- 04 Dec, 2013 1 commit
-
-
Johannes Berg authored
commit 79845c66 upstream. Since rdev->sched_scan_req is dereferenced outside the lock protecting it, this might be done at the wrong time, causing crashes. Move the dereference to where it should be - inside the RTNL locked section. Reviewed-by:
Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by:
Johannes Berg <johannes.berg@intel.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 04 Sep, 2013 1 commit
-
-
Joe Perches authored
This function is being removed, so remove the reference to it. Signed-off-by:
Joe Perches <joe@perches.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 16 Jul, 2013 1 commit
-
-
Simon Wunderlich authored
To allow scanning and working with 5 MHz and 10 MHz BSS, extend the inform bss commands and add wrappers to take 5 and 10 MHz bss into account. Signed-off-by:
Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Signed-off-by:
Mathias Kretschmer <mathias.kretschmer@fokus.fraunhofer.de> Signed-off-by:
Johannes Berg <johannes@sipsolutions.net>
-
- 24 Jun, 2013 1 commit
-
-
Ben Greear authored
Should help the next person that tries to understand the bss refcounting logic. Signed-off-by:
Ben Greear <greearb@candelatech.com> Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
- 24 May, 2013 2 commits
-
-
Johannes Berg authored
Virtually all code paths in cfg80211 already (need to) hold the RTNL. As such, there's little point in having another four mutexes for various parts of the code, they just cause lock ordering issues (and much of the time, the RTNL and a few of the others need thus be held.) Simplify all this by getting rid of the extra four mutexes and just use the RTNL throughout. Only a few code changes were needed to do this and we can get rid of a work struct for bonus points. Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
The function is only used and needed by the wext code for scanning, so move it there. Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
- 24 Mar, 2013 1 commit
-
-
Johannes Berg authored
If a P2P device wdev is removed while it has a scan, then the scan completion might crash later as it is already freed by that time. To avoid the crash always check the scan completion when the P2P device is being removed for some reason. If the driver already canceled it, don't want and free it, otherwise warn and leak it to avoid later crashes. In order to do this, locking needs to be changed away from the rdev mutex (which can't always be guaranteed). For now, use the sched_scan_mtx instead, I'll rename it to just scan_mtx in a later patch. Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
- 07 Mar, 2013 1 commit
-
-
Johannes Berg authored
In the odd case that while updating information from a beacon, a BSS was found that is part of a hidden group, we drop the new information. In this case, however, we leak the IE buffer from the update, and erroneously update the entry's timestamp so it will never time out. Fix both these issues. Cc: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
- 15 Feb, 2013 1 commit
-
-
Simon Wunderlich authored
Add new NL80211_CMD_RADAR_DETECT, which starts the Channel Availability Check (CAC). This command will also notify the usermode about events (CAC finished, CAC aborted, radar detected, NOP finished). Once radar detection has started it should continuously monitor for radars as long as the channel is active. This patch enables DFS for AP mode in nl80211/cfg80211. Based on original patch by Victor Goldenshtein <victorg@ti.com> Signed-off-by:
Simon Wunderlich <siwu@hrz.tu-chemnitz.de> [remove WIPHY_FLAG_HAS_RADAR_DETECT again -- my mistake] Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
- 13 Feb, 2013 1 commit
-
-
Luciano Coelho authored
cfg80211_find_vendor_ie() was checking only that the vendor IE would fit in the remaining IEs buffer. If a corrupt includes a vendor IE that is too small, we could potentially overrun the IEs buffer. Fix this by checking that the vendor IE fits in the reported IE length field and skip it otherwise. Reported-by:
Jouni Malinen <j@w1.fi> Signed-off-by:
Luciano Coelho <coelho@ti.com> [change BUILD_BUG_ON to != 1 (from >= 2)] Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
- 11 Feb, 2013 4 commits
-
-
Johannes Berg authored
While technically the TSF isn't an IE, it can be necessary to distinguish between the TSF from a beacon and a probe response, in particular in order to know the next DTIM TBTT, as not all APs are spec compliant wrt. TSF==0 being a DTIM TBTT and thus the DTIM count needs to be taken into account as well. To allow this, move the TSF into the IE struct so it can be known whence it came. Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
There's no way scan BSS IEs can be NULL as even if the allocation fails the frame is discarded. Remove some code checking for this and document that it is always non-NULL. Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
Currently, cfg80211 will copy beacon IEs from a previously received hidden SSID beacon to a probe response entry, if that entry is created after the beacon entry. However, if it is the other way around, or if the beacon is updated, such changes aren't propagated. Fix this by tracking the relation between the probe response and beacon BSS structs in this case. In case drivers have private data stored in a BSS struct and need access to such data from a beacon entry, cfg80211 now provides the hidden_beacon_bss pointer from the probe response entry to the beacon entry. Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
This prepares for using the spinlock instead of krefs which is needed in the next patch to track the refs of combined BSSes correctly. Acked-by: Bing Zhao <bzhao@marvell.com> [mwifiex] Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
- 04 Feb, 2013 9 commits
-
-
Johannes Berg authored
Add inline wrappers for the BSS struct krefs to be able to extend them easily later. Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
This local variable is only used once, so remove it. Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
Instead of annotating with a comment, add a lockdep annotation which also serves as documentation. Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
There's no reason for it to require external locking, move it into the function. Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
The comment about allocating the IEs together with the BSS struct is no longer true, remove it. Also fix a typo in the same area. Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
As Thomas pointed out, cfg80211_get_mesh() is unused and can be removed. Cc: Thomas Pedersen <thomas@cozybit.com> Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
Instead of first checking if a BSS is an MBSS and then doing the comparisons, inline it all into the BSS comparison function. This avoids doing the IE searches twice and is also a lot less code. Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
When trying to find a hidden SSID, the lookup function is done wrong; the code is trying to combine the two lookups into one, and as a consequence doesn't always find the entry at all. To understand this, consider a case where multiple BSS entries with the same channel and BSSID exist but have different SSID length. Then comparing against the probe response SSID length is bound to cause problems since the hidden one might be either zeroed out or zero-length. To fix this we need to do two lookups for the two ways to hide SSIDs. Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
Instead of duplicating the rbtree functions, pass an argument to the compare function. This removes the code duplication for the two searches. Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
- 31 Jan, 2013 1 commit
-
-
Johannes Berg authored
Now that mac80211 no longer uses this API, remove it completely. If anyone needs it again, we can revert this patch of course, but mac80211 was the only user right now. Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
- 24 Jan, 2013 1 commit
-
-
Dan Carpenter authored
We do a: sprintf(buf, " Last beacon: %ums ago", elapsed_jiffies_msecs(bss->ts)); elapsed_jiffies_msecs() can return a 10 digit number so "buf" needs to be 31 characters long. Signed-off-by:
Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
- 30 Nov, 2012 4 commits
-
-
Johannes Berg authored
When a BSS struct is updated, the IEs are currently overwritten or freed. This can lead to races if some other CPU is accessing the BSS struct and using the IEs concurrently. Fix this by always allocating the IEs in a new struct that holds the data and length and protecting access to this new struct with RCU. Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
The cmp_bss() comparator function uses memcmp() to compare the SSID. This means that cmp_hidden_bss() needs to similarly return a number bigger than zero (use 1) instead of -1 when ie1 is bigger than ie2, which is the case if an ie2 byte is non-zero. Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
Fix a number of indentation and similar issues. Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
There's no need to stop the machine, just leak the BSS entry if there's an issue with its hold counter when freeing. Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
- 23 Nov, 2012 1 commit
-
-
Johannes Berg authored
Currently, mac80211 checks the DS params IE if present and uses it for the (primary) BSS channel, instead of the one that the frame was received on. This is particularly useful in the 2.4 GHz band since a frame is often received on one of the adjacent channels due to overlap. Move this code to cfg80211 so other drivers also do this. Additionally, on 5 GHz, in particular with some (possibly) upcoming changes in 802.11ai and duplicate transmissions when wider channels are used, something similar happens. So if present, also use the (primary) channel information contained in the HT operation IE. Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
- 18 Oct, 2012 4 commits
-
-
Beni Lev authored
Also add tracing to the API functions that drivers (and mac80211) can call in cfg80211. Signed-off-by:
Beni Lev <beni.lev@intel.com> Reviewed-by:
Emmanuel Grumbach <emmanuel.grumbach@intel.com> Reviewed-by:
Johannes Berg <johannes.berg@intel.com> Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
Hila Gonen authored
This will allow adding central tracing like in mac80211. Signed-off-by:
Hila Gonen <hila.gonen@intel.com> Reviewed-by:
Emmanuel Grumbach <emmanuel.grumbach@intel.com> Reviewed-by:
Johannes Berg <johannes.berg@intel.com> Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
Sam Leffler authored
Add an NL80211_SCAN_FLAG_FLUSH flag that causes old bss cache entries to be flushed on scan completion. This is useful for collecting guaranteed fresh scan/survey result (e.g. on resume). For normal scan, flushing only happens on successful completion of a scan; i.e. it does not happen if the scan is aborted. For scheduled scan, previous scan results are flushed everytime when we get new scan results. This feature is enabled by default. Drivers can disable it by unsetting the NL80211_FEATURE_SCAN_FLUSH flag. Signed-off-by:
Sam Leffler <sleffler@chromium.org> Tested-by:
Amitkumar Karwar <akarwar@marvell.com> Signed-off-by:
Amitkumar Karwar <akarwar@marvell.com> Signed-off-by:
Bing Zhao <bzhao@marvell.com> [invert polarity of feature flag to account for old kernels] Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
Amitkumar Karwar authored
bss_release() and __cfg80211_unlink_bss() function definitions are moved at the begining of the file. They are used in next patch in this series. Signed-off-by:
Amitkumar Karwar <akarwar@marvell.com> Signed-off-by:
Bing Zhao <bzhao@marvell.com> Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
- 05 Sep, 2012 1 commit
-
-
Hila Gonen authored
checkpatch pointed out an issue, fix it. Signed-off-by:
Hila Gonen <hila.gonen@intel.com> Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
- 12 Jul, 2012 1 commit
-
-
Johannes Berg authored
The new P2P Device will have to be able to scan for P2P search, so move scanning to use struct wireless_dev instead of struct net_device. Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
- 10 May, 2012 1 commit
-
-
Joe Perches authored
Use the new bool function ether_addr_equal to add some clarity and reduce the likelihood for misuse of compare_ether_addr for sorting. I removed a conversion from scan.c/cmp_bss_core that appears to be a sorting function. Done via cocci script: $ cat compare_ether_addr.cocci @@ expression a,b; @@ - !compare_ether_addr(a, b) + ether_addr_equal(a, b) @@ expression a,b; @@ - compare_ether_addr(a, b) + !ether_addr_equal(a, b) @@ expression a,b; @@ - !ether_addr_equal(a, b) == 0 + ether_addr_equal(a, b) @@ expression a,b; @@ - !ether_addr_equal(a, b) != 0 + !ether_addr_equal(a, b) @@ expression a,b; @@ - ether_addr_equal(a, b) == 0 + !ether_addr_equal(a, b) @@ expression a,b; @@ - ether_addr_equal(a, b) != 0 + ether_addr_equal(a, b) @@ expression a,b; @@ - !!ether_addr_equal(a, b) + ether_addr_equal(a, b) Signed-off-by:
Joe Perches <joe@perches.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 09 May, 2012 1 commit
-
-
Emmanuel Grumbach authored
Since the BSS table is organized in a RB tree, the BSSs need to be comparable. This means that we must define a < and > operator to the BSS object. compare_ethr_addr isn't enough since it returns only a binary value. Since Felix's cfg80211: 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> Signed-off-by:
John W. Linville <linville@tuxdriver.com> The BSS table is corrupted: rb_find_bss can't find the bss. As a result BSSes are duplicated in the BSS table, and we get stuck while probing an AP before associating (in STA mode). Change-Id: I85928756f4328028230832c1565ece7f412f3843 CC: Felix Fietkau <nbd@openwrt.org> Signed-off-by:
Emmanuel Grumbach <emmanuel.grumbach@intel.com> Acked-by:
Felix Fietkau <nbd@openwrt.org> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
- 16 Apr, 2012 1 commit
-
-
Rajkumar Manoharan authored
The background scan completion takes more time when the station is having heavy uplink traffic. The scan state machine decides to fall back to home channel on every off-channel visit when there are pending frames in tx queue. bgscan completion took ~30sec on dual band US regulatory card. scan period = (20 active channels * probe timeout) + (12 passive channels * passive probe timeout) + (32 * timeout on home channel) + (32 * flush timeout) Signed-off-by:
Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
- 09 Apr, 2012 1 commit
-
-
Felix Fietkau authored
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> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-