aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211
Commit message (Collapse)AuthorAge
...
* | | mac80211: use __printf attribute in debugfsJohannes Berg2012-10-18
| | | | | | | | | | | | | | | | | | | | | | | | The internal function mac80211_format_buffer() has a printf-style argument list, so add the attribute to have gcc verify that list. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | | mac80211: remove some unused codeJohannes Berg2012-10-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are a number of unused variables that gcc pointed out (when building with W=1) as well as some conditions that can never be true due to the datatypes used: unsigned values can't be less than zero. Remove this code. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | | mac80211: remove unimplemented mesh vendor syncJohannes Berg2012-10-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | There's no vendor-specific mesh sync implemented and there don't need to be dummy handlers that only print messages, so remove that code. While at it, also constify the mesh sync ops. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | | mac80211: Notify new IBSS network creationSujith Manoharan2012-10-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Initialization of beacon transmission in IBSS mode depends on whether a new BSS is being created or joined. When joining an existing IBSS network, beaconing has to start only after a TSF-sync has happened - this is explained in 11.1.4. Introduce a new parameter in the BSS information structure to indicate creator/joiner mode. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | | mac80211: add support for tx to abort low priority scan requestsSam Leffler2012-10-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use NL80211_SCAN_FLAG_LOW_PRIORITY flag in mac80211's scan state machine to prematurely terminate scan operations if outbound traffic collides. This is useful for marking background scans so they don't affect throughput. Signed-off-by: Sam Leffler <sleffler@chromium.org> Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> [set feature flag only if software scan is used] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | | wireless: use OR operation to set wiphy featuresJohannes Berg2012-10-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The next patch will introduce a flag that is set by default in cfg80211 so drivers and mac80211 need to use |= to set features they have so that they don't clear the already-set feature. We could set the flag in wiphy_register() instead of wiphy_new() to avoid this patch, but then the drivers couldn't *unset* flags they don't want to use even though the implementation is generic. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | | {nl,cfg}80211: Peer STA VHT capsMahesh Palivela2012-10-17
| | | | | | | | | | | | | | | | | | | | | 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>
* | | mac80211: VHT peer STA capsMahesh Palivela2012-10-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Save the AP's VHT capabilities (in managed mode) and make them available to the driver in the station information. Unlike HT capabilities, they aren't restricted to the common capabilities, so drivers must be aware of their own capabilities. Signed-off-by: Mahesh Palivela <maheshp@posedge.com> [fix endian conversion bug ...] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | | ieee80211: Rename VHT cap structMahesh Palivela2012-10-17
| | | | | | | | | | | | | | | | | | | | | | | | Rename struct ieee80211_vht_capabilities to ieee80211_vht_cap and renamed its member vht_capabilities_info to vht_cap_info. Signed-off-by: Mahesh Palivela <maheshp@posedge.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | | mac80211: move out the non-statistics variable estab_plinks from mesh_statAshok Nagarajan2012-10-17
| | | | | | | | | | | | | | | | | | | | | | | | estab_plinks is not a statistics member. Hence move estab_plinks from struct mesh_stat to struct ieee80211_if_mesh Signed-off-by: Ashok Nagarajan <ashok@cozybit.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | | mac80211: Use appropriate debug wrapperMohammed Shafi Shajakhan2012-10-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | ieee80211_sta_expire will be called by both IBSS and mesh interfaces to account for inactive stations, so it would be more appropriate to use sta_dbg instead of ibss_dbg. Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | | mac80211: Allow station mode SAE to be implemented in user spaceJouni Malinen2012-10-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SAE uses two rounds of Authentication frames and both rounds require considerable calculation to be done. This commit extends the existing station mode authentication request to allow more control for user space programs to build the SAE fields and to run the authentication step ones. Only the second round with authentication transaction sequence 2 will result in moving to authenticated state. Signed-off-by: Jouni Malinen <j@w1.fi> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | | mac80211: Add debug print on unexpect authentication stateJouni Malinen2012-10-17
| | | | | | | | | | | | | | | | | | | | | This is useful when debugging authentication process issues. Signed-off-by: Jouni Malinen <j@w1.fi> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | | mac80211: Take status code as parameter to ieee80211_send_authJouni Malinen2012-10-17
| | | | | | | | | | | | | | | | | | | | | | | | Non-zero status code may be needed for Authentication frames, e.g., when using SAE. Signed-off-by: Jouni Malinen <j@w1.fi> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | | mac80211: add channel context iteratorJohannes Berg2012-10-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | Drivers may need to iterate the active channel contexts, export an iterator function to allow that. To make it possible, use RCU-safe list functions. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | | mac80211: track needed RX chains for channel contextsJohannes Berg2012-10-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On each channel that the device is operating on, it may need to listen using one or more chains depending on the SMPS settings of the interfaces using it. The previous channel context changes completely removed this ability (before, it was available as the SMPS mode). Add per-context tracking of the required static and dynamic RX chains and notify the driver on changes. To achieve this, track the chains and SMPS mode used on each virtual interface and update the channel context whenever this changes. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | | mac80211: use channel contextsJohannes Berg2012-10-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of operating on a single channel only, use the new channel context infrastructure in all mac80211 code. This enables drivers that want to use the new channel context infrastructure to use multiple channels, while nothing should change for all the other drivers that don't support it. Right now this disables both TX power settings and spatial multiplexing powersave. Both need to be re-enabled on a channel context basis. Additionally, when channel contexts are used drop the connection when channel switch is received rather than trying to handle it. This will have to be improved later. [With fixes from Eliad and Emmanuel incorporated] Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | | mac80211: track whether to use channel contextsJohannes Berg2012-10-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Depending on the driver, channel contexts may be used or not. If they are used, the driver must have support for hardware scan and remain-on-channel; otherwise the driver must not advertise support for multiple channels. Also prohibit WDS type interfaces when channel contexts are to be used as there's no clear definition of which channel they use. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | | mac80211: check channel context methodsJohannes Berg2012-10-16
| | | | | | | | | | | | | | | | | | | | | Verify that the channel context methods are all assigned by the driver or not used. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | | mac80211: reuse channels for channel contextsMichal Kazior2012-10-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | Reuse channels with compatible channel types. Some channel types are compatible and can be used concurrently. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | | mac80211: use channel context notificationsMichal Kazior2012-10-16
| | | | | | | | | | | | | | | | | | | | | | | | Channel context pointer will be accessible on both assign and unassign events. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | | mac80211: introduce new ieee80211_opsMichal Kazior2012-10-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce channel context driver methods. The channel on a context channel is immutable, but the channel type and other properties can change. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | | mac80211: introduce channel context skeleton codeMichal Kazior2012-10-16
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | Channel context are the foundation for multi-channel operation. They are are immutable and are re-created (or re-used if other interfaces are bound to a certain channel and a compatible channel type) on channel switching. This is an initial implementation and more features will come in separate patches. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> [some changes including RCU protection] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | mac80211: use ieee80211_free_txskb to fix possible skb leaksFelix Fietkau2012-10-08
| | | | | | | | | | | | | | | | | | | | A few places free skbs using dev_kfree_skb even though they're called after ieee80211_subif_start_xmit might have cloned it for tracking tx status. Use ieee80211_free_txskb here to prevent skb leaks. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Cc: stable@vger.kernel.org Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | mac80211: call drv_get_tsf() in sleepable contextThomas Pedersen2012-10-08
| | | | | | | | | | | | | | | | | | | | The call to drv_get/set_tsf() was put on the workqueue to perform tsf adjustments since that function might sleep. However it ended up inside a spinlock, whose critical section must be atomic. Do tsf adjustment outside the spinlock instead, and get rid of a warning. Signed-off-by: Thomas Pedersen <thomas@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | mac80211: don't send delBA on addBA failureJohannes Berg2012-09-21
| | | | | | | | | | | | | | There's no reason to send a delBA when the peer refused our addBA, so change that. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | mac80211: don't send delBA when removing stationsJohannes Berg2012-09-21
| | | | | | | | | | | | | | | | | | When a station is removed and we stop the aggregation sessions, it's not useful to send delBA since this is due to us or the station disassociating or dropping the connection in some other way, so change that. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | mac80211: don't send delBA before disassocJohannes Berg2012-09-21
| | | | | | | | | | | | | | | | When we disassociate, it's not really useful to send delBA action frames since we're going to send disassoc/deauth anyway, so change that. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | mac80211: fix IBSS auth TX debug messageSylvain Roger Rieunier2012-09-20
| | | | | | | | | | | | | | | | | | In the IBSS auth TX debug message the BSSID and DA address are reversed, fix that. Signed-off-by: Sylvain Roger Rieunier <sylvain.roger.rieunier@gmail.com> [reword commit message and make it fit 72 cols] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | cfg80211: constify name parameter to add_virtual_intfJohannes Berg2012-09-19
| | | | | | | | | | | | | | The name can't be modified by the driver, make it const. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | mac80211: make reset debugfs depend on CONFIG_PMJohannes Berg2012-09-19
| | | | | | | | | | | | | | | | | | | | The suspend/resume code depends on CONFIG_PM, so the reset debugfs file can only be made available if that is enabled. Fengguang Wu's zero-day build testing found this. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | mac80211: allow re-open the blocked peer link in meshChun-Yeow Yeoh2012-09-14
| | | | | | | | | | | | | | | | | | | | | | | | | | Peer link which is blocked using the "iw mesh0 station set <MAC addr> plink_action block" is previously not able to re-open using "iw mesh0 station set <MAC addr> plink_action open". This patch is intended to solve this. If the station plink state remains at OPN_SNT once open, try block and open again should solve this problem. Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@gmail.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | mac80211: change locking around ieee80211_recalc_smpsJohannes Berg2012-09-14
| | | | | | | | | | | | | | Make the function acquire the necessary mutex itself to simplify the callers. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | mac80211: handle power constraint/country IE betterJohannes Berg2012-09-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, mac80211 uses the power constraint IE, and reduces the regulatory max TX power by it. This can cause issues if the AP is advertising a large power constraint value matching a high TX power in its country IE, for example in this case: ... Country: US Environment: Indoor/Outdoor ... Channels [157 - 157] @ 30 dBm ... Power constraint: 13 dB ... What happened here is that our local regulatory TX power is 15 dBm, and gets reduced by 13 dB so we end up with only 2 dBm effective TX power, which is way too low. Instead, handle the country IE/power constraint IE combined and restrict our TX power to the max of the regulatory power and the maximum power advertised by the AP, in this case 17 dBm (= 30 dBm - 13 dB). Also print a message when this happens to let the user know and help us debug issues with it. Reported-by: Carl A. Cook <CACook@quantum-equities.com> Tested-by: Carl A. Cook <CACook@quantum-equities.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | mac80211: remove unneeded CONFIG_PM ifdefJohannes Berg2012-09-11
| | | | | | | | | | | | | | | | The functions are only called if CONFIG_PM is set as the callers are under an ifdef, so there's no need to also define no-op functions. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | mac80211: validate skb->dev in the tx status pathFelix Fietkau2012-09-10
| | | | | | | | | | | | | | | | | | | | | | skb->dev might contain a stale reference to a device that was already deleted, and using it unchecked can lead to invalid pointer accesses. Since this is only used for nl80211 tx, iterate over active interfaces to find a match for skb->dev, and discard the tx status if the device is gone. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | mac80211: use call_rcu() on sta deletionEliad Peller2012-09-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mac80211 calls synchronize_rcu() on sta deletion, which increase the roaming time significantly. Convert it into a call_rcu() mechanism, in order to avoid blocking. Since some of the cleanup functions might sleep, schedule from the call_rcu callback a new work that will do the actual cleanup. In order to make sure the cleanup occurs before the interface went down, flush local->workqueue on ieee80211_do_stop(). Signed-off-by: Yoni Divinsky <yoni.divinsky@ti.com> Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | mac80211: add key flag for management keysJohannes Berg2012-09-10
| | | | | | | | | | | | | | | | | | | | | | | | Mark keys that might be used to receive management frames so drivers can fall back on software crypto for them if they don't support hardware offload. As the new flag is only set correctly for RX keys and the existing IEEE80211_KEY_FLAG_SW_MGMT flag can only affect TX, also rename the latter to IEEE80211_KEY_FLAG_SW_MGMT_TX. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | mac80211: reply to AUTH with DEAUTH if sta allocation fails in IBSSAntonio Quartulli2012-09-07
| | | | | | | | | | | | | | | | | | | | | | Whenever a host gets an AUTH frame it first allocates a new station and then replies with another AUTH frame. However, if sta allocations fails the host should send a DEAUTH frame instead to tell the other end that something went wrong. Signed-off-by: Antonio Quartulli <ordex@autistici.org> [reword commit message a bit] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | mac80211: move ieee80211_send_deauth_disassoc outside mlme codeAntonio Quartulli2012-09-07
| | | | | | | | | | | | | | | | | | Move ieee80211_send_deauth_disassoc() to util.c to make it available for the rest of the mac80211 code. Signed-off-by: Antonio Quartulli <ordex@autistici.org> [reword commit message] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | net/mac80211/scan.c: removes unnecessary semicolonPeter Senna Tschudin2012-09-07
| | | | | | | | | | | | | | | | | | removes unnecessary semicolon Found by Coccinelle: http://coccinelle.lip6.fr/ Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | mac80211: refactor set_channel_typeMichal Kazior2012-09-06
| | | | | | | | | | | | | | | | | | | | Split functionality for further reuse. Will prevent code duplication when channel context channel_type merging is introduced. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | mac80211: use synchronize_net() on key destroyingEliad Peller2012-09-06
| | | | | | | | | | | | | | | | | | | | | | | | __ieee80211_key_destroy() calls synchronize_rcu() in order to sync the tx path before destroying the key. However, synching the tx path can be done with synchronize_net() as well, which is usually faster (the timing might be important for roaming scenarios). Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | mac80211: check power constraint IE size when parsingJohannes Berg2012-09-06
| | | | | | | | | | | | | | The power constraint IE is always a single byte so check the size when parsing instead of later. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | Merge remote-tracking branch 'wireless-next/master' into mac80211-nextJohannes Berg2012-09-06
|\ \
| * \ Merge branch 'for-john' of ↵John W. Linville2012-08-23
| |\ \ | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next
| * \ \ Merge branch 'for-john' of ↵John W. Linville2012-08-21
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next Conflicts: drivers/net/wireless/mac80211_hwsim.c
| * | | | mac80211: fix unnecessary beacon update after peering status changeMarco Porsch2012-08-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ieee80211_bss_info_change_notify is called everytime a peer link is established or closed, because the accepting_plinks flag in the meshconf IE *might* have changed. With this patch the corresponding functions return the BSS_CHANGED_BEACON flag when a beacon update is necessary. Also it makes mesh_accept_plinks_update the common place to update the accepting_plinks flag. mesh_accept_plinks_update is called upon plink change and also periodically from ieee80211_mesh_housekeeping. Thus, it also picks up changes of local->num_sta. Signed-off-by: Marco Porsch <marco.porsch@etit.tu-chemnitz.de> Acked-by: Thomas Pedersen <thomas@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | | | | mac80211: disconnect if channel switch failsJohannes Berg2012-09-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Disconnect from the AP if channel switching in the driver failed or if the new channel is unavailable. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | | | | mac80211: don't hang on to sched_scan_iesJohannes Berg2012-09-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There's no need to keep a copy of the scheduled scan IEs after the driver has been told, if it requires a copy it must make one. Therefore, we can move sched_scan_ies into the function. Signed-off-by: Johannes Berg <johannes.berg@intel.com>