diff options
Diffstat (limited to 'net/mac80211')
-rw-r--r-- | net/mac80211/cfg.c | 21 | ||||
-rw-r--r-- | net/mac80211/ieee80211_i.h | 6 | ||||
-rw-r--r-- | net/mac80211/offchannel.c | 6 | ||||
-rw-r--r-- | net/mac80211/rx.c | 2 | ||||
-rw-r--r-- | net/mac80211/status.c | 9 |
5 files changed, 27 insertions, 17 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 6a171e299b5..7d9abea37b1 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 | ||
2301 | static int ieee80211_remain_on_channel(struct wiphy *wiphy, | 2301 | static 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 | ||
2394 | static int ieee80211_cancel_remain_on_channel(struct wiphy *wiphy, | 2394 | static 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 | ||
2404 | static int ieee80211_mgmt_tx(struct wiphy *wiphy, struct net_device *dev, | 2404 | static 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 | ||
2515 | static int ieee80211_mgmt_tx_cancel_wait(struct wiphy *wiphy, | 2515 | static 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 | ||
2525 | static void ieee80211_mgmt_frame_register(struct wiphy *wiphy, | 2524 | static 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: |
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index e0423f8c0ce..8f8535ee599 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h | |||
@@ -1091,6 +1091,12 @@ IEEE80211_DEV_TO_SUB_IF(struct net_device *dev) | |||
1091 | return netdev_priv(dev); | 1091 | return netdev_priv(dev); |
1092 | } | 1092 | } |
1093 | 1093 | ||
1094 | static inline struct ieee80211_sub_if_data * | ||
1095 | IEEE80211_WDEV_TO_SUB_IF(struct wireless_dev *wdev) | ||
1096 | { | ||
1097 | return container_of(wdev, struct ieee80211_sub_if_data, wdev); | ||
1098 | } | ||
1099 | |||
1094 | /* this struct represents 802.11n's RA/TID combination */ | 1100 | /* this struct represents 802.11n's RA/TID combination */ |
1095 | struct ieee80211_ra_tid { | 1101 | struct ieee80211_ra_tid { |
1096 | u8 ra[ETH_ALEN]; | 1102 | u8 ra[ETH_ALEN]; |
diff --git a/net/mac80211/offchannel.c b/net/mac80211/offchannel.c index b0fb6a2b89a..8c047fc8b32 100644 --- a/net/mac80211/offchannel.c +++ b/net/mac80211/offchannel.c | |||
@@ -191,7 +191,7 @@ void ieee80211_handle_roc_started(struct ieee80211_roc_work *roc) | |||
191 | roc->frame = NULL; | 191 | roc->frame = NULL; |
192 | } | 192 | } |
193 | } else { | 193 | } else { |
194 | cfg80211_ready_on_channel(roc->sdata->dev, (unsigned long)roc, | 194 | cfg80211_ready_on_channel(&roc->sdata->wdev, (unsigned long)roc, |
195 | roc->chan, roc->chan_type, | 195 | roc->chan, roc->chan_type, |
196 | roc->req_duration, GFP_KERNEL); | 196 | roc->req_duration, GFP_KERNEL); |
197 | } | 197 | } |
@@ -299,7 +299,7 @@ void ieee80211_roc_notify_destroy(struct ieee80211_roc_work *roc) | |||
299 | 299 | ||
300 | /* was never transmitted */ | 300 | /* was never transmitted */ |
301 | if (roc->frame) { | 301 | if (roc->frame) { |
302 | cfg80211_mgmt_tx_status(roc->sdata->dev, | 302 | cfg80211_mgmt_tx_status(&roc->sdata->wdev, |
303 | (unsigned long)roc->frame, | 303 | (unsigned long)roc->frame, |
304 | roc->frame->data, roc->frame->len, | 304 | roc->frame->data, roc->frame->len, |
305 | false, GFP_KERNEL); | 305 | false, GFP_KERNEL); |
@@ -307,7 +307,7 @@ void ieee80211_roc_notify_destroy(struct ieee80211_roc_work *roc) | |||
307 | } | 307 | } |
308 | 308 | ||
309 | if (!roc->mgmt_tx_cookie) | 309 | if (!roc->mgmt_tx_cookie) |
310 | cfg80211_remain_on_channel_expired(roc->sdata->dev, | 310 | cfg80211_remain_on_channel_expired(&roc->sdata->wdev, |
311 | (unsigned long)roc, | 311 | (unsigned long)roc, |
312 | roc->chan, roc->chan_type, | 312 | roc->chan, roc->chan_type, |
313 | GFP_KERNEL); | 313 | GFP_KERNEL); |
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index ab5185054e6..f8cf9e7477a 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c | |||
@@ -2404,7 +2404,7 @@ ieee80211_rx_h_userspace_mgmt(struct ieee80211_rx_data *rx) | |||
2404 | if (rx->local->hw.flags & IEEE80211_HW_SIGNAL_DBM) | 2404 | if (rx->local->hw.flags & IEEE80211_HW_SIGNAL_DBM) |
2405 | sig = status->signal; | 2405 | sig = status->signal; |
2406 | 2406 | ||
2407 | if (cfg80211_rx_mgmt(rx->sdata->dev, status->freq, sig, | 2407 | if (cfg80211_rx_mgmt(&rx->sdata->wdev, status->freq, sig, |
2408 | rx->skb->data, rx->skb->len, | 2408 | rx->skb->data, rx->skb->len, |
2409 | GFP_ATOMIC)) { | 2409 | GFP_ATOMIC)) { |
2410 | if (rx->sta) | 2410 | if (rx->sta) |
diff --git a/net/mac80211/status.c b/net/mac80211/status.c index 2ed2f27fe8a..8cd72914cda 100644 --- a/net/mac80211/status.c +++ b/net/mac80211/status.c | |||
@@ -519,14 +519,19 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb) | |||
519 | u64 cookie = (unsigned long)skb; | 519 | u64 cookie = (unsigned long)skb; |
520 | acked = info->flags & IEEE80211_TX_STAT_ACK; | 520 | acked = info->flags & IEEE80211_TX_STAT_ACK; |
521 | 521 | ||
522 | /* | ||
523 | * TODO: When we have non-netdev frame TX, | ||
524 | * we cannot use skb->dev->ieee80211_ptr | ||
525 | */ | ||
526 | |||
522 | if (ieee80211_is_nullfunc(hdr->frame_control) || | 527 | if (ieee80211_is_nullfunc(hdr->frame_control) || |
523 | ieee80211_is_qos_nullfunc(hdr->frame_control)) | 528 | ieee80211_is_qos_nullfunc(hdr->frame_control)) |
524 | cfg80211_probe_status(skb->dev, hdr->addr1, | 529 | cfg80211_probe_status(skb->dev, hdr->addr1, |
525 | cookie, acked, GFP_ATOMIC); | 530 | cookie, acked, GFP_ATOMIC); |
526 | else | 531 | else |
527 | cfg80211_mgmt_tx_status( | 532 | cfg80211_mgmt_tx_status( |
528 | skb->dev, cookie, skb->data, skb->len, | 533 | skb->dev->ieee80211_ptr, cookie, skb->data, |
529 | acked, GFP_ATOMIC); | 534 | skb->len, acked, GFP_ATOMIC); |
530 | } | 535 | } |
531 | 536 | ||
532 | if (unlikely(info->ack_frame_id)) { | 537 | if (unlikely(info->ack_frame_id)) { |