Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 277839
b: refs/heads/master
c: 87bbbe2
h: refs/heads/master
i:
  277837: f7d0917
  277835: 827259a
  277831: e05dc45
  277823: b7b9925
v: v3
  • Loading branch information
Arik Nemtsov authored and John W. Linville committed Nov 11, 2011
1 parent 154f65b commit f768f92
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d64d373ffed925f29c3e68a8d6f45677a622054e
refs/heads/master: 87bbbe22f84b91d0bcd3a7fc638e4f5e8224cc4e
28 changes: 28 additions & 0 deletions trunk/include/linux/nl80211.h
Original file line number Diff line number Diff line change
Expand Up @@ -1160,6 +1160,11 @@ enum nl80211_commands {
*
* @NL80211_ATTR_FEATURE_FLAGS: This u32 attribute contains flags from
* &enum nl80211_feature_flags and is advertised in wiphy information.
* @NL80211_ATTR_PROBE_RESP_OFFLOAD: Indicates that the HW responds to probe
*
* requests while operating in AP-mode.
* This attribute holds a bitmap of the supported protocols for
* offloading (see &enum nl80211_probe_resp_offload_support_attr).
*
* @NL80211_ATTR_MAX: highest attribute number currently defined
* @__NL80211_ATTR_AFTER_LAST: internal use
Expand Down Expand Up @@ -1395,6 +1400,8 @@ enum nl80211_attrs {

NL80211_ATTR_FEATURE_FLAGS,

NL80211_ATTR_PROBE_RESP_OFFLOAD,

/* add attributes here, update the policy in nl80211.c */

__NL80211_ATTR_AFTER_LAST,
Expand Down Expand Up @@ -2727,4 +2734,25 @@ enum nl80211_feature_flags {
NL80211_FEATURE_SK_TX_STATUS = 1 << 0,
};

/**
* enum nl80211_probe_resp_offload_support_attr - optional supported
* protocols for probe-response offloading by the driver/FW.
* To be used with the %NL80211_ATTR_PROBE_RESP_OFFLOAD attribute.
* Each enum value represents a bit in the bitmap of supported
* protocols. Typically a subset of probe-requests belonging to a
* supported protocol will be excluded from offload and uploaded
* to the host.
*
* @NL80211_PROBE_RESP_OFFLOAD_SUPPORT_WPS: Support for WPS ver. 1
* @NL80211_PROBE_RESP_OFFLOAD_SUPPORT_WPS2: Support for WPS ver. 2
* @NL80211_PROBE_RESP_OFFLOAD_SUPPORT_P2P: Support for P2P
* @NL80211_PROBE_RESP_OFFLOAD_SUPPORT_80211U: Support for 802.11u
*/
enum nl80211_probe_resp_offload_support_attr {
NL80211_PROBE_RESP_OFFLOAD_SUPPORT_WPS = 1<<0,
NL80211_PROBE_RESP_OFFLOAD_SUPPORT_WPS2 = 1<<1,
NL80211_PROBE_RESP_OFFLOAD_SUPPORT_P2P = 1<<2,
NL80211_PROBE_RESP_OFFLOAD_SUPPORT_80211U = 1<<3,
};

#endif /* __LINUX_NL80211_H */
10 changes: 10 additions & 0 deletions trunk/include/net/cfg80211.h
Original file line number Diff line number Diff line change
Expand Up @@ -1694,6 +1694,8 @@ struct cfg80211_ops {
* @WIPHY_FLAG_REPORTS_OBSS: the device will report beacons from other BSSes
* when there are virtual interfaces in AP mode by calling
* cfg80211_report_obss_beacon().
* @WIPHY_FLAG_AP_PROBE_RESP_OFFLOAD: When operating as an AP, the device
* responds to probe-requests in hardware.
*/
enum wiphy_flags {
WIPHY_FLAG_CUSTOM_REGULATORY = BIT(0),
Expand All @@ -1714,6 +1716,7 @@ enum wiphy_flags {
WIPHY_FLAG_TDLS_EXTERNAL_SETUP = BIT(16),
WIPHY_FLAG_HAVE_AP_SME = BIT(17),
WIPHY_FLAG_REPORTS_OBSS = BIT(18),
WIPHY_FLAG_AP_PROBE_RESP_OFFLOAD = BIT(19),
};

/**
Expand Down Expand Up @@ -1982,6 +1985,13 @@ struct wiphy {
u32 available_antennas_tx;
u32 available_antennas_rx;

/*
* Bitmap of supported protocols for probe response offloading
* see &enum nl80211_probe_resp_offload_support_attr. Only valid
* when the wiphy flag @WIPHY_FLAG_AP_PROBE_RESP_OFFLOAD is set.
*/
u32 probe_resp_offload;

/* If multiple wiphys are registered and you're handed e.g.
* a regular netdev with assigned ieee80211_ptr, you won't
* know whether it points to a wiphy your driver has registered
Expand Down
4 changes: 4 additions & 0 deletions trunk/net/wireless/nl80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -759,6 +759,10 @@ static int nl80211_send_wiphy(struct sk_buff *msg, u32 pid, u32 seq, int flags,
NLA_PUT_U32(msg, NL80211_ATTR_WIPHY_ANTENNA_AVAIL_RX,
dev->wiphy.available_antennas_rx);

if (dev->wiphy.flags & WIPHY_FLAG_AP_PROBE_RESP_OFFLOAD)
NLA_PUT_U32(msg, NL80211_ATTR_PROBE_RESP_OFFLOAD,
dev->wiphy.probe_resp_offload);

if ((dev->wiphy.available_antennas_tx ||
dev->wiphy.available_antennas_rx) && dev->ops->get_antenna) {
u32 tx_ant = 0, rx_ant = 0;
Expand Down

0 comments on commit f768f92

Please sign in to comment.