- Jan 03, 2013
-
-
Johannes Berg authored
Instead of returning an error and filling a pointer return the pointer and an ERR_PTR value in error cases. Acked-by:
Luis R. Rodriguez <mcgrof@do-not-panic.com> Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
To simplify the locking and not require cfg80211_mutex (which nl80211 uses to access the global regdomain) and also to make it possible for drivers to access their wiphy->regd safely, use RCU to protect these pointers. Acked-by:
Luis R. Rodriguez <mcgrof@do-not-panic.com> Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
The channel bandwidth handling isn't really quite right, it assumes that a 40 MHz channel is really two 20 MHz channels, which isn't strictly true. This is the way the regulatory database handling is defined right now though so remove the logic to handle other channel widths. Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
- Nov 30, 2012
-
-
Johannes Berg authored
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>
-
- Nov 27, 2012
-
-
Johannes Berg authored
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>
-
Johannes Berg authored
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>
-
- Nov 26, 2012
-
-
Johannes Berg authored
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>
-
Johannes Berg authored
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>
-
Johannes Berg authored
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>
-
Johannes Berg authored
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>
-
Arend van Spriel authored
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>
-
- Nov 19, 2012
-
-
Jouni Malinen authored
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>
-
- Nov 06, 2012
-
-
Johannes Berg authored
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>
-
- Nov 05, 2012
-
-
Ben Greear authored
The commit: commit 5e760230 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>
-
Antonio Quartulli authored
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>
-
- Oct 30, 2012
-
-
Johannes Berg authored
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>
-
- Oct 26, 2012
-
-
Johannes Berg authored
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>
-
- Oct 18, 2012
-
-
Sam Leffler authored
Add an NL80211_SCAN_FLAG_FLUSH flag that causes old bss cache entries to be flushed on scan completion. This is useful for collecting guaranteed fresh scan/survey result (e.g. on resume). For normal scan, flushing only happens on successful completion of a scan; i.e. it does not happen if the scan is aborted. For scheduled scan, previous scan results are flushed everytime when we get new scan results. This feature is enabled by default. Drivers can disable it by unsetting the NL80211_FEATURE_SCAN_FLUSH flag. Signed-off-by:
Sam Leffler <sleffler@chromium.org> Tested-by:
Amitkumar Karwar <akarwar@marvell.com> Signed-off-by:
Amitkumar Karwar <akarwar@marvell.com> Signed-off-by:
Bing Zhao <bzhao@marvell.com> [invert polarity of feature flag to account for old kernels] Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
Sam Leffler authored
Add a flags word to direct and scheduled scan requests; it will be used for control of optional behaviours such as flushing the bss cache prior to doing a scan. Signed-off-by:
Sam Leffler <sleffler@chromium.org> Tested-by:
Amitkumar Karwar <akarwar@marvell.com> Signed-off-by:
Amitkumar Karwar <akarwar@marvell.com> Signed-off-by:
Bing Zhao <bzhao@marvell.com> Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
- Oct 17, 2012
-
-
Mahesh Palivela authored
To save STAs VHT caps in AP mode Signed-off-by:
Mahesh Palivela <maheshp@posedge.com> Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
Jouni Malinen authored
SAE extends Authentication frames with fields that are not information elements. NL80211_ATTR_IE is not suitable for these, so introduce a new attribute that can be used to specify the fields needed for SAE in station mode. Signed-off-by:
Jouni Malinen <j@w1.fi> [change to verify that SAE is only used with authenticate command] Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
- Oct 15, 2012
-
-
Stanislaw Gruszka authored
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>
-
- Sep 19, 2012
-
-
Johannes Berg authored
The name can't be modified by the driver, make it const. Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
- Sep 18, 2012
-
-
Pandiyarajan Pitchaimuthu authored
In AP mode, when a station requests connection to an AP and if the request is failed for particular reason, userspace is notified about the failure through NL80211_CMD_CONN_FAILED command. Reason for the failure is sent through the attribute NL80211_ATTR_CONN_FAILED_REASON. Signed-off-by:
Pandiyarajan Pitchaimuthu <c_ppitch@qca.qualcomm.com> Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
Arend van Spriel authored
The kerneldoc comment for .sched_scan_stop() callback describes a driver_initiated flag, but the interface does not hold such a flag. Reviewed-by:
Franky (Zhenhui) Lin <frankyl@broadcom.com> Reviewed-by:
Hante Meuleman <meuleman@broadcom.com> Signed-off-by:
Arend van Spriel <arend@broadcom.com> Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
- Sep 10, 2012
-
-
Eric W. Biederman authored
It is a frequent mistake to confuse the netlink port identifier with a process identifier. Try to reduce this confusion by renaming fields that hold port identifiers portid instead of pid. I have carefully avoided changing the structures exported to userspace to avoid changing the userspace API. I have successfully built an allyesconfig kernel with this change. Signed-off-by:
"Eric W. Biederman" <ebiederm@xmission.com> Acked-by:
Stephen Hemminger <shemminger@vyatta.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Sep 05, 2012
-
-
Robert P. J. Day authored
Signed-off-by:
Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
- Aug 20, 2012
-
-
Johannes Berg authored
In order to support using a different MAC address for the P2P Device address we must first have a P2P Device abstraction that can be assigned a MAC address. This abstraction will also be useful to support offloading P2P operations to the device, e.g. periodic listen for discoverability. Currently, the driver is responsible for assigning a MAC address to the P2P Device, but this could be changed by allowing a MAC address to be given to the NEW_INTERFACE command. As it has no associated netdev, a P2P Device can only be identified by its wdev identifier but the previous patches allowed using the wdev identifier in various APIs, e.g. remain-on-channel. Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
- Aug 02, 2012
-
-
Seth Forshee authored
Currently the only way for wireless drivers to tell whether or not OFDM is allowed on the current channel is to check the regulatory information. However, this requires hodling cfg80211_mutex, which is not visible to the drivers. Other regulatory restrictions are provided as flags in the channel definition, so let's do similarly with OFDM. This patch adds a new flag, IEEE80211_CHAN_NO_OFDM, to tell drivers that OFDM on a channel is not allowed. This flag is set on any channels for which regulatory indicates that OFDM is prohibited. Signed-off-by:
Seth Forshee <seth.forshee@canonical.com> Tested-by:
Arend van Spriel <arend@broadcom.com> Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
- Jul 17, 2012
-
-
Thomas Pedersen authored
Let the user configure serveral TX error conection quality monitoring parameters: % error rate, survey interval, and # of attempted packets. On exceeding the TX failure rate over the given interval, the driver will send a CQM notify event with the actual TX failure rate and packets attempted. Signed-off-by:
Thomas Pedersen <c_tpeder@qca.qualcomm.com> Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
- Jul 13, 2012
-
-
Johannes Berg authored
Revert commit b78e8cea ("cfg80211: track monitor channel") and remove the set_monitor_enabled() callback. Due to the tracking happening in NETDEV_PRE_UP, it had introduced bugs because the monitor interface callback would be called before the device was started. It looks like there's no way to fix this, and using NETDEV_PRE_UP is broken anyway (since there's no NETDEV_UP_FAIL), so remove all that code, track interfaces in NETDEV_UP and also stop tracking the monitor channel in cfg80211. This mostly reverts to before the tracking, except that we keep the interface count tracking so that setting the monitor channel can be rejected properly. Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
This essentially reverts commit 2e165b81 but introduces the get_channel operation with a new wireless_dev argument so that you can retrieve the channel per interface. This is necessary as even though we can track all interface channels (except monitor) we can't track the channel type used. Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
- Jul 12, 2012
-
-
Johannes Berg authored
The new P2P Device will have to be able to scan for P2P search, so move scanning to use struct wireless_dev instead of struct net_device. Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
In order to be able to create P2P Device wdevs, move the virtual interface management over to wireless_dev structures. Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
- Jul 09, 2012
-
-
Johannes Berg authored
The management frame and remain-on-channel APIs will be needed in the P2P device abstraction, so move them over to the new wdev-based APIs. Userspace can still use both the interface index and wdev identifier for them so it's backward compatible, but for the P2P Device wdev it will be able to use the wdev identifier only. Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
Johannes Berg authored
In order to support a P2P device abstraction and Bluetooth high-speed AMPs, we need to have a way to identify virtual interfaces that don't have a netdev associated. Do this by adding a NL80211_ATTR_WDEV attribute to identify a wdev which may or may not also be a netdev. To simplify things, use a 64-bit value with the high 32 bits being the wiphy index for this new wdev identifier in the nl80211 API. Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
- Jul 05, 2012
-
-
Vladimir Kondratiev authored
60g band uses different from .11n MCS scheme, so bitrate should be calculated differently Signed-off-by:
Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
Vladimir Kondratiev authored
Until now, a u16 value was used to represent bitrate value. With VHT bitrates this becomes too small. Introduce a new 32-bit bitrate attribute. nl80211 will report both the new and the old attribute, unless the bitrate doesn't fit into the old u16 attribute in which case only the new one will be reported. User space tools encouraged to prefer the 32-bit attribute, if available (since it won't be available on older kernels.) Signed-off-by:
Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> [reword commit message and comments a bit] Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
- Jul 02, 2012
-
-
Vladimir Kondratiev authored
Add enumerations for both cfg80211 and nl80211. This expands wiphy.bands etc. arrays. Extend channel <-> frequency translation to cover 60g band and modify the rate check logic since there are no legacy mandatory rates (only MCS is used.) Signed-off-by:
Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-
- Jun 29, 2012
-
-
Michal Kazior authored
We do not need it anymore since cfg80211 tracks monitor channel and monitor channel type. Signed-off-by:
Michal Kazior <michal.kazior@tieto.com> Signed-off-by:
Johannes Berg <johannes.berg@intel.com>
-