aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless (follow)
AgeCommit message (Collapse)AuthorFilesLines
2013-03-06Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless into for-davemJohn W. Linville2-28/+26
2013-03-01Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless into for-davemJohn W. Linville1-58/+3
2013-03-01nl80211: increase wiphy dump size dynamicallyJohannes Berg1-5/+25
Given a device with many channels capabilities the wiphy information can still overflow even though its size in 3.9 was reduced to 3.8 levels. For new userspace and kernel 3.10 we're going to implement a new "split dump" protocol that can use multiple messages per wiphy. For now though, add a workaround to be able to send more information to userspace. Since generic netlink doesn't have a way to set the minimum dump size globally, and we wouldn't really want to set it globally anyway, increase the size only when needed, as described in the comments. As userspace might not be prepared for large buffers, we can only use 4k. Also increase the size for the get_wiphy command. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-02-27nl80211: remove channel width and extended capa advertisingJohannes Berg2-23/+1
This is another case of data increasing the size of the wiphy information significantly with a new feature, for now remove this as well. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-02-26nl80211: remove TCP WoWLAN informationJohannes Berg1-45/+0
Just like the radar information, the TCP WoWLAN capability data can increase the wiphy information and make it too big. Remove the TCP WoWLAN information; no driver supports it and new userspace tools will be required as well. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-02-26nl80211: remove radar informationJohannes Berg1-13/+3
The wiphy information is getting very close to being too much for a typical netlink dump message and adding the radar attributes to channels and interface combinations can push it over the limit, which means userspace gets no information whatsoever. Therefore, remove these again for now, no driver actually supports radar detection anyway and a modified userspace is required as well. We're working on a solution that will allow userspace to request splitting the information across multiple netlink messages, which will allow us to add this back. Cc: Simon Wunderlich <simon.wunderlich@s2003.tu-chemnitz.de> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-02-19Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davemJohn W. Linville1-9/+0
2013-02-18Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-nextDavid S. Miller13-379/+1486
John W. Linville says: ==================== This probably is the last big pull request for wireless bits for 3.9. Of course, I'm sure there will be a few stragglers here and there...surely a few bug fixes as well... :-) (In fact, I see that Johannes has already queued-up a few more for me while I was preparing this...) Included are a number of pulls... For mac80211-next, Johannes says: "The biggest change I have is undoubtedly Marco's mesh powersave implementation. Beyond that, I have a patch from Emmanuel to modify the DTIM period API in mac80211, scan improvements and a removal of some previous workaround code from Stanislaw, dynamic short slot time from Thomas and 64-bit station byte counters from Vladimir. I also made a number of changes myself, some related to WoWLAN, some auth/deauth improvements and most of them BSS list cleanups." "This time, I have relatively large number of fixes in various areas of the code (a memory leak in regulatory, an RX race in mac80211, the new radar checking caused a P2P device problem, some mesh issues with stations, an older bug in tracing and for kernel-doc) as well as a number of small new features. The biggest (in the diffstat) is my work on hidden SSID tracking." "Please pull to get * radar detection work from Simon * mesh improvements from Thomas * a connection monitoring/powersave fix from Wojciech * TDLS-related station management work from Jouni * VLAN crypto fixes from Michael Braun * CCK support in minstrel_ht from Felix * an SMPS (not SMSP, oops) related improvement in mac80211 (Emmanuel) * some WoWLAN work from Amitkumar Karwar: pattern match offset and a documentation fix * some WoWLAN work from myself (TCP connection wakeup feature API) * and a lot of VHT (and some HT) work (also from myself) And a number of more random cleanups/fixes. I merged mac80211/master to avoid a merge problem there." And regarding iwlwifi-next, Johannes says: "We continue work on our new driver, but I also have a WoWLAN and AP mode improvement for the previous driver and a change to use threaded interrupts to prepare us for working with non-PCIe devices." Regarding wl12xx, Luca says: "A few more patches intended for 3.9. Mostly some clean-ups I've been doing to make it easier to support device-tree. Also including one bug fix for wl12xx where the rates we advertise were wrong and an update in the wlconf structure to support newer firmwares." For the nfc-next bits, Samuel says: "This is the second NFC pull request for 3.9. We have: - A few pn533 fixes on top of Waldemar refactorization of the driver, one of them fixes target mode. - A new driver for Inside Secure microread chipset. It supports two physical layers: i2c and MEI. The MEI one depends on a patchset that's been sent to Greg Kroah-Hartman for inclusion into the 3.9 kernel [1]. The dependency is a KConfig one which means this code is not buildable as long as the MEI API is not usptream." "This 3rd NFC pull request for 3.9 contains a fix for the microread MEI physical layer support, as the MEI bus API changed. From the MEI code, we now pass the MEI id back to the driver probe routine, and we also pass a name and a MEI id table through the mei_bus_driver structure. A few renames as well like e.g. mei_bus_driver to mei_driver or mei_bus_client to mei_device in order to be closer to the driver model practices." For the ath6kl bits, Kalle says: "There's not anything special here, most of the patches are just code cleanup. The only functional changes are using the beacon interval from user space and fixing a crash which happens when inserting and removing the module in a loop." Also, I pulled the wireless tree in order to resolve some pending merge issues. On top of that, there is a bunch of work on brcmfmac that leads up to P2P support. Also, mwifiex, rtlwifi, and a variety of other drivers see some basic cleanups and minor enhancements. Please let me know if there are problems! ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2013-02-18net: proc: change proc_net_remove to remove_proc_entryGao feng1-1/+1
proc_net_remove is only used to remove proc entries that under /proc/net,it's not a general function for removing proc entries of netns. if we want to remove some proc entries which under /proc/net/stat/, we still need to call remove_proc_entry. this patch use remove_proc_entry to replace proc_net_remove. we can remove proc_net_remove after this patch. Signed-off-by: Gao feng <gaofeng@cn.fujitsu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-02-18net: proc: change proc_net_fops_create to proc_createGao feng1-1/+2
Right now, some modules such as bonding use proc_create to create proc entries under /proc/net/, and other modules such as ipv4 use proc_net_fops_create. It looks a little chaos.this patch changes all of proc_net_fops_create to proc_create. we can remove proc_net_fops_create after this patch. Signed-off-by: Gao feng <gaofeng@cn.fujitsu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-02-18Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davemJohn W. Linville13-379/+1486
Conflicts: drivers/net/wireless/iwlwifi/dvm/tx.c drivers/net/wireless/ti/wlcore/sdio.c drivers/net/wireless/ti/wlcore/spi.c
2013-02-18cfg80211: fix station change if TDLS isn't supportedJohannes Berg1-9/+0
Larry noticed (and bisected) that commit df881293c6ba9a12868491a717b25 "cfg80211: Pass TDLS peer's QoS/HT/VHT information during set_station" broke secure connections. This is is the case only for drivers that don't support TDLS, where any kind of change, even just the change of authorized flag that is required for normal operation, was rejected now. To fix this, remove the checks. I have some patches that will add proper verification for all the different cases later. Cc: Jouni Malinen <j@w1.fi> Bisected-by: Larry Finger <Larry.Finger@lwfinger.net> Tested-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-02-15cfg80211: Pass TDLS peer's QoS/HT/VHT information during set_stationJouni Malinen1-9/+81
The information of the peer's capabilities is required for the driver to perform TDLS Peer UAPSD operations. This information of the peer is passed by the supplicant using NL80211_CMD_SET_STATION command. This commit enhances the function nl80211_set_station to pass this information of the peer to the driver in case this command is used with the TDLS peer STA. In addition, make the HT/VHT capability configuration handled more consistently for other STA cases (reject both instead of just HT). Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-02-15cfg80211: Pass station (extended) capability info to kernelJouni Malinen1-0/+36
The information of the peer's capabilities and extended capabilities are required for the driver to perform TDLS Peer UAPSD operations and off channel operations. This information of the peer is passed from user space using NL80211_CMD_SET_STATION command. This commit enhances the function nl80211_set_station to pass the capability information of the peer to the driver. Similarly, there may be need for capability information for other modes, so allow this to be provided with both add_station and change_station. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-02-15cfg80211: advertise extended capabilities to userspaceJohannes Berg1-0/+9
In many cases, userspace may need to know which of the 802.11 extended capabilities ("Extended Capabilities element") are implemented in the driver or device, to include them e.g. in beacons, assoc request/response or other frames. Add a new nl80211 attribute to hold the extended capabilities bitmap for this. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-02-15nl80211: advertise HT/VHT channel limitationsJohannes Berg2-1/+14
When drivers or regulatory have limitations on 40, 80 or 160 MHz channels, advertise these to userspace via nl80211. Also add a new feature flag to let userspace know this is supported. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-02-15cfg80211: allow drivers to selectively disable 80/160 MHzJohannes Berg2-1/+20
Some drivers might support 80 or 160 MHz only on some channels for whatever reason, so allow them to disable these channel widths. Also maintain the new flags when regulatory bandwidth limitations would disable these wide channels. Reviewed-by: Luis R. Rodriguez <mcgrof@do-not-panic.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-02-15Merge remote-tracking branch 'mac80211/master' into HEADJohannes Berg1-1/+1
2013-02-15nl80211/cfg80211: add radar detection command/eventSimon Wunderlich9-17/+463
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>
2013-02-13cfg80211: configuration for WoWLAN over TCPJohannes Berg2-3/+295
Intel Wireless devices are able to make a TCP connection after suspending, sending some data and waking up when the connection receives wakeup data (or breaks). Add the WoWLAN configuration and feature advertising API for it. Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-02-13cfg80211: check vendor IE length to avoid overrunLuciano Coelho1-4/+8
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>
2013-02-13nl80211: add packet offset information for wowlan patternAmitkumar Karwar1-27/+47
If user knows the location of a wowlan pattern to be matched in Rx packet, he can provide an offset with the pattern. This will help drivers to ignore initial bytes and match the pattern efficiently. Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> [refactor pattern sending] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-02-11cfg80211: move TSF into IEsJohannes Berg2-15/+19
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>
2013-02-11cfg80211: remove scan ies NULL checkJohannes Berg1-8/+3
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>
2013-02-11cfg80211: track hidden SSID networks properlyJohannes Berg2-54/+223
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>
2013-02-11cfg80211: pass wiphy to cfg80211_ref_bss/put_bssJohannes Berg5-20/+20
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>
2013-02-11cfg80211: fix radar check for P2P_DEVICEIlan Peer1-1/+1
Radar is not required for P2P_DEVICE interfaces. Signed-off-by: Ilan Peer <ilan.peer@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-02-11cfg80211: Fix memory leakLarry Finger1-2/+7
When a driver requests a specific regulatory domain after cfg80211 already has one, a struct ieee80211_regdomain is leaked. Reported-by: Larry Finger <Larry.Finger@lwfinger.net> Tested-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-02-08Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davemJohn W. Linville5-1/+153
2013-02-05Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller1-1/+1
Conflicts: drivers/net/ethernet/intel/e1000e/ethtool.c drivers/net/vmxnet3/vmxnet3_drv.c drivers/net/wireless/iwlwifi/dvm/tx.c net/ipv6/route.c The ipv6 route.c conflict is simple, just ignore the 'net' side change as we fixed the same problem in 'net-next' by eliminating cached neighbours from ipv6 routes. The e1000e conflict is an addition of a new statistic in the ethtool code, trivial. The vmxnet3 conflict is about one change in 'net' removing a guarding conditional, whilst in 'net-next' we had a netdev_info() conversion. The iwlwifi conflict is dealing with a WARN_ON() conversion in 'net-next' vs. a revert happening in 'net'. Signed-off-by: David S. Miller <davem@davemloft.net>
2013-02-04cfg80211: wrap BSS krefJohannes Berg1-5/+15
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>
2013-02-04cfg80211: remove a local variableJohannes Berg1-3/+2
This local variable is only used once, so remove it. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-02-04cfg80211: use lockdep to assert lock is heldJohannes Berg1-2/+4
Instead of annotating with a comment, add a lockdep annotation which also serves as documentation. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-02-04cfg80211: move locking into cfg80211_bss_ageJohannes Berg2-3/+2
There's no reason for it to require external locking, move it into the function. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-02-04cfg80211: fix BSS IE allocation commentJohannes Berg1-4/+1
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>
2013-02-04cfg80211: remove unused cfg80211_get_meshJohannes Berg1-65/+0
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>
2013-02-04cfg80211: simplify mesh BSS comparisonJohannes Berg1-81/+39
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>
2013-02-04cfg80211: fix BSS list hidden SSID lookupJohannes Berg1-27/+53
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>
2013-02-04cfg80211: refactor hidden SSID findingJohannes Berg1-62/+20
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>
2013-02-04cfg80211: expand per-station byte counters to 64bitVladimir Kondratiev1-3/+13
In per-station statistics, present 32bit counters are too small for practical purposes - with gigabit speeds, it get overlapped every few seconds. Expand counters in the struct station_info to be 64-bit. Driver can still fill only 32-bit and indicate in @filled only bits like STATION_INFO_[TR]X_BYTES; in case driver provides full 64-bit counter, it should also set in @filled bit STATION_INFO_[TR]RX_BYTES64 Netlink sends both 32-bit and 64-bit counters, if present, to not break userspace. Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> [change to also have 32-bit counters if driver advertises 64-bit] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-02-01Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless into for-davemJohn W. Linville1-1/+1
2013-01-31cfg80211: remove free_priv BSS APIJohannes Berg1-3/+0
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>
2013-01-31cfg80211/mac80211: support reporting wakeup reasonJohannes Berg2-0/+132
When waking up from WoWLAN, it is useful to know what triggered the wakeup. Support reporting the wakeup reason(s) in cfg80211 (and a pass-through in mac80211) to allow userspace to know. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-01-29cfg80211: add SME state to warning in __cfg80211_mlme_disassocJohannes Berg1-1/+1
The warning here occasionally triggers but we haven't found the cause yet. It's a valid warning since if it triggers the SME state got confused, so add the SME state to it to help narrow it down in the future. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-01-28Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davemJohn W. Linville11-819/+817
2013-01-25cfg80211/nl80211: add API for MAC address ACLsVasanthakumar Thiagarajan4-0/+151
Add API to enable drivers to implement MAC address based access control in AP/P2P GO mode. Capable drivers advertise this capability by setting the maximum number of MAC addresses in such a list in wiphy->max_acl_mac_addrs. An initial ACL may be given to the NL80211_CMD_START_AP command and/or changed later with NL80211_CMD_SET_MAC_ACL. Black- and whitelists are supported, but not simultaneously. Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> [rewrite commit log, many cleanups] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-01-24cfg80211: fix channel check in cfg80211_can_use_iftype_chanSimon Wunderlich1-1/+2
In commit "cfg80211: check radar interface combinations" a regression was introduced which might lead to NULL dereference if the argument chan = NULL, which might happen in IBSS/wext case (and probably others). Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-01-24cfg80211: off by one in ieee80211_bss()Dan Carpenter1-1/+1
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>
2013-01-16cfg80211: check radar interface combinationsSimon Wunderlich4-8/+55
To ease further DFS development regarding interface combinations, use the interface combinations structure to test for radar capabilities. Drivers can specify which channel widths they support, and in which modes. Right now only a single AP interface is allowed, but as the DFS code evolves other combinations can be enabled. Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-01-16cfg80211: Allow use_mfp to be specified with the connect commandJouni Malinen2-1/+11
The NL80211_ATTR_USE_MFP attribute was originally added for NL80211_CMD_ASSOCIATE, but it is actually as useful (if not even more useful) with NL80211_CMD_CONNECT, so process that attribute with the connect command, too. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>