diff options
-rw-r--r-- | include/linux/nl80211.h | 13 | ||||
-rw-r--r-- | include/net/cfg80211.h | 5 | ||||
-rw-r--r-- | net/mac80211/cfg.c | 3 | ||||
-rw-r--r-- | net/wireless/core.h | 3 | ||||
-rw-r--r-- | net/wireless/mlme.c | 5 | ||||
-rw-r--r-- | net/wireless/nl80211.c | 9 |
6 files changed, 32 insertions, 6 deletions
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h index 460b12a8ef66..c73582fb9d20 100644 --- a/include/linux/nl80211.h +++ b/include/linux/nl80211.h | |||
@@ -238,6 +238,8 @@ | |||
238 | * | 238 | * |
239 | * @NL80211_CMD_GET_SCAN: get scan results | 239 | * @NL80211_CMD_GET_SCAN: get scan results |
240 | * @NL80211_CMD_TRIGGER_SCAN: trigger a new scan with the given parameters | 240 | * @NL80211_CMD_TRIGGER_SCAN: trigger a new scan with the given parameters |
241 | * %NL80211_ATTR_TX_NO_CCK_RATE is used to decide whether to send the | ||
242 | * probe requests at CCK rate or not. | ||
241 | * @NL80211_CMD_NEW_SCAN_RESULTS: scan notification (as a reply to | 243 | * @NL80211_CMD_NEW_SCAN_RESULTS: scan notification (as a reply to |
242 | * NL80211_CMD_GET_SCAN and on the "scan" multicast group) | 244 | * NL80211_CMD_GET_SCAN and on the "scan" multicast group) |
243 | * @NL80211_CMD_SCAN_ABORTED: scan was aborted, for unspecified reasons, | 245 | * @NL80211_CMD_SCAN_ABORTED: scan was aborted, for unspecified reasons, |
@@ -432,6 +434,8 @@ | |||
432 | * specified using %NL80211_ATTR_DURATION. When called, this operation | 434 | * specified using %NL80211_ATTR_DURATION. When called, this operation |
433 | * returns a cookie (%NL80211_ATTR_COOKIE) that will be included with the | 435 | * returns a cookie (%NL80211_ATTR_COOKIE) that will be included with the |
434 | * TX status event pertaining to the TX request. | 436 | * TX status event pertaining to the TX request. |
437 | * %NL80211_ATTR_TX_NO_CCK_RATE is used to decide whether to send the | ||
438 | * management frames at CCK rate or not in 2GHz band. | ||
435 | * @NL80211_CMD_FRAME_WAIT_CANCEL: When an off-channel TX was requested, this | 439 | * @NL80211_CMD_FRAME_WAIT_CANCEL: When an off-channel TX was requested, this |
436 | * command may be used with the corresponding cookie to cancel the wait | 440 | * command may be used with the corresponding cookie to cancel the wait |
437 | * time if it is known that it is no longer necessary. | 441 | * time if it is known that it is no longer necessary. |
@@ -1078,6 +1082,13 @@ enum nl80211_commands { | |||
1078 | * @NL80211_ATTR_PMKSA_CANDIDATE: Nested attribute containing the PMKSA caching | 1082 | * @NL80211_ATTR_PMKSA_CANDIDATE: Nested attribute containing the PMKSA caching |
1079 | * candidate information, see &enum nl80211_pmksa_candidate_attr. | 1083 | * candidate information, see &enum nl80211_pmksa_candidate_attr. |
1080 | * | 1084 | * |
1085 | * @NL80211_ATTR_TX_NO_CCK_RATE: Indicates whether to use CCK rate or not | ||
1086 | * for management frames transmission. In order to avoid p2p probe/action | ||
1087 | * frames are being transmitted at CCK rate in 2GHz band, the user space | ||
1088 | * applications use this attribute. | ||
1089 | * This attribute is used with %NL80211_CMD_TRIGGER_SCAN and | ||
1090 | * %NL80211_CMD_FRAME commands. | ||
1091 | * | ||
1081 | * @NL80211_ATTR_MAX: highest attribute number currently defined | 1092 | * @NL80211_ATTR_MAX: highest attribute number currently defined |
1082 | * @__NL80211_ATTR_AFTER_LAST: internal use | 1093 | * @__NL80211_ATTR_AFTER_LAST: internal use |
1083 | */ | 1094 | */ |
@@ -1298,6 +1309,8 @@ enum nl80211_attrs { | |||
1298 | 1309 | ||
1299 | NL80211_ATTR_PMKSA_CANDIDATE, | 1310 | NL80211_ATTR_PMKSA_CANDIDATE, |
1300 | 1311 | ||
1312 | NL80211_ATTR_TX_NO_CCK_RATE, | ||
1313 | |||
1301 | /* add attributes here, update the policy in nl80211.c */ | 1314 | /* add attributes here, update the policy in nl80211.c */ |
1302 | 1315 | ||
1303 | __NL80211_ATTR_AFTER_LAST, | 1316 | __NL80211_ATTR_AFTER_LAST, |
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index ccfdf3f63ce5..c1dd56b7cce5 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h | |||
@@ -860,6 +860,7 @@ struct cfg80211_ssid { | |||
860 | * @wiphy: the wiphy this was for | 860 | * @wiphy: the wiphy this was for |
861 | * @dev: the interface | 861 | * @dev: the interface |
862 | * @aborted: (internal) scan request was notified as aborted | 862 | * @aborted: (internal) scan request was notified as aborted |
863 | * @no_cck: used to send probe requests at non CCK rate in 2GHz band | ||
863 | */ | 864 | */ |
864 | struct cfg80211_scan_request { | 865 | struct cfg80211_scan_request { |
865 | struct cfg80211_ssid *ssids; | 866 | struct cfg80211_ssid *ssids; |
@@ -874,6 +875,7 @@ struct cfg80211_scan_request { | |||
874 | struct wiphy *wiphy; | 875 | struct wiphy *wiphy; |
875 | struct net_device *dev; | 876 | struct net_device *dev; |
876 | bool aborted; | 877 | bool aborted; |
878 | bool no_cck; | ||
877 | 879 | ||
878 | /* keep last */ | 880 | /* keep last */ |
879 | struct ieee80211_channel *channels[0]; | 881 | struct ieee80211_channel *channels[0]; |
@@ -1560,7 +1562,8 @@ struct cfg80211_ops { | |||
1560 | struct ieee80211_channel *chan, bool offchan, | 1562 | struct ieee80211_channel *chan, bool offchan, |
1561 | enum nl80211_channel_type channel_type, | 1563 | enum nl80211_channel_type channel_type, |
1562 | bool channel_type_valid, unsigned int wait, | 1564 | bool channel_type_valid, unsigned int wait, |
1563 | const u8 *buf, size_t len, u64 *cookie); | 1565 | const u8 *buf, size_t len, bool no_cck, |
1566 | u64 *cookie); | ||
1564 | int (*mgmt_tx_cancel_wait)(struct wiphy *wiphy, | 1567 | int (*mgmt_tx_cancel_wait)(struct wiphy *wiphy, |
1565 | struct net_device *dev, | 1568 | struct net_device *dev, |
1566 | u64 cookie); | 1569 | u64 cookie); |
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index b57ddf941e59..9cba0104e291 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c | |||
@@ -1869,7 +1869,8 @@ static int ieee80211_mgmt_tx(struct wiphy *wiphy, struct net_device *dev, | |||
1869 | struct ieee80211_channel *chan, bool offchan, | 1869 | struct ieee80211_channel *chan, bool offchan, |
1870 | enum nl80211_channel_type channel_type, | 1870 | enum nl80211_channel_type channel_type, |
1871 | bool channel_type_valid, unsigned int wait, | 1871 | bool channel_type_valid, unsigned int wait, |
1872 | const u8 *buf, size_t len, u64 *cookie) | 1872 | const u8 *buf, size_t len, bool no_cck, |
1873 | u64 *cookie) | ||
1873 | { | 1874 | { |
1874 | struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); | 1875 | struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); |
1875 | struct ieee80211_local *local = sdata->local; | 1876 | struct ieee80211_local *local = sdata->local; |
diff --git a/net/wireless/core.h b/net/wireless/core.h index cb87b8bbceb7..b9ec3061ed72 100644 --- a/net/wireless/core.h +++ b/net/wireless/core.h | |||
@@ -375,7 +375,8 @@ int cfg80211_mlme_mgmt_tx(struct cfg80211_registered_device *rdev, | |||
375 | struct ieee80211_channel *chan, bool offchan, | 375 | struct ieee80211_channel *chan, bool offchan, |
376 | enum nl80211_channel_type channel_type, | 376 | enum nl80211_channel_type channel_type, |
377 | bool channel_type_valid, unsigned int wait, | 377 | bool channel_type_valid, unsigned int wait, |
378 | const u8 *buf, size_t len, u64 *cookie); | 378 | const u8 *buf, size_t len, bool no_cck, |
379 | u64 *cookie); | ||
379 | 380 | ||
380 | /* SME */ | 381 | /* SME */ |
381 | int __cfg80211_connect(struct cfg80211_registered_device *rdev, | 382 | int __cfg80211_connect(struct cfg80211_registered_device *rdev, |
diff --git a/net/wireless/mlme.c b/net/wireless/mlme.c index 61adea540e02..21fc9702f81c 100644 --- a/net/wireless/mlme.c +++ b/net/wireless/mlme.c | |||
@@ -900,7 +900,8 @@ int cfg80211_mlme_mgmt_tx(struct cfg80211_registered_device *rdev, | |||
900 | struct ieee80211_channel *chan, bool offchan, | 900 | struct ieee80211_channel *chan, bool offchan, |
901 | enum nl80211_channel_type channel_type, | 901 | enum nl80211_channel_type channel_type, |
902 | bool channel_type_valid, unsigned int wait, | 902 | bool channel_type_valid, unsigned int wait, |
903 | const u8 *buf, size_t len, u64 *cookie) | 903 | const u8 *buf, size_t len, bool no_cck, |
904 | u64 *cookie) | ||
904 | { | 905 | { |
905 | struct wireless_dev *wdev = dev->ieee80211_ptr; | 906 | struct wireless_dev *wdev = dev->ieee80211_ptr; |
906 | const struct ieee80211_mgmt *mgmt; | 907 | const struct ieee80211_mgmt *mgmt; |
@@ -991,7 +992,7 @@ int cfg80211_mlme_mgmt_tx(struct cfg80211_registered_device *rdev, | |||
991 | /* Transmit the Action frame as requested by user space */ | 992 | /* Transmit the Action frame as requested by user space */ |
992 | return rdev->ops->mgmt_tx(&rdev->wiphy, dev, chan, offchan, | 993 | return rdev->ops->mgmt_tx(&rdev->wiphy, dev, chan, offchan, |
993 | channel_type, channel_type_valid, | 994 | channel_type, channel_type_valid, |
994 | wait, buf, len, cookie); | 995 | wait, buf, len, no_cck, cookie); |
995 | } | 996 | } |
996 | 997 | ||
997 | bool cfg80211_rx_mgmt(struct net_device *dev, int freq, const u8 *buf, | 998 | bool cfg80211_rx_mgmt(struct net_device *dev, int freq, const u8 *buf, |
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index a3e26951fd8b..48c1bf1a142d 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c | |||
@@ -191,6 +191,7 @@ static const struct nla_policy nl80211_policy[NL80211_ATTR_MAX+1] = { | |||
191 | .len = IEEE80211_MAX_DATA_LEN }, | 191 | .len = IEEE80211_MAX_DATA_LEN }, |
192 | [NL80211_ATTR_ROAM_SUPPORT] = { .type = NLA_FLAG }, | 192 | [NL80211_ATTR_ROAM_SUPPORT] = { .type = NLA_FLAG }, |
193 | [NL80211_ATTR_SCHED_SCAN_MATCH] = { .type = NLA_NESTED }, | 193 | [NL80211_ATTR_SCHED_SCAN_MATCH] = { .type = NLA_NESTED }, |
194 | [NL80211_ATTR_TX_NO_CCK_RATE] = { .type = NLA_FLAG }, | ||
194 | }; | 195 | }; |
195 | 196 | ||
196 | /* policy for the key attributes */ | 197 | /* policy for the key attributes */ |
@@ -3620,6 +3621,9 @@ static int nl80211_trigger_scan(struct sk_buff *skb, struct genl_info *info) | |||
3620 | } | 3621 | } |
3621 | } | 3622 | } |
3622 | 3623 | ||
3624 | request->no_cck = | ||
3625 | nla_get_flag(info->attrs[NL80211_ATTR_TX_NO_CCK_RATE]); | ||
3626 | |||
3623 | request->dev = dev; | 3627 | request->dev = dev; |
3624 | request->wiphy = &rdev->wiphy; | 3628 | request->wiphy = &rdev->wiphy; |
3625 | 3629 | ||
@@ -5171,6 +5175,7 @@ static int nl80211_tx_mgmt(struct sk_buff *skb, struct genl_info *info) | |||
5171 | struct sk_buff *msg; | 5175 | struct sk_buff *msg; |
5172 | unsigned int wait = 0; | 5176 | unsigned int wait = 0; |
5173 | bool offchan; | 5177 | bool offchan; |
5178 | bool no_cck; | ||
5174 | 5179 | ||
5175 | if (!info->attrs[NL80211_ATTR_FRAME] || | 5180 | if (!info->attrs[NL80211_ATTR_FRAME] || |
5176 | !info->attrs[NL80211_ATTR_WIPHY_FREQ]) | 5181 | !info->attrs[NL80211_ATTR_WIPHY_FREQ]) |
@@ -5207,6 +5212,8 @@ static int nl80211_tx_mgmt(struct sk_buff *skb, struct genl_info *info) | |||
5207 | 5212 | ||
5208 | offchan = info->attrs[NL80211_ATTR_OFFCHANNEL_TX_OK]; | 5213 | offchan = info->attrs[NL80211_ATTR_OFFCHANNEL_TX_OK]; |
5209 | 5214 | ||
5215 | no_cck = nla_get_flag(info->attrs[NL80211_ATTR_TX_NO_CCK_RATE]); | ||
5216 | |||
5210 | freq = nla_get_u32(info->attrs[NL80211_ATTR_WIPHY_FREQ]); | 5217 | freq = nla_get_u32(info->attrs[NL80211_ATTR_WIPHY_FREQ]); |
5211 | chan = rdev_freq_to_chan(rdev, freq, channel_type); | 5218 | chan = rdev_freq_to_chan(rdev, freq, channel_type); |
5212 | if (chan == NULL) | 5219 | if (chan == NULL) |
@@ -5227,7 +5234,7 @@ static int nl80211_tx_mgmt(struct sk_buff *skb, struct genl_info *info) | |||
5227 | channel_type_valid, wait, | 5234 | channel_type_valid, wait, |
5228 | nla_data(info->attrs[NL80211_ATTR_FRAME]), | 5235 | nla_data(info->attrs[NL80211_ATTR_FRAME]), |
5229 | nla_len(info->attrs[NL80211_ATTR_FRAME]), | 5236 | nla_len(info->attrs[NL80211_ATTR_FRAME]), |
5230 | &cookie); | 5237 | no_cck, &cookie); |
5231 | if (err) | 5238 | if (err) |
5232 | goto free_msg; | 5239 | goto free_msg; |
5233 | 5240 | ||