diff options
author | Arik Nemtsov <arik@wizery.com> | 2011-11-10 04:28:55 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-11-11 12:32:51 -0500 |
commit | 87bbbe22f84b91d0bcd3a7fc638e4f5e8224cc4e (patch) | |
tree | ef61839cade89a6c47c96c3447d0d4c12f913c41 /include | |
parent | d64d373ffed925f29c3e68a8d6f45677a622054e (diff) |
nl80211: Add probe response offload attribute
Notify user-space about probe-response offloading support in the driver.
A wiphy flag is used to indicate support and a bitmap of protocols
determines which protocols are supported.
Signed-off-by: Guy Eilam <guy@wizery.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/nl80211.h | 28 | ||||
-rw-r--r-- | include/net/cfg80211.h | 10 |
2 files changed, 38 insertions, 0 deletions
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h index 3152ddfb4294..be92333cf8fe 100644 --- a/include/linux/nl80211.h +++ b/include/linux/nl80211.h | |||
@@ -1160,6 +1160,11 @@ enum nl80211_commands { | |||
1160 | * | 1160 | * |
1161 | * @NL80211_ATTR_FEATURE_FLAGS: This u32 attribute contains flags from | 1161 | * @NL80211_ATTR_FEATURE_FLAGS: This u32 attribute contains flags from |
1162 | * &enum nl80211_feature_flags and is advertised in wiphy information. | 1162 | * &enum nl80211_feature_flags and is advertised in wiphy information. |
1163 | * @NL80211_ATTR_PROBE_RESP_OFFLOAD: Indicates that the HW responds to probe | ||
1164 | * | ||
1165 | * requests while operating in AP-mode. | ||
1166 | * This attribute holds a bitmap of the supported protocols for | ||
1167 | * offloading (see &enum nl80211_probe_resp_offload_support_attr). | ||
1163 | * | 1168 | * |
1164 | * @NL80211_ATTR_MAX: highest attribute number currently defined | 1169 | * @NL80211_ATTR_MAX: highest attribute number currently defined |
1165 | * @__NL80211_ATTR_AFTER_LAST: internal use | 1170 | * @__NL80211_ATTR_AFTER_LAST: internal use |
@@ -1395,6 +1400,8 @@ enum nl80211_attrs { | |||
1395 | 1400 | ||
1396 | NL80211_ATTR_FEATURE_FLAGS, | 1401 | NL80211_ATTR_FEATURE_FLAGS, |
1397 | 1402 | ||
1403 | NL80211_ATTR_PROBE_RESP_OFFLOAD, | ||
1404 | |||
1398 | /* add attributes here, update the policy in nl80211.c */ | 1405 | /* add attributes here, update the policy in nl80211.c */ |
1399 | 1406 | ||
1400 | __NL80211_ATTR_AFTER_LAST, | 1407 | __NL80211_ATTR_AFTER_LAST, |
@@ -2727,4 +2734,25 @@ enum nl80211_feature_flags { | |||
2727 | NL80211_FEATURE_SK_TX_STATUS = 1 << 0, | 2734 | NL80211_FEATURE_SK_TX_STATUS = 1 << 0, |
2728 | }; | 2735 | }; |
2729 | 2736 | ||
2737 | /** | ||
2738 | * enum nl80211_probe_resp_offload_support_attr - optional supported | ||
2739 | * protocols for probe-response offloading by the driver/FW. | ||
2740 | * To be used with the %NL80211_ATTR_PROBE_RESP_OFFLOAD attribute. | ||
2741 | * Each enum value represents a bit in the bitmap of supported | ||
2742 | * protocols. Typically a subset of probe-requests belonging to a | ||
2743 | * supported protocol will be excluded from offload and uploaded | ||
2744 | * to the host. | ||
2745 | * | ||
2746 | * @NL80211_PROBE_RESP_OFFLOAD_SUPPORT_WPS: Support for WPS ver. 1 | ||
2747 | * @NL80211_PROBE_RESP_OFFLOAD_SUPPORT_WPS2: Support for WPS ver. 2 | ||
2748 | * @NL80211_PROBE_RESP_OFFLOAD_SUPPORT_P2P: Support for P2P | ||
2749 | * @NL80211_PROBE_RESP_OFFLOAD_SUPPORT_80211U: Support for 802.11u | ||
2750 | */ | ||
2751 | enum nl80211_probe_resp_offload_support_attr { | ||
2752 | NL80211_PROBE_RESP_OFFLOAD_SUPPORT_WPS = 1<<0, | ||
2753 | NL80211_PROBE_RESP_OFFLOAD_SUPPORT_WPS2 = 1<<1, | ||
2754 | NL80211_PROBE_RESP_OFFLOAD_SUPPORT_P2P = 1<<2, | ||
2755 | NL80211_PROBE_RESP_OFFLOAD_SUPPORT_80211U = 1<<3, | ||
2756 | }; | ||
2757 | |||
2730 | #endif /* __LINUX_NL80211_H */ | 2758 | #endif /* __LINUX_NL80211_H */ |
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 50e3608f5656..093f538f65d6 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h | |||
@@ -1694,6 +1694,8 @@ struct cfg80211_ops { | |||
1694 | * @WIPHY_FLAG_REPORTS_OBSS: the device will report beacons from other BSSes | 1694 | * @WIPHY_FLAG_REPORTS_OBSS: the device will report beacons from other BSSes |
1695 | * when there are virtual interfaces in AP mode by calling | 1695 | * when there are virtual interfaces in AP mode by calling |
1696 | * cfg80211_report_obss_beacon(). | 1696 | * cfg80211_report_obss_beacon(). |
1697 | * @WIPHY_FLAG_AP_PROBE_RESP_OFFLOAD: When operating as an AP, the device | ||
1698 | * responds to probe-requests in hardware. | ||
1697 | */ | 1699 | */ |
1698 | enum wiphy_flags { | 1700 | enum wiphy_flags { |
1699 | WIPHY_FLAG_CUSTOM_REGULATORY = BIT(0), | 1701 | WIPHY_FLAG_CUSTOM_REGULATORY = BIT(0), |
@@ -1714,6 +1716,7 @@ enum wiphy_flags { | |||
1714 | WIPHY_FLAG_TDLS_EXTERNAL_SETUP = BIT(16), | 1716 | WIPHY_FLAG_TDLS_EXTERNAL_SETUP = BIT(16), |
1715 | WIPHY_FLAG_HAVE_AP_SME = BIT(17), | 1717 | WIPHY_FLAG_HAVE_AP_SME = BIT(17), |
1716 | WIPHY_FLAG_REPORTS_OBSS = BIT(18), | 1718 | WIPHY_FLAG_REPORTS_OBSS = BIT(18), |
1719 | WIPHY_FLAG_AP_PROBE_RESP_OFFLOAD = BIT(19), | ||
1717 | }; | 1720 | }; |
1718 | 1721 | ||
1719 | /** | 1722 | /** |
@@ -1982,6 +1985,13 @@ struct wiphy { | |||
1982 | u32 available_antennas_tx; | 1985 | u32 available_antennas_tx; |
1983 | u32 available_antennas_rx; | 1986 | u32 available_antennas_rx; |
1984 | 1987 | ||
1988 | /* | ||
1989 | * Bitmap of supported protocols for probe response offloading | ||
1990 | * see &enum nl80211_probe_resp_offload_support_attr. Only valid | ||
1991 | * when the wiphy flag @WIPHY_FLAG_AP_PROBE_RESP_OFFLOAD is set. | ||
1992 | */ | ||
1993 | u32 probe_resp_offload; | ||
1994 | |||
1985 | /* If multiple wiphys are registered and you're handed e.g. | 1995 | /* If multiple wiphys are registered and you're handed e.g. |
1986 | * a regular netdev with assigned ieee80211_ptr, you won't | 1996 | * a regular netdev with assigned ieee80211_ptr, you won't |
1987 | * know whether it points to a wiphy your driver has registered | 1997 | * know whether it points to a wiphy your driver has registered |