aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/net/cfg80211.h1
-rw-r--r--net/mac80211/cfg.c4
-rw-r--r--net/mac80211/ieee80211_i.h1
-rw-r--r--net/mac80211/mlme.c9
-rw-r--r--net/wireless/core.h1
-rw-r--r--net/wireless/mlme.c3
-rw-r--r--net/wireless/nl80211.c3
7 files changed, 17 insertions, 5 deletions
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 049e507d2f82..0c3c214772e7 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -1168,6 +1168,7 @@ struct cfg80211_ops {
1168 int (*action)(struct wiphy *wiphy, struct net_device *dev, 1168 int (*action)(struct wiphy *wiphy, struct net_device *dev,
1169 struct ieee80211_channel *chan, 1169 struct ieee80211_channel *chan,
1170 enum nl80211_channel_type channel_type, 1170 enum nl80211_channel_type channel_type,
1171 bool channel_type_valid,
1171 const u8 *buf, size_t len, u64 *cookie); 1172 const u8 *buf, size_t len, u64 *cookie);
1172 1173
1173 int (*set_power_mgmt)(struct wiphy *wiphy, struct net_device *dev, 1174 int (*set_power_mgmt)(struct wiphy *wiphy, struct net_device *dev,
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index c7000a6ca379..f8c49c5ad8aa 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -1554,10 +1554,12 @@ static int ieee80211_cancel_remain_on_channel(struct wiphy *wiphy,
1554static int ieee80211_action(struct wiphy *wiphy, struct net_device *dev, 1554static int ieee80211_action(struct wiphy *wiphy, struct net_device *dev,
1555 struct ieee80211_channel *chan, 1555 struct ieee80211_channel *chan,
1556 enum nl80211_channel_type channel_type, 1556 enum nl80211_channel_type channel_type,
1557 bool channel_type_valid,
1557 const u8 *buf, size_t len, u64 *cookie) 1558 const u8 *buf, size_t len, u64 *cookie)
1558{ 1559{
1559 return ieee80211_mgd_action(IEEE80211_DEV_TO_SUB_IF(dev), chan, 1560 return ieee80211_mgd_action(IEEE80211_DEV_TO_SUB_IF(dev), chan,
1560 channel_type, buf, len, cookie); 1561 channel_type, channel_type_valid,
1562 buf, len, cookie);
1561} 1563}
1562 1564
1563struct cfg80211_ops mac80211_config_ops = { 1565struct cfg80211_ops mac80211_config_ops = {
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index 1a9e2da37a93..d4677efd3a36 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -988,6 +988,7 @@ int ieee80211_mgd_disassoc(struct ieee80211_sub_if_data *sdata,
988int ieee80211_mgd_action(struct ieee80211_sub_if_data *sdata, 988int ieee80211_mgd_action(struct ieee80211_sub_if_data *sdata,
989 struct ieee80211_channel *chan, 989 struct ieee80211_channel *chan,
990 enum nl80211_channel_type channel_type, 990 enum nl80211_channel_type channel_type,
991 bool channel_type_valid,
991 const u8 *buf, size_t len, u64 *cookie); 992 const u8 *buf, size_t len, u64 *cookie);
992ieee80211_rx_result ieee80211_sta_rx_mgmt(struct ieee80211_sub_if_data *sdata, 993ieee80211_rx_result ieee80211_sta_rx_mgmt(struct ieee80211_sub_if_data *sdata,
993 struct sk_buff *skb); 994 struct sk_buff *skb);
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 31e3386b8d43..29c3a75a7ad0 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -2308,6 +2308,7 @@ int ieee80211_mgd_disassoc(struct ieee80211_sub_if_data *sdata,
2308int ieee80211_mgd_action(struct ieee80211_sub_if_data *sdata, 2308int ieee80211_mgd_action(struct ieee80211_sub_if_data *sdata,
2309 struct ieee80211_channel *chan, 2309 struct ieee80211_channel *chan,
2310 enum nl80211_channel_type channel_type, 2310 enum nl80211_channel_type channel_type,
2311 bool channel_type_valid,
2311 const u8 *buf, size_t len, u64 *cookie) 2312 const u8 *buf, size_t len, u64 *cookie)
2312{ 2313{
2313 struct ieee80211_local *local = sdata->local; 2314 struct ieee80211_local *local = sdata->local;
@@ -2315,9 +2316,11 @@ int ieee80211_mgd_action(struct ieee80211_sub_if_data *sdata,
2315 struct sk_buff *skb; 2316 struct sk_buff *skb;
2316 2317
2317 /* Check that we are on the requested channel for transmission */ 2318 /* Check that we are on the requested channel for transmission */
2318 if ((chan != local->tmp_channel || 2319 if (chan != local->tmp_channel &&
2319 channel_type != local->tmp_channel_type) && 2320 chan != local->oper_channel)
2320 (chan != local->oper_channel || 2321 return -EBUSY;
2322 if (channel_type_valid &&
2323 (channel_type != local->tmp_channel_type &&
2321 channel_type != local->_oper_channel_type)) 2324 channel_type != local->_oper_channel_type))
2322 return -EBUSY; 2325 return -EBUSY;
2323 2326
diff --git a/net/wireless/core.h b/net/wireless/core.h
index ae930acf75e9..63d57ae399c3 100644
--- a/net/wireless/core.h
+++ b/net/wireless/core.h
@@ -339,6 +339,7 @@ int cfg80211_mlme_action(struct cfg80211_registered_device *rdev,
339 struct net_device *dev, 339 struct net_device *dev,
340 struct ieee80211_channel *chan, 340 struct ieee80211_channel *chan,
341 enum nl80211_channel_type channel_type, 341 enum nl80211_channel_type channel_type,
342 bool channel_type_valid,
342 const u8 *buf, size_t len, u64 *cookie); 343 const u8 *buf, size_t len, u64 *cookie);
343 344
344/* SME */ 345/* SME */
diff --git a/net/wireless/mlme.c b/net/wireless/mlme.c
index 48ead6f0426d..f69ae19f497f 100644
--- a/net/wireless/mlme.c
+++ b/net/wireless/mlme.c
@@ -827,6 +827,7 @@ int cfg80211_mlme_action(struct cfg80211_registered_device *rdev,
827 struct net_device *dev, 827 struct net_device *dev,
828 struct ieee80211_channel *chan, 828 struct ieee80211_channel *chan,
829 enum nl80211_channel_type channel_type, 829 enum nl80211_channel_type channel_type,
830 bool channel_type_valid,
830 const u8 *buf, size_t len, u64 *cookie) 831 const u8 *buf, size_t len, u64 *cookie)
831{ 832{
832 struct wireless_dev *wdev = dev->ieee80211_ptr; 833 struct wireless_dev *wdev = dev->ieee80211_ptr;
@@ -855,7 +856,7 @@ int cfg80211_mlme_action(struct cfg80211_registered_device *rdev,
855 856
856 /* Transmit the Action frame as requested by user space */ 857 /* Transmit the Action frame as requested by user space */
857 return rdev->ops->action(&rdev->wiphy, dev, chan, channel_type, 858 return rdev->ops->action(&rdev->wiphy, dev, chan, channel_type,
858 buf, len, cookie); 859 channel_type_valid, buf, len, cookie);
859} 860}
860 861
861bool cfg80211_rx_action(struct net_device *dev, int freq, const u8 *buf, 862bool cfg80211_rx_action(struct net_device *dev, int freq, const u8 *buf,
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index db71150b8040..90ab3c8519be 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -4681,6 +4681,7 @@ static int nl80211_action(struct sk_buff *skb, struct genl_info *info)
4681 struct net_device *dev; 4681 struct net_device *dev;
4682 struct ieee80211_channel *chan; 4682 struct ieee80211_channel *chan;
4683 enum nl80211_channel_type channel_type = NL80211_CHAN_NO_HT; 4683 enum nl80211_channel_type channel_type = NL80211_CHAN_NO_HT;
4684 bool channel_type_valid = false;
4684 u32 freq; 4685 u32 freq;
4685 int err; 4686 int err;
4686 void *hdr; 4687 void *hdr;
@@ -4722,6 +4723,7 @@ static int nl80211_action(struct sk_buff *skb, struct genl_info *info)
4722 err = -EINVAL; 4723 err = -EINVAL;
4723 goto out; 4724 goto out;
4724 } 4725 }
4726 channel_type_valid = true;
4725 } 4727 }
4726 4728
4727 freq = nla_get_u32(info->attrs[NL80211_ATTR_WIPHY_FREQ]); 4729 freq = nla_get_u32(info->attrs[NL80211_ATTR_WIPHY_FREQ]);
@@ -4745,6 +4747,7 @@ static int nl80211_action(struct sk_buff *skb, struct genl_info *info)
4745 goto free_msg; 4747 goto free_msg;
4746 } 4748 }
4747 err = cfg80211_mlme_action(rdev, dev, chan, channel_type, 4749 err = cfg80211_mlme_action(rdev, dev, chan, channel_type,
4750 channel_type_valid,
4748 nla_data(info->attrs[NL80211_ATTR_FRAME]), 4751 nla_data(info->attrs[NL80211_ATTR_FRAME]),
4749 nla_len(info->attrs[NL80211_ATTR_FRAME]), 4752 nla_len(info->attrs[NL80211_ATTR_FRAME]),
4750 &cookie); 4753 &cookie);