Commit graph

287330 commits

Author SHA1 Message Date
Felix Fietkau fe8431f89e mac80211: add an rx flag for ignoring a packet's signal strength
For A-MPDU rx it makes sense to only process the signal strength once per
aggregate instead of once per subframe. Additonally, some hardware (e.g.
Atheros) only provides valid signal strength information for the last
subframe.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-05 15:38:32 -05:00
Johannes Berg c04a4ff71b cfg80211: fix kernel-doc
I forgot to update the kernel-doc in my patch
to redesign AP mode APIs, fix that now.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-05 15:38:32 -05:00
Felix Fietkau 888d04dfbe mac80211: use compare_ether_addr on MAC addresses instead of memcmp
Because of the constant size and guaranteed 16 bit alignment, the inline
compare_ether_addr function is much cheaper than calling memcmp.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-05 15:38:31 -05:00
Felix Fietkau 4d196e4b2f mac80211: use 16 bit alignment for the if_ibss bssid field
Several MAC address comparison functions assume 16 bit alignment for pointers
passed to them. Since the addition of the control_port field, alignment
for the IBSS bssid was off by one, causing a severe performance hit on
architectures without efficient unaligned access (e.g. MIPS).

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-05 15:24:14 -05:00
Dan Carpenter 380aeef894 mwifiex: endian bug in mwifiex_drv_change_adhoc_chan()
In mwifiex_drv_change_adhoc_chan() we pass channel to
mwifiex_bss_ioctl_ibss_channel() which sets the high 16 bits.  This
works on little endian systems but not on big endian ones.  I've changed
mwifiex_drv_change_adhoc_chan() to use a 16 bit variable.  This matches
the other functions in the file.

I considered changing mwifiex_change_adhoc_chan() as well but it turns
out that the function isn't implemented so I just removed the
definition.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-05 15:24:14 -05:00
Max Filippov 62ebeed8d0 p54spi: Release GPIO lines and IRQ on error in p54spi_probe
This makes it possible to reload driver if insmod has failed due to
missing firmware.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Cc: stable <stable@vger.kernel.org>
Acked-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-05 15:23:17 -05:00
Jussi Kivilinna 461bc26c93 rndis_wlan: use u8 for key indexes
cfg80211 uses u8 for key indexes and so should rndis_wlan.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-05 15:23:17 -05:00
Jussi Kivilinna f096ce6d24 rndis_wlan: use RNDIS_WLAN_NUM_KEYS for all key index checks
Use new RNDIS_WLAN_NUM_KEYS for checks in add_wep_key() and add_wpa_key().

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-05 15:23:17 -05:00
Jussi Kivilinna f808e4ad05 rndis_wlan: fix le16/le32_to_cpu mix up with config.beacon_period
'beacon_period' in 'struct ndis_80211_conf' is __le32 instead of __le16 so
le32_to_cpu must be used instead of le16_to_cpu.

