aboutsummaryrefslogtreecommitdiff
path: root/net/wireless
AgeCommit message (Collapse)AuthorFilesLines
2014-09-11cfg80211: clear wext keys when freeing and removing themJohannes Berg2-1/+3
When freeing the keys stored for wireless extensions, clear the memory to avoid having the key material stick around in memory "forever". Similarly, when userspace overwrites a key, actually clear it instead of just setting the key length to zero. Signed-off-by: Johannes Berg <[email protected]>
2014-09-11cfg80211: clear connect keys when freeing themJohannes Berg5-11/+11
When freeing the connect keys, clear the memory to avoid having the key material stick around in memory "forever". Signed-off-by: Johannes Berg <[email protected]>
2014-09-05cfg80211: enable dynack through nl80211Lorenzo Bianconi1-0/+11
Enable ACK timeout estimation algorithm (dynack) using mac80211 set_coverage_class API. Dynack is activated passing coverage class equals to -1 to lower drivers and it is automatically disabled setting valid value for coverage class. Define NL80211_ATTR_WIPHY_DYN_ACK flag attribute to enable dynack from userspace. In order to activate dynack NL80211_FEATURE_ACKTO_ESTIMATION feature flag must be set by lower drivers to indicate dynack capability. Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2014-09-05cfg80211: avoid duplicate entries on regdomain intersectionEliad Peller1-21/+60
The regdom intersection code simply tries intersecting each rule of the source with each rule of the target. Since the resulting intersections are not observed as a whole, this can result in multiple overlapping/duplicate entries. Make the rule addition a bit more smarter, by looking for rules that can be contained within other rules, and adding only extended ones. Signed-off-by: Eliad Peller <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2014-09-05nl80211: Add flag attribute for RRM connectionsAssaf Krauss1-0/+17
Add a flag attribute to use in associations, for tagging the target connection as supporting RRM. It is the responsibility of upper layers to set this flag only if both the underlying device, and the target network indeed support RRM. To be used in ASSOCIATE and CONNECT commands. Signed-off-by: Assaf Krauss <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2014-09-05cfg80211: add Intel Mobile Communications copyrightJohannes Berg6-0/+6
Our legal structure changed at some point (see wikipedia), but we forgot to immediately switch over to the new copyright notice. For files that we have modified in the time since the change, add the proper copyright notice now. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2014-09-04Merge tag 'mac80211-next-for-john-2014-08-29' of ↵John W. Linville4-16/+31
git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next Johannes Berg <[email protected]> says: "Not that much content this time. Some RCU cleanups, crypto performance improvements, and various patches all over, rather than listing them one might as well look into the git log instead." Signed-off-by: John W. Linville <[email protected]> Conflicts: drivers/net/wireless/ath/wil6210/wmi.c
2014-09-03nl80211: clear skb cb before passing to netlinkJohannes Berg1-0/+6
In testmode and vendor command reply/event SKBs we use the skb cb data to store nl80211 parameters between allocation and sending. This causes the code for CONFIG_NETLINK_MMAP to get confused, because it takes ownership of the skb cb data when the SKB is handed off to netlink, and it doesn't explicitly clear it. Clear the skb cb explicitly when we're done and before it gets passed to netlink to avoid this issue. Cc: [email protected] [this goes way back] Reported-by: Assaf Azulay <[email protected]> Reported-by: David Spinadel <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2014-08-26cfg80211: allow passing frame type to cfg80211_inform_bss()Johannes Berg1-2/+13
When using the cfg80211_inform_bss[_width]() functions drivers cannot currently indicate whether the data was received in a beacon or probe response. Fix that by passing a new enum that indicates such (or unknown). For good measure, use it in ath6kl. Acked-by: Kalle Valo <[email protected]> [ath6kl] Acked-by: Arend van Spriel <[email protected]> [brcmfmac] Signed-off-by: Johannes Berg <[email protected]>
2014-08-26cfg80211: clarify BSS probe response vs. beacon dataJohannes Berg2-6/+16
There are a few possible cases of where BSS data came from: 1) only a beacon has been received 2) only a probe response has been received 3) the driver didn't report what it received (this happens when using cfg80211_inform_bss[_width]()) 4) both probe response and beacon data has been received Unfortunately, in the userspace API, a few things weren't there: a) there was no way to differentiate cases 1) and 4) above without comparing the data of the IEs b) the TSF was always from the last frame, instead of being exposed for beacon/probe response separately like IEs Fix this by i) exporting a new flag attribute that indicates whether or not probe response data has been received - this addresses (a) ii) exporting a BEACON_TSF attribute that holds the beacon's TSF if a beacon has been received iii) not exporting the beacon attributes in case (3) above as that would just lead userspace into thinking the data actually came from a beacon when that isn't clear To implement this, track inside the IEs struct whether or not it (definitely) came from a beacon. Reported-by: William Seto Signed-off-by: Johannes Berg <[email protected]>
2014-08-26cfg80211: re-enable CSA for drivers that support itMichal Kazior1-6/+0
This reverts commit dda444d52496aa8ddc501561bca580f1374a96a9. Channel switching code has been reworked and improved significantly since the time original locking issues were found. Signed-off-by: Michal Kazior <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2014-08-26cfg80211: remove @gfp parameter from cfg80211_rx_mgmt()Vladimir Kondratiev1-2/+2
In the cfg80211_rx_mgmt(), parameter @gfp was used for the memory allocation. But, memory get allocated under spin_lock_bh(), this implies atomic context. So, one can't use GFP_KERNEL, only variants with no __GFP_WAIT. Actually, in all occurrences GFP_ATOMIC is used (wil6210 use GFP_KERNEL by mistake), and it should be this way or warning triggered in the memory allocation code. Remove @gfp parameter as no actual choice exist, and use hard coded GFP_ATOMIC for memory allocation. Signed-off-by: Vladimir Kondratiev <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2014-08-25wireless: core: Reorder wiphy_register() notifications relevantlyTomasz Bursztyka1-4/+3
Currently it can send regulatory domain change notification before any NEW_WIPHY notification. Moreover, if rfill_register() fails, calling wiphy_unregister() will send a DEL_WIPHY though no NEW_WIPHY had been sent previously. Thus reordering so it properly notifies NEW_WIPHY before any other. Signed-off-by: Tomasz Bursztyka <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-07-25Merge branch 'master' of ↵John W. Linville1-1/+2
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless Conflicts: net/mac80211/cfg.c Signed-off-by: John W. Linville <[email protected]>
2014-07-22Merge git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-nextJohn W. Linville3-14/+30
2014-07-21wireless: fixup genregdb.awk for remove of antenna gain from wireless-regdLuis R. Rodriguez2-13/+28
Since "wireless-regdb: remove antenna gain" was merged in the wireless-regdb tree, the awk script parser has been incompatible with the 'official' regulatory database. This fixes that up. Without this change the max EIRP is set to 0 making 802.11 devices useless. The fragile nature of the awk parser must be replaced, but ideas over how to do that in the most scalable way are being reviewed. In the meantime update the documentation for CFG80211_INTERNAL_REGDB so folks are aware of expectations for now. Reported-by: John Walker <[email protected]> Reported-by: Krishna Chaitanya <[email protected]> Signed-off-by: Luis R. Rodriguez <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2014-07-21cfg80211: fix TDLS setup with VHT peersArik Nemtsov1-1/+2
Some VHT TDLS peers (Google Nexus 5) include the VHT-AID IE in their TDLS setup request/response. Usermode passes this aid as the station aid, causing it to fail verifiction, since this happens in the "set_station" stage. Make an exception for the TDLS use-case. Signed-off-by: Arik Nemtsov <[email protected]> Reviewed-by: Emmanuel Grumbach <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2014-07-18cfg80211: fix mic_failure tracingEliad Peller1-1/+2
tsc can be NULL (mac80211 currently always passes NULL), resulting in NULL-dereference. check before copying it. Cc: [email protected] Signed-off-by: Eliad Peller <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2014-07-10Merge branch 'master' of ↵John W. Linville3-22/+13
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
2014-06-25cfg80211: remove channel_switch combination checkMichal Kazior1-11/+0
Driver is now responsible for veryfing if the switch is possible. Since this is inherently tricky driver may decide to disconnect an interface later with cfg80211_stop_iface(). This doesn't mean driver can accept everything. It should do it's best to verify requests and reject them as soon as possible. Signed-off-by: Michal Kazior <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2014-06-24nl80211: move set_qos_map command into split stateJohannes Berg1-6/+5
The non-split wiphy state shouldn't be increased in size so move the new set_qos_map command into the split if statement. Cc: [email protected] (3.14+) Fixes: fa9ffc745610 ("cfg80211: Add support for QoS mapping") Reviewed-by: Emmanuel Grumbach <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2014-06-23cfg80211: pass TDLS initiator in tdls_mgmt operationsArik Nemtsov3-6/+14
The TDLS initiator is set once during link setup. If determines the address ordering in the link identifier IE. Fix dependent drivers - mwifiex and mac80211. Signed-off-by: Arik Nemtsov <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2014-06-23cfg80211: fix elapsed_jiffies calculationEliad Peller1-1/+1
MAX_JIFFY_OFFSET has no meaning when calculating the elapsed jiffies, as jiffies run out until ULONG_MAX. This miscalculation results in erroneous values in case of a wrap-around. Signed-off-by: Eliad Peller <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2014-06-23Revert "cfg80211: Use 5MHz bandwidth by default when checking usable channels"Johannes Berg1-15/+7
This reverts commit 8eca1fb692cc9557f386eddce75c300a3855d11a. Felix notes that this broke regulatory, leaving channel 12 open for AP operation in the US regulatory domain where it isn't permitted. Link: http://mid.gmane.org/[email protected] Reported-by: Felix Fietkau <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2014-06-23cfg80211: make ethtool the driver's responsibilityJohannes Berg5-190/+2
Currently, cfg80211 tries to implement ethtool, but that doesn't really scale well, with all the different operations. Make the lower-level driver responsible for it, which currently only has an effect on mac80211. It will similarly not scale well at that level though, since mac80211 also has many drivers. To cleanly implement this in mac80211, introduce a new file and move some code to appropriate places. Signed-off-by: Johannes Berg <[email protected]>
2014-05-29Merge git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-nextJohn W. Linville4-19/+24
2014-05-27regdb: Generalize the mW to dBm power conversion[email protected]1-12/+2
Generalize the power conversion from mW to dBm using log. This should fix the below compilation error for country NO which adds a new power value 2000mW which is not handled earlier. CC [M] net/wireless/wext-sme.o CC [M] net/wireless/regdb.o net/wireless/regdb.c:1130:1: error: Unknown undeclared here (not in a function) net/wireless/regdb.c:1130:9: error: expected } before power make[2]: *** [net/wireless/regdb.o] Error 1 make[1]: *** [net/wireless] Error 2 make: *** [net] Error 2 Reported-By: John Walker <[email protected]> Signed-off-by: Chaitanya T K <[email protected]> Acked-by: John W. Linville <[email protected]> [remove unneeded parentheses, fix rounding by using %.0f] Signed-off-by: Johannes Berg <[email protected]>
2014-05-26cfg80211: send events when devices are added/removedJohannes Berg3-7/+22
We're currently sending NEW_WIPHY events for renames (which is a bit odd, but now can't be changed), but also send them for really new devices that register. Also send DEL_WIPHY events when a device is removed, the event ID for this was already reserved. Signed-off-by: Johannes Berg <[email protected]>
2014-05-22Merge git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-nextJohn W. Linville13-77/+252
2014-05-22cfg80211: allow RSSI compensationEmmanuel Grumbach1-4/+8
Channels in 2.4GHz band overlap, this means that if we send a probe request on channel 1 and then move to channel 2, we will hear the probe response on channel 2. In this case, the RSSI will be lower than if we had heard it on the channel on which it was sent (1 in this case). The firmware / low level driver can parse the channel in the DS IE or HT IE and compensate the RSSI so that it will still have a valid value even if we heard the frame on an adjacent channel. This can be done up to a certain offset. Add this offset as a configuration for the low level driver. A low level driver that can compensate the low RSSI in this case should assign the maximal offset for which the RSSI value is still valid. Signed-off-by: Emmanuel Grumbach <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2014-05-21cfg80211: don't set reg timeout for user-handled hintArik Nemtsov1-1/+2
Otherwise every "indoor" setting by usermode will cause a regdomain reset. Acked-by: Luis R. Rodriguez <[email protected]> Signed-off-by: Arik Nemtsov <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2014-05-21cfg80211: implement cfg80211_get_station cfg80211 APIAntonio Quartulli2-1/+19
Implement and export the new cfg80211_get_station() API. This utility can be used by other kernel modules to obtain detailed information about a given wireless station. It will be in particular useful to batman-adv which will implement a wireless rate based metric. Signed-off-by: Antonio Quartulli <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2014-05-20cfg80211: export expected throughput through get_station()Antonio Quartulli1-0/+4
Users may need information about the expected throughput towards a given peer. This value is supposed to consider the size overhead generated by the 802.11 header. This value is exported in kbps through the get_station() API by including it into the station_info object. Moreover, it is sent to user space when replying to the nl80211 GET_STATION command. This information will be useful to the batman-adv module which will use it for its new metric computation. Signed-off-by: Antonio Quartulli <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2014-05-19cfg80211: constify wowlan/coalesce mask/pattern pointersJohannes Berg1-17/+22
This requires changing the nl80211 parsing code a bit to use intermediate pointers for the allocation, but clarifies the API towards the drivers. Signed-off-by: Johannes Berg <[email protected]>
2014-05-19cfg80211: constify more pointers in the cfg80211 APIJohannes Berg3-3/+4
This also propagates through the drivers. The orinoco driver uses the cfg80211 API structs for internal bookkeeping, and so needs a (void *) cast that removes the const - but that's OK because it allocates those pointers. Signed-off-by: Johannes Berg <[email protected]>
2014-05-15cfg80211: Support multiple CSA countersAndrei Otcheretianski3-23/+66
Change the type of NL80211_ATTR_CSA_C_OFF_BEACON and NL80211_ATTR_CSA_C_OFF_PRESP to be NLA_BINARY which allows userspace to use beacons and probe responses with multiple CSA counters. This isn't breaking the API since userspace can continue to use nla_put_u16 for this attributes, which is equivalent to a single element u16 array. In addition advertise max number of supported CSA counters. This is needed when using CSA and eCSA IEs together. Signed-off-by: Andrei Otcheretianski <[email protected]> Signed-off-by: Luciano Coelho <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2014-05-15cfg80211: Add API to update CSA counters in mgmt framesAndrei Otcheretianski1-2/+22
Add NL80211_ATTR_CSA_C_OFFSETS_TX which holds an array of offsets to the CSA counters which should be updated when sending a management frames with NL80211_CMD_FRAME. This API should be used by the drivers that wish to keep the CSA counter updated in probe responses, but do not implement probe response offloading and so, do not use ieee80211_proberesp_get function. Signed-off-by: Andrei Otcheretianski <[email protected]> Signed-off-by: Luciano Coelho <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2014-05-15cfg80211: pass the actual iftype when calling cfg80211_chandef_dfs_required()Luciano Coelho2-4/+3
There is no need to pass NL80211_IFTYPE_UNSPECIFIED when calling cfg80211_chandef_dfs_required() since we always already have the interface type. So, pass the actual interface type instead. Additionally, have cfg80211_chandef_dfs_required() WARN if the passed interface type is NL80211_IFTYPE_UNSPECIFIED, so we can detect problems more easily. Tested-by: Janusz Dziedzic <[email protected]> Reported-by: Eliad Peller <[email protected]> Signed-off-by: Luciano Coelho <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2014-05-14cfg80211: fix start_radar_detection issueJanusz Dziedzic1-1/+1
After patch: cfg80211/mac80211: refactor cfg80211_chandef_dfs_required() start_radar_detection always fail with -EINVAL. Acked-by: Luciano Coelho <[email protected]> Signed-off-by: Janusz Dziedzic <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2014-05-13Merge branch 'master' of ↵John W. Linville2-3/+11
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
2014-05-13cfg80211: allow restricting supported dfs regionsFelix Fietkau2-2/+18
At the moment, the ath9k/ath10k DFS module only supports detecting ETSI radar patterns. Add a bitmap in the interface combinations, indicating which DFS regions are supported by the detector. If unset, support for all regions is assumed. Signed-off-by: Felix Fietkau <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2014-05-09mac80211: handle failed restart/resume betterJohannes Berg1-6/+14
When the driver fails during HW restart or resume, the whole stack goes into a very confused state with interfaces being up while the hardware is down etc. Address this by shutting down everything; we'll run into a lot of warnings in the process but that's better than having the whole stack get messed up. Reviewed-by: Arik Nemtsov <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2014-05-06cfg80211: export interface stopping functionMichal Kazior6-11/+65
This exports a new cfg80211_stop_iface() function. This is intended for driver internal interface combination management and channel switching. Due to locking issues (it re-enters driver) the call is asynchronous and uses cfg80211 event list/worker. Signed-off-by: Michal Kazior <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2014-05-05cfg80211: add cfg80211_sched_scan_stopped_rtnlEliad Peller1-2/+10
Add locked-version for cfg80211_sched_scan_stopped. This is used for some users that might want to call it when rtnl is already locked. Fixes: d43c6b6 ("mac80211: reschedule sched scan after HW restart") Cc: [email protected] (3.14+) Signed-off-by: Eliad Peller <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2014-05-05cfg80211: free sme on connection failuresEliad Peller1-1/+1
cfg80211 is notified about connection failures by __cfg80211_connect_result() call. However, this function currently does not free cfg80211 sme. This results in hanging connection attempts in some cases e.g. when mac80211 authentication attempt is denied, we have this function call: ieee80211_rx_mgmt_auth() -> cfg80211_rx_mlme_mgmt() -> cfg80211_process_auth() -> cfg80211_sme_rx_auth() -> __cfg80211_connect_result() but cfg80211_sme_free() is never get called. Fixes: ceca7b712 ("cfg80211: separate internal SME implementation") Cc: [email protected] (3.10+) Signed-off-by: Eliad Peller <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2014-04-29cfg80211: remove BUG_ON usageJohannes Berg2-3/+5
These really can't trigger unless somebody messes up the code, but don't make debugging it needlessly complicated, WARN and return instead of BUG_ON(). Signed-off-by: Johannes Berg <[email protected]>
2014-04-28cfg80211: Dynamic channel bandwidth changes in AP modeJouni Malinen3-12/+59
This extends NL80211_CMD_SET_CHANNEL to allow dynamic channel bandwidth changes in AP mode (including P2P GO) during a lifetime of the BSS. This can be used to implement, e.g., HT 20/40 MHz co-existence rules on the 2.4 GHz band. Signed-off-by: Jouni Malinen <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2014-04-25cfg80211: Use 5MHz bandwidth by default when checking usable channelsRostislav Lisovy1-7/+15
Current code checks if the 20MHz bandwidth is allowed for particular channel -- if it is not, the channel is disabled. Since we need to use 5/10 MHz channels, this code is modified in the way that the default bandwidth to check is 5MHz. If the maximum bandwidth allowed by the channel is smaller than 5MHz, the channel is disabled. Otherwise the channel is used and the flags are set according to the bandwidth allowed by the channel. Signed-off-by: Rostislav Lisovy <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2014-04-25cfg80211: Add attributes describing prohibited channel bandwidthRostislav Lisovy2-0/+15
Since there are frequency bands (e.g. 5.9GHz) allowing channels with only 10 or 5 MHz bandwidth, this patch adds attributes that allow keeping track about this information. When channel attributes are reported to user-space, make sure to not break old tools, i.e. if the 'split wiphy dump' is enabled, report the extra attributes (if present) describing the bandwidth restrictions. If the 'split wiphy dump' is not enabled, completely omit those channels that have flags set to either IEEE80211_CHAN_NO_10MHZ or IEEE80211_CHAN_NO_20MHZ. Add the check for new bandwidth restriction flags in cfg80211_chandef_usable() to comply with the restrictions. Signed-off-by: Rostislav Lisovy <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2014-04-25cfg80211: change return value of notifier functionZhao, Gang2-2/+4
Return NOTIFY_DONE if we don't care this time's notification, return NOTIFY_OK if we successfully handled this time's notification. That's the formal way to do it. Signed-off-by: Zhao, Gang <[email protected]> Signed-off-by: Johannes Berg <[email protected]>