aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2010-06-09 11:20:33 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-06-14 15:38:16 -0400
commit9d38d85de0270e3927bffab94973a9c78d1dc800 (patch)
tree31bc0111445ce78e2c373954d3b0fbce7cbb63ba /net/wireless
parentaa9746af8fa26d28d442a7415c701eb5dfeb7a2a (diff)
cfg80211/mac80211: allow action frame TX/RX in IBSS
When in IBSS mode, currently action frame TX and RX cannot be used. Allow using it to talk to any peer, or for public action frames. Also, while at it, restructure the code in mac80211 to make it easier to add this for other interface types in the future. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/wireless')
-rw-r--r--net/wireless/mlme.c5
-rw-r--r--net/wireless/nl80211.c6
2 files changed, 7 insertions, 4 deletions
diff --git a/net/wireless/mlme.c b/net/wireless/mlme.c
index f69ae19f497f..9f95354f859f 100644
--- a/net/wireless/mlme.c
+++ b/net/wireless/mlme.c
@@ -846,8 +846,9 @@ int cfg80211_mlme_action(struct cfg80211_registered_device *rdev,
846 if (!wdev->current_bss || 846 if (!wdev->current_bss ||
847 memcmp(wdev->current_bss->pub.bssid, mgmt->bssid, 847 memcmp(wdev->current_bss->pub.bssid, mgmt->bssid,
848 ETH_ALEN) != 0 || 848 ETH_ALEN) != 0 ||
849 memcmp(wdev->current_bss->pub.bssid, mgmt->da, 849 (wdev->iftype == NL80211_IFTYPE_STATION &&
850 ETH_ALEN) != 0) 850 memcmp(wdev->current_bss->pub.bssid, mgmt->da,
851 ETH_ALEN) != 0))
851 return -ENOTCONN; 852 return -ENOTCONN;
852 } 853 }
853 854
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 90ab3c8519be..c65e67e9231c 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -4653,7 +4653,8 @@ static int nl80211_register_action(struct sk_buff *skb, struct genl_info *info)
4653 if (err) 4653 if (err)
4654 goto unlock_rtnl; 4654 goto unlock_rtnl;
4655 4655
4656 if (dev->ieee80211_ptr->iftype != NL80211_IFTYPE_STATION) { 4656 if (dev->ieee80211_ptr->iftype != NL80211_IFTYPE_STATION &&
4657 dev->ieee80211_ptr->iftype != NL80211_IFTYPE_ADHOC) {
4657 err = -EOPNOTSUPP; 4658 err = -EOPNOTSUPP;
4658 goto out; 4659 goto out;
4659 } 4660 }
@@ -4703,7 +4704,8 @@ static int nl80211_action(struct sk_buff *skb, struct genl_info *info)
4703 goto out; 4704 goto out;
4704 } 4705 }
4705 4706
4706 if (dev->ieee80211_ptr->iftype != NL80211_IFTYPE_STATION) { 4707 if (dev->ieee80211_ptr->iftype != NL80211_IFTYPE_STATION &&
4708 dev->ieee80211_ptr->iftype != NL80211_IFTYPE_ADHOC) {
4707 err = -EOPNOTSUPP; 4709 err = -EOPNOTSUPP;
4708 goto out; 4710 goto out;
4709 } 4711 }