aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/cfg.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-06-15 09:30:18 -0400
committerJohannes Berg <johannes.berg@intel.com>2012-07-09 08:51:47 -0400
commit71bbc9943883cffaf5d7a7728a4e4c50b3ac44d3 (patch)
tree9810d365fc57be75ee59cf4883216202ac2c5e09 /net/mac80211/cfg.c
parentba22fb5b25db1e18692e2d01f8addb3fea0af813 (diff)
cfg80211: use wdev in mgmt-tx/ROC APIs
The management frame and remain-on-channel APIs will be needed in the P2P device abstraction, so move them over to the new wdev-based APIs. Userspace can still use both the interface index and wdev identifier for them so it's backward compatible, but for the P2P Device wdev it will be able to use the wdev identifier only. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/cfg.c')
-rw-r--r--net/mac80211/cfg.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 6a171e299b57..7d9abea37b17 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -2299,13 +2299,13 @@ static int ieee80211_start_roc_work(struct ieee80211_local *local,
2299} 2299}
2300 2300
2301static int ieee80211_remain_on_channel(struct wiphy *wiphy, 2301static int ieee80211_remain_on_channel(struct wiphy *wiphy,
2302 struct net_device *dev, 2302 struct wireless_dev *wdev,
2303 struct ieee80211_channel *chan, 2303 struct ieee80211_channel *chan,
2304 enum nl80211_channel_type channel_type, 2304 enum nl80211_channel_type channel_type,
2305 unsigned int duration, 2305 unsigned int duration,
2306 u64 *cookie) 2306 u64 *cookie)
2307{ 2307{
2308 struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); 2308 struct ieee80211_sub_if_data *sdata = IEEE80211_WDEV_TO_SUB_IF(wdev);
2309 struct ieee80211_local *local = sdata->local; 2309 struct ieee80211_local *local = sdata->local;
2310 int ret; 2310 int ret;
2311 2311
@@ -2392,23 +2392,23 @@ static int ieee80211_cancel_roc(struct ieee80211_local *local,
2392} 2392}
2393 2393
2394static int ieee80211_cancel_remain_on_channel(struct wiphy *wiphy, 2394static int ieee80211_cancel_remain_on_channel(struct wiphy *wiphy,
2395 struct net_device *dev, 2395 struct wireless_dev *wdev,
2396 u64 cookie) 2396 u64 cookie)
2397{ 2397{
2398 struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); 2398 struct ieee80211_sub_if_data *sdata = IEEE80211_WDEV_TO_SUB_IF(wdev);
2399 struct ieee80211_local *local = sdata->local; 2399 struct ieee80211_local *local = sdata->local;
2400 2400
2401 return ieee80211_cancel_roc(local, cookie, false); 2401 return ieee80211_cancel_roc(local, cookie, false);
2402} 2402}
2403 2403
2404static int ieee80211_mgmt_tx(struct wiphy *wiphy, struct net_device *dev, 2404static int ieee80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
2405 struct ieee80211_channel *chan, bool offchan, 2405 struct ieee80211_channel *chan, bool offchan,
2406 enum nl80211_channel_type channel_type, 2406 enum nl80211_channel_type channel_type,
2407 bool channel_type_valid, unsigned int wait, 2407 bool channel_type_valid, unsigned int wait,
2408 const u8 *buf, size_t len, bool no_cck, 2408 const u8 *buf, size_t len, bool no_cck,
2409 bool dont_wait_for_ack, u64 *cookie) 2409 bool dont_wait_for_ack, u64 *cookie)
2410{ 2410{
2411 struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); 2411 struct ieee80211_sub_if_data *sdata = IEEE80211_WDEV_TO_SUB_IF(wdev);
2412 struct ieee80211_local *local = sdata->local; 2412 struct ieee80211_local *local = sdata->local;
2413 struct sk_buff *skb; 2413 struct sk_buff *skb;
2414 struct sta_info *sta; 2414 struct sta_info *sta;
@@ -2513,21 +2513,20 @@ static int ieee80211_mgmt_tx(struct wiphy *wiphy, struct net_device *dev,
2513} 2513}
2514 2514
2515static int ieee80211_mgmt_tx_cancel_wait(struct wiphy *wiphy, 2515static int ieee80211_mgmt_tx_cancel_wait(struct wiphy *wiphy,
2516 struct net_device *dev, 2516 struct wireless_dev *wdev,
2517 u64 cookie) 2517 u64 cookie)
2518{ 2518{
2519 struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); 2519 struct ieee80211_local *local = wiphy_priv(wiphy);
2520 struct ieee80211_local *local = sdata->local;
2521 2520
2522 return ieee80211_cancel_roc(local, cookie, true); 2521 return ieee80211_cancel_roc(local, cookie, true);
2523} 2522}
2524 2523
2525static void ieee80211_mgmt_frame_register(struct wiphy *wiphy, 2524static void ieee80211_mgmt_frame_register(struct wiphy *wiphy,
2526 struct net_device *dev, 2525 struct wireless_dev *wdev,
2527 u16 frame_type, bool reg) 2526 u16 frame_type, bool reg)
2528{ 2527{
2529 struct ieee80211_local *local = wiphy_priv(wiphy); 2528 struct ieee80211_local *local = wiphy_priv(wiphy);
2530 struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); 2529 struct ieee80211_sub_if_data *sdata = IEEE80211_WDEV_TO_SUB_IF(wdev);
2531 2530
2532 switch (frame_type) { 2531 switch (frame_type) {
2533 case IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_AUTH: 2532 case IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_AUTH: