aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless (follow)
AgeCommit message (Collapse)AuthorFilesLines
2010-08-09cfg80211: fix locking in action frame TXJohannes Berg1-1/+7
Accesses to "wdev->current_bss" must be locked with the wdev lock, which action frame transmission is missing. Cc: stable@kernel.org [2.6.33+] Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-07-28cfg80211: Update of regulatory request initiator handlingYuri Ershov1-1/+2
In some cases there could be possible dereferencing freed pointer. The update is intended to avoid this issue. Signed-off-by: Yuri Ershov <ext-yuri.ershov@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-07-28nl80211: Fix memory leaksYuri Ershov1-0/+2
In case of errors during message composing msg should be freed after canceling. Signed-off-by: Yuri Kululin <ext-yuri.kululin@nokia.com> Signed-off-by: Yuri Ershov <ext-yuri.ershov@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-07-27wireless: Convert wiphy_debug macro to functionJoe Perches1-0/+49
Save a few bytes of text (allyesconfig) $ size drivers/net/wireless/built-in.o* text data bss dec hex filename 3924568 100548 871056 4896172 4ab5ac drivers/net/wireless/built-in.o.new 3926520 100548 871464 4898532 4abee4 drivers/net/wireless/built-in.o.old $ size net/wireless/core.o* text data bss dec hex filename 12843 216 3768 16827 41bb net/wireless/core.o.new 12328 216 3656 16200 3f48 net/wireless/core.o Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-07-27Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/holtmann/bluetooth-next-2.6John W. Linville2-3/+3
Conflicts: drivers/net/wireless/iwlwifi/iwl-commands.h
2010-07-26cfg80211: fix IBSS default management keyJohannes Berg1-1/+3
When wireless extensions are used to control an encrypted IBSS, we erroneously can try to set the default management key. Fix this. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-07-26wireless: remove unneeded variable from regulatory_hint_11d()Dan Carpenter1-4/+1
The "rd" variable isn't needed any more since 4f366c5dabcb "wireless: only use alpha2 regulatory information from country IE" Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-07-26lib80211: remove unused host_build_iv optionJohn W. Linville3-3/+0
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-07-21cfg80211: fix race between sysfs and cfg80211Maxime Bizon1-6/+8
device_add() is called before adding the phy to the cfg80211 device list. So if a userspace program uses sysfs uevents to detect new phy devices, and queries nl80211 to get phy info, it can get ENODEV even though the phy exists in sysfs. An easy workaround is to hold the cfg80211 mutex until the phy is present in sysfs/cfg80211/debugfs. Signed-off-by: Maxime Bizon <mbizon@freebox.fr> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-07-20wireless: remove unnecessary reg_same_country_ie_hintJohn W. Linville1-45/+0
"Might as well remove reg_same_country_ie_hint() completely since we already dealt with suspend/resume through the regulatory hint disconnect." -- Luis Reported-by: Luis R. Rodriguez <mcgrof@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-07-20wireless: mark cfg80211_is_all_idle as staticJohn W. Linville1-1/+1
CHECK net/wireless/sme.c net/wireless/sme.c:38:6: warning: symbol 'cfg80211_is_all_idle' was not declared. Should it be static? It is not used elsewhere, so mark it static. Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-07-20wireless: correct sparse warning in generated regdb.cJohn W. Linville1-0/+1
CHECK net/wireless/regdb.c net/wireless/regdb.c:8:34: warning: symbol 'reg_regdb' was not declared. Should it be static? net/wireless/regdb.c:11:5: warning: symbol 'reg_regdb_size' was not declared. Should it be static? Simply include the also generated regdb.h. Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-07-20wireless: correct sparse warning in wext-compat.cJohn W. Linville1-0/+1
CHECK net/wireless/wext-compat.c net/wireless/wext-compat.c:1434:5: warning: symbol 'cfg80211_wext_siwpmksa' was not declared. Should it be static? Add declaration in cfg80211.h. Also add an EXPORT_SYMBOL_GPL, since all the peer functions have it. Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-07-20wireless: correct sparse warning in lib80211_crypt_tkip.cJohn W. Linville1-1/+1
CHECK net/wireless/lib80211_crypt_tkip.c net/wireless/lib80211_crypt_tkip.c:581:27: warning: cast to restricted __le16 Caused by dereferencing a "u8 *" and passing it to le16_to_cpu... Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-07-20wireless: only use alpha2 regulatory information from country IEJohn W. Linville1-613/+12
The meaning and/or usage of the country IE is somewhat poorly defined. In practice, this means that regulatory rulesets in a country IE are often incomplete and might be untrustworthy. This removes the code associated with interpreting those rulesets while preserving respect for country "alpha2" codes also contained in the country IE. Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-07-14cfg80211: don't get expired BSSesJohannes Berg1-0/+5
When kernel-internal users use cfg80211_get_bss() to get a reference to a BSS struct, they may end up getting one that would have been removed from the list if there had been any userspace access to the list. This leads to inconsistencies and problems. Fix it by making cfg80211_get_bss() ignore BSSes that cfg80211_bss_expire() would remove. Fixes http://bugzilla.intellinuxwireless.org/show_bug.cgi?id=2180 Cc: stable@kernel.org Reported-by: Jiajia Zheng <jiajia.zheng@intel.com> Tested-by: Jiajia Zheng <jiajia.zheng@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-07-13Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davemJohn W. Linville2-5/+5
Conflicts: drivers/net/wireless/wl12xx/wl1271_cmd.h
2010-07-12cfg80211: ignore spurious deauthJohannes Berg1-4/+4
Ever since mac80211/drivers are no longer fully in charge of keeping track of the auth status, trying to make them do so will fail. Instead of warning and reporting the deauthentication to userspace, cfg80211 must simply ignore it so that spurious deauthentications, e.g. before starting authentication, aren't seen by userspace as actual deauthentications. Cc: stable@kernel.org Reported-by: Paul Stewart <pstew@google.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-07-07NET: nl80211, fix lock imbalance and netdev referencingJiri Slaby1-1/+1
Stanse found that nl80211_set_wiphy imporperly handles a lock and netdev reference and contains unreachable code. It is because there return statement isntead of assignment to result variable. Fix that. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Johannes Berg <johannes@sipsolutions.net> Cc: "John W. Linville" <linville@tuxdriver.com> Cc: "David S. Miller" <davem@davemloft.net> Cc: Jouni Malinen <j@w1.fi> Cc: Samuel Ortiz <sameo@linux.intel.com> Cc: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-07-01Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6David S. Miller5-10/+41
Conflicts: drivers/net/wireless/libertas/host.h
2010-06-24nl80211: Add option to adjust transmit powerJuuso Oikarinen1-0/+31
This patch adds transmit power setting type and transmit power level attributes to NL80211_CMD_SET_WIPHY in order to facilitate adjusting of the transmit power level of the device. The added attributes allow selection of automatic, limited or fixed transmit power level, with the level definable in signed mBm format. Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-06-24cfg80211/mac80211: Update set_tx_power to use mBm instead of dBm unitsJuuso Oikarinen1-5/+5
In preparation for a TX power setting interface in the nl80211, change the .set_tx_power function to use mBm units instead of dBm for greater accuracy and smaller power levels. Also, already in advance move the tx_power_setting enumeration to nl80211. This change affects the .tx_set_power function prototype. As a result, the corresponding changes are needed to modules using it. These are mac80211, iwmc3200wifi and rndis_wlan. Cc: Samuel Ortiz <samuel.ortiz@intel.com> Cc: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com> Acked-by: Samuel Ortiz <samuel.ortiz@intel.com> Acked-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-06-24wireless: mark reg_mutex as staticJohn W. Linville1-1/+1
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-06-18wireless: move regulatory_init to .init.textUwe Kleine-König2-3/+3
regulatory_init is only called by cfg80211_init which is in .init.text, too. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-06-18cfg80211: move cfg80211_exit to .exit.textUwe Kleine-König1-1/+1
cfg80211_exit is only used as module_exit function, so it can go to .exit.text saving a few bytes when CONFIG_CFG80211=y. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-06-17Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6David S. Miller2-4/+56
2010-06-15bridge: use rx_handler_data pointer to store net_bridge_port pointerJiri Pirko2-3/+3
Register net_bridge_port pointer as rx_handler data pointer. As br_port is removed from struct net_device, another netdev priv_flag is added to indicate the device serves as a bridge port. Also rcuized pointers are now correctly dereferenced in br_fdb.c and in netfilter parts. Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-06-14mac80211: Set basic rates while joining ibss networkTeemu Paasikivi1-0/+49
This patch adds support to nl80211 and mac80211 to set basic rates when joining/creating ibss network. Original patch was posted by Johannes Berg on the linux-wireless posting list. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-06-14cfg80211/mac80211: allow action frame TX/RX in IBSSJohannes Berg2-4/+7
When in IBSS mode, currently action frame TX and RX cannot be used. Allow using it to talk to any peer, or for public action frames. Also, while at it, restructure the code in mac80211 to make it easier to add this for other interface types in the future. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-06-02cfg80211: make action channel type optionalJohannes Berg3-1/+6
When sending action frames, we want to verify that we do that on the correct channel. However, checking the channel type in addition can get in the way, since the channel type could change on the fly during an association, and it's not useful to have the channel type anyway since it has no effect on the transmission. Therefore, make it optional to specify so that if wanted, it can still be checked, but is not required. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-06-02cfg80211: don't refuse HT20 channels on devices that don't support HT40Helmut Schaa1-2/+3
Don't refuse HT20 channels on devices that don't support HT40. Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-05-21cfg80211: add missing bracesJohannes Berg1-2/+4
Specifying a valid channel type will get goto out rather than continuing, due to missing braces. This affects both remain on channel and action frame TX commands. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-05-21cfg80211: fix crash in cfg80211_set_freq()Felix Fietkau1-1/+1
Since wdev can be NULL, check it before dereferencing it Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-05-21cfg80211: Fix signal_type comparisonSujith1-2/+2
signal_type is enum cfg80211_signal_type. This fixes the gcc warning: scan.c: In function `cfg80211_inform_bss': scan.c:518:6: warning: comparison between `enum cfg80211_signal_type' and `enum nl80211_bss' scan.c: In function `cfg80211_inform_bss_frame': scan.c:574:6: warning: comparison between `enum cfg80211_signal_type' and `enum nl80211_bss' Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-05-11Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davemJohn W. Linville7-103/+163
Conflicts: drivers/net/wireless/ath/ar9170/main.c
2010-05-07cfg80211/mac80211: better channel handlingJohannes Berg7-103/+163
Currently (all tested with hwsim) you can do stupid things like setting up an AP on a certain channel, then adding another virtual interface and making that associate on another channel -- this will make the beaconing to move channel but obviously without the necessary IEs data update. In order to improve this situation, first make the configuration APIs (cfg80211 and nl80211) aware of multi-channel operation -- we'll eventually need that in the future anyway. There's one userland API change and one API addition. The API change is that now SET_WIPHY must be called with virtual interface index rather than only wiphy index in order to take effect for that interface -- luckily all current users (hostapd) do that. For monitor interfaces, the old setting is preserved, but monitors are always slaved to other devices anyway so no guarantees. The second userland API change is the introduction of a per virtual interface SET_CHANNEL command, that hostapd should use going forward to make it easier to understand what's going on (it can automatically detect a kernel with this command). Other than mac80211, no existing cfg80211 drivers are affected by this change because they only allow a single virtual interface. mac80211, however, now needs to be aware that the channel settings are per interface now, and needs to disallow (for now) real multi-channel operation, which is another important part of this patch. One of the immediate benefits is that you can now start hostapd to operate on a hardware that already has a connection on another virtual interface, as long as you specify the same channel. Note that two things are left unhandled (this is an improvement -- not a complete fix): * different HT/no-HT modes currently you could start an HT AP and then connect to a non-HT network on the same channel which would configure the hardware for no HT; that can be fixed fairly easily * CSA An AP we're connected to on a virtual interface might indicate switching channels, and in that case we would follow it, regardless of how many other interfaces are operating; this requires more effort to fix but is pretty rare after all Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-05-05Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davemJohn W. Linville2-1/+6
Conflicts: drivers/net/wireless/libertas_tf/cmd.c drivers/net/wireless/libertas_tf/main.c
2010-04-27cfg80211: Remove default dynamic PS timeout valueJuuso Oikarinen1-1/+2
Now that the mac80211 is choosing dynamic ps timeouts based on the ps-qos network latency configuration, configure a default value of -1 as the dynamic ps timeout in cfg80211. This value allows the mac80211 to determine the value to be used. Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-04-27cfg80211: add ap isolation supportFelix Fietkau1-0/+4
This is used to configure APs to not bridge traffic between connected stations. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-04-23Merge branch 'master' into for-davemJohn W. Linville1-6/+10
Conflicts: drivers/net/wireless/ath/ath9k/phy.c drivers/net/wireless/iwlwifi/iwl-6000.c drivers/net/wireless/iwlwifi/iwl-debugfs.c
2010-04-16cfg80211: Avoid sending IWEVASSOCREQIE and IWEVASSOCRESPIE events with NULL event bodyNishant Sarmukadam1-6/+10
In a scenario, where a cfg80211 driver (station mode) does not send assoc request and assoc response IEs in cfg80211_connect_result after a successful association to an AP, cfg80211 sends IWEVASSOCREQIE and IWEVASSOCRESPIE to the user space application with NULL data. This can cause an issue at the event recipient. An example of this is when cfg80211 sends IWEVASSOCREQIE and IWEVASSOCRESPIE events with NULL event body to wpa_supplicant. The wpa_supplicant overwrites the assoc request and assoc response IEs for this station with NULL data. If the association is WPA/WPA2, the wpa_supplicant is not able to generate EAPOL handshake messages, since the IEs are NULL. With the patch, req_ie and resp_ie will be NULL by avoiding the assignment if the driver has not sent the IEs to cfg80211. The event sending code sends the events only if resp_ie and req_ie are not NULL. This will ensure that the events are not sent with NULL event body. Signed-off-by: Nishant Sarmukadam <nishants@marvell.com> Reviewed-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-04-15Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davemJohn W. Linville6-35/+86
Conflicts: Documentation/feature-removal-schedule.txt drivers/net/wireless/ath/ath5k/phy.c drivers/net/wireless/wl12xx/wl1271_main.c
2010-04-11Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6David S. Miller13-0/+13
Conflicts: drivers/net/stmmac/stmmac_main.c drivers/net/wireless/wl12xx/wl1271_cmd.c drivers/net/wireless/wl12xx/wl1271_main.c drivers/net/wireless/wl12xx/wl1271_spi.c net/core/ethtool.c net/mac80211/scan.c
2010-04-08Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 into mergeJohn W. Linville1-7/+5
Conflicts: Documentation/feature-removal-schedule.txt drivers/net/wireless/ath/ath5k/phy.c drivers/net/wireless/iwlwifi/iwl-4965.c drivers/net/wireless/iwlwifi/iwl-agn.c drivers/net/wireless/iwlwifi/iwl-core.c drivers/net/wireless/iwlwifi/iwl-core.h drivers/net/wireless/iwlwifi/iwl-tx.c
2010-04-07cfg80211: Add local-state-change-only auth/deauth/disassocJouni Malinen4-25/+63
cfg80211 is quite strict on allowing authentication and association commands only in certain states. In order to meet these requirements, user space applications may need to clear authentication or association state in some cases. Currently, this can be done with deauth/disassoc command, but that ends up sending out Deauthentication or Disassociation frame unnecessarily. Add a new nl80211 attribute to allow this sending of the frame be skipped, but with all other deauth/disassoc operations being completed. Similar state change is also needed for IEEE 802.11r FT protocol in the FT-over-DS case which does not use Authentication frame exchange in a transition to another BSS. For this to work with cfg80211, an authentication entry needs to be created for the target BSS without sending out an Authentication frame. The nl80211 authentication command can be used for this purpose, too, with the new attribute to indicate that the command is only for changing local state. This enables wpa_supplicant to complete FT-over-DS transition successfully. Signed-off-by: Jouni Malinen <j@w1.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-04-06Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6David S. Miller1-7/+5
Conflicts: drivers/net/bonding/bond_main.c drivers/net/via-velocity.c drivers/net/wireless/iwlwifi/iwl-agn.c
2010-04-06Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6Linus Torvalds1-7/+5
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (37 commits) smc91c92_cs: fix the problem of "Unable to find hardware address" r8169: clean up my printk uglyness net: Hook up cxgb4 to Kconfig and Makefile cxgb4: Add main driver file and driver Makefile cxgb4: Add remaining driver headers and L2T management cxgb4: Add packet queues and packet DMA code cxgb4: Add HW and FW support code cxgb4: Add register, message, and FW definitions netlabel: Fix several rcu_dereference() calls used without RCU read locks bonding: fix potential deadlock in bond_uninit() net: check the length of the socket address passed to connect(2) stmmac: add documentation for the driver. stmmac: fix kconfig for crc32 build error be2net: fix bug in vlan rx path for big endian architecture be2net: fix flashing on big endian architectures be2net: fix a bug in flashing the redboot section bonding: bond_xmit_roundrobin() fix drivers/net: Add missing unlock net: gianfar - align BD ring size console messages net: gianfar - initialize per-queue statistics ...
2010-03-31nl80211: reenable station del for meshMarco Porsch1-1/+2
iw dev <devname> station del <MAC address> is quiet useful in mesh mode and should be possible. Signed-off-by: Marco Porsch <marco.porsch@siemens.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-03-31mac80211: support paged rx SKBsZhu Yi1-6/+18
Mac80211 drivers can now pass paged SKBs to mac80211 via ieee80211_rx{_irqsafe}. The implementation currently use skb_linearize() in a few places i.e. management frame handling, software decryption, defragmentation and A-MSDU process. We will optimize them one by one later. Signed-off-by: Zhu Yi <yi.zhu@intel.com> Cc: Kalle Valo <kalle.valo@iki.fi> Cc: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-03-31wireless: remove trailing space in messagesFrans Pop1-3/+3
Also correct indentation in net/wireless/reg.c. Signed-off-by: Frans Pop <elendil@planet.nl> Signed-off-by: John W. Linville <linville@tuxdriver.com>