From 44713c41b7857936322397eb8f75d14b6e913d4b Mon Sep 17 00:00:00 2001 From: Wei Ni Date: Tue, 22 Nov 2011 18:17:43 +0800 Subject: mac80211 & nl80211: add support to abort a scan request on tx This fix comes from: https://gerrit.chromium.org/gerrit/#change,5744 https://gerrit.chromium.org/gerrit/#change,5745 So that it can work with the related wpa_supplicant tool. BUG=895591 Change-Id: Ie81f6d6052bd45dab13c936f9f0c5f4eb277496a Original-Signed-off-by: Wei Ni Signed-off-by: Rhyland Klein Reviewed-on: http://git-master/r/111333 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Bharat Nihalani --- include/linux/nl80211.h | 16 ++++++++++++++++ include/net/cfg80211.h | 11 +++++++++++ 2 files changed, 27 insertions(+) (limited to 'include') diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h index 8ad70dcac3f9..bec6bcacc899 100644 --- a/include/linux/nl80211.h +++ b/include/linux/nl80211.h @@ -967,6 +967,8 @@ enum nl80211_commands { * @NL80211_ATTR_WIPHY_ANTENNA_AVAIL_RX: Bitmap of antennas which are available * for configuration as RX antennas via the above parameters. * + * @NL80211_ATTR_SCAN_FLAGS: scan request control flags (u32) + * * @NL80211_ATTR_MCAST_RATE: Multicast tx rate (in 100 kbps) for IBSS * * @NL80211_ATTR_OFFCHANNEL_TX_OK: For management frame TX, the frame may be @@ -1206,6 +1208,8 @@ enum nl80211_attrs { NL80211_ATTR_WIPHY_ANTENNA_AVAIL_TX, NL80211_ATTR_WIPHY_ANTENNA_AVAIL_RX, + NL80211_ATTR_SCAN_FLAGS, + NL80211_ATTR_SUPPORT_MESH_AUTH, NL80211_ATTR_STA_PLINK_STATE, @@ -2206,6 +2210,18 @@ enum nl80211_tx_power_setting { NL80211_TX_POWER_FIXED, }; +/** + * enum nl80211_scan_flags - scan request control flags + * + * Scan request control flags are used to control the handling + * of NL80211_CMD_TRIGGER_SCAN, requests. + * + * @NL80211_SCAN_FLAG_TX_ABORT: abort scan if tx collides + */ +enum nl80211_scan_flags { + NL80211_SCAN_FLAG_TX_ABORT = 1<<0, +}; + /** * enum nl80211_wowlan_packet_pattern_attr - WoWLAN packet pattern attribute * @__NL80211_WOWLAN_PKTPAT_INVALID: invalid number for nested attribute diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index dc4ae1277e47..251a2f936727 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h @@ -783,6 +783,15 @@ struct cfg80211_ssid { u8 ssid_len; }; +/** + * enum cfg80211_scan_flag - scan request control flags + * + * @CFG80211_SCAN__FLAG_TX_ABORT: abort scan on pending transmit + */ +enum cfg80211_scan_flags { + CFG80211_SCAN_FLAG_TX_ABORT = NL80211_SCAN_FLAG_TX_ABORT, +}; + /** * struct cfg80211_scan_request - scan request description * @@ -792,6 +801,7 @@ struct cfg80211_ssid { * @n_channels: total number of channels to scan * @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 * @rates: bitmap of rates to advertise for each band * @wiphy: the wiphy this was for * @dev: the interface @@ -803,6 +813,7 @@ struct cfg80211_scan_request { u32 n_channels; const u8 *ie; size_t ie_len; + u32 flags; u32 rates[IEEE80211_NUM_BANDS]; -- cgit v1.2.3