Bing Zhao [Sat, 14 Dec 2013 02:32:59 +0000 (18:32 -0800)]
mwifiex: send regulatory domain info to firmware only if alpha2 changed
On cfg80211 regulatory domain change, drivers gets alpha2 country
code or "00" in driver's notification handler.
In most cases, the pattern will be US, 00, US, 00, US, 00, US, ...
There is no need to send domain info to firmware in case of "00" or
with the same alpha2 country code.
Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Lorenzo Bianconi [Thu, 12 Dec 2013 17:10:16 +0000 (18:10 +0100)]
ath9k: fix 5/10MHz channel width initialization on ar9003
Move ath9k_hw_set_rfmode() after ath9k_hw_process_ini() in order to avoid
AR_PHY_MODE register is overwritten with default values by
ar9003_hw_process_ini()
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
The struct brcmf_sdio_dev contains array of sdio functions that
are used in the driver. However, during probe func[0] entry was
assigned to the function 1 reference. This was corrected upon
doing the actual I/O access. This patch makes it more clear by
creating the func[0] entry properly and use it as is during
I/O access.
Reviewed-by: Franky Lin <frankyl@broadcom.com> Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Hante Meuleman [Thu, 12 Dec 2013 10:59:03 +0000 (11:59 +0100)]
brcmfmac: Combine protocol push hdr and bus txdata.
For the transmission of data a protocol push hdr is performed
followed by a bus txdata call. For the new protocol msgbuf this
is not workable. Since they are already "loosely" coupled for
bcdc protocol they are combined. This means that txdata will
go "through" the protocol layer and a seperate protocol push
hdr will not be needed anymore.
Reviewed-by: Arend Van Spriel <arend@broadcom.com> Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Hante Meuleman [Thu, 12 Dec 2013 10:59:02 +0000 (11:59 +0100)]
brcmfmac: Add definition of new protocol layer msgbuf.
A new protocol layer msgbuf will be added in the future. This
change makes it possible to select the desired layer by the
bus driver. USB and SDIO will select BCDC. At the moment
nothing is being done with this information.
Reviewed-by: Arend Van Spriel <arend@broadcom.com> Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Hante Meuleman [Thu, 12 Dec 2013 10:59:01 +0000 (11:59 +0100)]
brcmfmac: Fix hex dump for FWIL.
The debug function brcmf_dbg_hex_dump API got changed and the
information string should preferably contain a \n at the end
of the string. Update the FWIL so debug output looks better.
Reviewed-by: Arend Van Spriel <arend@broadcom.com> Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Hante Meuleman [Thu, 12 Dec 2013 10:59:00 +0000 (11:59 +0100)]
brcmfmac: Move common BCDC code in single function.
The BCDC functions query_dcmd and set_dcmd both create a msgbuf to
be sent to dongle this code is very similar and for optimisation
best put in a function.
Reviewed-by: Arend Van Spriel <arend@broadcom.com> Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Arend van Spriel [Thu, 12 Dec 2013 10:58:59 +0000 (11:58 +0100)]
brcmfmac: reduce function parameters in sdio send/receive calls
The SDIO send and receive functions in bcmsdh.c are always called
with the same parameters. For the driver there is no use-case
to call them otherwise so remove those parameters from function
prototypes.
Reviewed-by: Franky Lin <frankyl@broadcom.com> Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Arend van Spriel [Thu, 12 Dec 2013 10:58:58 +0000 (11:58 +0100)]
brcmfmac: use consistent function names in bcmsdh.c
Functions in bcmsdh.c that are called with struct brcmf_sdio_dev
instance are renamed consistently with brcmf_sdiod_ prefix. Also
removing brcmf_sdioh_attach/detach() functions and merge it with
brcmf_sdiod_probe/remove().
Reviewed-by: Franky Lin <frankyl@broadcom.com> Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Arend van Spriel [Thu, 12 Dec 2013 10:58:57 +0000 (11:58 +0100)]
brcmfmac: remove brcmf_sdio_wdtimer_enable() function
Instead of using the brcmf_sdio_wdtimer_enable() function
call brcmf_sdbrcm_wd_timer() directly.
Reviewed-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Arend van Spriel [Thu, 12 Dec 2013 10:58:56 +0000 (11:58 +0100)]
brcmfmac: get rid of some void pointer parameters
In sdio code a couple of functions use a void pointer as argument
type although it should be struct brcmf_sdio. Changing the functions
to have proper type checking.
Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Reviewed-by: Franky Lin <frankyl@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Arend van Spriel [Thu, 12 Dec 2013 10:58:55 +0000 (11:58 +0100)]
brcmfmac: remove regs parameter from sdio probe functions
The chip recognition requires a base address that was provided
to it during the probe. However, the address is a fixed define
value so it is unnecessary to pass through the probe functions.
Reviewed-by: Franky Lin <frankyl@broadcom.com> Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Arend van Spriel [Thu, 12 Dec 2013 10:58:53 +0000 (11:58 +0100)]
brcmfmac: use sdio functions to enable/disable F2
Instead of catching CCCR_IOEx register in F0 write access to
determine whether F2 state needs to change do it with direct
call to sdio_[enable/disable]_func().
Reviewed-by: Franky Lin <frankyl@broadcom.com> Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
During the SDIO probe the func_cis_ptr attribute in struct brcmf_sdio_dev
is being determined, but it is never used after that. Removing it also
obsoletes two functions in bcmsdh.c.
Reviewed-by: Franky Lin <frankyl@broadcom.com> Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Arend van Spriel [Thu, 12 Dec 2013 10:58:51 +0000 (11:58 +0100)]
brcmfmac: remove unnecessary function prototypes
With the merge of bcmsdh.c and bcmsdh_mmc.c several function prototypes
are no longer necessary and can be removed. Consequence is reordering
some of the functions.
Reviewed-by: Franky Lin <frankyl@broadcom.com> Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
net: wirelesse: wcn36xx: pull allocation outside of critical section
Commit [3469adb3: fix potential NULL pointer dereference] introduced
a check of msg_ind allocation, but omitted allocation of msg_ind->msg.
Moreover, it introduced two if statements, which looked a bit clunky.
This commit moves allocation code outside of the critical section so
there's no need to dance around mutex_unlock, and adds the missing
allocation check.
Signed-off-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Eyal Shapira [Mon, 16 Dec 2013 23:08:50 +0000 (01:08 +0200)]
iwlwifi: mvm: rs: fix RTS protection being set indefinitely
RTS protection was turned on once aggregation was enabled but it
was never turned off. Remove turning on RTS protection in the LQ command
completely as TX_CMD_FLG_PROT_REQUIRE gets set in iwl_mvm_set_tx_cmd
for every Tx which is part of an aggregation. This would already cause
RTS protection to be used during aggregations.
Eyal Shapira [Wed, 11 Dec 2013 07:32:28 +0000 (09:32 +0200)]
iwlwifi: mvm: rs: disable MCS9 Tx workaround
MCS9 introduces some corner cases in the current rs
algorithm which may lead to non optimal throughput and
instability in the throughput. Until all the corner
cases are resolved disable MCS9 for Tx as a workaround
which yields better throughput results as MCS8 is much
more stable.
Ilan Peer [Wed, 4 Dec 2013 14:47:14 +0000 (16:47 +0200)]
iwlwifi: mvm: Do not allow AP MAC context update if not active
Fix a regression introduced in "iwlwifi: mvm: fix ht protection flags"
where an AP/IBSS MAC context could have been updated even before the
context was added to the FW. This fix avoids the following warning:
Extract the scale action decision to a different function
in preparation of modifying it. While at it also convert
the scale action values from hardcoded values to a clear enum.
Eyal Shapira [Tue, 10 Dec 2013 10:20:37 +0000 (12:20 +0200)]
iwlwifi: mvm: rs: remove unnecessary debug logs
The logs are emitted in a flow in which there were retries
and the rates in the rate table entry didn't match the active
or search table. This doesn't indicate a problem and is
expected in most cases where there will be retries for some
reason. Remove the logs.
Eyal Shapira [Mon, 9 Dec 2013 11:02:56 +0000 (13:02 +0200)]
iwlwifi: mvm: rs: improve rates table algo
The new logic will attempt more rates with less retries
per rate. Also when starting off with MIMO it will
fallback to SISO with the same MCS and only then to Legacy.
Previously we fell back directly to Legacy.
Eyal Shapira [Mon, 9 Dec 2013 09:14:11 +0000 (11:14 +0200)]
iwlwifi: mvm: rs: avoid recalc of supported legacy rate mask
The supported legacy rate mask is initialized when rs
is initialized based on the remote peer supported rates.
There's no need to re mask it repeatedly with the supported
remote peer rates.
Eyal Shapira [Wed, 4 Dec 2013 00:15:46 +0000 (02:15 +0200)]
iwlwifi: mvm: rs: refactor building the LQ command
Simplify the code a bit more by extracting the rates table
building logic into a separate function and handle setting
a fixed rate for debug in a separate flow.
Also avoid using and saving ucode rate format in different
places. Instead use rs_rate struct and convert to ucode format
only when filling the rates table in the LQ command.
Alexander Bondar [Tue, 12 Nov 2013 12:47:59 +0000 (14:47 +0200)]
iwlwifi: mvm: Add and examine TLV flag for P2P client uAPSD support
Current firmware doesn't handle well uAPSD in P2P Client.
When it will be fixed, the firmware will set a TLV flag to notify
the driver that uAPSD is supported in P2P client mode.
Check this flag when sending power command for P2P client.
Signed-off-by: Alexander Bondar <alexander.bondar@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Arik Nemtsov [Sun, 1 Dec 2013 11:50:40 +0000 (13:50 +0200)]
iwlwifi: trans: prevent reprobe on repeated FW errors before restart
In case a sync command timeouts or Tx is stuck while a FW error
interrupt arrives, we might call iwl_op_mode_nic_error twice before
a restart has been initiated. This will cause a reprobe. Unify calls
to this function at the transport level and only call it on the first
FW error in a given by checking the transport FW error flag.
While at it, remove the privately defined iwl_nic_error from PCIE code
and use the common callback instead.
Eyal Shapira [Tue, 3 Dec 2013 16:34:52 +0000 (18:34 +0200)]
iwlwifi: mvm: rs: move rs_program_fix_rate to cleanup ifdefs
Move rs_program_fix_rate right before it's caller where we're
already in the context of an ifdef CPTCFG_MAC80211_DEBUGFS so
we can get rid of the extra ifdefs surrounding the original
location.
Arik Nemtsov [Sun, 1 Dec 2013 11:02:18 +0000 (13:02 +0200)]
iwlwifi: trans: prevent tx and cmds during FW error
Stop Tx and commands from arriving to the transport layer when a FW
error has occurred. A HW recovery should take place before. Remove
transport specific checks of the same nature (note that not all
transports were protected).
Arik Nemtsov [Sun, 1 Dec 2013 10:30:38 +0000 (12:30 +0200)]
iwlwifi: trans: use a unified transport status
The same bits are employed in all transport layers. Put the status
field in the common transport layer. This allows us to employ them
in common transport code.
Arik Nemtsov [Sun, 24 Nov 2013 17:10:46 +0000 (19:10 +0200)]
iwlwifi: trans: divide stop_hw into stop_device/op_mode_leave
The stop_hw trans callback is not well defined. It is missing in many
cleanup flows and the division of labor between stop_device/stop_hw
is cumbersome. Remove stop_hw and use stop_device to perform both.
Implement this for all current transports.
PCIE needs some extra configuration the op-mode is leaving to configure
RF kill. Expose this explicitly as a new op_mode_leave trans callback.
Take the call to stop_device outside iwl_run_mvm_init_ucode, this
makes more sense and WARN when we want to run the INIT firmware while
it has run already.
iwlwifi: mvm: Enable power save on a single P2P client interface
Enable power save on P2P client interface only if it is the
only bound interface.
Avoid using uAPSD if P2P client is associated to GO that uses
opportunistic power save. This is due to current FW limitation.
Signed-off-by: Alexander Bondar <alexander.bondar@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Alexander Bondar [Wed, 23 Oct 2013 09:50:34 +0000 (11:50 +0200)]
iwlwifi: mvm: Disable power save for monitor interface
When monitor interface is activated device power save needs
to be disabled.
Re-consider power management status on other active
interfaces when monitor interface is bound or unbound.
Signed-off-by: Alexander Bondar <alexander.bondar@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Alexander Bondar [Tue, 27 Aug 2013 17:31:48 +0000 (20:31 +0300)]
iwlwifi: mvm: Change power management dependency on multi MAC
FW still does not support power management on multiple MAC interfaces.
Currently the driver enforce this limitation by disabling PM if second
interface is added. Change this behavior to allow PM on a single interface
even if other interfaces exist but not bound to any specific PHY.
PM will be enabled if only one single interface is bound.
Signed-off-by: Alexander Bondar <alexander.bondar@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Alexander Bondar [Sun, 14 Apr 2013 17:59:37 +0000 (20:59 +0300)]
iwlwifi: mvm: Add uAPSD misbehaving AP notification handling
FW implements protective algorithm to identify AP's improper uAPSD
behavior. FW sends misbehaving AP notification in this case.
Add this notification handling. Avoid using uAPSD in next association
to the exactly same AP. Refactor iwl_mvm_power_build_cmd() to move
uAPSD related code to a separate function.
Signed-off-by: Alexander Bondar <alexander.bondar@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Eyal Shapira [Tue, 12 Nov 2013 20:40:40 +0000 (22:40 +0200)]
iwlwifi: publish Tx STBC support in VHT
If the device is MIMO and VHT capable it supports Tx STBC.
Unlike HT, any chip that supports VHT also support STBC so
no need for a config parameter.
Using num_of_ants multiple times warranted caching it.
Eyal Shapira [Sun, 3 Nov 2013 08:04:08 +0000 (10:04 +0200)]
iwlwifi: set VHT beamformee STS cap correctly
It was set to zero which reflects support of a single STS.
Set according to the number of Rx antennas which correctly
reflects the number of STSs the STA can receive in a VHT NDP.
This improves beamforming and has been tested to improve Rx
throughput.
Max Stepanov [Tue, 27 Aug 2013 16:56:13 +0000 (19:56 +0300)]
iwlwifi: mvm: add a generic cipher scheme support
This patch adds a cipher scheme support to extend a set of
the supported ciphers. The driver reads a cipher scheme list TLV
from FW image and passes it to mac80211 on hw registration.
After the cipher schemes are registered the driver handles key
installation and Tx/Rx calls related to the new ciphers.
Signed-off-by: Max Stepanov <Max.Stepanov@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Send firmware a Smart FIFO Configuration host command to allow
interrupt coalescing. The smart FIFO is enabled when there is
only one bound interface (other than p2p devices which are
ignored) and it is of type station, and activated while the
station is associated.
Smart Fifo allows aggragations of DMA transactions and by that
causes processor and memory controller to stay for a longer time
on lower c-states, thus saving platform power.
Firmware relies on driver to activate and disable it.
Janusz Dziedzic [Thu, 5 Dec 2013 19:42:58 +0000 (20:42 +0100)]
nl80211: add VHT support for set_bitrate_mask
Add VHT MCS/NSS set support for nl80211_set_tx_bitrate_mask().
This should be used mainly for test purpose, to check
different MCS/NSS VHT combinations.
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Luciano Coelho [Fri, 13 Dec 2013 19:13:51 +0000 (21:13 +0200)]
mac80211: align ieee80211_ibss_csa_beacon() with ieee80211_assign_beacon()
The return value of ieee80211_ibss_csa_beacon is not aligned with the
return value of ieee80211_assign_beacon(). For consistency and to be
able to use both functions with similar code, change
ieee80211_ibss_csa_beacon() not to send the bss changed notification
itself, but return what has changed so the caller can send the
notification instead.
Tested by: Simon Wunderlich <sw@simonwunderlich.de>
Acked by: Simon Wunderlich <sw@simonwunderlich.de> Signed-off-by: Luciano Coelho <luciano.coelho@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Thomas Pedersen [Sun, 15 Dec 2013 21:14:16 +0000 (13:14 -0800)]
mac80211: update adjusting TBTT bit in beacon
This regression was introduced in "mac80211: cache mesh
beacon".
mesh_sync_offset_adjust_tbtt() was assuming that the
beacon would be rebuilt in every single pre-tbtt
interrupt, but now the beacon update happens on the
workqueue, and it must be ready for immediate delivery to
the driver.
Save a pointer to the meshconf IE in the beacon_data (this
works because both the IE pointer and beacon buffer are
protected by the same rcu_{dereference,assign_pointer}())
for quick updates during pre-tbtt. This is faster and a
little prettier than iterating over the elements to find
the meshconf IE every time.
Signed-off-by: Thomas Pedersen <thomas@cozybit.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
David Spinadel [Sun, 8 Dec 2013 19:48:57 +0000 (21:48 +0200)]
mac80211: reschedule sched scan after HW restart
Keep the sched scan req when starting sched scan, and reschedule
it in case of HW restart during sched scan.
The upper layer don't have to know about the restart.
Signed-off-by: David Spinadel <david.spinadel@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Wed, 4 Dec 2013 22:47:09 +0000 (23:47 +0100)]
mac80211: free all AP/VLAN keys at once
When the AP interface is stopped, free all AP and VLAN keys at
once to only require synchronize_net() once. Since that does
synchronize_net(), also move two such calls into the function
(using the new force_synchronize parameter) to avoid doing it
twice.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Wed, 4 Dec 2013 22:18:37 +0000 (23:18 +0100)]
mac80211: optimise mixed AP/VLAN station removal
Teach sta_info_flush() to optionally also remove stations
from all VLANs associated with an AP interface to optimise
the station removal (in particular, synchronize_net().)
To not have to add the vlans argument throughout, do some
refactoring.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Wed, 4 Dec 2013 22:12:31 +0000 (23:12 +0100)]
mac80211: optimise synchronize_net() for sta_info_flush
There's no reason to have one synchronize_net() for each
removed station, refactor the code slightly to have just
a single synchronize_net() for all stations.
Note that this is currently useless as hostapd removes
stations one by one and this coalescing never happens.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Wed, 4 Dec 2013 22:05:45 +0000 (23:05 +0100)]
mac80211: move synchronize_net() before sta key removal
There's no reason to do this inside the sta key removal
since the keys can only be reached through the sta (and
not by the driver at all) so once the sta can no longer
be reached, the keys are safe.
This will allow further optimisation opportunities with
multiple stations.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Wed, 4 Dec 2013 21:46:11 +0000 (22:46 +0100)]
mac80211: don't delay station destruction
If we can assume that stations are never referenced by the
driver after sta_state returns (and this is true since the
previous iwlmvm patch and for all other drivers) then we
don't need to delay station destruction, and don't need to
play tricks with rcu_barrier() etc.
This should speed up some scenarios like hostapd shutdown.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Wed, 4 Dec 2013 19:11:06 +0000 (20:11 +0100)]
mac80211: move 4-addr sta pointer clearing before synchronize_rcu()
The pointer should be cleared before synchronize_rcu() so that the
consequently dead station won't be found by any lookups in the TX
or RX paths.
Also check that the station is actually the one being removed, the
check is not needed because each 4-addr VLAN can only have a single
station and non-4-addr VLANs always have a NULL pointer there, but
the code is clearer this way (and we avoid the memory write.)
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Wed, 4 Dec 2013 21:39:17 +0000 (22:39 +0100)]
iwlwifi: mvm: use pre-RCU-sync sta removal operation
iwlmvm relies on the current mac80211 behaviour of allowing
station pointers to be valid for an RCU grace period after
returning from the sta_state() callback. To optimise these
cases, this behaviour is going away, so make the driver use
the new sta_pre_rcu_remove() method to clear the pointer in
the fw_id_to_mac_id[] array.
Since this may happen while the station is still present in
the firmware, don't set the pointer to NULL but to -ENOENT
to mark this particular case. In client mode, the station
is kept even longer (until marking the MAC as unassociated)
so the drain flow must take this new behavior into account.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Wed, 4 Dec 2013 21:39:17 +0000 (22:39 +0100)]
mac80211: add pre-RCU-sync sta removal driver operation
Currently, mac80211 allows drivers to keep RCU-protected station
references that are cleared when the station is removed from the
driver and consequently needs to synchronize twice, once before
removing the station from the driver (so it can guarantee that
the station is no longer used in TX towards the driver) and once
after the station is removed from the driver.
Add a new pre-RCU-synchronisation station removal operation to
the API to allow drivers to clear/invalidate their RCU-protected
station pointers before the RCU synchronisation.
This will allow removing the second synchronisation by changing
the driver API so that the driver may no longer assume a valid
RCU-protected pointer after sta_remove/sta_state returns.
The alternative to this would be to synchronize_rcu() in all the
drivers that currently rely on this behaviour (only iwlmvm) but
that would defeat the purpose.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Nick Kossifidis [Sat, 7 Dec 2013 02:17:40 +0000 (02:17 +0000)]
ath5k: Reset Tx interrupt bits also on PISR
Some cards don't update the PISR properly when all SISR bits
for Tx interrupts are being cleared and as a result we get
interrupt storm. Since we handle all tx queues all together
(so we don't really use the SISR bits to do per-queue interrupt
handling), we can manualy update PISR by doing a write-to-clear
on its Tx interrupt bits.
Signed-off-by: Nick Kossifidis <mickflemm@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Jeff Kirsher [Fri, 6 Dec 2013 16:56:16 +0000 (08:56 -0800)]
nfc: Fix FSF address in file headers
Several files refer to an old address for the Free Software Foundation
in the file header comment. Resolve by replacing the address with
the URL <http://www.gnu.org/licenses/> so that we do not have to keep
updating the header comments anytime the address changes.
CC: linux-wireless@vger.kernel.org CC: Lauro Ramos Venancio <lauro.venancio@openbossa.org> CC: Aloisio Almeida Jr <aloisio.almeida@openbossa.org> CC: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Jeff Kirsher [Fri, 6 Dec 2013 11:32:14 +0000 (03:32 -0800)]
rfkill: Fix FSF address in file headers
Several files refer to an old address for the Free Software Foundation
in the file header comment. Resolve by replacing the address with
the URL <http://www.gnu.org/licenses/> so that we do not have to keep
updating the header comments anytime the address changes.
CC: linux-wireless@vger.kernel.org Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Jeff Kirsher [Fri, 6 Dec 2013 11:32:13 +0000 (03:32 -0800)]
drivers/net/wireless: Fix FSF address in file headers
Several files refer to an old address for the Free Software Foundation
in the file header comment. Resolve by replacing the address with
the URL <http://www.gnu.org/licenses/> so that we do not have to keep
updating the header comments anytime the address changes.
CC: linux-wireless@vger.kernel.org CC: Simon Kelley <simon@thekelleys.org.uk> CC: Christian Lamparter <chunkeey@googlemail.com> CC: Jussi Kivilinna <jussi.kivilinna@iki.fi> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Jeff Kirsher [Fri, 6 Dec 2013 11:32:12 +0000 (03:32 -0800)]
prism54: Fix FSF address in file headers
Several files refer to an old address for the Free Software Foundation
in the file header comment. Resolve by replacing the address with
the URL <http://www.gnu.org/licenses/> so that we do not have to keep
updating the header comments anytime the address changes.
CC: linux-wireless@vger.kernel.org CC: "Luis R. Rodriguez" <mcgrof@gmail.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Jeff Kirsher [Fri, 6 Dec 2013 11:32:11 +0000 (03:32 -0800)]
rt2x00: Fix FSF address in file headers
Several files refer to an old address for the Free Software Foundation
in the file header comment. Resolve by replacing the address with
the URL <http://www.gnu.org/licenses/> so that we do not have to keep
updating the header comments anytime the address changes.
CC: linux-wireless@vger.kernel.org CC: Ivo van Doorn <IvDoorn@gmail.com> CC: Gertjan van Wingerde <gwingerde@gmail.com> CC: Helmut Schaa <helmut.schaa@googlemail.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Jeff Kirsher [Fri, 6 Dec 2013 11:32:10 +0000 (03:32 -0800)]
zd1211rw: Fix FSF address in file headers
Several files refer to an old address for the Free Software Foundation
in the file header comment. Resolve by replacing the address with
the URL <http://www.gnu.org/licenses/> so that we do not have to keep
updating the header comments anytime the address changes.
CC: linux-wireless@vger.kernel.org CC: Daniel Drake <dsd@gentoo.org> CC: Ulrich Kunitz <kune@deine-taler.de> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johan Hedberg [Tue, 10 Dec 2013 08:52:48 +0000 (10:52 +0200)]
Bluetooth: Fix handling of L2CAP Command Reject over LE
If we receive an L2CAP command reject message over LE we should take
appropriate action on the corresponding channel. This is particularly
important when trying to interact with a remote pre-4.1 system using LE
CoC signaling messages. If we don't react to the command reject the
corresponding socket would not be notified until a connection timeout
occurs.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
ath9k: Use a separate TX gain table for WZR-HP-G450H
The Buffalo device WZR-HP-G450H uses the index 3 for TX gain,
which is set to the high_power table currently. Later variants
of the router use the same index, but instead refer to the
low_ob_db gain table. This is not handled in the driver since
there is no way to distinguish board revisions and the high_power
table is used (incorrectly) for the newer variants.
By default, devices based on AR9300 using the TX gain index 3 have
to use the high_power table. To make sure that WZR-HP-G450H is not
broken when the high_power table is updated, use a separate array
based on information obtained from the platform data.
The current situation where only the original variant of WZR-HP-G450H
works properly stays unchanged.
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>