aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/mlme.c
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/mac80211/mlme.c
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/mac80211/mlme.c')
-rw-r--r--net/mac80211/mlme.c38
1 files changed, 0 insertions, 38 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 2ab4e86d9929..1373b3dde8b4 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -2353,44 +2353,6 @@ int ieee80211_mgd_disassoc(struct ieee80211_sub_if_data *sdata,
2353 return 0; 2353 return 0;
2354} 2354}
2355 2355
2356int ieee80211_mgd_action(struct ieee80211_sub_if_data *sdata,
2357 struct ieee80211_channel *chan,
2358 enum nl80211_channel_type channel_type,
2359 bool channel_type_valid,
2360 const u8 *buf, size_t len, u64 *cookie)
2361{
2362 struct ieee80211_local *local = sdata->local;
2363 struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
2364 struct sk_buff *skb;
2365
2366 /* Check that we are on the requested channel for transmission */
2367 if (chan != local->tmp_channel &&
2368 chan != local->oper_channel)
2369 return -EBUSY;
2370 if (channel_type_valid &&
2371 (channel_type != local->tmp_channel_type &&
2372 channel_type != local->_oper_channel_type))
2373 return -EBUSY;
2374
2375 skb = dev_alloc_skb(local->hw.extra_tx_headroom + len);
2376 if (!skb)
2377 return -ENOMEM;
2378 skb_reserve(skb, local->hw.extra_tx_headroom);
2379
2380 memcpy(skb_put(skb, len), buf, len);
2381
2382 if (!(ifmgd->flags & IEEE80211_STA_MFP_ENABLED))
2383 IEEE80211_SKB_CB(skb)->flags |=
2384 IEEE80211_TX_INTFL_DONT_ENCRYPT;
2385 IEEE80211_SKB_CB(skb)->flags |= IEEE80211_TX_INTFL_NL80211_FRAME_TX |
2386 IEEE80211_TX_CTL_REQ_TX_STATUS;
2387 skb->dev = sdata->dev;
2388 ieee80211_tx_skb(sdata, skb);
2389
2390 *cookie = (unsigned long) skb;
2391 return 0;
2392}
2393
2394void ieee80211_cqm_rssi_notify(struct ieee80211_vif *vif, 2356void ieee80211_cqm_rssi_notify(struct ieee80211_vif *vif,
2395 enum nl80211_cqm_rssi_threshold_event rssi_event, 2357 enum nl80211_cqm_rssi_threshold_event rssi_event,
2396 gfp_t gfp) 2358 gfp_t gfp)