aboutsummaryrefslogtreecommitdiff
path: root/net/mac80211
AgeCommit message (Collapse)Author
2008-06-18mac80211: detect driver tx bugsJohannes Berg
When a driver rejects a frame in it's ->tx() callback, it must also stop queues, otherwise mac80211 can go into a loop here. Detect this situation and abort the loop after five retries, warning about the driver bug. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-06-18Revert "mac80211: Use skb_header_cloned() on TX path."David S. Miller
This reverts commit 608961a5eca8d3c6bd07172febc27b5559408c5d. The problem is that the mac80211 stack not only needs to be able to muck with the link-level headers, it also might need to mangle all of the packet data if doing sw wireless encryption. This fixes kernel bugzilla #10903. Thanks to Didier Raboud (for the bugzilla report), Andrew Prince (for bisecting), Johannes Berg (for bringing this bisection analysis to my attention), and Ilpo (for trying to analyze this purely from the TCP side). In 2.6.27 we can take another stab at this, by using something like skb_cow_data() when the TX path of mac80211 ends up with a non-NULL tx->key. The ESP protocol code in the IPSEC stack can be used as a model for implementation. Signed-off-by: David S. Miller <davem@davemloft.net>
2008-06-13mac80211: add missing new line in debug print HT_DEBUGTomas Winkler
This patch adds '\n' in debug printk (wme.c HT DEBUG) Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-13mac80211 : fix for iwconfig in ad-hoc modeAbhijeet Kolekar
The patch checks interface status, if it is in IBSS_JOINED mode show cell id it is associated with. Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com> Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-09mac80211: Checking IBSS support while changing channel in ad-hoc modeAssaf Krauss
This patch adds a check to the set_channel flow. When attempting to change the channel while in IBSS mode, and the new channel does not support IBSS mode, the flow return with an error value with no consequences on the mac80211 and driver state. Signed-off-by: Assaf Krauss <assaf.krauss@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-09mac80211: decrease IBSS creation latencyDan Williams
Sufficient scans (at least 2 or 3) should have been done within 7 seconds to find an existing IBSS to join. This should improve IBSS creation latency; and since IBSS merging is still in effect, shouldn't have detrimental effects on eventual IBSS convergence. Signed-off-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-09mac80211: Fixing slow IBSS rejoinAssaf Krauss
This patch fixes the issue of slow reconnection to an IBSS cell after disconnection from it. Now the interface's bssid is reset upon ifdown. ieee80211_sta_find_ibss: if (found && memcmp(ifsta->bssid, bssid, ETH_ALEN) != 0 && (bss = ieee80211_rx_bss_get(dev, bssid, local->hw.conf.channel->center_freq, ifsta->ssid, ifsta->ssid_len))) Note: In general disconnection is still not handled properly in mac80211 Signed-off-by: Assaf Krauss <assaf.krauss@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-06-09mac80211: send association event on IBSS createDan Williams
Otherwise userspace has no idea the IBSS creation succeeded. Signed-off-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-28mac80211: fix alignment issue with compare_ether_addr()Senthil Balasubramanian
This addresses an alignment issue with compare_ether_addr(). The addresses passed to compare_ether_addr should be two bytes aligned. It may function properly in x86 platform. However may not work properly on IA-64 or ARM processor. This also fixes a typo in mlme.c where the sk_buff struct name is incorect. Though sizeof() works for any incorrect structure pointer name as its just a pointer length that we want, lets just fix it. Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-28mac80211: Fix for NULL pointer dereference in sta_info_get()Senthil Balasubramanian
This addresses a NULL pointer dereference in sta_info_get(). TID and sta_info are extracted in ADDBA Timer expiry function through the timer handler's argument. The problem is extracging the TID (which was stored in timer_to_tid[] array of type "u8") through "int *" typecast which may also yield unwanted bytes for the MSB of TID that results in incorrect sta_info and ieee80211_local pointers. ieee80211_local pointer is NULL as illustrated below, it crashes in sta_info_get(). The problem started when extracting ieee80211_local pointer out of sta_info iteself and eventually crashed in stat_info_get(). The proper way to fix is to change the data type of TID to u8 instead of u16. However changing all the occurences requires some prototype changes as well. We should fix this in upcoming patches. Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com> Signed-off-by: Luis Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-28mac80211: fix a typo in ieee80211_handle_filtered_frame commentYi Zhu
fix a typo in ieee80211_handle_filtered_frame comment Signed-off-by: Yi Zhu <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-28mac80211 : Fixes the status message for iwconfigAbhijeet Kolekar
iwconfig was showing incorrect status messages when disassociated. Patch fixes this by always checking for association status in ioctl calls for getting ap address. Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-28mac80211: reorder channel and freq reporting in wext scan reportTomas Winkler
This patch switch order of channel and freq (SIOCGIWFREQ) reports in scan results in order to overcome wpa_supplicant inability to handle channel numbers in 5.2Ghz band. Wext reporting channel number is ambiguous as channels 7-12 (802.11j) exist on both bands. Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-28mac80211: fix ieee80211_rx_bss_put/get imbalanceTomas Winkler
This patch fixes iee80211_rx_bss_put/get imbalance introduced by 'mac80211: enable IBSS merging' patch. Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-28net/mac80211: always true conditionalsNicolas Kaiser
Correct always true conditionals. Signed-off-by: Nicolas Kaiser <nikai@nikai.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-20mac80211: fix NULL pointer dereference in ieee80211_compatible_ratesHelmut Schaa
Fix a possible NULL pointer dereference in ieee80211_compatible_rates introduced in the patch "mac80211: fix association with some APs". If no bss is available just use all supported rates in the association request. Signed-off-by: Helmut Schaa <hschaa@suse.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-20mac80211: don't claim iwspy supportJohannes Berg
We removed iwspy support a very long time ago because it is useless, but forgot to stop claiming to support it. Apparently, nobody cares, but remove it nonetheless. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-16mac80211: Add RTNL version of ieee80211_iterate_active_interfacesIvo van Doorn
Since commit e38bad4766a110b61fa6038f10be16ced8c6cc38 mac80211: make ieee80211_iterate_active_interfaces not need rtnl rt2500usb and rt73usb broke down due to attempting register access in atomic context (which is not possible for USB hardware). This patch restores ieee80211_iterate_active_interfaces() to use RTNL lock, and provides the non-RTNL version under a new name: ieee80211_iterate_active_interfaces_atomic() So far only rt2x00 uses ieee80211_iterate_active_interfaces(), and those drivers require the RTNL version of ieee80211_iterate_active_interfaces(). Since they already call that function directly, this patch will automatically fix the USB rt2x00 drivers. v2: Rename ieee80211_iterate_active_interfaces_rtnl Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Acked-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-16mac80211 : Association with 11n hidden ssid ap.Abhijeet Kolekar
This patch fixes the association problem with 11n hidden ssid ap. Patch fixes the problem of associating with hidden ssid when all three parameters ap,essid and channel are given to iwconfig. This patch removes the condition of checking three parameters and always checks for bss in bss list while associating. Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-12mac80211: Use skb_header_cloned() on TX path.David S. Miller
When skb_header_cloned() returns false you can change the headers however you like. Signed-off-by: David S. Miller <davem@davemloft.net>
2008-05-12mac80211: assign needed_headroom/tailroom for netdevsJohannes Berg
This assigns the netdev's needed_headroom/tailroom members to take advantage of pre-allocated space for 802.11 headers. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-05-12mac80211: add missing newlines in printk()Pavel Roskin
Signed-off-by: Pavel Roskin <proski@gnu.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-12mac80211: fix association with some APsHelmut Schaa
Some APs refuse association if the supported rates contained in the association request do not match its own supported rates. This patch introduces a new function which builds the intersection between the AP's supported rates and the client's supported rates to work around such problems. The same approach is already used in ipw2200 for example. Signed-off-by: Helmut Schaa <hschaa@suse.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-12Fix potential scheduling while atomic in mesh_path_add.Pavel Emelyanov
Calling synchronize_rcu() under write-lock-ed pathtbl_resize_lock may result in this warning (and other side effects). It looks safe just dropping this lock before calling synchronize_rcu. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-12Fix not checked kmalloc() result.Pavel Emelyanov
The new_node kmallocation is not checked for success, so add this check. BTW, it also happens under the read_lock. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-12Fix GFP_KERNEL allocation under read lock.Pavel Emelyanov
The mesh_path_add() read-locks the pathtbl_resize_lock and calls kmalloc with GFP_KERNEL mask. Fix it and move the endadd2 label lower. It should be _before_ the if() beyond, but it makes no sense for it being there, so I move it right after this if(). Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-12mac80211: mesh hwmp: fix kfree(skb)Patrick McHardy
Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-12mac80211: fix access to null skbLuis Carlos Cobo
Without this patch, if xmit_skb is null but net_ratelimit() returns 0 we would go to the else branch and access the null xmit_skb. Pointed out by Johannes Berg. Signed-off-by: Luis Carlos Cobo <luisca@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-12mac80211: fix incorrect mesh header lengthLuis Carlos Cobo
This should have been updated at the same time we were transitioning from 3 byte to 4 byte mesh sequence number. Pointed out by Johannes Berg. Signed-off-by: Luis Carlos Cobo <luisca@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-12mac80211: Don't encrypt beaconsIvo van Doorn
mac80211 should set the IEEE80211_TX_CTL_DO_NOT_ENCRYPT flag in tx_control structure to inform drivers not to encrypt the beacon. Drivers that only check for that flag before accessing the hw_key field, will otherwise cause a NULL pointer dereference since that field is not configured for beacons. Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-12mac80211: fix debugfs default key oopsJohannes Berg
Under certain circumstances (in AP mode) the debugfs function that is supposed to add the default key symlink can encounter a NULL default_key pointer. This patch makes it handle that situtation gracefully. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-12fix irq flags in mac80211 codeSteven Rostedt
A file in the net/mac80211 directory uses "int" for flags. This can cause hard to find bugs on some architectures. This patch converts the flags to use "long" instead. This bug was discovered by doing an allyesconfig make on the -rt kernel where checks are done to ensure all flags are of size sizeof(long). Signed-off-by: Steven Rostedt <srostedt@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-04mac80211: Do not free net device after it is unregistered.Pavel Emelyanov
The error path in ieee80211_register_hw() may call the unregister_netdev() and right after it - the free_netdev(), which is wrong, since the unregister releases the device itself. So the proposed fix is to NULL the local->mdev after unregister is done and check this before calling free_netdev(). I checked - no code uses the local->mdev after unregister in this error path (but even if some did this would be a BUG). Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-05-01Merge branch 'master' of ↵David S. Miller
master.kernel.org:/pub/scm/linux/kernel/git/linville/wireless-2.6
2008-04-30mac80211: incorrect shift directionHarvey Harrison
Looks like 5d2cdcd4e85c5187db30a6b29f79fbbe59f39f78 ("mac80211: get a TKIP phase key from skb") got the shifts wrong. Noticed by sparse: net/mac80211/tkip.c:234:25: warning: right shift by bigger than source value net/mac80211/tkip.c:235:25: warning: right shift by bigger than source value net/mac80211/tkip.c:236:25: warning: right shift by bigger than source value Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-30mac80211: insert WDS peer after adding interfaceJohannes Berg
This reorders the open code so that WDS peer STA info entries are added after the corresponding interface is added to the driver so that driver callbacks aren't invoked out of order. Also make any master device startup fatal. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-30mac80211: don't allow invalid WDS peer addressesJohannes Berg
Rather than just disallowing the zero address, disallow all invalid ones. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-30mac80211: assign conf.beacon_control for meshJohannes Berg
Drivers can rightfully assume that they get a beacon_control if the beacon is set. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-30mac80211: use 4-byte mesh sequence numberLuis Carlos Cobo
This follows the new 802.11s/D2.0 draft. Signed-off-by: Luis Carlos Cobo <luisca@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-28Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6Linus Torvalds
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: iwlwifi: Allow building iwl3945 without iwl4965. wireless: Fix compile error with wifi & leds tcp: Fix slab corruption with ipv6 and tcp6fuzz ipv4/ipv6 compat: Fix SSM applications on 64bit kernels. [IPSEC]: Use digest_null directly for auth sunrpc: fix missing kernel-doc can: Fix copy_from_user() results interpretation Revert "ipv6: Fix typo in net/ipv6/Kconfig" tipc: endianness annotations ipv6: result of csum_fold() is already 16bit, no need to cast [XFRM] AUDIT: Fix flowlabel text format ambibuity.
2008-04-27wireless: Fix compile error with wifi & ledsLuca Tettamanti
Fix build error caused by commit e82404ad612ebabc65d15c3d59b971cb35c3ff36 ("iwlwifi: Select LEDS_CLASS.") from David Miller: Since MAC80211_LEDS is selected by wireless drivers it must select its own dependencies otherwise a build error may occur (kbuild will select the symbol regardless of "depends" constraints). Signed-off-By: Luca Tettamanti <kronos.it@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-04-27asm/unaligned.h doesn't work well as the very first includeAl Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-04-23mac80211: fix use before check of Qdisc lengthRon Rindjunsky
This patch fixes use of Qdisc length in requeue function, before we checked the reference is valid. (Adrian Bunk's catch) Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com> Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-23net/mac80211/rx.c: fix off-by-oneAdrian Bunk
This patch fixes an off-by-one in net/mac80211/rx.c introduced by commit 8318d78a44d49ac1edf2bdec7299de3617c4232e (cfg80211 API for channels/bitrates, mac80211 and driver conversion) and spotted by the Coverity checker. Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-23mac80211: Fix race between ieee80211_rx_bss_put and lookup routines.Pavel Emelyanov
The put routine first decrements the users counter and then (if it is zero) locks the sta_bss_lock and removes one from the list and the hash. Thus, any of ieee80211_sta_config_auth, ieee80211_rx_bss_get or ieee80211_rx_mesh_bss_get can race with it by finding a bss that is about to get kfree-ed. Using atomic_dec_and_lock in ieee80211_rx_bss_put takes care of this race. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-23mac80211: Fix n-band association problemAbhijeet Kolekar
There are two structures named wmm_info and wmm_param, they are used while parsing the beacon frame. (Check the function ieee802_11_parse_elems). Certain APs like D-link does not set the fifth bit in WMM IE. While sending the association request to n-only ap it checks for wmm_ie. If it is set then only ieee80211_ht_cap is sent during association request. So n-only association fails. And this patch fixes this problem by copying the wmm_info to wmm_ie, which enables the "wmm" flag in iee80211_send_assoc. Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com> Acked-by: Ron Rindjunsky <ron.rindjunsky@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-17Merge branch 'master' of ↵David S. Miller
master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6
2008-04-16mac80211: rework scanning to account for probe response/beacon differenceJohannes Berg
This patch reworks the scanning code (ieee80211_rx_bss_info) to take more parameters from beacons and keep a BSS info structure alive when only beacons for it are received. This fixes a problem with iwlwifi drivers (where we don't understand the root cause of the problem yet) and another driver for some broken hardware (which cannot send probe requests unless associated, so can't always actively scan.) Signed-off-by: Bill Moss <bmoss@clemson.edu> [jmberg: reformatted comments, make probe_resp a bool] Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-16mac80211: allow WDS modeJohannes Berg
This allows creating interfaces in WDS mode or switching existing ones into WDS mode (both via cfg80211 and wext.) Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-16mac80211: fix key todo list orderJohannes Berg
When we add multiple todo entries, we rely on them being executed mostly in the right order, especially when a key is being replaced. But when a default key is replaced, the todo list order will differ from the order when the key being replaced is not a default key, so problems will happen. Hence, just move each todo item to the end of the list when it is added so we can in the other code ensure that hw accel for a key will be disabled before it is enabled for the replacement. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>