summaryrefslogtreecommitdiffstats
path: root/net/wireless/nl80211.c
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'master' into for-davemJohn W. Linville2012-04-121-15/+77
|\ | | | | | | | | | | Conflicts: drivers/net/wireless/iwlwifi/iwl-testmode.c net/wireless/nl80211.c
| * Merge branch 'master' of ↵John W. Linville2012-04-121-13/+18
| |\ | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
| | * nl80211: ensure interface is up in various APIsJohannes Berg2012-04-091-13/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The nl80211 handling code should ensure as much as it can that the interface is in a valid state, it can certainly ensure the interface is running. Not doing so can cause calls through mac80211 into the driver that result in warnings and unspecified behaviour in the driver. Cc: stable@vger.kernel.org Reported-by: Ben Greear <greearb@candelatech.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * | cfg80211: add channel switch notify eventThomas Pedersen2012-04-111-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The firmware may decide to switch channels while already beaconing, e.g. in response to a cfg80211 connect request on a different vif. Add this event to notify userspace when an AP or GO interface has successfully migrated to a new channel, so it can update its configuration accordingly. Signed-off-by: Thomas Pedersen <c_tpeder@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * | cfg80211/mac80211: enable proper device_set_wakeup_enable handlingJohannes Berg2012-04-111-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In WoWLAN, we only get the triggers when we actually get to suspend. As a consequence, drivers currently don't know that the device should enable wakeup. However, the device_set_wakeup_enable() API is intended to be called when the wakeup is enabled, not later when needed. Add a new set_wakeup() call to cfg80211 and mac80211 to allow drivers to properly call device_set_wakeup_enable. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * | {nl,cfg}80211: Support for mesh synchronizationJavier Cardona2012-04-101-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Report Toffset to userspace. Let userspace select the mesh synchronization method. Signed-off-by: Marco Porsch <marco.porsch@s2005.tu-chemnitz.de> Signed-off-by: Pavel Zubarev <pavel.zubarev@gmail.com> Signed-off-by: Javier Cardona <javier@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * | cfg80211/nl80211: clarify TX queue APIJohannes Berg2012-04-101-2/+5
| |/ | | | | | | | | | | | | | | | | | | | | | | With the plan to change mac80211's queue API to not map ACs to queues 1:1, it seems necessary to clarify some APIs that act on ACs rather than on queues to spell that out explicitly. Do this. Also verify that the AC number given is valid. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | wireless: Stop using NLA_PUT*().David S. Miller2012-04-011-544/+660
|/ | | | | | | These macros contain a hidden goto, and are thus extremely error prone and make code hard to audit. Signed-off-by: David S. Miller <davem@davemloft.net>
* cfg80211: allow CFG80211_SIGNAL_TYPE_UNSPEC in station_infoJohn W. Linville2012-03-261-10/+19
| | | | | | | | | | | The station_info struct had demanded dBm signal values, but the cfg80211 wireless extensions implementation was also accepting "unspecified" (i.e. RSSI) unit values while the nl80211 code was completely unaware of them. Resolve this by formally allowing the "unspecified" units while making nl80211 ignore them. Signed-off-by: John W. Linville <linville@tuxdriver.com> Reviewed-by: Johannes Berg <johannes@sipsolutions.net>
* cfg80211: Add background scan period attribute.Bala Shanmugam2012-03-121-0/+8
| | | | | | | | Receive background scan period as part of connect command and pass the same to the driver. Signed-off-by: Bala Shanmugam <bkamatch@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* cfg80211/mac80211: report signal strength for mgmt framesJohannes Berg2012-03-061-2/+7
| | | | | | | | | | Add the signal strength (in dBm only for now) to frames that are received via nl80211's various frame APIs. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Acked-by: Kalle Valo <kvalo@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* cfg80211: Add an attribute to set inactivity timeout in AP modeVasanthakumar Thiagarajan2012-03-051-0/+8
| | | | | | | | | | | | | | | | This patch adds an attribute, NL80211_ATTR_INACTIVITY_TIMEOUT, to set the inactivity timeout which can be used to remove the station in AP mode. This can be passed in NL80211_CMD_START_AP and used by the drivers which have AP MLME in firmware but don't support get_station() properly. To disable inactivity timer in userspace, wpa_s for example, there is a new flag, NL80211_FEATURE_INACTIVITY_TIMER, in nl80211_feature_flags through which drivers can register their capability to use the inactivity timeout to free the stations. Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Acked-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* {nl,cfg,mac}80211: Implement RSSI threshold for mesh peeringAshok Nagarajan2012-03-051-0/+5
| | | | | | | | | | | | | | 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>
* cfg80211: restructure AP/GO mode APIJohannes Berg2012-02-221-113/+142
| | | | | | | | | | | | | | | | | | | | | | | | The AP/GO mode API isn't very clearly defined, it has "set beacon" and "new beacon" etc. Modify the API to the following: * start AP -- all settings * change beacon -- new beacon data * stop AP -- stop AP mode operation This also reflects in the nl80211 API, rename the commands there correspondingly (but keep the old names for compatibility.) Overall, this makes it much clearer what's going on in the API. Kalle developed the ath6kl changes, I created the rest of the patch. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: off by one in mcs mask handlingDan Carpenter2012-02-061-1/+1
| | | | | | | | "ridx" is used as an index into the mcs_mask[] array which has IEEE80211_HT_MCS_MASK_LEN elements. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* cfg80211/mac80211: userspace peer authorization in IBSSAntonio Quartulli2012-02-061-8/+12
| | | | | | | | If the IBSS network is RSN-protected, let userspace authorize the stations instead of adding them as AUTHORIZED by default. Signed-off-by: Antonio Quartulli <ordex@autistici.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* cfg80211: stop tracking authenticated stateJohannes Berg2012-02-061-10/+8
| | | | | | | | | | | | | | | | | | | | | | | | | To track authenticated state seems to have been a design mistake in cfg80211. It is possible to have out of band authentication (FT), tracking multiple authentications caused more problems than it ever helped, and the implementation in mac80211 is too complex. Remove all this complexity, and let userspace do whatever it wants to, mac80211 can deal with that just fine. Association is still tracked of course, but authentication no longer is. Local auth state changes are thus no longer of value, so ignore them completely. This will also help implement SAE -- asking the driver to do an authentication is now almost equivalent to sending an authentication frame, with the exception of shared key authentication which is still handled completely. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* nl80211: add support for mcs masksSimon Wunderlich2012-01-301-1/+60
| | | | | | | | | Allow to set mcs masks through nl80211. We also allow to set MCS rates but no legacy rates (and vice versa). Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Signed-off-by: Mathias Kretschmer <mathias.kretschmer@fokus.fraunhofer.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* {nl,cfg,mac}80211: Add support of setting non-forwarding entity in MeshChun-Yeow Yeoh2012-01-271-0/+5
| | | | | | | | | A mesh node that joins the mesh network is by default a forwarding entity. This patch allows the mesh node to set as non-forwarding entity. Whenever dot11MeshForwarding is set to 0, the mesh node can prevent itself from forwarding the traffic which is not destined to him. Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* cfg80211: fix a few -Wshadow warningsJohannes Berg2012-01-271-5/+3
| | | | | | | | It seems that -Wshadow is no longer default in sparse runs, but let's fix the warnings anyway. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* nl80211: fix old station flags compatibilityJohannes Berg2012-01-111-4/+30
| | | | | | | | | | | | | | | | | My patch to validate station flags broke compatibility with the old station flags setting where all flags are always set at once since it always set the mask as all possible flags which ended up being rejected later in the station add/modify code. Fix by parsing only the current flags in the old flags attribute -- new applications and new flags should use (and will now require) the new flags attribute where the mask is given by the application. Reported-and-tested-by: Thomas Hilber <ath9k-dev@toh.cx> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* cfg80211: Return beacon loss count in stationPaul Stewart2011-12-191-0/+3
| | | | | | | | If station info contains a beacon loss count, return it to userspace. Signed-off-by: Paul Stewart <pstew@chromium.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* cfg80211: validate nl80211 station handling betterJohannes Berg2011-12-151-87/+112
| | | | | | | | | | | | | | The nl80211 station handling code is a bit messy and doesn't do a lot of validation. It seems like this could be an issue for drivers that don't use mac80211 to validate everything. As cfg80211 doesn't keep station state, move the validation of allowing supported_rates to change for TDLS only in station mode to mac80211. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* nl80211: add TDLS peer flag to policyJohannes Berg2011-12-151-0/+1
| | | | | | | | This was evidently missed in the TDLS patch (07ba55d7). Cc: Arik Nemtsov <arik@wizery.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* nl80211: accept testmode dump with netdevJohannes Berg2011-12-141-19/+31
| | | | | | | | | | | | | | All nl80211 commands that need only the wiphy still allow identifying it by giving an interface index, except, as Kenny pointed out, the testmode dump support. Fix this by looking up the wiphy via the ifidx in this case as well. Tested-by: Kenny Hsu <kenny.hsu@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* nl80211: Parse channel type attribute in an ibss join requestAlexander Simon2011-12-061-2/+30
| | | | | | | | | | | | | | | | | | | | | Prepare cfg80211 for IBSS HT: * extend cfg80211 ibss struct with channel_type * Check if extension channel can be used * Export can_beacon_sec_chan for use in mac80211 (will be called from ibss.c later). Signed-off-by: Alexander Simon <an.alexsimon@googlemail.com> [siwu@hrz.tu-chemnitz.de: Updates] * fix cfg80211_can_beacon_ext_chan comment * remove implicit channel_type enum assumptions * remove radar channel flags check * add HT IBSS feature flag * reword commit message Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Signed-off-by: Mathias Kretschmer <mathias.kretschmer@fokus.fraunhofer.de> Reviewed-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* Merge branch 'master' of ↵John W. Linville2011-12-021-2/+2
|\ | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless Conflicts: drivers/net/wireless/iwlwifi/iwl-agn.c drivers/net/wireless/libertas/cfg.c
| * nl80211: fix MAC address validationEliad Peller2011-11-281-2/+2
| | | | | | | | | | | | | | | | | | | | MAC addresses have a fixed length. The current policy allows passing < ETH_ALEN bytes, which might result in reading beyond the buffer. Cc: stable@vger.kernel.org Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | {nl,cfg,mac}80211: implement dot11MeshHWMPperrMinIntervalThomas Pedersen2011-11-281-0/+6
| | | | | | | | | | | | | | | | As per 802.11mb 13.9.11.3 Signed-off-by: Thomas Pedersen <thomas@cozybit.com> Signed-off-by: Javier Cardona <javier@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | {nl,cfg,mac}80211: Allow Setting Multicast Rate in MeshChun-Yeow Yeoh2011-11-281-0/+5
| | | | | | | | | | | | Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@gmail.com> Signed-off-by: Thomas Pedersen <thomas@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | wireless: Add NoAck per tid supportSimon Wunderlich2011-11-281-0/+28
| | | | | | | | | | | | | | | | This patch contains the configuration changes in nl80211/cfg80211. Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Signed-off-by: Mathias Kretschmer <mathias.kretschmer@fokus.fraunhofer.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | wireless: Support ht-capabilities over-rides.Ben Greear2011-11-211-1/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows users to disable features such as HT, HT40, and to modify the MCS, AMPDU, and AMSDU settings for drivers that support it. The MCS, AMPDU, and AMSDU features that may be disabled are are reported in the phy-info netlink message as a mask. Attemping to disable features that are not supported will take no affect, but will not return errors. This is to aid backwards compatibility in user-space apps that may not be clever enough to deal with parsing the the capabilities mask. This patch only enables the infrastructure. An additional patch will enable the feature in mac80211. Signed-off-by: Ben Greear <greearb@candelatech.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | nl80211: make get_vlan logic more commonJohannes Berg2011-11-211-23/+31
| | | | | | | | | | | | | | | | | | get_vlan() sets the output parameter even if it returns an error, which is a bit odd. Instead, convert it to use ERR_PTR. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | cfg80211: add flags for off-channel capabilitiesJohannes Berg2011-11-211-5/+11
| | | | | | | | | | | | | | | | | | | | | | Currently mac80211 implements these for all devices, but given restrictions of some devices that isn't really true, so prepare for being able to remove the capability for some mac80211 devices. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Acked-by: Kalle Valo <kvalo@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | nl80211: add testmode to the list of supported commandsKalle Valo2011-11-211-0/+4
| | | | | | | | | | | | | | | | | | | | | | User space might want to test if driver supports testmode. Adding testmode to the list of supported commands makes this easier. I omitted testmode_dump() in purpose. I assume all drivers implementing testmode_dump() will also implement testmode_cmd(). Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | cfg80211: process regulatory DFS region for countriesLuis R. Rodriguez2011-11-211-0/+15
| | | | | | | | | | | | | | | | | | | | | | The wireless-regdb now has support for mapping a country to one DFS region. CRDA sends this to us now so process it so we can provide that hint to drivers. This will later be used by code for processing DFS in a way that meets the criteria for the DFS region the country belongs to. Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | nl80211: Pass probe response data to driversArik Nemtsov2011-11-111-0/+9
| | | | | | | | | | | | | | | | Pass probe-response data from usermode via beacon parameters. Signed-off-by: Guy Eilam <guy@wizery.com> Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | nl80211: Add probe response offload attributeArik Nemtsov2011-11-111-0/+4
| | | | | | | | | | | | | | | | | | | | | | Notify user-space about probe-response offloading support in the driver. A wiphy flag is used to indicate support and a bitmap of protocols determines which protocols are supported. Signed-off-by: Guy Eilam <guy@wizery.com> Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | nl80211: fix compiler warningJohannes Berg2011-11-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | John reported the following warning: net/wireless/nl80211.c: In function ‘nl80211_tx_mgmt’: net/wireless/nl80211.c:5286:8: warning: ‘hdr’ may be used uninitialized in this function Evidently, his version of gcc isn't able to see that when "msg" is initialized, "hdr" must also be. My gcc, 4.6.1, can actually see that and doesn't warn. Simply initialize the variable to NULL. That means if the compiler was ever right we'll crash though so isn't really optimal since it may hide warnings from the compiler when somebody modifies this code in the future. Reported-by: John Linville <linville@tuxdriver.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | nl80211: advertise socket TX status capabilityJohannes Berg2011-11-091-0/+2
| | | | | | | | | | | | | | | | | | The new wifi socket TX capability should be supported by wifi drivers, let them advertise whether they do or not. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | cfg80211/mac80211: allow management TX to not wait for ACKJohannes Berg2011-11-091-15/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | For probe responses it can be useful to not wait for ACK to avoid retransmissions if the station that sent the probe is already on the next channel, so allow userspace to request not caring about the ACK with a new nl80211 flag. Since mac80211 needs to be updated for the new function prototype anyway implement it right away -- it's just a few lines of code. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | cfg80211: add event for unexpected 4addr framesJohannes Berg2011-11-091-2/+17
| | | | | | | | | | | | | | | | | | The frames are used by AP/STA WDS mode, and hostapd needs to know when such a frame was received to set up the VLAN appropriately to allow using it. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | cfg80211: allow registering to beaconsJohannes Berg2011-11-091-1/+69
| | | | | | | | | | | | | | | | | | | | Add the ability to register to received beacon frames to allow implementing OLBC logic in userspace. The registration is per wiphy since there's no point in receiving the same frame multiple times. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | nl80211: add API to probe a clientJohannes Berg2011-11-091-0/+104
| | | | | | | | | | | | | | | | | | When the AP SME in hostapd is used it wants to probe the clients when they have been idle for some time. Add explicit API to support this. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | nl80211: advertise device AP SMEJohannes Berg2011-11-091-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add the ability to advertise that the device contains the AP SME and what features it can support. There are currently no features in the bitmap -- probe response offload will be advertised by a few patches Arik is working on now (who took over from Guy Eilam) and a device with AP SME will typically implement and require response offload. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | nl80211: allow subscribing to unexpected class3 framesJohannes Berg2011-11-091-0/+66
| | | | | | | | | | | | | | | | | | | | | | To implement AP mode without monitor interfaces we need to be able to send a deauth to stations that send frames without being associated. Enable this by adding a new nl80211 event for such frames that an application can subscribe to. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | nl80211: Increase maximum NL80211_ATTR_KEY_SEQ length to 16Jouni Malinen2011-11-091-2/+2
| | | | | | | | | | | | | | | | WPI-SMS4 uses 16-octet PN field, so we need to allow longer key sequence values to be configured. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | Merge branch 'master' of ↵John W. Linville2011-11-091-2/+7
|\ \ | |/ | | | | git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
| * cfg80211: allow setting TXQ parameters only in AP modeJohannes Berg2011-11-071-0/+6
| | | | | | | | | | | | | | | | | | | | | | In other modes the parameters should not be set. Right now, mac80211 will set them, even if the user asked for setting them on VLANs which the driver doesn't know about, causing all kinds of trouble. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * nl80211: fix HT capability attribute validationJohannes Berg2011-11-071-2/+1
| | | | | | | | | | | | | | | | | | | | | | Since the NL80211_ATTR_HT_CAPABILITY attribute is used as a struct, it needs a minimum, not maximum length. Enforce that properly. Not doing so could potentially lead to reading after the buffer. Cc: stable@vger.kernel.org Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
OpenPOWER on IntegriCloud