summaryrefslogtreecommitdiff
path: root/net/mac80211/main.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-06-18 20:07:15 +0200
committerJohannes Berg <johannes.berg@intel.com>2012-08-20 13:58:22 +0200
commitf142c6b906da451ded2c7a8e17b2a0e6fee3e891 (patch)
treeed23b88e0cc23cb15fa28563d27965421ed47dd7 /net/mac80211/main.c
parent98104fdeda63d57631c9f89e90a7b83b58fcee40 (diff)
downloadlinux-3.10-f142c6b906da451ded2c7a8e17b2a0e6fee3e891.tar.gz
linux-3.10-f142c6b906da451ded2c7a8e17b2a0e6fee3e891.tar.bz2
linux-3.10-f142c6b906da451ded2c7a8e17b2a0e6fee3e891.zip
mac80211: support P2P Device abstraction
After cfg80211 got a P2P Device abstraction, add support to mac80211. Whether it really is supported or not will depend on whether or not the driver has support for it, but mac80211 needs to change to be able to support drivers that need a P2P Device. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/main.c')
-rw-r--r--net/mac80211/main.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index c26e231c733..e706f9e5b05 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -207,6 +207,10 @@ void ieee80211_bss_info_change_notify(struct ieee80211_sub_if_data *sdata,
sdata->vif.bss_conf.bssid = NULL;
else if (ieee80211_vif_is_mesh(&sdata->vif)) {
sdata->vif.bss_conf.bssid = zero;
+ } else if (sdata->vif.type == NL80211_IFTYPE_P2P_DEVICE) {
+ sdata->vif.bss_conf.bssid = sdata->vif.addr;
+ WARN_ONCE(changed & ~(BSS_CHANGED_IDLE),
+ "P2P Device BSS changed %#x", changed);
} else {
WARN_ON(1);
return;
@@ -514,6 +518,11 @@ ieee80211_default_mgmt_stypes[NUM_NL80211_IFTYPES] = {
BIT(IEEE80211_STYPE_AUTH >> 4) |
BIT(IEEE80211_STYPE_DEAUTH >> 4),
},
+ [NL80211_IFTYPE_P2P_DEVICE] = {
+ .tx = 0xffff,
+ .rx = BIT(IEEE80211_STYPE_ACTION >> 4) |
+ BIT(IEEE80211_STYPE_PROBE_REQ >> 4),
+ },
};
static const struct ieee80211_ht_cap mac80211_ht_capa_mod_mask = {