forked from analogdevicesinc/linux
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge tag 'mac80211-next-for-davem-2015-10-21' of git://git.kernel.or…
…g/pub/scm/linux/kernel/git/jberg/mac80211-next Johannes Berg says: ==================== Here's another set of patches for the current cycle: * I merged net-next back to avoid a conflict with the * cfg80211 scheduled scan API extensions * preparations for better scan result timestamping * regulatory cleanups * mac80211 statistics cleanups * a few other small cleanups and fixes ==================== Signed-off-by: David S. Miller <[email protected]>
- Loading branch information
Showing
41 changed files
with
910 additions
and
659 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ | |
* | ||
* Copyright 2006-2010 Johannes Berg <[email protected]> | ||
* Copyright 2013-2014 Intel Mobile Communications GmbH | ||
* Copyright 2015 Intel Deutschland GmbH | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License version 2 as | ||
|
@@ -1500,14 +1501,27 @@ struct cfg80211_match_set { | |
s32 rssi_thold; | ||
}; | ||
|
||
/** | ||
* struct cfg80211_sched_scan_plan - scan plan for scheduled scan | ||
* | ||
* @interval: interval between scheduled scan iterations. In seconds. | ||
* @iterations: number of scan iterations in this scan plan. Zero means | ||
* infinite loop. | ||
* The last scan plan will always have this parameter set to zero, | ||
* all other scan plans will have a finite number of iterations. | ||
*/ | ||
struct cfg80211_sched_scan_plan { | ||
u32 interval; | ||
u32 iterations; | ||
}; | ||
|
||
/** | ||
* struct cfg80211_sched_scan_request - scheduled scan request description | ||
* | ||
* @ssids: SSIDs to scan for (passed in the probe_reqs in active scans) | ||
* @n_ssids: number of SSIDs | ||
* @n_channels: total number of channels to scan | ||
* @scan_width: channel width for scanning | ||
* @interval: interval between each scheduled scan cycle | ||
* @ie: optional information element(s) to add into Probe Request or %NULL | ||
* @ie_len: length of ie in octets | ||
* @flags: bit field of flags controlling operation | ||
|
@@ -1526,6 +1540,9 @@ struct cfg80211_match_set { | |
* @mac_addr_mask: MAC address mask used with randomisation, bits that | ||
* are 0 in the mask should be randomised, bits that are 1 should | ||
* be taken from the @mac_addr | ||
* @scan_plans: scan plans to be executed in this scheduled scan. Lowest | ||
* index must be executed first. | ||
* @n_scan_plans: number of scan plans, at least 1. | ||
* @rcu_head: RCU callback used to free the struct | ||
* @owner_nlportid: netlink portid of owner (if this should is a request | ||
* owned by a particular socket) | ||
|
@@ -1539,14 +1556,15 @@ struct cfg80211_sched_scan_request { | |
int n_ssids; | ||
u32 n_channels; | ||
enum nl80211_bss_scan_width scan_width; | ||
u32 interval; | ||
const u8 *ie; | ||
size_t ie_len; | ||
u32 flags; | ||
struct cfg80211_match_set *match_sets; | ||
int n_match_sets; | ||
s32 min_rssi_thold; | ||
u32 delay; | ||
struct cfg80211_sched_scan_plan *scan_plans; | ||
int n_scan_plans; | ||
|
||
u8 mac_addr[ETH_ALEN] __aligned(2); | ||
u8 mac_addr_mask[ETH_ALEN] __aligned(2); | ||
|
@@ -1575,6 +1593,26 @@ enum cfg80211_signal_type { | |
CFG80211_SIGNAL_TYPE_UNSPEC, | ||
}; | ||
|
||
/** | ||
* struct cfg80211_inform_bss - BSS inform data | ||
* @chan: channel the frame was received on | ||
* @scan_width: scan width that was used | ||
* @signal: signal strength value, according to the wiphy's | ||
* signal type | ||
* @boottime_ns: timestamp (CLOCK_BOOTTIME) when the information was | ||
* received; should match the time when the frame was actually | ||
* received by the device (not just by the host, in case it was | ||
* buffered on the device) and be accurate to about 10ms. | ||
* If the frame isn't buffered, just passing the return value of | ||
* ktime_get_boot_ns() is likely appropriate. | ||
*/ | ||
struct cfg80211_inform_bss { | ||
struct ieee80211_channel *chan; | ||
enum nl80211_bss_scan_width scan_width; | ||
s32 signal; | ||
u64 boottime_ns; | ||
}; | ||
|
||
/** | ||
* struct cfg80211_bss_ie_data - BSS entry IE data | ||
* @tsf: TSF contained in the frame that carried these IEs | ||
|
@@ -3056,6 +3094,12 @@ struct wiphy_vendor_command { | |
* include fixed IEs like supported rates | ||
* @max_sched_scan_ie_len: same as max_scan_ie_len, but for scheduled | ||
* scans | ||
* @max_sched_scan_plans: maximum number of scan plans (scan interval and number | ||
* of iterations) for scheduled scan supported by the device. | ||
* @max_sched_scan_plan_interval: maximum interval (in seconds) for a | ||
* single scan plan supported by the device. | ||
* @max_sched_scan_plan_iterations: maximum number of iterations for a single | ||
* scan plan supported by the device. | ||
* @coverage_class: current coverage class | ||
* @fw_version: firmware version for ethtool reporting | ||
* @hw_version: hardware version for ethtool reporting | ||
|
@@ -3163,6 +3207,9 @@ struct wiphy { | |
u8 max_match_sets; | ||
u16 max_scan_ie_len; | ||
u16 max_sched_scan_ie_len; | ||
u32 max_sched_scan_plans; | ||
u32 max_sched_scan_plan_interval; | ||
u32 max_sched_scan_plan_iterations; | ||
|
||
int n_cipher_suites; | ||
const u32 *cipher_suites; | ||
|
@@ -3958,14 +4005,11 @@ void cfg80211_sched_scan_stopped(struct wiphy *wiphy); | |
void cfg80211_sched_scan_stopped_rtnl(struct wiphy *wiphy); | ||
|
||
/** | ||
* cfg80211_inform_bss_width_frame - inform cfg80211 of a received BSS frame | ||
* | ||
* cfg80211_inform_bss_frame_data - inform cfg80211 of a received BSS frame | ||
* @wiphy: the wiphy reporting the BSS | ||
* @rx_channel: The channel the frame was received on | ||
* @scan_width: width of the control channel | ||
* @data: the BSS metadata | ||
* @mgmt: the management frame (probe response or beacon) | ||
* @len: length of the management frame | ||
* @signal: the signal strength, type depends on the wiphy's signal_type | ||
* @gfp: context flags | ||
* | ||
* This informs cfg80211 that BSS information was found and | ||
|
@@ -3975,21 +4019,40 @@ void cfg80211_sched_scan_stopped_rtnl(struct wiphy *wiphy); | |
* Or %NULL on error. | ||
*/ | ||
struct cfg80211_bss * __must_check | ||
cfg80211_inform_bss_frame_data(struct wiphy *wiphy, | ||
struct cfg80211_inform_bss *data, | ||
struct ieee80211_mgmt *mgmt, size_t len, | ||
gfp_t gfp); | ||
|
||
static inline struct cfg80211_bss * __must_check | ||
cfg80211_inform_bss_width_frame(struct wiphy *wiphy, | ||
struct ieee80211_channel *rx_channel, | ||
enum nl80211_bss_scan_width scan_width, | ||
struct ieee80211_mgmt *mgmt, size_t len, | ||
s32 signal, gfp_t gfp); | ||
s32 signal, gfp_t gfp) | ||
{ | ||
struct cfg80211_inform_bss data = { | ||
.chan = rx_channel, | ||
.scan_width = scan_width, | ||
.signal = signal, | ||
}; | ||
|
||
return cfg80211_inform_bss_frame_data(wiphy, &data, mgmt, len, gfp); | ||
} | ||
|
||
static inline struct cfg80211_bss * __must_check | ||
cfg80211_inform_bss_frame(struct wiphy *wiphy, | ||
struct ieee80211_channel *rx_channel, | ||
struct ieee80211_mgmt *mgmt, size_t len, | ||
s32 signal, gfp_t gfp) | ||
{ | ||
return cfg80211_inform_bss_width_frame(wiphy, rx_channel, | ||
NL80211_BSS_CHAN_WIDTH_20, | ||
mgmt, len, signal, gfp); | ||
struct cfg80211_inform_bss data = { | ||
.chan = rx_channel, | ||
.scan_width = NL80211_BSS_CHAN_WIDTH_20, | ||
.signal = signal, | ||
}; | ||
|
||
return cfg80211_inform_bss_frame_data(wiphy, &data, mgmt, len, gfp); | ||
} | ||
|
||
/** | ||
|
@@ -4006,19 +4069,17 @@ enum cfg80211_bss_frame_type { | |
}; | ||
|
||
/** | ||
* cfg80211_inform_bss_width - inform cfg80211 of a new BSS | ||
* cfg80211_inform_bss_data - inform cfg80211 of a new BSS | ||
* | ||
* @wiphy: the wiphy reporting the BSS | ||
* @rx_channel: The channel the frame was received on | ||
* @scan_width: width of the control channel | ||
* @data: the BSS metadata | ||
* @ftype: frame type (if known) | ||
* @bssid: the BSSID of the BSS | ||
* @tsf: the TSF sent by the peer in the beacon/probe response (or 0) | ||
* @capability: the capability field sent by the peer | ||
* @beacon_interval: the beacon interval announced by the peer | ||
* @ie: additional IEs sent by the peer | ||
* @ielen: length of the additional IEs | ||
* @signal: the signal strength, type depends on the wiphy's signal_type | ||
* @gfp: context flags | ||
* | ||
* This informs cfg80211 that BSS information was found and | ||
|
@@ -4028,13 +4089,32 @@ enum cfg80211_bss_frame_type { | |
* Or %NULL on error. | ||
*/ | ||
struct cfg80211_bss * __must_check | ||
cfg80211_inform_bss_data(struct wiphy *wiphy, | ||
struct cfg80211_inform_bss *data, | ||
enum cfg80211_bss_frame_type ftype, | ||
const u8 *bssid, u64 tsf, u16 capability, | ||
u16 beacon_interval, const u8 *ie, size_t ielen, | ||
gfp_t gfp); | ||
|
||
static inline struct cfg80211_bss * __must_check | ||
cfg80211_inform_bss_width(struct wiphy *wiphy, | ||
struct ieee80211_channel *rx_channel, | ||
enum nl80211_bss_scan_width scan_width, | ||
enum cfg80211_bss_frame_type ftype, | ||
const u8 *bssid, u64 tsf, u16 capability, | ||
u16 beacon_interval, const u8 *ie, size_t ielen, | ||
s32 signal, gfp_t gfp); | ||
s32 signal, gfp_t gfp) | ||
{ | ||
struct cfg80211_inform_bss data = { | ||
.chan = rx_channel, | ||
.scan_width = scan_width, | ||
.signal = signal, | ||
}; | ||
|
||
return cfg80211_inform_bss_data(wiphy, &data, ftype, bssid, tsf, | ||
capability, beacon_interval, ie, ielen, | ||
gfp); | ||
} | ||
|
||
static inline struct cfg80211_bss * __must_check | ||
cfg80211_inform_bss(struct wiphy *wiphy, | ||
|
@@ -4044,11 +4124,15 @@ cfg80211_inform_bss(struct wiphy *wiphy, | |
u16 beacon_interval, const u8 *ie, size_t ielen, | ||
s32 signal, gfp_t gfp) | ||
{ | ||
return cfg80211_inform_bss_width(wiphy, rx_channel, | ||
NL80211_BSS_CHAN_WIDTH_20, ftype, | ||
bssid, tsf, capability, | ||
beacon_interval, ie, ielen, signal, | ||
gfp); | ||
struct cfg80211_inform_bss data = { | ||
.chan = rx_channel, | ||
.scan_width = NL80211_BSS_CHAN_WIDTH_20, | ||
.signal = signal, | ||
}; | ||
|
||
return cfg80211_inform_bss_data(wiphy, &data, ftype, bssid, tsf, | ||
capability, beacon_interval, ie, ielen, | ||
gfp); | ||
} | ||
|
||
struct cfg80211_bss *cfg80211_get_bss(struct wiphy *wiphy, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.