aboutsummaryrefslogtreecommitdiff
path: root/net/wireless
AgeCommit message (Collapse)AuthorFilesLines
2013-01-03regulatory: simplify regulatory_hint_11dJohannes Berg1-5/+0
There's no need to unlock before calling queue_regulatory_request(), so simplify the function. Acked-by: Luis R. Rodriguez <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2013-01-03regulatory: don't test list before iteratingJohannes Berg1-47/+19
There's no need to test whether a list is empty or not before iterating. Acked-by: Luis R. Rodriguez <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2013-01-03regulatory: clean up reg_copy_regd()Johannes Berg1-26/+24
Use ERR_PTR/IS_ERR to return the result or errors, also do some code cleanups. Acked-by: Luis R. Rodriguez <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2013-01-03regulatory: clean up regdom_intersectJohannes Berg1-10/+2
As the dummy_rule (also renamed from irule) is only used for output by the reg_rules_intersect() function there's no need to clear it at all, remove that. Acked-by: Luis R. Rodriguez <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2013-01-03regulatory: don't allocate too much memoryJohannes Berg1-3/+4
There's no need to allocate one reg rule more than will be used, reduce the allocations. The allocation in nl80211 already doesn't allocate too much space. Acked-by: Luis R. Rodriguez <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2013-01-03regulatory: don't write past array when intersecting rulesJohannes Berg1-2/+2
When intersecting rules, we count first to know how many rules need to be allocated, and then do the intersection into the allocated array. However, the code doing this writes past the end of the array because it attempts to do all intersections. Make it stop when the right number of rules has been reached. Acked-by: Luis R. Rodriguez <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2012-12-22CONFIG_HOTPLUG removal from networking coreGreg KH2-11/+0
CONFIG_HOTPLUG is always enabled now, so remove the unused code that was trying to be compiled out when this option was disabled, in the networking core. Cc: Bill Pemberton <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-12-11Merge branch 'for-john' of git://git.sipsolutions.net/mac80211-nextJohn W. Linville2-1/+4
2012-12-07wext: explicitly cast -110 to u8Johannes Berg1-1/+1
This doesn't generate any different code, but will suppress a spurious smatch warning. Signed-off-by: Johannes Berg <[email protected]>
2012-12-06Merge branch 'for-john' of ↵John W. Linville10-346/+398
git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next Conflicts: drivers/net/wireless/mwifiex/sta_ioctl.c net/mac80211/scan.c
2012-12-04cfg80211: check no-OFDM flag for channels wider than 20 MHzJohannes Berg1-0/+3
For channels wider than 20 MHz OFDM will be used, so when checking whether or not a channel is usable, check for the no-OFDM flag if the channel is wider than 20 MHz. Signed-off-by: Johannes Berg <[email protected]>
2012-12-03cfg80211: fix channel error on mesh joinMarco Porsch1-1/+2
Fix an error on mesh join when no channel has been explicitly set beforehand. Also remove a double semicolon. Signed-off-by: Marco Porsch <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2012-11-30cfg80211: fix BSS struct IE access racesJohannes Berg8-229/+243
When a BSS struct is updated, the IEs are currently overwritten or freed. This can lead to races if some other CPU is accessing the BSS struct and using the IEs concurrently. Fix this by always allocating the IEs in a new struct that holds the data and length and protecting access to this new struct with RCU. Signed-off-by: Johannes Berg <[email protected]>
2012-11-30cfg80211: fix cmp_hidden_bssJohannes Berg1-4/+14
The cmp_bss() comparator function uses memcmp() to compare the SSID. This means that cmp_hidden_bss() needs to similarly return a number bigger than zero (use 1) instead of -1 when ie1 is bigger than ie2, which is the case if an ie2 byte is non-zero. Signed-off-by: Johannes Berg <[email protected]>
2012-11-30cfg80211: fix whitespace in scan handlingJohannes Berg1-16/+13
Fix a number of indentation and similar issues. Signed-off-by: Johannes Berg <[email protected]>
2012-11-30cfg80211: don't BUG_ON BSS struct issuesJohannes Berg1-2/+4
There's no need to stop the machine, just leak the BSS entry if there's an issue with its hold counter when freeing. Signed-off-by: Johannes Berg <[email protected]>
2012-11-29nl80211: Fix HT_IBSS feature check in ibss_joinSimon Wunderlich1-0/+1
There is a standalone if, seems to be a regression of commit "nl80211/cfg80211: add VHT MCS support". Signed-off-by: Simon Wunderlich <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2012-11-29cfg80211: Remove unused VHT chan codeMahesh Palivela1-27/+1
Cleanup of unused VHT channel config related code. Signed-off-by: Mahesh Palivela <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2012-11-28nl80211: remove unnecessary checksJohannes Berg1-3/+2
The CQM TX-error rate/interval can't be less than zero since they're unsigned values, remove checks. Also fix indentation of the function. Signed-off-by: Johannes Berg <[email protected]>
2012-11-27nl80211: support P2P GO powersave configurationJohannes Berg1-0/+56
If a driver supports P2P GO powersave, allow it to set the new feature flags for it and allow userspace to configure the parameters for it. This can be done at GO startup and later changed with SET_BSS. Signed-off-by: Johannes Berg <[email protected]>
2012-11-27cfg80211: rework chandef checking and export itJohannes Berg3-69/+67
Some of the chandef checking that we do in cfg80211 to check if a channel is supported or not is also needed in mac80211, so rework that a bit and export the functions that are needed. Signed-off-by: Johannes Berg <[email protected]>
2012-11-26Merge branch 'for-john' of ↵John W. Linville13-490/+848
git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next
2012-11-26cfg80211: fix some tracing output issuesJohannes Berg1-76/+73
In some cases, e.g. probe_status, there were spaces missing so the trace output was confusing. Also make it more like mac80211 when printing netdevs/wiphys to make reading a combined log easier. Signed-off-by: Johannes Berg <[email protected]>
2012-11-26nl80211/cfg80211: add VHT MCS supportJohannes Berg2-16/+116
Add support for reporting and calculating VHT MCSes. Note that I'm not completely sure that the bitrate calculations are correct, nor that they can't be simplified. Signed-off-by: Johannes Berg <[email protected]>
2012-11-26nl80211/cfg80211: support VHT channel configurationJohannes Berg8-86/+372
Change nl80211 to support specifying a VHT (or HT) using the control channel frequency (as before) and new attributes for the channel width and first and second center frequency. The old channel type is of course still supported for HT. Also change the cfg80211 channel definition struct to support these by adding the relevant fields to it (and removing the _type field.) This also adds new helper functions: - cfg80211_chandef_create to create a channel def struct given the control channel and channel type, - cfg80211_chandef_identical to check if two channel definitions are identical - cfg80211_chandef_compatible to check if the given channel definitions are compatible, and return the wider of the two This isn't entirely complete, but that doesn't matter until we have a driver using it. In particular, it's missing - regulatory checks on the usable bandwidth (if that even makes sense) - regulatory TX power (database can't deal with it) - a proper channel compatibility calculation for the new channel types Signed-off-by: Johannes Berg <[email protected]>
2012-11-26cfg80211: pass a channel definition structJohannes Berg11-300/+276
Instead of passing a channel pointer and channel type to all functions and driver methods, pass a new channel definition struct. Right now, this struct contains just the control channel and channel type, but for VHT this will change. Also, add a small inline cfg80211_get_chandef_type() so that drivers don't need to use the _type field of the new structure all the time, which will change. Signed-off-by: Johannes Berg <[email protected]>
2012-11-26cfg80211: remove remain-on-channel channel typeJohannes Berg6-92/+47
As mwifiex (and mac80211 in the software case) are the only drivers actually implementing remain-on-channel with channel type, userspace can't be relying on it. This is the case, as it's used only for P2P operations right now. Rather than adding a flag to tell userspace whether or not it can actually rely on it, simplify all the code by removing the ability to use different channel types. Leave only the validation of the attribute, so that if we extend it again later (with the needed capability flag), it can't break userspace sending invalid data. Signed-off-by: Johannes Berg <[email protected]>
2012-11-26cfg80211: change function signature of cfg80211_get_p2p_attr()Arend van Spriel1-2/+3
The function cfg80211_get_p2p_attr() can fail and returns a negative error code. However, the return type is unsigned int. The largest positive number is determined by desired_len variable in the function, which is u16. So changing the return type to int to allow easy error checking. Also change the type for the attribute to enum for improved type checking. Signed-off-by: Arend van Spriel <[email protected]> [fix indentation, don't use u8 attr variable] Signed-off-by: Johannes Berg <[email protected]>
2012-11-23cfg80211: use DS or HT operation IEs to determine BSS channelJohannes Berg1-1/+44
Currently, mac80211 checks the DS params IE if present and uses it for the (primary) BSS channel, instead of the one that the frame was received on. This is particularly useful in the 2.4 GHz band since a frame is often received on one of the adjacent channels due to overlap. Move this code to cfg80211 so other drivers also do this. Additionally, on 5 GHz, in particular with some (possibly) upcoming changes in 802.11ai and duplicate transmissions when wider channels are used, something similar happens. So if present, also use the (primary) channel information contained in the HT operation IE. Signed-off-by: Johannes Berg <[email protected]>
2012-11-21Merge branch 'for-john' of ↵John W. Linville2-0/+70
git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next
2012-11-21Merge branch 'master' of ↵John W. Linville1-3/+2
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless Conflicts: drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c drivers/net/wireless/iwlwifi/pcie/tx.c
2012-11-19cfg80211: Add TDLS event to allow drivers to request operationsJouni Malinen2-0/+70
The NL80211_CMD_TDLS_OPER command was previously used only for userspace request for the kernel code to perform TDLS operations. However, there are also cases where the driver may need to request operations from userspace, e.g., when using security on the AP path. Add a new cfg80211 function for generating a TDLS operation event for drivers to request a new link to be set up (NL80211_TDLS_SETUP) or an existing link to be torn down (NL80211_TDLS_TEARDOWN). Drivers can optionally use these events, e.g., based on noticing data traffic being sent to a peer station that is seen with good signal strength. Signed-off-by: Jouni Malinen <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2012-11-16lib80211: hide Kconfig symbolJohannes Berg1-3/+2
There's no need to ask the user about lib80211 since it will be selected by drivers requiring it, hide it from Kconfig. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-11-12wireless: allow 40 MHz on world roaming channels 12/13Johannes Berg1-3/+2
When in world roaming mode, allow 40 MHz to be used on channels 12 and 13 so that an AP that is, e.g., using HT40+ on channel 9 (in the UK) can be used. Cc: [email protected] Reported-by: Eddie Chapman <[email protected]> Tested-by: Eddie Chapman <[email protected]> Acked-by: Luis R. Rodriguez <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2012-11-07nl80211: send the NL80211_ATTR_SSID in nl80211_send_iface()Antonio Quartulli1-0/+5
The userspace may want to know what is the current ssid that a given interface is using. This patch enables nl80211 to send the NL80211_ATTR_SSID attribute in nl80211_send_iface(). Signed-off-by: Antonio Quartulli <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2012-11-07cfg80211: store the ssid into wirless_dev in AP modeAntonio Quartulli2-0/+3
Store the configured ssid in wdev->ssid when starting an AP Signed-off-by: Antonio Quartulli <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2012-11-06wireless: add utility function to get P2P attributeJohannes Berg1-0/+99
Parsing the P2P attributes can be tricky as their contents can be split across multiple (vendor) IEs. Thus, it's not possible to parse them like IEs (by returning a pointer to the data.) Instead, provide a function that copies the attribute data into a caller-provided buffer and returns the size needed (useful in case the buffer was too small.) Signed-off-by: Johannes Berg <[email protected]>
2012-11-05cfg80211: allow registering more than one beacon listenerBen Greear3-29/+73
The commit: commit 5e760230e42cf759bd923457ca2753aacf2e656e Author: Johannes Berg <[email protected]> Date: Fri Nov 4 11:18:17 2011 +0100 cfg80211: allow registering to beacons allowed only a single process to register for beacon events per wiphy. This breaks cases where a user may want two or more VIFs on a wiphy and run a seperate hostapd process on each vif. This patch allows multiple beacon listeners, fixing the regression. Signed-off-by: Ben Greear <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2012-11-05nl/cfg80211: add the NL80211_CMD_SET_MCAST_RATE commandAntonio Quartulli1-0/+39
This command triggers a new callback: set_mcast_rate(). It enables the user to change the rate used to send multicast frames for vif configured as IBSS or MESH_POINT Signed-off-by: Antonio Quartulli <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2012-10-30cfg80211: allow per interface TX power settingJohannes Berg4-19/+26
The TX power setting is currently per wiphy (hardware device) but with multi-channel capabilities that doesn't make much sense any more. Allow drivers (and mac80211) to advertise support for per-interface TX power configuration. When the TX power is configured for the wiphy, the wdev will be NULL and the driver can still handle that, but when a wdev is given the TX power can be set only for that wdev now. Signed-off-by: Johannes Berg <[email protected]>
2012-10-30nl80211: move "can set channel" checkJohannes Berg1-4/+4
Setting the wdev to NULL when the channel can't be set for that interface type (to treat the channel setting for the wiphy/monitor) currently works, but is confusing in the code if netdev/wdev aren't both set/unset in the same way. Move the check whether the channel can be set to where it's needed so that wdev and netdev are always both assigned or NULL. Signed-off-by: Johannes Berg <[email protected]>
2012-10-29Merge branch 'master' of ↵John W. Linville3-10/+12
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless Conflicts: drivers/net/wireless/mwifiex/cfg80211.c
2012-10-29Merge branch 'for-john' of ↵John W. Linville4-4/+32
git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next
2012-10-26mac80211: verify that skb data is presentJohannes Berg1-1/+2
A number of places in the mesh code don't check that the frame data is present and in the skb header when trying to access. Add those checks and the necessary pskb_may_pull() calls. This prevents accessing data that doesn't actually exist. To do this, export ieee80211_get_mesh_hdrlen() to be able to use it in mac80211. Cc: [email protected] Signed-off-by: Johannes Berg <[email protected]>
2012-10-26wireless: drop invalid mesh address extension framesJohannes Berg1-5/+6
The mesh header can have address extension by a 4th or a 5th and 6th address, but never both. Drop such frames in 802.11 -> 802.3 conversion along with any frames that have the wrong extension. Cc: [email protected] Reviewed-by: Javier Cardona <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2012-10-23cfg80211: add tracing for P2P Device start/stopJohannes Berg4-4/+32
These were missed due to the tracing work having started on a kernel that didn't have P2P Device yet, implement them now. Signed-off-by: Johannes Berg <[email protected]>
2012-10-23Merge branch 'master' of ↵John W. Linville1-9/+3
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless Conflicts: drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c net/mac80211/mlme.c
2012-10-18cfg80211: fix initialization of chan->max_reg_powerFelix Fietkau1-2/+3
A few places touch chan->max_power based on updated tx power rules, but forget to do the same to chan->max_reg_power. Signed-off-by: Felix Fietkau <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2012-10-18cfg80211: fix antenna gain handlingFelix Fietkau1-2/+1
No driver initializes chan->max_antenna_gain to something sensible, and the only place where it is being used right now is inside ath9k. This leads to ath9k potentially using less tx power than it can use, which can decrease performance/range in some rare cases. Rather than going through every single driver, this patch initializes chan->orig_mag in wiphy_register(), ignoring whatever value the driver left in there. If a driver for some reason wishes to limit it independent from regulatory rulesets, it can do so internally. Signed-off-by: Felix Fietkau <[email protected]> Cc: [email protected] Signed-off-by: Johannes Berg <[email protected]>
2012-10-18cfg80211: add cfg80211 exported function tracingBeni Lev7-10/+615
Also add tracing to the API functions that drivers (and mac80211) can call in cfg80211. Signed-off-by: Beni Lev <[email protected]> Reviewed-by: Emmanuel Grumbach <[email protected]> Reviewed-by: Johannes Berg <[email protected]> Signed-off-by: Johannes Berg <[email protected]>