Andrea Merello [Mon, 30 Jun 2014 16:19:10 +0000 (18:19 +0200)]
rtl8180: disable buggy rate fallback mechanism
Currently the driver configures mac80211 to provide two rates for each TX frame:
One initial rate and one alternate fallback rate, each one with its retry count.
HW does not support fully this: rtl8180 doesn't have support for rate scaling at
all, and rtl8185/rtl8187SE supports it in a way that does not fit with mac80211:
The HW does automatically fall back to the next lower rate, and only a lower
limit can be specified, so the HW may TX also on rates in between the two rates
specified by mac80211. Furthermore only the total TX retry count can be
specified for each packet, while the number of TX attempts before scaling rate
can be configured only globally (not per each packet).
Currently the driver sets the HW auto rate fallback mechanism to quickly scale
rate after a couple of retries, and it uses the alternate rate requested by
mac80211 as fallback limit rate (and it does this even wrongly).
The HW indeed will behave differently than what mac80211 mandates, that is
probably undesirable, and the reported TX retry count may not refer to what
mac80211 thinks, and this could fool mac80211.
This patch makes the driver to declare to mac80211 to support only one rate
configuration for each packet, and it does disable the HW auto rate fallback
mechanism, relying only on SW and letting mac80211 to do all by itself.
This should ensure correct operation and fairness respect to mac80211.
Indeed here tests with iperf do not show significant performance differences.
Signed-off-by: Andrea Merello <andrea.merello@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Andrea Merello [Mon, 30 Jun 2014 16:18:55 +0000 (18:18 +0200)]
rtl8180: fix incorrect TX retry.
HW is programmed with wrong retry count value for TX:
Mac80211 passes to driver the number of times the TX should be attempted.
The HW, instead, wants the number of time the TX should be retried if it fails
the first time (assuming we have to TX it at least one time).
This patch correct this.
Signed-off-by: Andrea Merello <andrea.merello@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Andrea Merello [Mon, 30 Jun 2014 16:18:36 +0000 (18:18 +0200)]
rtl818x_pci: add comment pointing to the rtl8187se reference code
Rtl8187se support has been added to the rtl818x_pci driver by extracting a lot
of information from a rtl8187se Linux staging driver included in the kernel at
the time rtl8187se support was added.
The rtl818x_pci main file has a comment that advertises this.
Recently this staging driver has been removed from the kernel, but I still feel
it can be useful as "reference" code (in case of bugs, or to implement
improvements in rtl818x_pci driver).
This one-line patch adds a comment in rtl818x_pci driver to point people
searching for that "reference code" to the last kernel version still containing
it (3.14).
Signed-off-by: Andrea Merello <andrea.merello@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Andrea Merello [Mon, 30 Jun 2014 16:18:25 +0000 (18:18 +0200)]
rtl818x_pci: Fix rtl8185 excessive IFS after CTS-to-self
Measuring time between _end_ of CTS-to-self and _end_ of datapacket (with a
prism54 board and mac80211 hacked to let the MAC timestamp stay untouched in the
radiotap header) resulted in about 300uS, while the datapacket itself should be
by far shorter (less than 100uS) and IFS should be SIFS (10uS).
This measure was confirmed whith a scope: about 250uS IFS has been seen between
the two packets.
This situation causes the CTS-to-self protection mechanism to work incorrectly
due to the NAV expiring during, or even before beginning, the packet
transmission, and it also causes the performances to be anyway reduced due to
time waste.
This problem has been seen at every packet TXed with CTS-to-self enabled on
rtl8185 board.
rtl8187se seems not affected (and rtl8180, being a 802.11b card, does not have
CTS-to-self mechaninsm).
This patch fixes this by adding a magic register write, making the board wait
for correct SIFS after CTS-to-self packet.
Signed-off-by: Andrea Merello <andrea.merello@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Andrea Merello [Mon, 30 Jun 2014 16:17:48 +0000 (18:17 +0200)]
rtl818x_pci: Fix BSSID register written incorrectly
BSSID register was written with six byte-writes.
It seems that, similarly to what happens with MAC registers, they needs to be
written with one 16-bit and one 32-bit writes, otherwise the write does not work.
The byte write didn't work only on my rtl8185, while it worked on rtl8180 and
rtl8187se, BTW since there are probably a number of different ASIC revisions out
of there, I let the change to affect all cards.
It shouldn't hurt anyway.
Signed-off-by: Andrea Merello <andrea.merello@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Fabian Frederick [Sat, 28 Jun 2014 12:18:52 +0000 (14:18 +0200)]
drivers/net/wireless/ipw2x00/libipw_module.c: remove unnecessary null test before kfree
Fix checkpatch warning:
WARNING: kfree(NULL) is safe this check is probably not required
Cc: Stanislav Yakovlev <stas.yakovlev@gmail.com> Cc: "John W. Linville" <linville@tuxdriver.com> Cc: linux-wireless@vger.kernel.org Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: John W. Linville <linville@tuxdriver.com>
rsi: fix memory leaks and error handling in rsi_91x_usb
The patch fixes a couple of issues:
- absence of deallocation of rsi_dev->rx_usb_urb[0] in the driver;
- potential NULL pointer dereference because of lack of checks for memory
allocation success in rsi_init_usb_interface().
By the way, it makes rsi_probe() returning error code instead of 1
and fixes comments regarding returning values.
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Right now sleep duration is configured as beacon interval. It should be
the multiple of beacon interval by listen period which helps to
reduce station power consumption.
Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Earlier the listen interval is used to decide switching between
operating and off-channels during bgscan and to improve throughput,
the listen interval is reduced to 1. After optimiztion in scan
state machine, listen period is not used for decision making and
hence reverting it back to original value.
Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
The beacon configurations are not cached properly after the station
associates with AP. Not handling BEACON_INFO, is failing to update
dtim period and also it is causing below warning message.
Thomas Gleixner [Thu, 12 Jun 2014 07:31:34 +0000 (08:31 +0100)]
wireless: mwifiex: Use the proper interfaces
Why is converting time formats so desired if there are proper
interfaces for this?
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Bing Zhao <bzhao@marvell.com> Cc: "John W. Linville" <linville@tuxdriver.com> Cc: linux-wireless@vger.kernel.org Signed-off-by: John W. Linville <linville@tuxdriver.com>
Thomas corrected me on that I misunderstood Johannes' comment
for net_timedelta() and the ktime_get_real() usage inside
__net_timestamp().
Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Johannes Berg <johannes@sipsolutions.net> Cc: John W. Linville <linville@tuxdriver.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
p54: use request_firmware_direct() for optional EEPROM override
The p54 driver uses request_firmware() twice, once for actual
firmware and then another time for an optional user overide on
EEPROM, 3826.eeprom. The custom EEPROM is optional but if not
present we'll introduce an extra lag of 60 seconds with udev
present. Annotate we don't want udev nonsense here to avoid
the lag in case its not present.
- ret = request_firmware(&cf, config_file, dev);
+ ret = request_firmware_direct(&cf, config_file, dev);
if (ret < 0) {
... when != goto l;
when != return ret;
when any
} else {
...
release_firmware(cf);
...
}
Cc: Takashi Iwai <tiwai@suse.de> Cc: Christian Lamparter <chunkeey@googlemail.com> Cc: linux-wireless@vger.kernel.org Cc: cocci@systeme.lip6.fr Signed-off-by: Luis R. Rodriguez <mcgrof@suse.com> Acked-By: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Tue, 24 Jun 2014 08:50:41 +0000 (10:50 +0200)]
b43: update list and code making a selection of firmware files
Clean ucode selection, fix choice of firmware for LCN, drop some goto-s,
add new devices.
Tested on 14e4:4312, 14e4:4315, 14e4:4328, 14e4:432b, 14e4:4353.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
For consistency with other drivers, replace a magic number by a macro.
Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se> Reviewed-by: Peter Wu <peter@lekensteyn.nl> Signed-off-by: John W. Linville <linville@tuxdriver.com>
For consistency with other drivers, replace a magic number by a macro.
Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se> Reviewed-by: Peter Wu <peter@lekensteyn.nl> Signed-off-by: John W. Linville <linville@tuxdriver.com>
bt_msr & 0xfc will never match 0x3. Fix this by using a mask that actually matches the available types.
Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se> Reviewed-by: Peter Wu <peter@lekensteyn.nl> Signed-off-by: John W. Linville <linville@tuxdriver.com>
rtlwifi/rtl8192c[eu]: Fix media status register mask
bt_msr & 0xfc will never match 0x3. Fix this by using a mask that actually matches the available types.
Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se> Reviewed-by: Peter Wu <peter@lekensteyn.nl> Signed-off-by: John W. Linville <linville@tuxdriver.com>
bt_msr & 0xfc will never match 0x3. Fix this by using a mask that actually matches the available types.
Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se> Reviewed-by: Peter Wu <peter@lekensteyn.nl> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Arend van Spriel [Sat, 21 Jun 2014 10:11:19 +0000 (12:11 +0200)]
brcmfmac: reduce log level in fwil if firmware returns error
The users of the fwil put an error message in the log so there is
no need to do the same in the lower level functions in fwil when
the firmware on the device returns an error. Some errors can be
ignored for the driver to function and this will avoid driver users
to point at the low-level error message as potential bug.
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>
Daniel Kim [Sat, 21 Jun 2014 10:11:18 +0000 (12:11 +0200)]
brcmfmac: Don't control mpc setting during scan operation
Instead of controlling mpc setting during scan operation, initialize
mpc setting and then let firmware take care of it.
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Daniel Kim <dekim@broadcom.com>
[arend@broadcom.com: keep mpc setting for bcm4329] Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Arend van Spriel [Sat, 21 Jun 2014 10:11:17 +0000 (12:11 +0200)]
brcmfmac: correct logging levels in btcoex source
All log messages were set to TRACE level, which is intended
for function entry and exit. Using INFO instead in other
places. Also reducing an error message that always popped
up upon module unload.
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Franky Lin [Sat, 21 Jun 2014 10:11:16 +0000 (12:11 +0200)]
brcmfmac: replace cfg80211 testmode with vendor command
Passing a pointer from user space and using it directly in driver is not a
preferable behavior. Switch to cfg80211 vendor mode for dongle command for
better cross platform compatibility.
Reviewed-by: Daniel (Deognyoun) Kim <dekim@broadcom.com> Reviewed-by: Arend Van Spriel <arend@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Hante Meuleman [Sat, 21 Jun 2014 10:11:15 +0000 (12:11 +0200)]
brcmfmac: Change USB probe routine to support Composite USB
Some of the USB devices also have Bluetooth inside. These devices
can with specific firmware result in a composite USB device. This
change will update the driver such that it will also accept the
correct interface of composite devices. It is backward compatible
with old non-composite USB fw.
Reviewed-by: Arend Van Spriel <arend@broadcom.com> Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Daniel (Deognyoun) Kim <dekim@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 [Sat, 21 Jun 2014 10:11:14 +0000 (12:11 +0200)]
brcmfmac: clear ht info during attach phase
After updating 2G bandwidth capability clear ht info. This will be properly
set upon calling brcmf_update_wiphy_bands().
Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Reviewed-by: Daniel (Deognyoun) Kim <dekim@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>
Rasmus Villemoes [Sun, 22 Jun 2014 18:50:40 +0000 (20:50 +0200)]
net/wireless/brcm80211/brcmfmac: Make return type and name reflect actual semantics
Applying ++ to a bool is equivalent to setting it true, regardless of
its initial value (bools are not uint1_t). Hence the function
wl_get_vif_state_all can only ever return true/false. The only in-tree
caller uses its return value as a boolean. So update its return type,
and since the list traversal and bit testing have no side effects,
just return true immediately. Its return value tells if any vif is in
the specified state, so also rename it to brcmf_get_vif_state_any.
Reviewed-by: Arend van Spriel<arend@broadcom.com> Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Bing Zhao [Fri, 20 Jun 2014 04:38:58 +0000 (21:38 -0700)]
mwifiex: print sleep_confirm cmd/response and power save events
Sleep Confirm command is sent separately while other commands
are handled through cmd_pending_q. Print sleep_confirm cmd and
its response as well as power save events so that we have a
clearer picture of power save handshake in driver log.
Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Xinming Hu [Fri, 20 Jun 2014 04:38:56 +0000 (21:38 -0700)]
mwifiex: add hscfg to debugfs
Some SDIO controllers do not support MMC_PM_KEEP_POWER properly.
To test host sleep feature without putting the system into sleep
we need to simulate host sleep configuration & handshake between
driver and firmware using customized parameters.
This patch adds hscfg debugfs item, with which user could change
host sleep parameters for debugging.
Signed-off-by: Xinming Hu <huxm@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Amitkumar Karwar [Fri, 20 Jun 2014 04:38:53 +0000 (21:38 -0700)]
mwifiex: use generic 'iface_work' workqueue for SDIO interface
Existing dedicated card_reset work queue is replaced with the
interface specific workqueue pointer provided by mwifiex module.
Also new work flag is added for card reset task.
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Michal Kazior [Wed, 25 Jun 2014 10:35:09 +0000 (12:35 +0200)]
mac80211: use chanctx reservation for STA CSA
Channel switch finalization is now 2-step. First
step is when driver calls chswitch_done(), the
other is when reservation is actually finalized
(which be defered for in-place reservation).
It is now safe to call ieee80211_chswitch_done()
more than once.
Also remove the ieee80211_vif_change_channel()
because it is no longer used.
Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Michal Kazior [Wed, 25 Jun 2014 10:35:08 +0000 (12:35 +0200)]
mac80211: use chanctx reservation for AP CSA
Channel switch finalization is now 2-step. First
step is when driver calls csa_finish(), the other
is when reservation is actually finalized (which
can be deferred for in-place reservation).
It is now safe to call ieee80211_csa_finish() more
than once.
Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
David Spinadel [Thu, 6 Feb 2014 14:15:23 +0000 (16:15 +0200)]
mac80211: split sched scan IEs
Split sched scan IEs to band specific and not band specific
blocks. Common IEs blocks may be sent to the FW once per command,
instead of per band.
This allows optimization of size of the command, which may be
required by some drivers (eg. iwlmvm with newer firmware version).
As this changes the mac80211 API, update all drivers to use the
new version correctly, even if they don't (yet) make use of the
split data.
Signed-off-by: David Spinadel <david.spinadel@intel.com> Reviewed-by: Alexander Bondar <alexander.bondar@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
David Spinadel [Wed, 5 Feb 2014 13:21:13 +0000 (15:21 +0200)]
mac80211: support more than one band in scan request
Some drivers (such as iwlmvm) can handle multiple bands in a single
HW scan request. Add a HW flag to indicate that the driver support
this. To hold the required data, create a separate structure for
HW scan request that holds cfg scan request and data about
different parts of the scan IEs.
As this changes the mac80211 API, update all drivers using it to
use the correct new function type/argument.
Signed-off-by: David Spinadel <david.spinadel@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Wed, 30 Apr 2014 14:34:45 +0000 (16:34 +0200)]
iwlwifi: mvm: handle device start failures during restart
If the device fails during a restart, mac80211 now handles the
situation better but we still have a little bit of cleanup to
do in the driver - add the required code.
David Spinadel [Thu, 27 Feb 2014 14:41:52 +0000 (16:41 +0200)]
iwlwifi: mvm: support extended beacon notification
Use extended beacon notification when supported by FW.
Set last beacon system time to AP or GO interface.
System time of last beacon can be used to avoid TBTT overlapping
between two interfaces, CSA and other uses.
Signed-off-by: David Spinadel <david.spinadel@intel.com> Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
iwlwifi: mvm: Introduce an API to set STA_FLG_DISABLE_TX flag
Introduce new station flag STA_FLG_DISABLE_TX, which is modified with ADD_STA
command. This flag, when set, disables tx to the STA.
Provide an API (iwl_mvm_sta_modify_disable_tx) to modify this flag, which
should be used in channel switch and immediate quiet flows.
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Eliad Peller [Sun, 15 Jun 2014 08:12:38 +0000 (11:12 +0300)]
iwlwifi: mvm: disable beacon filtering escape timer in d0i3
The beacon filtering configuration in d0i3 currently uses
the max value defined as 1024. However, with beacon interval
of 100ms we end up with too-frequent wakeups.
Instead, configure the escape timer to 0, asking the fw
to disable it altogether.
iwlwifi: mvm: BT Coex - avoid the shared antenna for management frames
If BT is active, we need to refrain from using the shared
antenna. This logic is done in the firmware when we use the
link quality tables. But for management frames, the rate is
written in the Tx command by the driver.
Hence the driver needs to make sure not use the shared
antenna when BT is active for any frames that don't use
the rate scale table such as management frames or multicast.
Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
We can Tx in MIMO rates when we are in TxTx Disallow mode
just like we can when we are in Tight mode.
Same if we are in 5Ghz regardless of the mode we are.
Change the code to allow MIMO in these cases.
Liad Kaufman [Wed, 21 May 2014 11:37:00 +0000 (14:37 +0300)]
iwlwifi: mvm: assure no overflows occur while reading otp
Just in case sizes change in the OTP without proper SW
updating, an additional check is inserted when reading OTP
sections to assure no overflows occur.
Liad Kaufman [Sun, 1 Jun 2014 14:21:33 +0000 (17:21 +0300)]
iwlwifi: update trans->hw_rev 8000 hw family format
The format of the CSR_HW_REV register has changed in 8000
HW family. To keep backwards compatibility, we store the
value of this register as usual in trans->hw_rev, only we
store it in the old format in this variable.
iwlwifi: add device / firmware to fw-error-dump file
This can be useful later for parsing since the parsing may
differ based on the device's family / bus.
Also add the human readable version of the firmware.
Johannes Berg [Wed, 4 Jun 2014 08:13:50 +0000 (10:13 +0200)]
iwlwifi: mvm: add back support for low-priority scan
The low-priority scan feature can be useful, e.g. for OBSS
scans (if those are required by the AP); add back support
for it, restoring the maximum out time to the value it was
for low-priority scan before that was removed.
Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Arik Nemtsov [Wed, 11 Jun 2014 14:18:27 +0000 (17:18 +0300)]
mac80211: protect TDLS discovery session
After sending a TDLS discovery-request, we expect a reply to arrive on
the AP's channel. We must stay on the channel (no PSM, scan, etc.), since
a TDLS setup-response is a direct packet not buffered by the AP.
Add a new mac80211 driver callback to allow discovery session protection.
Arik Nemtsov [Wed, 11 Jun 2014 14:18:26 +0000 (17:18 +0300)]
mac80211: make sure TDLS peer STA exists during setup
Make sure userspace added a TDLS peer station before invoking the
transmission of the first setup frame. This ensures packets to the peer
won't go through the AP path.
Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Arik Nemtsov [Wed, 11 Jun 2014 14:18:24 +0000 (17:18 +0300)]
mac80211: implement proper Tx path flushing for TDLS
As the spec mandates, flush data in the AP path before transmitting the
first setup frame. Data packets transmitted during setup are already
dropped in the Tx path.
For the teardown flow, flush all packets in the direct path before
transmitting the teardown frame. Un-authorize the peer sta after teardown
is sent, forcing all subsequent Tx to the peer through the AP.
Make sure to flush the queues when disabling the link to get the
teardown packet out.
Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
[adjust to Luca's new quuee API and stop only vif queues] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Arik Nemtsov [Wed, 11 Jun 2014 14:18:23 +0000 (17:18 +0300)]
mac80211: split tdls_mgmt function
There are setup/teardown specific actions to be done that accompany
the sending of a TDLS management packet. Split the main function to
simplify future additions.
Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Arik Nemtsov [Wed, 11 Jun 2014 14:18:22 +0000 (17:18 +0300)]
mac80211: use TDLS initiator in tdls_mgmt operations
The TDLS initiator is set once during link setup. If determines the
address ordering in the link identifier IE.
Use the value from userspace in order to have a correct teardown packet.
With the current code, a teardown from the responder side fails the TDLS
MIC check because of a bad link identifier IE.
Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Arik Nemtsov [Wed, 11 Jun 2014 14:18:19 +0000 (17:18 +0300)]
mac80211: set auth flags after other station info
For TDLS, the AUTHORIZED flag arrives with all other important station
info (supported rates, HT/VHT caps, ...). Make sure to set the station
state in the low-level driver after transferring this information to
the mac80211 STA entry.
This aligns the STA information during sta_state callbacks with the
non-TDLS case.
Luciano Coelho [Fri, 13 Jun 2014 13:30:07 +0000 (16:30 +0300)]
mac80211: stop only the queues assigned to the vif during channel switch
Instead of stopping all the hardware queues during channel switch,
which is especially bad when we have large CSA counts, stop only the
queues that are assigned to the vif that is performing the channel
switch.
Additionally, check for (sdata->csa_block_tx) instead of calling
ieee80211_csa_needs_block_tx(), which can now be removed.
Signed-off-by: Luciano Coelho <luciano.coelho@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Luciano Coelho [Fri, 13 Jun 2014 13:30:06 +0000 (16:30 +0300)]
mac80211: add functions to stop and wake all queues assigned to a vif
In some cases we may want to stop the queues of a single vif (for
instance during a channel-switch). Add a function that stops all the
queues that are assigned to a vif. If a queue is assigned to more
than one vif, the corresponding netdev subqueue of the other vif(s)
will also be stopped. If the HW doesn't set the
IEEE80211_HW_QUEUE_CONTROL flag, then all queues are stopped.
Also add a corresponding function to wake the queues of a vif back.
Signed-off-by: Luciano Coelho <luciano.coelho@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Luciano Coelho [Fri, 13 Jun 2014 13:30:05 +0000 (16:30 +0300)]
mac80211: introduce refcount for queue_stop_reasons
Sometimes different vifs may be stopping the queues for the same
reason (e.g. when several interfaces are performing a channel switch).
Instead of using a bitmask for the reasons, use an integer that holds
a refcount instead. In order to keep it backwards compatible,
introduce a boolean in some functions that tell us whether the queue
stopping should be refcounted or not. For now, use not refcounted for
all calls to keep it functionally the same as before.
Signed-off-by: Luciano Coelho <luciano.coelho@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>