diff options
author | Jasper Bryant-Greene <jasper@amiton.co.nz> | 2008-08-02 20:04:37 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-08-22 16:29:58 -0400 |
commit | f698d856f65c3fea091cc303a135967965c5b880 (patch) | |
tree | 94c7c2d561e5191646dc5798683c0aca97973773 /net/mac80211/rx.c | |
parent | fef1643bf0cdd092a52dc3378479e4811fd65152 (diff) |
replace net_device arguments with ieee80211_{local,sub_if_data} as appropriate
This patch replaces net_device arguments to mac80211 internal functions
with ieee80211_{local,sub_if_data} as appropriate.
It also does the same for many 802.11s mesh functions, and changes the
mesh path table to be indexed on sub_if_data rather than net_device.
If the mesh part needs to be a separate patch let me know, but since
mesh uses a lot of mac80211 functions which were being converted anyway,
the changes go hand-in-hand somewhat.
This patch probably does not convert all the functions which could be
converted, but it is a large chunk and followup patches will be
provided.
Signed-off-by: Jasper Bryant-Greene <jasper@amiton.co.nz>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/rx.c')
-rw-r--r-- | net/mac80211/rx.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index 2464263cb7a5..fd83ef760a37 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c | |||
@@ -404,11 +404,11 @@ ieee80211_rx_h_passive_scan(struct ieee80211_rx_data *rx) | |||
404 | struct sk_buff *skb = rx->skb; | 404 | struct sk_buff *skb = rx->skb; |
405 | 405 | ||
406 | if (unlikely(local->sta_hw_scanning)) | 406 | if (unlikely(local->sta_hw_scanning)) |
407 | return ieee80211_sta_rx_scan(rx->dev, skb, rx->status); | 407 | return ieee80211_sta_rx_scan(rx->sdata, skb, rx->status); |
408 | 408 | ||
409 | if (unlikely(local->sta_sw_scanning)) { | 409 | if (unlikely(local->sta_sw_scanning)) { |
410 | /* drop all the other packets during a software scan anyway */ | 410 | /* drop all the other packets during a software scan anyway */ |
411 | if (ieee80211_sta_rx_scan(rx->dev, skb, rx->status) | 411 | if (ieee80211_sta_rx_scan(rx->sdata, skb, rx->status) |
412 | != RX_QUEUED) | 412 | != RX_QUEUED) |
413 | dev_kfree_skb(skb); | 413 | dev_kfree_skb(skb); |
414 | return RX_QUEUED; | 414 | return RX_QUEUED; |
@@ -466,7 +466,7 @@ ieee80211_rx_mesh_check(struct ieee80211_rx_data *rx) | |||
466 | 466 | ||
467 | if (ieee80211_is_data(hdr->frame_control) && | 467 | if (ieee80211_is_data(hdr->frame_control) && |
468 | is_multicast_ether_addr(hdr->addr1) && | 468 | is_multicast_ether_addr(hdr->addr1) && |
469 | mesh_rmc_check(hdr->addr4, msh_h_get(hdr, hdrlen), rx->dev)) | 469 | mesh_rmc_check(hdr->addr4, msh_h_get(hdr, hdrlen), rx->sdata)) |
470 | return RX_DROP_MONITOR; | 470 | return RX_DROP_MONITOR; |
471 | #undef msh_h_get | 471 | #undef msh_h_get |
472 | 472 | ||
@@ -1523,7 +1523,7 @@ ieee80211_rx_h_mgmt(struct ieee80211_rx_data *rx) | |||
1523 | sdata->vif.type == IEEE80211_IF_TYPE_IBSS || | 1523 | sdata->vif.type == IEEE80211_IF_TYPE_IBSS || |
1524 | sdata->vif.type == IEEE80211_IF_TYPE_MESH_POINT) && | 1524 | sdata->vif.type == IEEE80211_IF_TYPE_MESH_POINT) && |
1525 | !(sdata->flags & IEEE80211_SDATA_USERSPACE_MLME)) | 1525 | !(sdata->flags & IEEE80211_SDATA_USERSPACE_MLME)) |
1526 | ieee80211_sta_rx_mgmt(rx->dev, rx->skb, rx->status); | 1526 | ieee80211_sta_rx_mgmt(sdata, rx->skb, rx->status); |
1527 | else | 1527 | else |
1528 | return RX_DROP_MONITOR; | 1528 | return RX_DROP_MONITOR; |
1529 | 1529 | ||
@@ -1570,7 +1570,7 @@ static void ieee80211_rx_michael_mic_report(struct net_device *dev, | |||
1570 | !ieee80211_is_auth(hdr->frame_control)) | 1570 | !ieee80211_is_auth(hdr->frame_control)) |
1571 | goto ignore; | 1571 | goto ignore; |
1572 | 1572 | ||
1573 | mac80211_ev_michael_mic_failure(rx->dev, keyidx, hdr); | 1573 | mac80211_ev_michael_mic_failure(rx->sdata, keyidx, hdr); |
1574 | ignore: | 1574 | ignore: |
1575 | dev_kfree_skb(rx->skb); | 1575 | dev_kfree_skb(rx->skb); |
1576 | rx->skb = NULL; | 1576 | rx->skb = NULL; |
@@ -1744,7 +1744,7 @@ static int prepare_for_handlers(struct ieee80211_sub_if_data *sdata, | |||
1744 | return 0; | 1744 | return 0; |
1745 | if (ieee80211_is_beacon(hdr->frame_control)) { | 1745 | if (ieee80211_is_beacon(hdr->frame_control)) { |
1746 | if (!rx->sta) | 1746 | if (!rx->sta) |
1747 | rx->sta = ieee80211_ibss_add_sta(sdata->dev, | 1747 | rx->sta = ieee80211_ibss_add_sta(sdata, |
1748 | rx->skb, bssid, hdr->addr2, | 1748 | rx->skb, bssid, hdr->addr2, |
1749 | BIT(rx->status->rate_idx)); | 1749 | BIT(rx->status->rate_idx)); |
1750 | return 1; | 1750 | return 1; |
@@ -1760,7 +1760,7 @@ static int prepare_for_handlers(struct ieee80211_sub_if_data *sdata, | |||
1760 | return 0; | 1760 | return 0; |
1761 | rx->flags &= ~IEEE80211_RX_RA_MATCH; | 1761 | rx->flags &= ~IEEE80211_RX_RA_MATCH; |
1762 | } else if (!rx->sta) | 1762 | } else if (!rx->sta) |
1763 | rx->sta = ieee80211_ibss_add_sta(sdata->dev, rx->skb, | 1763 | rx->sta = ieee80211_ibss_add_sta(sdata, rx->skb, |
1764 | bssid, hdr->addr2, | 1764 | bssid, hdr->addr2, |
1765 | BIT(rx->status->rate_idx)); | 1765 | BIT(rx->status->rate_idx)); |
1766 | break; | 1766 | break; |
@@ -2066,7 +2066,7 @@ static u8 ieee80211_rx_reorder_ampdu(struct ieee80211_local *local, | |||
2066 | /* if this mpdu is fragmented - terminate rx aggregation session */ | 2066 | /* if this mpdu is fragmented - terminate rx aggregation session */ |
2067 | sc = le16_to_cpu(hdr->seq_ctrl); | 2067 | sc = le16_to_cpu(hdr->seq_ctrl); |
2068 | if (sc & IEEE80211_SCTL_FRAG) { | 2068 | if (sc & IEEE80211_SCTL_FRAG) { |
2069 | ieee80211_sta_stop_rx_ba_session(sta->sdata->dev, sta->addr, | 2069 | ieee80211_sta_stop_rx_ba_session(sta->sdata, sta->addr, |
2070 | tid, 0, WLAN_REASON_QSTA_REQUIRE_SETUP); | 2070 | tid, 0, WLAN_REASON_QSTA_REQUIRE_SETUP); |
2071 | ret = 1; | 2071 | ret = 1; |
2072 | goto end_reorder; | 2072 | goto end_reorder; |