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/main.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/main.c')
-rw-r--r-- | net/mac80211/main.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/net/mac80211/main.c b/net/mac80211/main.c index 93dcdc27254b..819639486653 100644 --- a/net/mac80211/main.c +++ b/net/mac80211/main.c | |||
@@ -347,8 +347,8 @@ static int ieee80211_open(struct net_device *dev) | |||
347 | goto err_stop; | 347 | goto err_stop; |
348 | 348 | ||
349 | if (ieee80211_vif_is_mesh(&sdata->vif)) | 349 | if (ieee80211_vif_is_mesh(&sdata->vif)) |
350 | ieee80211_start_mesh(sdata->dev); | 350 | ieee80211_start_mesh(sdata); |
351 | changed |= ieee80211_reset_erp_info(dev); | 351 | changed |= ieee80211_reset_erp_info(sdata); |
352 | ieee80211_bss_info_change_notify(sdata, changed); | 352 | ieee80211_bss_info_change_notify(sdata, changed); |
353 | ieee80211_enable_keys(sdata); | 353 | ieee80211_enable_keys(sdata); |
354 | 354 | ||
@@ -448,7 +448,7 @@ static int ieee80211_stop(struct net_device *dev) | |||
448 | 448 | ||
449 | list_for_each_entry_rcu(sta, &local->sta_list, list) { | 449 | list_for_each_entry_rcu(sta, &local->sta_list, list) { |
450 | if (sta->sdata == sdata) | 450 | if (sta->sdata == sdata) |
451 | ieee80211_sta_tear_down_BA_sessions(dev, sta->addr); | 451 | ieee80211_sta_tear_down_BA_sessions(sdata, sta->addr); |
452 | } | 452 | } |
453 | 453 | ||
454 | rcu_read_unlock(); | 454 | rcu_read_unlock(); |
@@ -706,7 +706,7 @@ int ieee80211_start_tx_ba_session(struct ieee80211_hw *hw, u8 *ra, u16 tid) | |||
706 | sta->ampdu_mlme.tid_tx[tid]->ssn = start_seq_num; | 706 | sta->ampdu_mlme.tid_tx[tid]->ssn = start_seq_num; |
707 | 707 | ||
708 | 708 | ||
709 | ieee80211_send_addba_request(sta->sdata->dev, ra, tid, | 709 | ieee80211_send_addba_request(sta->sdata, ra, tid, |
710 | sta->ampdu_mlme.tid_tx[tid]->dialog_token, | 710 | sta->ampdu_mlme.tid_tx[tid]->dialog_token, |
711 | sta->ampdu_mlme.tid_tx[tid]->ssn, | 711 | sta->ampdu_mlme.tid_tx[tid]->ssn, |
712 | 0x40, 5000); | 712 | 0x40, 5000); |
@@ -889,7 +889,7 @@ void ieee80211_stop_tx_ba_cb(struct ieee80211_hw *hw, u8 *ra, u8 tid) | |||
889 | } | 889 | } |
890 | 890 | ||
891 | if (*state & HT_AGG_STATE_INITIATOR_MSK) | 891 | if (*state & HT_AGG_STATE_INITIATOR_MSK) |
892 | ieee80211_send_delba(sta->sdata->dev, ra, tid, | 892 | ieee80211_send_delba(sta->sdata, ra, tid, |
893 | WLAN_BACK_INITIATOR, WLAN_REASON_QSTA_NOT_USE); | 893 | WLAN_BACK_INITIATOR, WLAN_REASON_QSTA_NOT_USE); |
894 | 894 | ||
895 | agg_queue = sta->tid_to_tx_q[tid]; | 895 | agg_queue = sta->tid_to_tx_q[tid]; |
@@ -1200,10 +1200,8 @@ void ieee80211_bss_info_change_notify(struct ieee80211_sub_if_data *sdata, | |||
1200 | changed); | 1200 | changed); |
1201 | } | 1201 | } |
1202 | 1202 | ||
1203 | u32 ieee80211_reset_erp_info(struct net_device *dev) | 1203 | u32 ieee80211_reset_erp_info(struct ieee80211_sub_if_data *sdata) |
1204 | { | 1204 | { |
1205 | struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); | ||
1206 | |||
1207 | sdata->bss_conf.use_cts_prot = 0; | 1205 | sdata->bss_conf.use_cts_prot = 0; |
1208 | sdata->bss_conf.use_short_preamble = 0; | 1206 | sdata->bss_conf.use_short_preamble = 0; |
1209 | return BSS_CHANGED_ERP_CTS_PROT | BSS_CHANGED_ERP_PREAMBLE; | 1207 | return BSS_CHANGED_ERP_CTS_PROT | BSS_CHANGED_ERP_PREAMBLE; |
@@ -1438,7 +1436,7 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb) | |||
1438 | tid = qc[0] & 0xf; | 1436 | tid = qc[0] & 0xf; |
1439 | ssn = ((le16_to_cpu(hdr->seq_ctrl) + 0x10) | 1437 | ssn = ((le16_to_cpu(hdr->seq_ctrl) + 0x10) |
1440 | & IEEE80211_SCTL_SEQ); | 1438 | & IEEE80211_SCTL_SEQ); |
1441 | ieee80211_send_bar(sta->sdata->dev, hdr->addr1, | 1439 | ieee80211_send_bar(sta->sdata, hdr->addr1, |
1442 | tid, ssn); | 1440 | tid, ssn); |
1443 | } | 1441 | } |
1444 | } | 1442 | } |