Also correct 'beacon_interval' variables used for passing this value forward
from u16 to u32 and rename those variables 'beacon_period' This is to avoid
confusion because 'beacon_interval' is defined as __le16 at other structure,
'struct ndis_80211_fixed_ies'.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-05 15:23:16 -05:00
Dan Carpenter e4e02da2ef rndis_wlan: prevent integer overflow in indication()
If we pick a high value for "offset" then it could lead to an integer
overflow and we would get past the check for:
	if (offset + len > buflen) { ...

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-05 15:23:16 -05:00
Dan Carpenter 551d6fe6cb rndis_wlan: make some variables unsigned
These variables can never be less than zero because we cap them in
get_device_pmkids().  Let's make them unsigned here because it's simpler
to not have to worry about negative numbers when we read the code.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-05 15:23:16 -05:00
Dan Carpenter b26e395038 rndis_wlan: remove unneeded variables
We never use the "len" variable.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-05 15:23:15 -05:00
Dan Carpenter 41eedf39df rndis_wlan: integer overflows in rndis_wlan_do_link_up_work()
If "offset" is negative then we can get past this check:
	if (offset > CONTROL_BUFFER_SIZE)
Or if we pick a very high "req_ie_len" then we can get around the check:
	if (offset + req_ie_len > CONTROL_BUFFER_SIZE)

I made "resp_ie_len" and "req_ie_len" unsigned.  I don't know if it was
intentional that they were signed in the original.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-05 15:23:15 -05:00
Ashok Nagarajan 5533513784 {nl,cfg,mac}80211: Implement RSSI threshold for mesh peering
Mesh peer links are established only if average rssi of the peer
candidate satisfies the threshold. This is not in 802.11s specification
but was requested by David Fulgham, an open80211s user. This is a way to avoid
marginal peer links with stations that are barely within range.

This patch adds a new mesh configuration parameter, mesh_rssi_threshold. This
feature is supported only for hardwares that report signal in dBm.

Signed-off-by: Ashok Nagarajan <ashok@cozybit.com>
Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-05 15:23:15 -05:00
Hauke Mehrtens 5809802180 b43: prevent firmware on bcm5354 from taking over wrong GPIO pins
When using the bcm5354 (Soc with integrated LP-PHY Wifi) with a recent
firmware >= 478.104 it runs out of memory after a very short time in
OpenWrt after doing an active scan or any thing else where packages are
send. This was cased by a gpio misconfiguration, the firmware triggered
the GPIO pins used for buttons on some devices and that caused an other
driver (OpenWrt diag) listening for these buttons irqs to send many
messages to the user space.
This patch fixes the bug for my devices (Asus WL-520GU) and makes it
work with firmware 666.2. Now the firmware just uses LED GPIO pin
number 1 and not the button pins any more.

This is the GPIO Pin layout used on my device, see [0].
GPIO pin layout:
pin#    name    type
0       power   led
1       wlan    led
2       reset   button
3       ses     buttom

This is the nvram configuration output of "nvram show |grep gpio"

related nvram configuration:
wl0gpio2=11
wl0gpio3=11
wl0gpio0=11
wl0gpio1=0x02
reset_gpio=2

[0]: https://dev.openwrt.org/browser/trunk/package/broadcom-diag/src/diag.c

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-05 15:23:14 -05:00
Mohammed Shafi Shajakhan 6a01f0c08d ath9k: make use of list_for_each_entry_safe
this does the same thing as the previous code

Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-05 15:23:14 -05:00
Mohammed Shafi Shajakhan d53c74e5a1 ath9k: completely zero intialize valid_phy_rate_idx
its better to zero initialize the 'valid_phy_rate_idx' array completely

Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-05 15:23:14 -05:00
Chun-Yeow Yeoh 3d045a5448 mac80211: Fix the generation of PREQs in proactive RANN mechanism of HWMP
According to Section Y.7.4 Actions on receipt of proactive RANN, an individually
addressed PREQ should be generated towards the neighbor peer mesh STA indicated
in the RANN Sender Address field in the forwarding information.

Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@gmail.com>
Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-05 15:23:14 -05:00
Amitkumar Karwar be0b281e8f mwifiex: fix bug in wildcard scan handling
Currently if valid SSID list is provided in scan request, driver
performs specific SSID scan otherwise wildcard scan is chosen.

When wpa_supplicant provides valid SSID list followed by
zero-length SSID for wildcard scan, only specific SSID scan is
performed by driver. Actually driver is expected to do both type
of scanning in this case. The patch fixes this issue.

Also, use SSID list pointer provided by stack directly, instead
of copying SSID's to local structure.

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>
2012-03-05 15:23:13 -05:00
Amitkumar Karwar b9be5f39bd mwifiex: remove unnecessary struct mwifiex_802_11_ssid
Use struct cfg80211_ssid available in include/net/cfg80211.h
instead of having similar definition in driver.

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>
2012-03-05 15:23:13 -05:00
Avinash Patil eb416ad37d mwifiex: correct bitrates advertised to cfg80211
1. Driver and firmware do not support 22Mbps and 72Mbps bitrates.
Remove them from the rate table advertised to cfg80211.

2. First 4 rates from mwifiex_rates table are not valid for
5GHz/A band. Set correct bitrate array's index and no of rates for
ieee80211_supported_band for 5GHz band.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Nishant Sarmukadam <nishants@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-05 15:20:52 -05:00
Hauke Mehrtens f384b3dddc MIPS: BCM47XX: provide sprom to bcma bus
On SoCs the sprom is often stored in nvram in the flashchip. This patch
registers a sprom fallback callback handler in bcma and provides the
sprom needed for this device.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-05 15:20:51 -05:00
Hauke Mehrtens 019eee2e34 MIPS: BCM47XX: move and extend sprom parsing
Move the sprom parsing from nvram into sprom.c. There are all values
needed for sprom version 1 to 9 read from nvram and there are more
sanity checks added. This is based on the sprom parsing in the open
source part of the Broadcom SDK.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-05 15:20:51 -05:00
Hauke Mehrtens ac78838b65 MIPS: BCM47XX: fix signature of nvram_parse_macaddr
Explicitly enforce an char array of 6 bytes for the mac address.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-05 15:20:51 -05:00
Hauke Mehrtens 44d4b2ae94 MIPS: BCM47XX: return number of written bytes in nvram_getenv
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-05 15:20:50 -05:00
Hauke Mehrtens a027237a56 bcma: add support for sprom not found on the device
On SoCs the sprom is stored in the nvram in a special partition on the
flash chip. The nvram contains the sprom for the main bus, but
sometimes also for a pci devices using bcma. This patch makes it
possible for the arch code to register a function to fetch the needed
sprom from the nvram and provide it to the bcma code.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-05 15:20:50 -05:00
Hauke Mehrtens 1c9351cf21 bcma: export bcma_find_core
This function is needed by the bcm47xx arch code to get the number of
the ieee80211 core.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-05 15:20:50 -05:00
Hauke Mehrtens 52aa63f532 ssb: add some missing sprom attributes
This patch extends the sprom struct to contain all sprom attributes
found in sprom version 1 to 9. This was done accordingly to the open
source part of the Broadcom SDK.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-05 15:20:49 -05:00
Hauke Mehrtens 03a5642b6a ssb: add alpha2
This member contains the country code encoded with two chars

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-05 15:20:49 -05:00
Hauke Mehrtens 3b64e6f905 ssb: fix per path sprom vars
On sprom version 4 and 5 there are 4 values for pa_2g, pa_5gl, pa_5g
and pa_5gh, for sprom version 8 and 9 there are only 3. Make the per
path sprom store also work for older sprom versions.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-05 15:20:49 -05:00
Hauke Mehrtens f8f8a660ba ssb: remove 5GHz antenna gain from sprom
There is no 2.4 GHz or 5GHz antenna gain stored in sprom. The sprom
just stores the gain values for antenna 1 and 2 or 1 to 4 for more
recent sprom versions. On old devices antenna 2 was used for 5 GHz wifi.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-05 15:20:49 -05:00
Hauke Mehrtens edd8d90b62 ssb: sprom fix some sizes / signedness
Some parts of the sprom struct are bigger than needed.
The leddc and maxpwr values are just 8 bit long and not 16.
rxpo2g and rxpo5g are signed

I got these information for the open source part of the Broadcom SDK
covering sprom version 1 to 9. rxpo2g contained a negative number on my
bcm5354 based device, this cased an error and Broadcom SDK says this is
signed.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-05 15:20:48 -05:00
Felix Fietkau 4e0ad2591a ath9k: fix drv_tx_last_beacon on AR9003 by processing beacon tx status
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-05 15:20:48 -05:00
Felix Fietkau 627e67a656 ath9k_hw: enable interrupts for beacon tx completion events
Not doing so could cause the tx status queue to overflow during longer
periods of time without non-beacon tx. These events are also required
for proper drv_tx_last_beacon handling.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-05 15:20:48 -05:00
Felix Fietkau 4286df60ed ath9k: do not call ath9k_hw_txprocdesc on AR9003 outside of the tx tasklet
Since AR9003 uses a global tx status queue, processing tx status outside of
the regular tx tasklet is dangerous and messes up hardware/software
synchronization of tx status events.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-05 15:20:47 -05:00
Felix Fietkau d6157bf780 Revert "ath9k_hw: Fix false tx hung detection in AR9003 chips"
The approach of this change is flawed, as it triggers tx status processing
from more callsites, yet the chips only have one global tx status queue.
Subsequent patches will properly fix the issue that this one tried to address.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-05 15:20:47 -05:00
Amitkumar Karwar a0f6d6caef mwifiex: handle auto authentication mode correctly
When authentication type is configured to NL80211_AUTHTYPE_AUTOMATIC,
driver tries to connect using open mode. The association is failed
if AP is configured in shared mode.

This patch adds code to try association using shared mode as well if
open mode association fails.

Now since we returned exact error code in association response handler
(instead of -1), corresponding changes are done in
mwifiex_process_cmdresp().

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>
2012-03-05 15:20:47 -05:00
John W. Linville c288ec614e carl9170: fix breakage from "mac80211: handle non-bufferable MMPDUs correctly"
That commit intended for 3.4 renamed IEEE80211_TX_CTL_POLL_RESPONSE as
IEEE80211_TX_CTL_NO_PS_BUFFER.  Meanwhile, "carl9170: fix frame delivery
if sta is in powersave mode" added a reference to
IEEE80211_TX_CTL_POLL_RESPONSE in the fixes stream for 3.3.  This simple
patch fixes that merge boo-boo.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-29 15:08:33 -05:00
John W. Linville 8701ff0a88 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless 2012-02-29 14:53:21 -05:00
Zefir Kurtisi f4fb4b212d ath9k: decouple RX error checking for DFS
Previous RX error checking was done exclusive-or for different error
types and caused DFS pulse events to be dropped when other error
flags (e.g. CRC) were set simultaneously.

This patch decouples PHY error processing from other types and ensures
that all pulses detected by HW are accounted by the pattern detector.

Signed-off-by: Zefir Kurtisi <zefir.kurtisi@neratec.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-29 14:14:56 -05:00
Greg Dietsche aef6a62d8b iwlegacy: remove unused enum il4965_calib_enabled_state
Remove the enum il4965_calib_enabled_state because it is not used.

Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-29 14:14:55 -05:00
Greg Dietsche d7b6b6a643 iwlegacy: remove enum iw_calib and related code
Remove the enum il_calib. It defined one identifier: IL_CALIB_MAX.
Remove the function il4965_calib_free_results. It was doing nothing
because IL_CALIB_MAX is zero. Next, remove calib_results from the
il_priv structure and also remove the associated return
type/struct il_calib_result.

Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-29 14:14:55 -05:00
Greg Dietsche 08db1ab7fa iwlegacy: Kconfig: Change Debug Option to be more clear
Since the menuconfig system doesn't indent the debug options
for the 3945 /4965, add some text to make it clear which
debug options are being configured.

Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-29 14:14:55 -05:00
Greg Dietsche 649921499c iwlegacy: Kconfig: Move Debugging Options
Move the debug options so they appear below the 3945 / 4965 options.

Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-29 14:14:54 -05:00
Johannes Berg 02f2f1a951 mac80211: handle non-bufferable MMPDUs correctly
This renames the IEEE80211_TX_CTL_POLL_RESPONSE
TX flag to IEEE80211_TX_CTL_NO_PS_BUFFER and also
uses it for non-bufferable MMPDUs (all MMPDUs but
deauth, disassoc and action frames.)

Previously, mac80211 would let the MMPDU through
but not set the flag so drivers supporting some
hardware aids for avoiding the PS races would
then reject the frame.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-29 14:14:54 -05:00
Amitkumar Karwar 5eb02e44ad mwifiex: remove unnecessary enum MWIFIEX_802_11_WEP_STATUS
Instead of defining an 'enum', we can simply use 'u8' flag for WEP
status. Rename 'wep_status' to 'wep_enabled' to match with
'wpa_enabled' and 'wpa2_enabled'.

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>
2012-02-29 14:11:35 -05:00
Amitkumar Karwar 1a907b749c mwifiex: remove redundant scan operation
It should have been removed by commit "mwifiex: use cfg80211 dynamic
scan..." (7c6fa2a843..) after adding code to avoid an extra scan
during association because scan entries are valid for 15 seconds in
cfg80211 stack.

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>
2012-02-29 14:11:35 -05:00
Johannes Berg 37ad38887d mac80211: make deauth/disassoc sequence more natural
The association sequence looks (roughly) like
this now:
 * set BSSID
 * set station to EXIST state
 * send auth
 * set station to AUTH state
 * send assoc
 * set station to ASSOC state
 * set BSS info to associated

In contrast, the deauth/disassoc sequence is
the other way around:
 * clear BSSID/BSS info state
 * remove station
 * send deauth/disassoc
(in some cases the last two steps are reversed.)

This patch encodes the entire sequence in the
ieee80211_set_disassoc() function and changes
it to be like this, for good measure with an
explicit flush:
 * send deauth/disassoc
 * flush
 * remove station
 * clear BSSID/BSS info state

At least iwlwifi gets confused with the other
sequence in P2P mode and complains that it
wasn't able to flush the queues.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-29 14:11:34 -05:00
Johannes Berg 02d83e60b9 mac80211: fix ieee80211_set_disassoc() sending DelBA
When ieee80211_set_disassoc() is called with the
tx argument set to true, it will send DelBA out
to the peer. This isn't useful or necessary in a
few cases where we do it today, those being when
we lost the connection or when the supplicant
explicitly asked us to not tell the AP.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-29 14:11:34 -05:00
Johannes Berg 5fef7dbcad mac80211: dont call cfg80211 from ieee80211_send_deauth_disassoc
Instead of calling cfg80211 in ieee80211_send_deauth_disassoc()
pass out the frame and call it from the caller. That saves the
SKB allocation if we don't actually want to send the frame and
enables us to make the ordering smarter in the future.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-29 14:11:34 -05:00