summaryrefslogtreecommitdiffstats
path: root/net/wireless
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'master' of ↵John W. Linville2013-02-011-1/+1
|\ | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless into for-davem
| * cfg80211: off by one in ieee80211_bss()Dan Carpenter2013-01-241-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>
* | net, wireless: overwrite default_ethtool_opsStanislaw Gruszka2013-01-111-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since: commit 2c60db037034d27f8c636403355d52872da92f81 Author: Eric Dumazet <edumazet@google.com> Date: Sun Sep 16 09:17:26 2012 +0000 net: provide a default dev->ethtool_ops wireless core does not correctly assign ethtool_ops. After alloc_netdev*() call, some cfg80211 drivers provide they own ethtool_ops, but some do not. For them, wireless core provide generic cfg80211_ethtool_ops, which is assigned in NETDEV_REGISTER notify call: if (!dev->ethtool_ops) dev->ethtool_ops = &cfg80211_ethtool_ops; But after Eric's commit, dev->ethtool_ops is no longer NULL (on cfg80211 drivers without custom ethtool_ops), but points to &default_ethtool_ops. In order to fix the problem, provide function which will overwrite default_ethtool_ops and use it by wireless core. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Acked-by: Johannes Berg <johannes@sipsolutions.net> Acked-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | CONFIG_HOTPLUG removal from networking coreGreg KH2012-12-222-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 <wfp5p@virginia.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'for-john' of git://git.sipsolutions.net/mac80211-nextJohn W. Linville2012-12-112-1/+4
|\
| * wext: explicitly cast -110 to u8Johannes Berg2012-12-071-1/+1
| | | | | | | | | | | | | | This doesn't generate any different code, but will suppress a spurious smatch warning. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * cfg80211: check no-OFDM flag for channels wider than 20 MHzJohannes Berg2012-12-041-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 <johannes.berg@intel.com>
* | Merge branch 'for-john' of ↵John W. Linville2012-12-0610-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
| * cfg80211: fix channel error on mesh joinMarco Porsch2012-12-031-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 <marco.porsch@etit.tu-chemnitz.de> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * cfg80211: fix BSS struct IE access racesJohannes Berg2012-11-308-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 <johannes.berg@intel.com>
| * cfg80211: fix cmp_hidden_bssJohannes Berg2012-11-301-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 <johannes.berg@intel.com>
| * cfg80211: fix whitespace in scan handlingJohannes Berg2012-11-301-16/+13
| | | | | | | | | | | | Fix a number of indentation and similar issues. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * cfg80211: don't BUG_ON BSS struct issuesJohannes Berg2012-11-301-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 <johannes.berg@intel.com>
| * nl80211: Fix HT_IBSS feature check in ibss_joinSimon Wunderlich2012-11-291-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 <siwu@hrz.tu-chemnitz.de> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * cfg80211: Remove unused VHT chan codeMahesh Palivela2012-11-291-27/+1
| | | | | | | | | | | | | | Cleanup of unused VHT channel config related code. Signed-off-by: Mahesh Palivela <maheshp@posedge.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * nl80211: remove unnecessary checksJohannes Berg2012-11-281-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 <johannes.berg@intel.com>
| * nl80211: support P2P GO powersave configurationJohannes Berg2012-11-271-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 <johannes.berg@intel.com>
| * cfg80211: rework chandef checking and export itJohannes Berg2012-11-273-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 <johannes.berg@intel.com>
* | Merge branch 'for-john' of ↵John W. Linville2012-11-2613-490/+848
|\| | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next
| * cfg80211: fix some tracing output issuesJohannes Berg2012-11-261-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 <johannes.berg@intel.com>
| * nl80211/cfg80211: add VHT MCS supportJohannes Berg2012-11-262-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 <johannes.berg@intel.com>
| * nl80211/cfg80211: support VHT channel configurationJohannes Berg2012-11-268-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 <johannes.berg@intel.com>
| * cfg80211: pass a channel definition structJohannes Berg2012-11-2611-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 <johannes.berg@intel.com>
| * cfg80211: remove remain-on-channel channel typeJohannes Berg2012-11-266-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 <johannes.berg@intel.com>
| * cfg80211: change function signature of cfg80211_get_p2p_attr()Arend van Spriel2012-11-261-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 <arend@broadcom.com> [fix indentation, don't use u8 attr variable] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * cfg80211: use DS or HT operation IEs to determine BSS channelJohannes Berg2012-11-231-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 <johannes.berg@intel.com>
* | Merge branch 'for-john' of ↵John W. Linville2012-11-212-0/+70
|\| | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next
| * cfg80211: Add TDLS event to allow drivers to request operationsJouni Malinen2012-11-192-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 <jouni@qca.qualcomm.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | Merge branch 'master' of ↵John W. Linville2012-11-211-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
| * | wireless: allow 40 MHz on world roaming channels 12/13Johannes Berg2012-11-121-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: stable@vger.kernel.org Reported-by: Eddie Chapman <eddie@ehuk.net> Tested-by: Eddie Chapman <eddie@ehuk.net> Acked-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | | lib80211: hide Kconfig symbolJohannes Berg2012-11-161-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 <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | nl80211: send the NL80211_ATTR_SSID in nl80211_send_iface()Antonio Quartulli2012-11-071-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 <ordex@autistici.org> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | cfg80211: store the ssid into wirless_dev in AP modeAntonio Quartulli2012-11-072-0/+3
| | | | | | | | | | | | | | Store the configured ssid in wdev->ssid when starting an AP Signed-off-by: Antonio Quartulli <ordex@autistici.org> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | wireless: add utility function to get P2P attributeJohannes Berg2012-11-061-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 <johannes.berg@intel.com>
* | cfg80211: allow registering more than one beacon listenerBen Greear2012-11-053-29/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The commit: commit 5e760230e42cf759bd923457ca2753aacf2e656e Author: Johannes Berg <johannes.berg@intel.com> 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 <greearb@candelatech.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | nl/cfg80211: add the NL80211_CMD_SET_MCAST_RATE commandAntonio Quartulli2012-11-051-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 <ordex@autistici.org> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | cfg80211: allow per interface TX power settingJohannes Berg2012-10-304-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 <johannes.berg@intel.com>
* | nl80211: move "can set channel" checkJohannes Berg2012-10-301-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 <johannes.berg@intel.com>
* | Merge branch 'master' of ↵John W. Linville2012-10-293-10/+12
|\| | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless Conflicts: drivers/net/wireless/mwifiex/cfg80211.c
| * mac80211: verify that skb data is presentJohannes Berg2012-10-261-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: stable@vger.kernel.org Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * wireless: drop invalid mesh address extension framesJohannes Berg2012-10-261-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: stable@vger.kernel.org Reviewed-by: Javier Cardona <javier@cozybit.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * cfg80211: fix initialization of chan->max_reg_powerFelix Fietkau2012-10-181-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 <nbd@openwrt.org> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| * cfg80211: fix antenna gain handlingFelix Fietkau2012-10-181-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 <nbd@openwrt.org> Cc: stable@vger.kernel.org Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | Merge branch 'for-john' of ↵John W. Linville2012-10-294-4/+32
|\ \ | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next
| * | cfg80211: add tracing for P2P Device start/stopJohannes Berg2012-10-234-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 <johannes.berg@intel.com>
* | | Merge branch 'master' of ↵John W. Linville2012-10-231-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
| * cfg80211/mac80211: avoid state mishmash on deauthStanislaw Gruszka2012-10-151-9/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | Avoid situation when we are on associate state in mac80211 and on disassociate state in cfg80211. This can results on crash during modules unload (like showed on this thread: http://marc.info/?t=134373976300001&r=1&w=2) and possibly other problems. Reported-by: Pedro Francisco <pedrogfrancisco@gmail.com> Cc: stable@vger.kernel.org Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | cfg80211: add cfg80211 exported function tracingBeni Lev2012-10-187-10/+615
| | | | | | | | | | | | | | | | | | | | Also add tracing to the API functions that drivers (and mac80211) can call in cfg80211. Signed-off-by: Beni Lev <beni.lev@intel.com> Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | cfg80211: add tracing to rdev-opsBeni Lev2012-10-184-79/+2141
| | | | | | | | | | | | | | | | | | | | | | | | | | Add tracing to make debugging cfg80211/mac80211 (or full-mac driver) interaction easier. Signed-off-by: Beni Lev <beni.lev@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Reviewed-by: Hila Gonen <hila.gonen@intel.com> Tested-by: Hila Gonen <hila.gonen@intel.com> Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> [add a cast to int to sizeof() to avoid warning] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | cfg80211: add wrappers for registered_device_opsHila Gonen2012-10-1814-148/+700
| | | | | | | | | | | | | | | | | | This will allow adding central tracing like in mac80211. Signed-off-by: Hila Gonen <hila.gonen@intel.com> Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>