summaryrefslogtreecommitdiffstats
path: root/net
Commit message (Collapse)AuthorAgeFilesLines
* cfg80211: print bandwidth in chan_reg_rule_print_dbg()Pavel Roskin2011-09-131-1/+2
| | | | | | | | | | Two spaces and the second "KHz" suggest that the code author meant to print the bandwidth but forgot it. The code appears in commit e702d3cf already with two spaces and "KHz" in place of the bandwidth. Signed-off-by: Pavel Roskin <proski@gnu.org> Acked-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* nl80211/cfg80211: add match filtering for sched_scanLuciano Coelho2011-09-131-1/+58
| | | | | | | | | | | | | | | Introduce filtering for scheduled scans to reduce the number of unnecessary results (which cause useless wake-ups). Add a new nested attribute where sets of parameters to be matched can be passed when starting a scheduled scan. Only scan results that match any of the sets will be returned. At this point, the set consists of a single parameter, an SSID. This can be easily extended in the future to support more complex matches. Signed-off-by: Luciano Coelho <coelho@ti.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* nl80211/cfg80211: add WIPHY_FLAG_AP_UAPSD flagEliad Peller2011-09-131-1/+4
| | | | | | | | | | | add WIPHY_FLAG_AP_UAPSD flag to indicate uapsd support on AP mode. Advertise it to userspace by including a new NL80211_ATTR_SUPPORT_AP_UAPSD attribute. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: handle allocation failures in mesh_pathtbl_init()Dan Carpenter2011-09-131-2/+17
| | | | | | | | | The calls to kzalloc() weren't checked here and it upsets the static checkers. Obviously they're not super likely to fail, but we might as well add some error handling. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: add flag to indicate HW only Tx-agg setup supportArik Nemtsov2011-09-133-2/+6
| | | | | | | | | When this flag is set, Tx A-MPDU sessions will not be started by mac80211. This flag is required for devices that support Tx A-MPDU setup in hardware. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* wireless: Remove unnecessary OOM logging messagesJoe Perches2011-09-134-13/+2
| | | | | | | | | | | Removing unnecessary messages saves code and text. Site specific OOM messages are duplications of a generic MM out of memory message and aren't really useful, so just delete them. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rfkill: Remove unnecessary OOM logging messagesJoe Perches2011-09-131-1/+0
| | | | | | | | | | | Removing unnecessary messages saves code and text. Site specific OOM messages are duplications of a generic MM out of memory message and aren't really useful, so just delete them. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: Remove unnecessary OOM logging messagesJoe Perches2011-09-1310-93/+32
| | | | | | | | | | | Removing unnecessary messages saves code and text. Site specific OOM messages are duplications of a generic MM out of memory message and aren't really useful, so just delete them. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: Consolidate mesh path duplicated functionsJavier Cardona2011-09-131-42/+28
| | | | Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: Consolidate {mesh,mpp}_path_flush into one functionJavier Cardona2011-09-131-39/+26
| | | | | Signed-off-by: Javier Cardona <javier@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: Don't iterate twice over all mpaths when once in sufficientJavier Cardona2011-09-131-27/+37
| | | | | Signed-off-by: Javier Cardona <javier@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: Remove redundant mesh path expiration checksJavier Cardona2011-09-131-6/+3
| | | | | Signed-off-by: Javier Cardona <javier@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: Improve mpath state lockingJavier Cardona2011-09-132-11/+7
| | | | | | | | No need to take the mpath state lock when an mpath is removed. Also, no need checking the lock when reading mpath flags. Signed-off-by: Javier Cardona <javier@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: Remove mesh paths when an interface is removedJavier Cardona2011-09-134-3/+47
| | | | | | | | | | | When an interface is removed, the mesh paths associated with it should also be removed. This fixes a bug we observed when reloading a device driver module without reloading mac80211s. Signed-off-by: Javier Cardona <javier@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: Fix RCU pointer dereference in mesh_path_discard_frame()Javier Cardona2011-09-131-1/+6
| | | | | | | Reported by Pedro Larbig (ASPj) Signed-off-by: Javier Cardona <javier@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* cfg80211/nl80211: Indicate roaming feature capability to userspace.Vivek Natarajan2011-09-131-0/+4
| | | | | | | | | | | | | | | | | | When the rssi of the current AP drops, both wpa_supplicant and the firmware may do a background scan to find a better AP and try to associate. Since firmware based roaming is faster, inform wpa_supplicant to avoid roaming and let the firmware decide to roam if necessary. For fullmac drivers like ath6kl, it is just enough to provide the ESSID and the firmware will decide on the BSSID. Since it is not possible to do pre-auth during roaming for fullmac drivers, the wpa_supplicant needs to completely disconnect with the old AP and reconnect with the new AP. This consumes lot of time and it is better to leave the roaming decision to the firmware. Signed-off-by: Vivek Natarajan <nataraja@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: retry sending failed BAR frames later instead of tearing down aggrFelix Fietkau2011-09-132-1/+41
| | | | | | | | | | | | | | Unfortunately failed BAR tx attempts happen more frequently than I expected, and the resulting aggregation teardowns cause performance issues, as the aggregation session does not always get re-established properly. Instead of tearing down the entire aggr session, we can simply store the SSN of the last failed BAR tx attempt, wait for the first successful tx status event, and then send another BAR with the same SSN. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Cc: Helmut Schaa <helmut.schaa@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: Defer tranmission of mesh path errorsJavier Cardona2011-09-131-2/+30
| | | | | | | | | Under failure conditions, the mesh stack sends PERR messages to the previous sender of the failed frame. This happens in the tx feedback path, in which the transmission queue lock may be taken. Avoid a deadlock by sending the path error via the pending queue. Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: refactor skb copy to failq in mesh_path_move_to_queueJohn W. Linville2011-08-291-4/+4
| | | | | | This seems a bit less awkward... Signed-off-by: John W. Linville <linville@tuxdriver.com>
* net/mac80211/debugfs: Convert to kstrou8_from_userPeter Huewe2011-08-291-11/+3
| | | | | | | | | | | | | | This patch replaces the code for getting an number from a userspace buffer by a simple call to kstrou8_from_user. This makes it easier to read and less error prone. Since the old buffer was only 10 bytes long and the value is masked by a nibble-mask anyway, we don't need to use kstrtoul but rather kstrtou8. Kernel Version: v3.0-rc2 Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: add uapsd_queues and max_sp params fieldsEliad Peller2011-08-261-0/+3
| | | | | | | | | Add uapsd_queues and max_sp fields to ieee80211_sta. These fields might be needed by low-level drivers in order to configure the AP. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* nl80211/cfg80211: add STA WME parametersEliad Peller2011-08-261-0/+27
| | | | | | | | | | | Add new NL80211_ATTR_STA_WME nested attribute that contains wme params needed by the low-level driver (uapsd_queues and max_sp). Add these params to the station_parameters struct as well. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: allow action frames with unknown BSSID in GO modeArik Nemtsov2011-08-261-1/+3
| | | | | | | | | | When operating as a P2P GO, we receive some P2P action frames where the BSSID is set to the peer MAC address. Specifically, this occurs for invitation responses. These are valid action frames and they should be passed up. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: fix race condition between assoc_done and first EAP packetGuy Eilam2011-08-264-60/+236
| | | | | | | | | | | | | | | | | | | | | | | When associating to an AP, the station might miss the first EAP packet that the AP sends due to a race condition between the association success procedure and the rx flow in mac80211. In such cases, the packet might fall in ieee80211_rx_h_check due to the fact that the relevant rx->sta wasn't allocated yet. Allocation of the relevant station info struct before actually sending the association request and setting it with a new dummy_sta flag solve this problem. The station will accept only EAP packets from the AP while it is in the pre-association/dummy state. This dummy station entry is not seen by normal sta_info_get() calls, only by sta_info_get_bss_rx(). The driver is not notified for the first insertion of the dummy station. The driver is notified only after the association is complete and the dummy flag is removed from the station entry. That way, all the rest of the code flow should be untouched by this change. Signed-off-by: Guy Eilam <guy@wizery.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: refactor sta_info_insert_rcu to 3 main stagesGuy Eilam2011-08-261-53/+95
| | | | | | | | | | | | | | | | | | Divided the sta_info_insert_rcu function to 3 mini-functions: sta_info_insert_check - the initial checks done when inserting a new station sta_info_insert_ibss - the function that handles the station addition for IBSS interfaces sta_info_insert_non_ibss - the function that handles the station addition in other cases The outer API was not changed. The refactoring was done for better usage of the different stages in the station addition in new scenarios added in the next commit. Signed-off-by: Guy Eilam <guy@wizery.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: mesh gate fixesThomas Pedersen2011-08-263-8/+14
| | | | | | | | | | | | | | Since a v1 of the mesh gate series was accidentally applied, this patch contains the changes in v2. These are: - automatically make mesh gate a root node. - use TU_TO_EXP_TIME macro. - initialize timer instead of checking for NULL timer function. - cleanups. Signed-off-by: Thomas Pedersen <thomas@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* NFC: Reserve tx head and tail roomSamuel Ortiz2011-08-242-8/+11
| | | | | | | | | We can have the NFC core layer allocating the tx head and tail room for the drivers and avoid 1 or more SKBs copy on write on the Tx path. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* {nl,cfg,mac}80211: let userspace make meshif mesh gateJavier Cardona2011-08-245-1/+19
| | | | | | | | | Allow userspace to set NL80211_MESHCONF_GATE_ANNOUNCEMENTS attribute, which will advertise this mesh node as being a mesh gate. NL80211_HWMP_ROOTMODE must be set or this will do nothing. Signed-off-by: Javier Cardona <javier@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* {nl,cfg,mac}80211: let userspace set RANN intervalJavier Cardona2011-08-247-6/+22
| | | | | | | | Allow userspace to set Root Announcement Interval for our mesh interface. Also, RANN interval is now in proper units of TUs. Signed-off-by: Javier Cardona <javier@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* {nl,mac}80211: add missing root mode meshconf entriesJavier Cardona2011-08-242-1/+2
| | | | | | | This fix allows userspace to mark a meshif as a root node. Signed-off-by: Javier Cardona <javier@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: mesh gate implementationJavier Cardona2011-08-245-9/+331
| | | | | | | | | | | In this implementation, a mesh gate is a root node with a certain bit set in its RANN flags. The mpath to this root node is marked as a path to a gate, and added to our list of known gates for this if_mesh. Once a path discovery process fails, we forward the unresolved frames to a known gate. Thanks to Luis Rodriguez for refactoring and bug fix help. Signed-off-by: Javier Cardona <javier@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: fix mesh path flushingJavier Cardona2011-08-241-2/+1
| | | | | | | | Previously, mpaths were never flushed since the mpath is not active once we call this function. Signed-off-by: Javier Cardona <javier@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: mesh locking fixesJavier Cardona2011-08-241-2/+2
| | | | | | | | | mesh_queue_preq is invoked invoked from both user (work queue) and softirq (timer) context, so the _bh version of spinlock needs to be used. Also, the mpath->state_lock should be softirq safe as well. Signed-off-by: Javier Cardona <javier@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: fix mpath timer NULL functionJavier Cardona2011-08-241-2/+4
| | | | | | | | If we have an mpath whose timer has not been initialized, don't try to delete it. Signed-off-by: Javier Cardona <javier@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: improve mpath debuggingJavier Cardona2011-08-243-11/+31
| | | | | | | | | make hwmp_dbg print the relevant sdata->name by default and improve formatting. Also add mpath_dbg macro for debugging of mesh path operations. Signed-off-by: Javier Cardona <javier@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: update mesh path selection frame formatThomas Pedersen2011-08-225-45/+61
| | | | | | | | | | Make mesh path selection frames Mesh Action category, remove outdated Mesh Path Selection category and defines, use updated reason codes, add mesh_action_is_path_sel for readability, and update/correct path selection IEs. Signed-off-by: Thomas Pedersen <thomas@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: update mesh peering frame formatThomas Pedersen2011-08-224-46/+77
| | | | | | | | | | | | | | | | | This patch updates the mesh peering frames to the format specified in the recently ratified 802.11s standard. Several changes took place to make this happen: - Change RX path to handle new self-protected frames - Add new Peering management IE - Remove old Peer Link IE - Remove old plink_action field in ieee80211_mgmt header These changes by themselves would either break peering, or work by coincidence, so squash them all into this patch. Signed-off-by: Thomas Pedersen <thomas@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: update mesh peering frame codesThomas Pedersen2011-08-221-81/+76
| | | | | | | | Have the mesh peering frames use the self-protected action and reason codes specified in 802.11s and defined in ieee80211.h. Remove the local enums. Signed-off-by: Thomas Pedersen <thomas@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: fix mesh beacon formatThomas Pedersen2011-08-224-62/+196
| | | | | | | | | | Correct ordering of IEs in the mesh beacon while removing unneeded IEs from mesh peering frames. Set privacy bit in capability info if security is enabled. Add utility functions to aid in construction of IEs and reduce code duplication. Signed-off-by: Thomas Pedersen <thomas@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: Tear down BA session on BAR tx failureHelmut Schaa2011-08-221-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As described at [1] some STAs (i.e. Intel 5100 Windows) can end up correctly BlockAcking incoming frames without delivering them to user space if a AMPDU subframe got lost and we don't flush the receipients reorder buffer with a BlockAckReq. This in turn results in stuck connections. According to 802.11n-2009 it is not necessary to send a BAR to flush the recepients RX reorder buffer but we still do that to be polite. However, assume the following frame exchange: AP -> STA, AMPDU (failed) AP -> STA, BAR (failed) The client in question then ends up in the same situation and won't deliver frames to userspace anymore since we weren't able to flush its reorder buffer. This is not a hypothetical situation but I was able to observe this exact behavior during a stress test between a rt2800pci AP and a Intel 5100 Windows client. In order to work around this issue just tear down the BA session as soon as a BAR failed to be TX'ed. [1] http://comments.gmane.org/gmane.linux.kernel.wireless.general/66867 Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* wireless: Introduce defines for BAR TID_INFO & MULTI_TID fieldsHelmut Schaa2011-08-221-1/+1
| | | | | | | While at it also fix the indention of the other IEEE80211_BAR_CTRL_ defines. Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* nl80211/cfg80211: Add extra IE configuration to AP mode setupJouni Malinen2011-08-121-1/+27
| | | | | | | | | | The NL80211_CMD_NEW_BEACON command is, in practice, requesting AP mode operations to be started. Add new attributes to provide extra IEs (e.g., WPS IE, P2P IE) for drivers that build Beacon, Probe Response, and (Re)Association Response frames internally (likely in firmware). Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* nl80211/cfg80211: Add crypto settings into NEW_BEACONJouni Malinen2011-08-121-0/+21
| | | | | | | | | | This removes need from drivers to parse the beacon tail/head data to figure out what crypto settings are to be used in AP mode in case the Beacon and Probe Response frames are fully constructed in the driver/firmware. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* nl80211/cfg80211: Allow SSID to be specified in new beacon commandJouni Malinen2011-08-121-0/+29
| | | | | | | | This makes it easier for drivers that generate Beacon and Probe Response frames internally (in firmware most likely) in AP mode. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* cfg80211/mac80211: move information element parsing logic to cfg80211Yogesh Ashok Powar2011-08-123-230/+168
| | | | | | | | | | | Moving the parsing logic for retrieving the information elements stored in management frames, e.g. beacons or probe responses, and making it available to other cfg80211 drivers. Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com> Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* nl80211/cfg80211: Make addition of new sinfo fields saferJouni Malinen2011-08-112-0/+2
| | | | | | | | | | Add a comment pointing out the use of enum station_info_flags for all new struct station_info fields. In addition, memset the sinfo buffer to zero before use on all paths in the current tree to avoid leaving uninitialized pointers in the data. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* cfg80211: fix a crash in nl80211_send_stationFelix Fietkau2011-08-111-1/+1
| | | | | | | | | | mac80211 leaves sinfo->assoc_req_ies uninitialized, causing a random pointer memory access in nl80211_send_station. Instead of checking if the pointer is null, use sinfo->filled, like the rest of the fields. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: fix erroneous clearing of MESH_PATH_SN_VALID flagJavier Cardona2011-08-101-1/+0
| | | | | | | | | | | | | | | When a PREQ or PREP is received from an intermediate node, it contains useful information for path selection but it doesn't include the originator's sequence number. Therefore, when updating the mesh path to that intermediate node, we should not set the MESH_PATH_SN_VALID flag. BUT, if the flag is set, it should not be unset as we might have received a valid sequence number for that intermediate node in the past. This issue was reported, fixed and tested by Ya Bo (游波) and Pedro Larbig (ASPj). Signed-off-by: Javier Cardona <javier@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: clear sta.drv_priv on reconfigurationEliad Peller2011-08-101-0/+1
| | | | | | | | | drivers might assume sta.drv_priv is clear while the sta is added, so clear it on reconfinguration. Signed-off-by: Eliad Peller <eliad@wizery.com> Acked-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* cfg80211/nl80211: Send AssocReq IEs to user space in AP modeJouni Malinen2011-08-101-0/+4
| | | | | | | | | | | When user space SME/MLME (e.g., hostapd) is not used in AP mode, the IEs from the (Re)Association Request frame that was processed in firmware need to be made available for user space (e.g., RSN IE for hostapd). Allow this to be done with cfg80211_new_sta(). Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com> Acked-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
OpenPOWER on IntegriCloud