2011-05-29 20:04:00

by Kalle Valo

[permalink] [raw]
Subject: [RFC PATCH 00/27] mac80211: create mac80211_ prefix

It has always annoyed me that mac80211 uses ieee80211_ prefix. For some time
already I have been planning to try to do something about it and finally I
started it. Here's my first shot at it.

In this patchset I first fix some issues I found from the drivers, then
create mac80211-compat.h to make the transition as smooth as possible and
then start changing mac80211 itself.

I now changed only parts of mac80211_i.h, I anticipate there will be still
three or four patchsets before mac80211 has been converted. Once that is done
I'm planning to start converting the drivers, one at a time. Unless driver
maintainers beat me to it, of course. I'm hoping that the conversion would be
fast enough so that mac80211-compat.h would not be included in any of the
official linux releases.

But what do people think? Is this worth the effort?

Or have I drank too much coke and totally lost my mind? ;)

---

Kalle Valo (27):
iwlegacy: fix stop/wake queue hacks
iwlwifi: fix stop/wake queue hacks
zd1211rw: include mac80211.h from zd_chip.h
rtlwifi: include mac80211.h from core.h
mac80211: switch mac80211.h to use mac80211 prefix
mac80211: rename ieee80211_i.h to mac80211_i.h
mac80211: rename ieee80211_local to mac80211_local
mac80211: rename ieee80211_fragment_entry to mac80211_fragment_entry
mac80211: rename ieee80211_bss to mac80211_bss
mac80211: rename ieee80211_tx_data to mac80211_tx_data
mac80211: rename ieee80211_packet_rx_flags to mac80211_packet_rx_flags
mac80211: rename ieee80211_rx_flags to mac80211_i_rx_flags
mac80211: rename ieee80211_rx_data to mac80211_rx_data
mac80211: rename ieee80211_if_ap to mac80211_if_ap
mac80211: change ieee80211_if_wds and _vlan to use mac80211 prefix
mac80211: rename ieee80211_work_type to mac80211_work_type
mac80211: rename ieee80211_work to mac80211_work
mac80211: rename ieee80211_sta_flags to mac80211_sta_flags
mac80211: rename ieee80211_if_managed to mac80211_if_managed
mac80211: rename ieee80211_if_ibss to mac80211_if_ibss
mac80211: rename ieee80211_if_mesh to mac80211_if_mesh
mac80211: rename ieee80211_sub_if_data_flags to mac80211_sub_if_data_flags
mac80211: rename ieee80211_sdata_state_bits to mac80211_sdata_state_bits
mac80211: ieee80211_sub_if_data to mac80211_sub_if_data
mac80211: use mac80211 prefix with rx and tx msg flags
mac80211: change queue stop reasons to use mac80211 prefix
mac80211: use mac80211_hw


drivers/net/wireless/iwlegacy/iwl-helpers.h | 9
drivers/net/wireless/iwlwifi/iwl-helpers.h | 9
drivers/net/wireless/rtlwifi/core.h | 2
drivers/net/wireless/zd1211rw/zd_chip.h | 2
include/net/mac80211-compat.h | 273 +++++
include/net/mac80211.h | 1428 ++++++++++++++-------------
net/mac80211/agg-rx.c | 10
net/mac80211/agg-tx.c | 60 +
net/mac80211/cfg.c | 176 ++-
net/mac80211/chan.c | 18
net/mac80211/debugfs.c | 32 -
net/mac80211/debugfs.h | 4
net/mac80211/debugfs_key.c | 8
net/mac80211/debugfs_key.h | 12
net/mac80211/debugfs_netdev.c | 56 +
net/mac80211/debugfs_netdev.h | 12
net/mac80211/debugfs_sta.c | 2
net/mac80211/driver-ops.h | 122 +-
net/mac80211/driver-trace.h | 172 ++-
net/mac80211/event.c | 4
net/mac80211/ht.c | 18
net/mac80211/ibss.c | 94 +-
net/mac80211/ieee80211_i.h | 1409 ---------------------------
net/mac80211/iface.c | 106 +-
net/mac80211/key.c | 32 -
net/mac80211/key.h | 22
net/mac80211/led.c | 44 -
net/mac80211/led.h | 38 -
net/mac80211/mac80211_i.h | 1409 +++++++++++++++++++++++++++
net/mac80211/main.c | 80 +-
net/mac80211/mesh.c | 92 +-
net/mac80211/mesh.h | 86 +-
net/mac80211/mesh_hwmp.c | 48 -
net/mac80211/mesh_pathtbl.c | 34 -
net/mac80211/mesh_plink.c | 32 -
net/mac80211/mlme.c | 426 ++++----
net/mac80211/offchannel.c | 44 -
net/mac80211/pm.c | 12
net/mac80211/rate.c | 10
net/mac80211/rate.h | 16
net/mac80211/rc80211_minstrel.c | 8
net/mac80211/rc80211_minstrel.h | 2
net/mac80211/rc80211_minstrel_ht.c | 6
net/mac80211/rc80211_pid_algo.c | 2
net/mac80211/rx.c | 250 ++---
net/mac80211/scan.c | 86 +-
net/mac80211/spectmgmt.c | 8
net/mac80211/sta_info.c | 88 +-
net/mac80211/sta_info.h | 28 -
net/mac80211/status.c | 26
net/mac80211/tkip.c | 4
net/mac80211/tx.c | 154 +--
net/mac80211/util.c | 172 ++-
net/mac80211/wep.c | 22
net/mac80211/wep.h | 12
net/mac80211/wme.c | 10
net/mac80211/wme.h | 8
net/mac80211/work.c | 146 +--
net/mac80211/wpa.c | 22
net/mac80211/wpa.h | 18
60 files changed, 3916 insertions(+), 3619 deletions(-)
create mode 100644 include/net/mac80211-compat.h
delete mode 100644 net/mac80211/ieee80211_i.h
create mode 100644 net/mac80211/mac80211_i.h



2011-05-29 20:06:17

by Kalle Valo

[permalink] [raw]
Subject: [RFC PATCH 18/27] mac80211: rename ieee80211_sta_flags to mac80211_sta_flags

Signed-off-by: Kalle Valo <[email protected]>
---
net/mac80211/mac80211_i.h | 20 +++++-----
net/mac80211/mlme.c | 94 +++++++++++++++++++++++----------------------
net/mac80211/status.c | 2 -
net/mac80211/tx.c | 4 +-
4 files changed, 60 insertions(+), 60 deletions(-)

diff --git a/net/mac80211/mac80211_i.h b/net/mac80211/mac80211_i.h
index 6cc8790..bc18582 100644
--- a/net/mac80211/mac80211_i.h
+++ b/net/mac80211/mac80211_i.h
@@ -337,16 +337,16 @@ struct mac80211_work {
};

/* flags used in struct ieee80211_if_managed.flags */
-enum ieee80211_sta_flags {
- IEEE80211_STA_BEACON_POLL = BIT(0),
- IEEE80211_STA_CONNECTION_POLL = BIT(1),
- IEEE80211_STA_CONTROL_PORT = BIT(2),
- IEEE80211_STA_DISABLE_11N = BIT(4),
- IEEE80211_STA_CSA_RECEIVED = BIT(5),
- IEEE80211_STA_MFP_ENABLED = BIT(6),
- IEEE80211_STA_UAPSD_ENABLED = BIT(7),
- IEEE80211_STA_NULLFUNC_ACKED = BIT(8),
- IEEE80211_STA_RESET_SIGNAL_AVE = BIT(9),
+enum mac80211_sta_flags {
+ MAC80211_STA_BEACON_POLL = BIT(0),
+ MAC80211_STA_CONNECTION_POLL = BIT(1),
+ MAC80211_STA_CONTROL_PORT = BIT(2),
+ MAC80211_STA_DISABLE_11N = BIT(4),
+ MAC80211_STA_CSA_RECEIVED = BIT(5),
+ MAC80211_STA_MFP_ENABLED = BIT(6),
+ MAC80211_STA_UAPSD_ENABLED = BIT(7),
+ MAC80211_STA_NULLFUNC_ACKED = BIT(8),
+ MAC80211_STA_RESET_SIGNAL_AVE = BIT(9),
};

struct ieee80211_if_managed {
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 272e147..d06ba14 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -304,7 +304,7 @@ static void ieee80211_send_deauth_disassoc(struct ieee80211_sub_if_data *sdata,
__cfg80211_send_disassoc(sdata->dev, (u8 *)mgmt, skb->len);
else
cfg80211_send_disassoc(sdata->dev, (u8 *)mgmt, skb->len);
- if (!(ifmgd->flags & IEEE80211_STA_MFP_ENABLED))
+ if (!(ifmgd->flags & MAC80211_STA_MFP_ENABLED))
IEEE80211_SKB_CB(skb)->flags |= IEEE80211_TX_INTFL_DONT_ENCRYPT;

if (send_frame)
@@ -408,7 +408,7 @@ static void ieee80211_chswitch_work(struct work_struct *work)
ieee80211_wake_queues_by_reason(&sdata->local->hw,
IEEE80211_QUEUE_STOP_REASON_CSA);
out:
- ifmgd->flags &= ~IEEE80211_STA_CSA_RECEIVED;
+ ifmgd->flags &= ~MAC80211_STA_CSA_RECEIVED;
mutex_unlock(&ifmgd->mtx);
}

@@ -472,7 +472,7 @@ void ieee80211_sta_process_chanswitch(struct ieee80211_sub_if_data *sdata,
/* Disregard subsequent beacons if we are already running a timer
processing a CSA */

- if (ifmgd->flags & IEEE80211_STA_CSA_RECEIVED)
+ if (ifmgd->flags & MAC80211_STA_CSA_RECEIVED)
return;

new_ch = ieee80211_get_channel(sdata->local->hw.wiphy, new_freq);
@@ -493,7 +493,7 @@ void ieee80211_sta_process_chanswitch(struct ieee80211_sub_if_data *sdata,
}
ch_switch.channel = new_ch;
ch_switch.count = sw_elem->count;
- ifmgd->flags |= IEEE80211_STA_CSA_RECEIVED;
+ ifmgd->flags |= MAC80211_STA_CSA_RECEIVED;
drv_channel_switch(sdata->local, &ch_switch);
return;
}
@@ -505,7 +505,7 @@ void ieee80211_sta_process_chanswitch(struct ieee80211_sub_if_data *sdata,
if (sw_elem->mode)
ieee80211_stop_queues_by_reason(&sdata->local->hw,
IEEE80211_QUEUE_STOP_REASON_CSA);
- ifmgd->flags |= IEEE80211_STA_CSA_RECEIVED;
+ ifmgd->flags |= MAC80211_STA_CSA_RECEIVED;
mod_timer(&ifmgd->chswitch_timer,
jiffies +
msecs_to_jiffies(sw_elem->count *
@@ -625,8 +625,8 @@ static bool ieee80211_powersave_allowed(struct ieee80211_sub_if_data *sdata)
if (!mgd->associated->beacon_ies)
return false;

- if (mgd->flags & (IEEE80211_STA_BEACON_POLL |
- IEEE80211_STA_CONNECTION_POLL))
+ if (mgd->flags & (MAC80211_STA_BEACON_POLL |
+ MAC80211_STA_CONNECTION_POLL))
return false;

rcu_read_lock();
@@ -785,7 +785,7 @@ void ieee80211_dynamic_ps_enable_work(struct work_struct *work)
spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags);

if ((local->hw.flags & IEEE80211_HW_PS_NULLFUNC_STACK) &&
- (!(ifmgd->flags & IEEE80211_STA_NULLFUNC_ACKED))) {
+ (!(ifmgd->flags & MAC80211_STA_NULLFUNC_ACKED))) {
netif_tx_stop_all_queues(sdata->dev);

if (drv_tx_frames_pending(local))
@@ -801,8 +801,8 @@ void ieee80211_dynamic_ps_enable_work(struct work_struct *work)

if (!((local->hw.flags & IEEE80211_HW_REPORTS_TX_ACK_STATUS) &&
(local->hw.flags & IEEE80211_HW_PS_NULLFUNC_STACK)) ||
- (ifmgd->flags & IEEE80211_STA_NULLFUNC_ACKED)) {
- ifmgd->flags &= ~IEEE80211_STA_NULLFUNC_ACKED;
+ (ifmgd->flags & MAC80211_STA_NULLFUNC_ACKED)) {
+ ifmgd->flags &= ~MAC80211_STA_NULLFUNC_ACKED;
local->hw.conf.flags |= IEEE80211_CONF_PS;
ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_PS);
}
@@ -843,7 +843,7 @@ static void ieee80211_sta_wmm_params(struct mac80211_local *local,
if (wmm_param_len < 8 || wmm_param[5] /* version */ != 1)
return;

- if (ifmgd->flags & IEEE80211_STA_UAPSD_ENABLED)
+ if (ifmgd->flags & MAC80211_STA_UAPSD_ENABLED)
uapsd_queues = local->uapsd_queues;

count = wmm_param[6] & 0x0f;
@@ -982,11 +982,11 @@ static void ieee80211_set_associated(struct ieee80211_sub_if_data *sdata,
sdata->u.mgd.associated = cbss;
memcpy(sdata->u.mgd.bssid, cbss->bssid, ETH_ALEN);

- sdata->u.mgd.flags |= IEEE80211_STA_RESET_SIGNAL_AVE;
+ sdata->u.mgd.flags |= MAC80211_STA_RESET_SIGNAL_AVE;

/* just to be sure */
- sdata->u.mgd.flags &= ~(IEEE80211_STA_CONNECTION_POLL |
- IEEE80211_STA_BEACON_POLL);
+ sdata->u.mgd.flags &= ~(MAC80211_STA_CONNECTION_POLL |
+ MAC80211_STA_BEACON_POLL);

ieee80211_led_assoc(local, 1);

@@ -1139,12 +1139,12 @@ static void ieee80211_reset_ap_probe(struct ieee80211_sub_if_data *sdata)
{
struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;

- if (!(ifmgd->flags & (IEEE80211_STA_BEACON_POLL |
- IEEE80211_STA_CONNECTION_POLL)))
+ if (!(ifmgd->flags & (MAC80211_STA_BEACON_POLL |
+ MAC80211_STA_CONNECTION_POLL)))
return;

- ifmgd->flags &= ~(IEEE80211_STA_CONNECTION_POLL |
- IEEE80211_STA_BEACON_POLL);
+ ifmgd->flags &= ~(MAC80211_STA_CONNECTION_POLL |
+ MAC80211_STA_BEACON_POLL);
mutex_lock(&sdata->local->iflist_mtx);
ieee80211_recalc_ps(sdata->local, -1);
mutex_unlock(&sdata->local->iflist_mtx);
@@ -1255,14 +1255,14 @@ static void ieee80211_mgd_probe_ap(struct ieee80211_sub_if_data *sdata,
* because otherwise we would reset the timer every time and
* never check whether we received a probe response!
*/
- if (ifmgd->flags & (IEEE80211_STA_BEACON_POLL |
- IEEE80211_STA_CONNECTION_POLL))
+ if (ifmgd->flags & (MAC80211_STA_BEACON_POLL |
+ MAC80211_STA_CONNECTION_POLL))
already = true;

if (beacon)
- ifmgd->flags |= IEEE80211_STA_BEACON_POLL;
+ ifmgd->flags |= MAC80211_STA_BEACON_POLL;
else
- ifmgd->flags |= IEEE80211_STA_CONNECTION_POLL;
+ ifmgd->flags |= MAC80211_STA_CONNECTION_POLL;

if (already)
goto out;
@@ -1480,7 +1480,7 @@ static bool ieee80211_assoc_success(struct mac80211_work *wk,

set_sta_flags(sta, WLAN_STA_AUTH | WLAN_STA_ASSOC |
WLAN_STA_ASSOC_AP);
- if (!(ifmgd->flags & IEEE80211_STA_CONTROL_PORT))
+ if (!(ifmgd->flags & MAC80211_STA_CONTROL_PORT))
set_sta_flags(sta, WLAN_STA_AUTHORIZED);

rates = 0;
@@ -1531,7 +1531,7 @@ static bool ieee80211_assoc_success(struct mac80211_work *wk,
else
sdata->flags &= ~IEEE80211_SDATA_OPERATING_GMODE;

- if (elems.ht_cap_elem && !(ifmgd->flags & IEEE80211_STA_DISABLE_11N))
+ if (elems.ht_cap_elem && !(ifmgd->flags & MAC80211_STA_DISABLE_11N))
ieee80211_ht_cap_ie_to_sta_ht_cap(sband,
elems.ht_cap_elem, &sta->sta.ht_cap);

@@ -1539,7 +1539,7 @@ static bool ieee80211_assoc_success(struct mac80211_work *wk,

rate_control_rate_init(sta);

- if (ifmgd->flags & IEEE80211_STA_MFP_ENABLED)
+ if (ifmgd->flags & MAC80211_STA_MFP_ENABLED)
set_sta_flags(sta, WLAN_STA_MFP);

if (elems.wmm_param)
@@ -1571,7 +1571,7 @@ static bool ieee80211_assoc_success(struct mac80211_work *wk,

if (elems.ht_info_elem && elems.wmm_param &&
(sdata->local->hw.queues >= 4) &&
- !(ifmgd->flags & IEEE80211_STA_DISABLE_11N))
+ !(ifmgd->flags & MAC80211_STA_DISABLE_11N))
changed |= ieee80211_enable_ht(sdata, elems.ht_info_elem,
cbss->bssid, ap_ht_cap_flags);

@@ -1749,8 +1749,8 @@ static void ieee80211_rx_mgmt_beacon(struct ieee80211_sub_if_data *sdata,

/* Track average RSSI from the Beacon frames of the current AP */
ifmgd->last_beacon_signal = rx_status->signal;
- if (ifmgd->flags & IEEE80211_STA_RESET_SIGNAL_AVE) {
- ifmgd->flags &= ~IEEE80211_STA_RESET_SIGNAL_AVE;
+ if (ifmgd->flags & MAC80211_STA_RESET_SIGNAL_AVE) {
+ ifmgd->flags &= ~MAC80211_STA_RESET_SIGNAL_AVE;
ifmgd->ave_beacon_signal = rx_status->signal * 16;
ifmgd->last_cqm_event_signal = 0;
ifmgd->count_beacon_signal = 1;
@@ -1785,14 +1785,14 @@ static void ieee80211_rx_mgmt_beacon(struct ieee80211_sub_if_data *sdata,
}
}

- if (ifmgd->flags & IEEE80211_STA_BEACON_POLL) {
+ if (ifmgd->flags & MAC80211_STA_BEACON_POLL) {
#ifdef CONFIG_MAC80211_VERBOSE_DEBUG
if (net_ratelimit()) {
printk(KERN_DEBUG "%s: cancelling probereq poll due "
"to a received beacon\n", sdata->name);
}
#endif
- ifmgd->flags &= ~IEEE80211_STA_BEACON_POLL;
+ ifmgd->flags &= ~MAC80211_STA_BEACON_POLL;
mutex_lock(&local->iflist_mtx);
ieee80211_recalc_ps(local, -1);
mutex_unlock(&local->iflist_mtx);
@@ -1861,7 +1861,7 @@ static void ieee80211_rx_mgmt_beacon(struct ieee80211_sub_if_data *sdata,


if (elems.ht_cap_elem && elems.ht_info_elem && elems.wmm_param &&
- !(ifmgd->flags & IEEE80211_STA_DISABLE_11N)) {
+ !(ifmgd->flags & MAC80211_STA_DISABLE_11N)) {
struct sta_info *sta;
struct ieee80211_supported_band *sband;
u16 ap_ht_cap_flags;
@@ -2025,8 +2025,8 @@ static void ieee80211_sta_connection_lost(struct ieee80211_sub_if_data *sdata,
struct mac80211_local *local = sdata->local;
struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;

- ifmgd->flags &= ~(IEEE80211_STA_CONNECTION_POLL |
- IEEE80211_STA_BEACON_POLL);
+ ifmgd->flags &= ~(MAC80211_STA_CONNECTION_POLL |
+ MAC80211_STA_BEACON_POLL);

ieee80211_set_disassoc(sdata, true, true);
mutex_unlock(&ifmgd->mtx);
@@ -2052,8 +2052,8 @@ void ieee80211_sta_work(struct ieee80211_sub_if_data *sdata)
/* then process the rest of the work */
mutex_lock(&ifmgd->mtx);

- if (ifmgd->flags & (IEEE80211_STA_BEACON_POLL |
- IEEE80211_STA_CONNECTION_POLL) &&
+ if (ifmgd->flags & (MAC80211_STA_BEACON_POLL |
+ MAC80211_STA_CONNECTION_POLL) &&
ifmgd->associated) {
u8 bssid[ETH_ALEN];
int max_tries;
@@ -2164,8 +2164,8 @@ static void ieee80211_sta_monitor_work(struct work_struct *work)
static void ieee80211_restart_sta_timer(struct ieee80211_sub_if_data *sdata)
{
if (sdata->vif.type == NL80211_IFTYPE_STATION) {
- sdata->u.mgd.flags &= ~(IEEE80211_STA_BEACON_POLL |
- IEEE80211_STA_CONNECTION_POLL);
+ sdata->u.mgd.flags &= ~(MAC80211_STA_BEACON_POLL |
+ MAC80211_STA_CONNECTION_POLL);

/* let's probe the connection once */
ieee80211_queue_work(&sdata->local->hw,
@@ -2441,8 +2441,8 @@ int ieee80211_mgd_assoc(struct ieee80211_sub_if_data *sdata,
if (!wk)
return -ENOMEM;

- ifmgd->flags &= ~IEEE80211_STA_DISABLE_11N;
- ifmgd->flags &= ~IEEE80211_STA_NULLFUNC_ACKED;
+ ifmgd->flags &= ~MAC80211_STA_DISABLE_11N;
+ ifmgd->flags &= ~MAC80211_STA_NULLFUNC_ACKED;

ifmgd->beacon_crc_valid = false;

@@ -2450,7 +2450,7 @@ int ieee80211_mgd_assoc(struct ieee80211_sub_if_data *sdata,
if (req->crypto.ciphers_pairwise[i] == WLAN_CIPHER_SUITE_WEP40 ||
req->crypto.ciphers_pairwise[i] == WLAN_CIPHER_SUITE_TKIP ||
req->crypto.ciphers_pairwise[i] == WLAN_CIPHER_SUITE_WEP104)
- ifmgd->flags |= IEEE80211_STA_DISABLE_11N;
+ ifmgd->flags |= MAC80211_STA_DISABLE_11N;


if (req->ie && req->ie_len) {
@@ -2480,7 +2480,7 @@ int ieee80211_mgd_assoc(struct ieee80211_sub_if_data *sdata,
* We can set this to true for non-11n hardware, that'll be checked
* separately along with the peer capabilities.
*/
- wk->assoc.use_11n = !(ifmgd->flags & IEEE80211_STA_DISABLE_11N);
+ wk->assoc.use_11n = !(ifmgd->flags & MAC80211_STA_DISABLE_11N);
wk->assoc.capability = req->bss->capability;
wk->assoc.wmm_used = bss->wmm_used;
wk->assoc.supp_rates = bss->supp_rates;
@@ -2491,10 +2491,10 @@ int ieee80211_mgd_assoc(struct ieee80211_sub_if_data *sdata,
if (bss->wmm_used && bss->uapsd_supported &&
(sdata->local->hw.flags & IEEE80211_HW_SUPPORTS_UAPSD)) {
wk->assoc.uapsd_used = true;
- ifmgd->flags |= IEEE80211_STA_UAPSD_ENABLED;
+ ifmgd->flags |= MAC80211_STA_UAPSD_ENABLED;
} else {
wk->assoc.uapsd_used = false;
- ifmgd->flags &= ~IEEE80211_STA_UAPSD_ENABLED;
+ ifmgd->flags &= ~MAC80211_STA_UAPSD_ENABLED;
}

ssid = ieee80211_bss_get_ie(req->bss, WLAN_EID_SSID);
@@ -2516,16 +2516,16 @@ int ieee80211_mgd_assoc(struct ieee80211_sub_if_data *sdata,

if (req->use_mfp) {
ifmgd->mfp = IEEE80211_MFP_REQUIRED;
- ifmgd->flags |= IEEE80211_STA_MFP_ENABLED;
+ ifmgd->flags |= MAC80211_STA_MFP_ENABLED;
} else {
ifmgd->mfp = IEEE80211_MFP_DISABLED;
- ifmgd->flags &= ~IEEE80211_STA_MFP_ENABLED;
+ ifmgd->flags &= ~MAC80211_STA_MFP_ENABLED;
}

if (req->crypto.control_port)
- ifmgd->flags |= IEEE80211_STA_CONTROL_PORT;
+ ifmgd->flags |= MAC80211_STA_CONTROL_PORT;
else
- ifmgd->flags &= ~IEEE80211_STA_CONTROL_PORT;
+ ifmgd->flags &= ~MAC80211_STA_CONTROL_PORT;

sdata->control_port_protocol = req->crypto.control_port_ethertype;
sdata->control_port_no_encrypt = req->crypto.control_port_no_encrypt;
diff --git a/net/mac80211/status.c b/net/mac80211/status.c
index 86d971b..464cec7 100644
--- a/net/mac80211/status.c
+++ b/net/mac80211/status.c
@@ -320,7 +320,7 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb)
local->ps_sdata && !(local->scanning)) {
if (info->flags & IEEE80211_TX_STAT_ACK) {
local->ps_sdata->u.mgd.flags |=
- IEEE80211_STA_NULLFUNC_ACKED;
+ MAC80211_STA_NULLFUNC_ACKED;
} else
mod_timer(&local->dynamic_ps_timer, jiffies +
msecs_to_jiffies(10));
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 85b2a0c..22c0e5a 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -224,7 +224,7 @@ ieee80211_tx_h_dynamic_ps(struct mac80211_tx_data *tx)
* changed via debugfs, user needs to reassociate manually to have
* everything in sync.
*/
- if ((ifmgd->flags & IEEE80211_STA_UAPSD_ENABLED)
+ if ((ifmgd->flags & MAC80211_STA_UAPSD_ENABLED)
&& (local->uapsd_queues & IEEE80211_WMM_IE_STA_QOSINFO_AC_VO)
&& skb_get_queue_mapping(tx->skb) == 0)
return TX_CONTINUE;
@@ -232,7 +232,7 @@ ieee80211_tx_h_dynamic_ps(struct mac80211_tx_data *tx)
if (local->hw.conf.flags & IEEE80211_CONF_PS) {
ieee80211_stop_queues_by_reason(&local->hw,
IEEE80211_QUEUE_STOP_REASON_PS);
- ifmgd->flags &= ~IEEE80211_STA_NULLFUNC_ACKED;
+ ifmgd->flags &= ~MAC80211_STA_NULLFUNC_ACKED;
ieee80211_queue_work(&local->hw,
&local->dynamic_ps_disable_work);
}


2011-05-29 20:05:16

by Kalle Valo

[permalink] [raw]
Subject: [RFC PATCH 09/27] mac80211: rename ieee80211_bss to mac80211_bss

Signed-off-by: Kalle Valo <[email protected]>
---
net/mac80211/ibss.c | 6 +++---
net/mac80211/mac80211_i.h | 16 ++++++++--------
net/mac80211/main.c | 2 +-
net/mac80211/mlme.c | 10 +++++-----
net/mac80211/scan.c | 12 ++++++------
5 files changed, 23 insertions(+), 23 deletions(-)

diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c
index 2533947..40f14f2 100644
--- a/net/mac80211/ibss.c
+++ b/net/mac80211/ibss.c
@@ -211,7 +211,7 @@ static void __ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata,
}

static void ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata,
- struct ieee80211_bss *bss)
+ struct mac80211_bss *bss)
{
struct cfg80211_bss *cbss =
container_of((void *)bss, struct cfg80211_bss, priv);
@@ -260,7 +260,7 @@ static void ieee80211_rx_bss_info(struct ieee80211_sub_if_data *sdata,
struct mac80211_local *local = sdata->local;
int freq;
struct cfg80211_bss *cbss;
- struct ieee80211_bss *bss;
+ struct mac80211_bss *bss;
struct sta_info *sta;
struct ieee80211_channel *channel;
u64 beacon_timestamp, rx_timestamp;
@@ -600,7 +600,7 @@ static void ieee80211_sta_find_ibss(struct ieee80211_sub_if_data *sdata)
capability);

if (cbss) {
- struct ieee80211_bss *bss;
+ struct mac80211_bss *bss;

bss = (void *)cbss->priv;
#ifdef CONFIG_MAC80211_IBSS_DEBUG
diff --git a/net/mac80211/mac80211_i.h b/net/mac80211/mac80211_i.h
index ddaf7de..fffafa8 100644
--- a/net/mac80211/mac80211_i.h
+++ b/net/mac80211/mac80211_i.h
@@ -74,7 +74,7 @@ struct mac80211_fragment_entry {
};


-struct ieee80211_bss {
+struct mac80211_bss {
/* don't want to look up all the time */
size_t ssid_len;
u8 ssid[IEEE80211_MAX_SSID_LEN];
@@ -106,7 +106,7 @@ struct ieee80211_bss {
u8 erp_value;
};

-static inline u8 *bss_mesh_cfg(struct ieee80211_bss *bss)
+static inline u8 *bss_mesh_cfg(struct mac80211_bss *bss)
{
#ifdef CONFIG_MAC80211_MESH
return bss->mesh_cfg;
@@ -114,7 +114,7 @@ static inline u8 *bss_mesh_cfg(struct ieee80211_bss *bss)
return NULL;
}

-static inline u8 *bss_mesh_id(struct ieee80211_bss *bss)
+static inline u8 *bss_mesh_id(struct mac80211_bss *bss)
{
#ifdef CONFIG_MAC80211_MESH
return bss->mesh_id;
@@ -122,7 +122,7 @@ static inline u8 *bss_mesh_id(struct ieee80211_bss *bss)
return NULL;
}

-static inline u8 bss_mesh_id_len(struct ieee80211_bss *bss)
+static inline u8 bss_mesh_id_len(struct mac80211_bss *bss)
{
#ifdef CONFIG_MAC80211_MESH
return bss->mesh_id_len;
@@ -1104,7 +1104,7 @@ int ieee80211_max_network_latency(struct notifier_block *nb,
int ieee80211_set_arp_filter(struct ieee80211_sub_if_data *sdata);
void ieee80211_sta_process_chanswitch(struct ieee80211_sub_if_data *sdata,
struct ieee80211_channel_sw_ie *sw_elem,
- struct ieee80211_bss *bss,
+ struct mac80211_bss *bss,
u64 timestamp);
void ieee80211_sta_quiesce(struct ieee80211_sub_if_data *sdata);
void ieee80211_sta_restart(struct ieee80211_sub_if_data *sdata);
@@ -1146,7 +1146,7 @@ ieee80211_rx_result
ieee80211_scan_rx(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb);

void ieee80211_mlme_notify_scan_completed(struct mac80211_local *local);
-struct ieee80211_bss *
+struct mac80211_bss *
ieee80211_bss_info_update(struct mac80211_local *local,
struct ieee80211_rx_status *rx_status,
struct ieee80211_mgmt *mgmt,
@@ -1154,11 +1154,11 @@ ieee80211_bss_info_update(struct mac80211_local *local,
struct ieee802_11_elems *elems,
struct ieee80211_channel *channel,
bool beacon);
-struct ieee80211_bss *
+struct mac80211_bss *
ieee80211_rx_bss_get(struct mac80211_local *local, u8 *bssid, int freq,
u8 *ssid, u8 ssid_len);
void ieee80211_rx_bss_put(struct mac80211_local *local,
- struct ieee80211_bss *bss);
+ struct mac80211_bss *bss);

/* scheduled scan handling */
int ieee80211_request_sched_scan_start(struct ieee80211_sub_if_data *sdata,
diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index 87416c3..244f588 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -586,7 +586,7 @@ struct ieee80211_hw *ieee80211_alloc_hw(size_t priv_data_len,
if (!ops->set_key)
wiphy->flags |= WIPHY_FLAG_IBSS_RSN;

- wiphy->bss_priv_size = sizeof(struct ieee80211_bss);
+ wiphy->bss_priv_size = sizeof(struct mac80211_bss);

local = wiphy_priv(wiphy);

diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 451a9fd..4e24610 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -451,7 +451,7 @@ static void ieee80211_chswitch_timer(unsigned long data)

void ieee80211_sta_process_chanswitch(struct ieee80211_sub_if_data *sdata,
struct ieee80211_channel_sw_ie *sw_elem,
- struct ieee80211_bss *bss,
+ struct mac80211_bss *bss,
u64 timestamp)
{
struct cfg80211_bss *cbss =
@@ -708,7 +708,7 @@ void ieee80211_recalc_ps(struct mac80211_local *local, s32 latency)
if (beaconint_us > latency) {
local->ps_sdata = NULL;
} else {
- struct ieee80211_bss *bss;
+ struct mac80211_bss *bss;
int maxslp = 1;
u8 dtimper;

@@ -963,7 +963,7 @@ static void ieee80211_set_associated(struct ieee80211_sub_if_data *sdata,
struct cfg80211_bss *cbss,
u32 bss_info_changed)
{
- struct ieee80211_bss *bss = (void *)cbss->priv;
+ struct mac80211_bss *bss = (void *)cbss->priv;
struct mac80211_local *local = sdata->local;
struct ieee80211_bss_conf *bss_conf = &sdata->vif.bss_conf;

@@ -1608,7 +1608,7 @@ static void ieee80211_rx_bss_info(struct ieee80211_sub_if_data *sdata,
{
struct mac80211_local *local = sdata->local;
int freq;
- struct ieee80211_bss *bss;
+ struct mac80211_bss *bss;
struct ieee80211_channel *channel;
bool need_ps = false;

@@ -2413,7 +2413,7 @@ int ieee80211_mgd_assoc(struct ieee80211_sub_if_data *sdata,
struct cfg80211_assoc_request *req)
{
struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
- struct ieee80211_bss *bss = (void *)req->bss->priv;
+ struct mac80211_bss *bss = (void *)req->bss->priv;
struct ieee80211_work *wk;
const u8 *ssid;
int i;
diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c
index e7b8be2..7c3d17b 100644
--- a/net/mac80211/scan.c
+++ b/net/mac80211/scan.c
@@ -27,7 +27,7 @@
#define IEEE80211_CHANNEL_TIME (HZ / 33)
#define IEEE80211_PASSIVE_CHANNEL_TIME (HZ / 8)

-struct ieee80211_bss *
+struct mac80211_bss *
ieee80211_rx_bss_get(struct mac80211_local *local, u8 *bssid, int freq,
u8 *ssid, u8 ssid_len)
{
@@ -43,14 +43,14 @@ ieee80211_rx_bss_get(struct mac80211_local *local, u8 *bssid, int freq,

static void ieee80211_rx_bss_free(struct cfg80211_bss *cbss)
{
- struct ieee80211_bss *bss = (void *)cbss->priv;
+ struct mac80211_bss *bss = (void *)cbss->priv;

kfree(bss_mesh_id(bss));
kfree(bss_mesh_cfg(bss));
}

void ieee80211_rx_bss_put(struct mac80211_local *local,
- struct ieee80211_bss *bss)
+ struct mac80211_bss *bss)
{
if (!bss)
return;
@@ -74,7 +74,7 @@ static bool is_uapsd_supported(struct ieee802_11_elems *elems)
return qos_info & IEEE80211_WMM_IE_AP_QOSINFO_UAPSD;
}

-struct ieee80211_bss *
+struct mac80211_bss *
ieee80211_bss_info_update(struct mac80211_local *local,
struct ieee80211_rx_status *rx_status,
struct ieee80211_mgmt *mgmt,
@@ -84,7 +84,7 @@ ieee80211_bss_info_update(struct mac80211_local *local,
bool beacon)
{
struct cfg80211_bss *cbss;
- struct ieee80211_bss *bss;
+ struct mac80211_bss *bss;
int clen, srlen;
s32 signal = 0;

@@ -151,7 +151,7 @@ ieee80211_scan_rx(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb)
{
struct ieee80211_rx_status *rx_status = IEEE80211_SKB_RXCB(skb);
struct ieee80211_mgmt *mgmt;
- struct ieee80211_bss *bss;
+ struct mac80211_bss *bss;
u8 *elements;
struct ieee80211_channel *channel;
size_t baselen;


2011-05-29 20:06:24

by Kalle Valo

[permalink] [raw]
Subject: [RFC PATCH 19/27] mac80211: rename ieee80211_if_managed to mac80211_if_managed

Signed-off-by: Kalle Valo <[email protected]>
---
net/mac80211/mac80211_i.h | 6 ++--
net/mac80211/main.c | 2 +
net/mac80211/mlme.c | 66 +++++++++++++++++++++++----------------------
net/mac80211/offchannel.c | 2 +
net/mac80211/tx.c | 6 ++--
net/mac80211/util.c | 2 +
6 files changed, 42 insertions(+), 42 deletions(-)

diff --git a/net/mac80211/mac80211_i.h b/net/mac80211/mac80211_i.h
index bc18582..aa927ba 100644
--- a/net/mac80211/mac80211_i.h
+++ b/net/mac80211/mac80211_i.h
@@ -336,7 +336,7 @@ struct mac80211_work {
u8 ie[0];
};

-/* flags used in struct ieee80211_if_managed.flags */
+/* flags used in struct mac80211_if_managed.flags */
enum mac80211_sta_flags {
MAC80211_STA_BEACON_POLL = BIT(0),
MAC80211_STA_CONNECTION_POLL = BIT(1),
@@ -349,7 +349,7 @@ enum mac80211_sta_flags {
MAC80211_STA_RESET_SIGNAL_AVE = BIT(9),
};

-struct ieee80211_if_managed {
+struct mac80211_if_managed {
struct timer_list timer;
struct timer_list conn_mon_timer;
struct timer_list bcn_mon_timer;
@@ -596,7 +596,7 @@ struct ieee80211_sub_if_data {
struct mac80211_if_ap ap;
struct mac80211_if_wds wds;
struct mac80211_if_vlan vlan;
- struct ieee80211_if_managed mgd;
+ struct mac80211_if_managed mgd;
struct ieee80211_if_ibss ibss;
struct ieee80211_if_mesh mesh;
u32 mntr_flags;
diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index 244f588..bd8c543 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -409,7 +409,7 @@ static int ieee80211_ifa_changed(struct notifier_block *nb,
struct in_device *idev;
struct ieee80211_sub_if_data *sdata;
struct ieee80211_bss_conf *bss_conf;
- struct ieee80211_if_managed *ifmgd;
+ struct mac80211_if_managed *ifmgd;
int c = 0;

/* Make sure it's our interface that got changed */
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index d06ba14..55c97b5 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -98,7 +98,7 @@ enum rx_mgmt_action {
};

/* utils */
-static inline void ASSERT_MGD_MTX(struct ieee80211_if_managed *ifmgd)
+static inline void ASSERT_MGD_MTX(struct mac80211_if_managed *ifmgd)
{
lockdep_assert_held(&ifmgd->mtx);
}
@@ -113,7 +113,7 @@ static inline void ASSERT_MGD_MTX(struct ieee80211_if_managed *ifmgd)
* has happened -- the work that runs from this timer will
* do that.
*/
-static void run_again(struct ieee80211_if_managed *ifmgd,
+static void run_again(struct mac80211_if_managed *ifmgd,
unsigned long timeout)
{
ASSERT_MGD_MTX(ifmgd);
@@ -134,7 +134,7 @@ void ieee80211_sta_reset_beacon_monitor(struct ieee80211_sub_if_data *sdata)

void ieee80211_sta_reset_conn_monitor(struct ieee80211_sub_if_data *sdata)
{
- struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
+ struct mac80211_if_managed *ifmgd = &sdata->u.mgd;

if (unlikely(!sdata->u.mgd.associated))
return;
@@ -272,7 +272,7 @@ static void ieee80211_send_deauth_disassoc(struct ieee80211_sub_if_data *sdata,
void *cookie, bool send_frame)
{
struct mac80211_local *local = sdata->local;
- struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
+ struct mac80211_if_managed *ifmgd = &sdata->u.mgd;
struct sk_buff *skb;
struct ieee80211_mgmt *mgmt;

@@ -386,7 +386,7 @@ static void ieee80211_chswitch_work(struct work_struct *work)
{
struct ieee80211_sub_if_data *sdata =
container_of(work, struct ieee80211_sub_if_data, u.mgd.chswitch_work);
- struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
+ struct mac80211_if_managed *ifmgd = &sdata->u.mgd;

if (!ieee80211_sdata_running(sdata))
return;
@@ -415,7 +415,7 @@ static void ieee80211_chswitch_work(struct work_struct *work)
void ieee80211_chswitch_done(struct ieee80211_vif *vif, bool success)
{
struct ieee80211_sub_if_data *sdata;
- struct ieee80211_if_managed *ifmgd;
+ struct mac80211_if_managed *ifmgd;

sdata = vif_to_sdata(vif);
ifmgd = &sdata->u.mgd;
@@ -439,7 +439,7 @@ static void ieee80211_chswitch_timer(unsigned long data)
{
struct ieee80211_sub_if_data *sdata =
(struct ieee80211_sub_if_data *) data;
- struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
+ struct mac80211_if_managed *ifmgd = &sdata->u.mgd;

if (sdata->local->quiescing) {
set_bit(TMR_RUNNING_CHANSW, &ifmgd->timers_running);
@@ -457,7 +457,7 @@ void ieee80211_sta_process_chanswitch(struct ieee80211_sub_if_data *sdata,
struct cfg80211_bss *cbss =
container_of((void *)bss, struct cfg80211_bss, priv);
struct ieee80211_channel *new_ch;
- struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
+ struct mac80211_if_managed *ifmgd = &sdata->u.mgd;
int new_freq = ieee80211_channel_to_frequency(sw_elem->new_ch_num,
cbss->channel->band);

@@ -612,7 +612,7 @@ static void ieee80211_change_ps(struct mac80211_local *local)

static bool ieee80211_powersave_allowed(struct ieee80211_sub_if_data *sdata)
{
- struct ieee80211_if_managed *mgd = &sdata->u.mgd;
+ struct mac80211_if_managed *mgd = &sdata->u.mgd;
struct sta_info *sta = NULL;
u32 sta_flags = 0;

@@ -755,7 +755,7 @@ void ieee80211_dynamic_ps_enable_work(struct work_struct *work)
container_of(work, struct mac80211_local,
dynamic_ps_enable_work);
struct ieee80211_sub_if_data *sdata = local->ps_sdata;
- struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
+ struct mac80211_if_managed *ifmgd = &sdata->u.mgd;
unsigned long flags;
int q;

@@ -826,7 +826,7 @@ static void ieee80211_sta_wmm_params(struct mac80211_local *local,
u8 *wmm_param, size_t wmm_param_len)
{
struct ieee80211_tx_queue_params params;
- struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
+ struct mac80211_if_managed *ifmgd = &sdata->u.mgd;
size_t left;
int count;
u8 *pos, uapsd_queues = 0;
@@ -1031,7 +1031,7 @@ static void ieee80211_set_associated(struct ieee80211_sub_if_data *sdata,
static void ieee80211_set_disassoc(struct ieee80211_sub_if_data *sdata,
bool remove_sta, bool tx)
{
- struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
+ struct mac80211_if_managed *ifmgd = &sdata->u.mgd;
struct mac80211_local *local = sdata->local;
struct sta_info *sta;
u32 changed = 0, config_changed = 0;
@@ -1137,7 +1137,7 @@ void ieee80211_sta_rx_notify(struct ieee80211_sub_if_data *sdata,

static void ieee80211_reset_ap_probe(struct ieee80211_sub_if_data *sdata)
{
- struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
+ struct mac80211_if_managed *ifmgd = &sdata->u.mgd;

if (!(ifmgd->flags & (MAC80211_STA_BEACON_POLL |
MAC80211_STA_CONNECTION_POLL)))
@@ -1185,7 +1185,7 @@ void ieee80211_sta_tx_notify(struct ieee80211_sub_if_data *sdata,

static void ieee80211_mgd_probe_ap_send(struct ieee80211_sub_if_data *sdata)
{
- struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
+ struct mac80211_if_managed *ifmgd = &sdata->u.mgd;
const u8 *ssid;
u8 *dst = ifmgd->associated->bssid;
u8 unicast_limit = max(1, max_probe_tries - 3);
@@ -1221,7 +1221,7 @@ static void ieee80211_mgd_probe_ap_send(struct ieee80211_sub_if_data *sdata)
static void ieee80211_mgd_probe_ap(struct ieee80211_sub_if_data *sdata,
bool beacon)
{
- struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
+ struct mac80211_if_managed *ifmgd = &sdata->u.mgd;
bool already = false;

if (!ieee80211_sdata_running(sdata))
@@ -1281,7 +1281,7 @@ struct sk_buff *ieee80211_ap_probereq_get(struct ieee80211_hw *hw,
struct ieee80211_vif *vif)
{
struct ieee80211_sub_if_data *sdata = vif_to_sdata(vif);
- struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
+ struct mac80211_if_managed *ifmgd = &sdata->u.mgd;
struct sk_buff *skb;
const u8 *ssid;

@@ -1303,7 +1303,7 @@ EXPORT_SYMBOL(ieee80211_ap_probereq_get);

static void __ieee80211_connection_loss(struct ieee80211_sub_if_data *sdata)
{
- struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
+ struct mac80211_if_managed *ifmgd = &sdata->u.mgd;
struct mac80211_local *local = sdata->local;
u8 bssid[ETH_ALEN];

@@ -1375,7 +1375,7 @@ static enum rx_mgmt_action __must_check
ieee80211_rx_mgmt_deauth(struct ieee80211_sub_if_data *sdata,
struct ieee80211_mgmt *mgmt, size_t len)
{
- struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
+ struct mac80211_if_managed *ifmgd = &sdata->u.mgd;
const u8 *bssid = NULL;
u16 reason_code;

@@ -1404,7 +1404,7 @@ static enum rx_mgmt_action __must_check
ieee80211_rx_mgmt_disassoc(struct ieee80211_sub_if_data *sdata,
struct ieee80211_mgmt *mgmt, size_t len)
{
- struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
+ struct mac80211_if_managed *ifmgd = &sdata->u.mgd;
u16 reason_code;

if (len < 24 + 2)
@@ -1435,7 +1435,7 @@ static bool ieee80211_assoc_success(struct mac80211_work *wk,
struct ieee80211_mgmt *mgmt, size_t len)
{
struct ieee80211_sub_if_data *sdata = wk->sdata;
- struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
+ struct mac80211_if_managed *ifmgd = &sdata->u.mgd;
struct mac80211_local *local = sdata->local;
struct ieee80211_supported_band *sband;
struct sta_info *sta;
@@ -1658,7 +1658,7 @@ static void ieee80211_rx_mgmt_probe_resp(struct ieee80211_sub_if_data *sdata,
struct sk_buff *skb)
{
struct ieee80211_mgmt *mgmt = (void *)skb->data;
- struct ieee80211_if_managed *ifmgd;
+ struct mac80211_if_managed *ifmgd;
struct ieee80211_rx_status *rx_status = (void *) skb->cb;
size_t baselen, len = skb->len;
struct ieee802_11_elems elems;
@@ -1710,7 +1710,7 @@ static void ieee80211_rx_mgmt_beacon(struct ieee80211_sub_if_data *sdata,
size_t len,
struct ieee80211_rx_status *rx_status)
{
- struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
+ struct mac80211_if_managed *ifmgd = &sdata->u.mgd;
struct ieee80211_bss_conf *bss_conf = &sdata->vif.bss_conf;
size_t baselen;
struct ieee802_11_elems elems;
@@ -1903,7 +1903,7 @@ static void ieee80211_rx_mgmt_beacon(struct ieee80211_sub_if_data *sdata,
void ieee80211_sta_rx_queued_mgmt(struct ieee80211_sub_if_data *sdata,
struct sk_buff *skb)
{
- struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
+ struct mac80211_if_managed *ifmgd = &sdata->u.mgd;
struct ieee80211_rx_status *rx_status;
struct ieee80211_mgmt *mgmt;
enum rx_mgmt_action rma = RX_MGMT_NONE;
@@ -2008,7 +2008,7 @@ static void ieee80211_sta_timer(unsigned long data)
{
struct ieee80211_sub_if_data *sdata =
(struct ieee80211_sub_if_data *) data;
- struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
+ struct mac80211_if_managed *ifmgd = &sdata->u.mgd;
struct mac80211_local *local = sdata->local;

if (local->quiescing) {
@@ -2023,7 +2023,7 @@ static void ieee80211_sta_connection_lost(struct ieee80211_sub_if_data *sdata,
u8 *bssid)
{
struct mac80211_local *local = sdata->local;
- struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
+ struct mac80211_if_managed *ifmgd = &sdata->u.mgd;

ifmgd->flags &= ~(MAC80211_STA_CONNECTION_POLL |
MAC80211_STA_BEACON_POLL);
@@ -2047,7 +2047,7 @@ static void ieee80211_sta_connection_lost(struct ieee80211_sub_if_data *sdata,
void ieee80211_sta_work(struct ieee80211_sub_if_data *sdata)
{
struct mac80211_local *local = sdata->local;
- struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
+ struct mac80211_if_managed *ifmgd = &sdata->u.mgd;

/* then process the rest of the work */
mutex_lock(&ifmgd->mtx);
@@ -2143,7 +2143,7 @@ static void ieee80211_sta_conn_mon_timer(unsigned long data)
{
struct ieee80211_sub_if_data *sdata =
(struct ieee80211_sub_if_data *) data;
- struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
+ struct mac80211_if_managed *ifmgd = &sdata->u.mgd;
struct mac80211_local *local = sdata->local;

if (local->quiescing)
@@ -2178,7 +2178,7 @@ static void ieee80211_restart_sta_timer(struct ieee80211_sub_if_data *sdata)
#ifdef CONFIG_PM
void ieee80211_sta_quiesce(struct ieee80211_sub_if_data *sdata)
{
- struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
+ struct mac80211_if_managed *ifmgd = &sdata->u.mgd;

/*
* we need to use atomic bitops for the running bits
@@ -2204,7 +2204,7 @@ void ieee80211_sta_quiesce(struct ieee80211_sub_if_data *sdata)

void ieee80211_sta_restart(struct ieee80211_sub_if_data *sdata)
{
- struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
+ struct mac80211_if_managed *ifmgd = &sdata->u.mgd;

if (test_and_clear_bit(TMR_RUNNING_TIMER, &ifmgd->timers_running))
add_timer(&ifmgd->timer);
@@ -2218,7 +2218,7 @@ void ieee80211_sta_restart(struct ieee80211_sub_if_data *sdata)
/* interface setup */
void ieee80211_sta_setup_sdata(struct ieee80211_sub_if_data *sdata)
{
- struct ieee80211_if_managed *ifmgd;
+ struct mac80211_if_managed *ifmgd;

ifmgd = &sdata->u.mgd;
INIT_WORK(&ifmgd->monitor_work, ieee80211_sta_monitor_work);
@@ -2412,7 +2412,7 @@ static enum work_done_result ieee80211_assoc_done(struct mac80211_work *wk,
int ieee80211_mgd_assoc(struct ieee80211_sub_if_data *sdata,
struct cfg80211_assoc_request *req)
{
- struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
+ struct mac80211_if_managed *ifmgd = &sdata->u.mgd;
struct mac80211_bss *bss = (void *)req->bss->priv;
struct mac80211_work *wk;
const u8 *ssid;
@@ -2539,7 +2539,7 @@ int ieee80211_mgd_deauth(struct ieee80211_sub_if_data *sdata,
void *cookie)
{
struct mac80211_local *local = sdata->local;
- struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
+ struct mac80211_if_managed *ifmgd = &sdata->u.mgd;
struct mac80211_work *wk;
u8 bssid[ETH_ALEN];
bool assoc_bss = false;
@@ -2611,7 +2611,7 @@ int ieee80211_mgd_disassoc(struct ieee80211_sub_if_data *sdata,
struct cfg80211_disassoc_request *req,
void *cookie)
{
- struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
+ struct mac80211_if_managed *ifmgd = &sdata->u.mgd;
u8 bssid[ETH_ALEN];

mutex_lock(&ifmgd->mtx);
diff --git a/net/mac80211/offchannel.c b/net/mac80211/offchannel.c
index 46814ee..0c97ef7 100644
--- a/net/mac80211/offchannel.c
+++ b/net/mac80211/offchannel.c
@@ -27,7 +27,7 @@ static void ieee80211_offchannel_ps_enable(struct ieee80211_sub_if_data *sdata,
bool tell_ap)
{
struct mac80211_local *local = sdata->local;
- struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
+ struct mac80211_if_managed *ifmgd = &sdata->u.mgd;

local->offchannel_ps_enabled = false;

diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 22c0e5a..f5c9bc0 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -180,7 +180,7 @@ static ieee80211_tx_result debug_noinline
ieee80211_tx_h_dynamic_ps(struct mac80211_tx_data *tx)
{
struct mac80211_local *local = tx->local;
- struct ieee80211_if_managed *ifmgd;
+ struct mac80211_if_managed *ifmgd;

/* driver doesn't support power save */
if (!(local->hw.flags & IEEE80211_HW_SUPPORTS_PS))
@@ -2318,7 +2318,7 @@ struct sk_buff *ieee80211_pspoll_get(struct ieee80211_hw *hw,
struct ieee80211_vif *vif)
{
struct ieee80211_sub_if_data *sdata;
- struct ieee80211_if_managed *ifmgd;
+ struct mac80211_if_managed *ifmgd;
struct ieee80211_pspoll *pspoll;
struct mac80211_local *local;
struct sk_buff *skb;
@@ -2359,7 +2359,7 @@ struct sk_buff *ieee80211_nullfunc_get(struct ieee80211_hw *hw,
{
struct ieee80211_hdr_3addr *nullfunc;
struct ieee80211_sub_if_data *sdata;
- struct ieee80211_if_managed *ifmgd;
+ struct mac80211_if_managed *ifmgd;
struct mac80211_local *local;
struct sk_buff *skb;

diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index 5eef7cd..40b0fbe 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -1321,7 +1321,7 @@ int ieee80211_reconfig(struct mac80211_local *local)
return 0;
}

-static int check_mgd_smps(struct ieee80211_if_managed *ifmgd,
+static int check_mgd_smps(struct mac80211_if_managed *ifmgd,
enum ieee80211_smps_mode *smps_mode)
{
if (ifmgd->associated) {


2011-05-29 20:05:29

by Kalle Valo

[permalink] [raw]
Subject: [RFC PATCH 11/27] mac80211: rename ieee80211_packet_rx_flags to mac80211_packet_rx_flags

Signed-off-by: Kalle Valo <[email protected]>
---
net/mac80211/mac80211_i.h | 30 +++++++++++++------------
net/mac80211/rx.c | 54 +++++++++++++++++++++++----------------------
2 files changed, 42 insertions(+), 42 deletions(-)

diff --git a/net/mac80211/mac80211_i.h b/net/mac80211/mac80211_i.h
index b5c8374..4ef1594 100644
--- a/net/mac80211/mac80211_i.h
+++ b/net/mac80211/mac80211_i.h
@@ -161,31 +161,31 @@ typedef unsigned __bitwise__ ieee80211_rx_result;
#define RX_QUEUED ((__force ieee80211_rx_result) 3u)

/**
- * enum ieee80211_packet_rx_flags - packet RX flags
- * @IEEE80211_RX_RA_MATCH: frame is destined to interface currently processed
+ * enum mac80211_packet_rx_flags - packet RX flags
+ * @MAC80211_RX_RA_MATCH: frame is destined to interface currently processed
* (incl. multicast frames)
- * @IEEE80211_RX_IN_SCAN: received while scanning
- * @IEEE80211_RX_FRAGMENTED: fragmented frame
- * @IEEE80211_RX_AMSDU: a-MSDU packet
- * @IEEE80211_RX_MALFORMED_ACTION_FRM: action frame is malformed
- * @IEEE80211_RX_DEFERRED_RELEASE: frame was subjected to receive reordering
+ * @MAC80211_RX_IN_SCAN: received while scanning
+ * @MAC80211_RX_FRAGMENTED: fragmented frame
+ * @MAC80211_RX_AMSDU: a-MSDU packet
+ * @MAC80211_RX_MALFORMED_ACTION_FRM: action frame is malformed
+ * @MAC80211_RX_DEFERRED_RELEASE: frame was subjected to receive reordering
*
* These are per-frame flags that are attached to a frame in the
* @rx_flags field of &struct ieee80211_rx_status.
*/
-enum ieee80211_packet_rx_flags {
- IEEE80211_RX_IN_SCAN = BIT(0),
- IEEE80211_RX_RA_MATCH = BIT(1),
- IEEE80211_RX_FRAGMENTED = BIT(2),
- IEEE80211_RX_AMSDU = BIT(3),
- IEEE80211_RX_MALFORMED_ACTION_FRM = BIT(4),
- IEEE80211_RX_DEFERRED_RELEASE = BIT(5),
+enum mac80211_packet_rx_flags {
+ MAC80211_RX_IN_SCAN = BIT(0),
+ MAC80211_RX_RA_MATCH = BIT(1),
+ MAC80211_RX_FRAGMENTED = BIT(2),
+ MAC80211_RX_AMSDU = BIT(3),
+ MAC80211_RX_MALFORMED_ACTION_FRM = BIT(4),
+ MAC80211_RX_DEFERRED_RELEASE = BIT(5),
};

/**
* enum ieee80211_rx_flags - RX data flags
*
- * @IEEE80211_RX_CMNTR: received on cooked monitor already
+ * @MAC80211_RX_CMNTR: received on cooked monitor already
*
* These flags are used across handling multiple interfaces
* for a single frame.
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index d49fa8b..12086b4 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -339,7 +339,7 @@ static void ieee80211_parse_qos(struct ieee80211_rx_data *rx)
/* frame has qos control */
tid = *qc & IEEE80211_QOS_CTL_TID_MASK;
if (*qc & IEEE80211_QOS_CONTROL_A_MSDU_PRESENT)
- status->rx_flags |= IEEE80211_RX_AMSDU;
+ status->rx_flags |= MAC80211_RX_AMSDU;
} else {
/*
* IEEE 802.11-2007, 7.1.3.4.1 ("Sequence Number field"):
@@ -404,7 +404,7 @@ ieee80211_rx_h_passive_scan(struct ieee80211_rx_data *rx)
struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(rx->skb);
struct sk_buff *skb = rx->skb;

- if (likely(!(status->rx_flags & IEEE80211_RX_IN_SCAN) &&
+ if (likely(!(status->rx_flags & MAC80211_RX_IN_SCAN) &&
!local->sched_scanning))
return RX_CONTINUE;

@@ -563,7 +563,7 @@ static void ieee80211_release_reorder_frame(struct ieee80211_hw *hw,
tid_agg_rx->stored_mpdu_num--;
tid_agg_rx->reorder_buf[index] = NULL;
status = IEEE80211_SKB_RXCB(skb);
- status->rx_flags |= IEEE80211_RX_DEFERRED_RELEASE;
+ status->rx_flags |= MAC80211_RX_DEFERRED_RELEASE;
skb_queue_tail(&local->rx_skb_queue, skb);

no_frame:
@@ -812,7 +812,7 @@ ieee80211_rx_h_check(struct ieee80211_rx_data *rx)
if (unlikely(ieee80211_has_retry(hdr->frame_control) &&
rx->sta->last_seq_ctrl[rx->queue] ==
hdr->seq_ctrl)) {
- if (status->rx_flags & IEEE80211_RX_RA_MATCH) {
+ if (status->rx_flags & MAC80211_RX_RA_MATCH) {
rx->local->dot11FrameDuplicateCount++;
rx->sta->num_duplicates++;
}
@@ -893,7 +893,7 @@ ieee80211_rx_h_decrypt(struct ieee80211_rx_data *rx)
* No point in finding a key and decrypting if the frame is neither
* addressed to us nor a multicast frame.
*/
- if (!(status->rx_flags & IEEE80211_RX_RA_MATCH))
+ if (!(status->rx_flags & MAC80211_RX_RA_MATCH))
return RX_CONTINUE;

/* start without a key */
@@ -1185,7 +1185,7 @@ ieee80211_rx_h_sta_process(struct ieee80211_rx_data *rx)
}
}

- if (!(status->rx_flags & IEEE80211_RX_RA_MATCH))
+ if (!(status->rx_flags & MAC80211_RX_RA_MATCH))
return RX_CONTINUE;

if (rx->sdata->vif.type == NL80211_IFTYPE_STATION)
@@ -1202,7 +1202,7 @@ ieee80211_rx_h_sta_process(struct ieee80211_rx_data *rx)
*/
if (!(sta->local->hw.flags & IEEE80211_HW_AP_LINK_PS) &&
!ieee80211_has_morefrags(hdr->frame_control) &&
- !(status->rx_flags & IEEE80211_RX_DEFERRED_RELEASE) &&
+ !(status->rx_flags & MAC80211_RX_DEFERRED_RELEASE) &&
(rx->sdata->vif.type == NL80211_IFTYPE_AP ||
rx->sdata->vif.type == NL80211_IFTYPE_AP_VLAN)) {
if (test_sta_flags(sta, WLAN_STA_PS_STA)) {
@@ -1446,7 +1446,7 @@ ieee80211_rx_h_defragment(struct ieee80211_rx_data *rx)

/* Complete frame has been reassembled - process it now */
status = IEEE80211_SKB_RXCB(rx->skb);
- status->rx_flags |= IEEE80211_RX_FRAGMENTED;
+ status->rx_flags |= MAC80211_RX_FRAGMENTED;

out:
if (rx->sta)
@@ -1466,7 +1466,7 @@ ieee80211_rx_h_ps_poll(struct ieee80211_rx_data *rx)
struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(rx->skb);

if (likely(!rx->sta || !ieee80211_is_pspoll(fc) ||
- !(status->rx_flags & IEEE80211_RX_RA_MATCH)))
+ !(status->rx_flags & MAC80211_RX_RA_MATCH)))
return RX_CONTINUE;

if ((sdata->vif.type != NL80211_IFTYPE_AP) &&
@@ -1675,7 +1675,7 @@ ieee80211_deliver_skb(struct ieee80211_rx_data *rx)
if ((sdata->vif.type == NL80211_IFTYPE_AP ||
sdata->vif.type == NL80211_IFTYPE_AP_VLAN) &&
!(sdata->flags & IEEE80211_SDATA_DONT_BRIDGE_PACKETS) &&
- (status->rx_flags & IEEE80211_RX_RA_MATCH) &&
+ (status->rx_flags & MAC80211_RX_RA_MATCH) &&
(sdata->vif.type != NL80211_IFTYPE_AP_VLAN || !sdata->u.vlan.sta)) {
if (is_multicast_ether_addr(ehdr->h_dest)) {
/*
@@ -1760,7 +1760,7 @@ ieee80211_rx_h_amsdu(struct ieee80211_rx_data *rx)
if (unlikely(!ieee80211_is_data_present(fc)))
return RX_DROP_MONITOR;

- if (!(status->rx_flags & IEEE80211_RX_AMSDU))
+ if (!(status->rx_flags & MAC80211_RX_AMSDU))
return RX_CONTINUE;

if (ieee80211_has_a4(hdr->frame_control) &&
@@ -1857,7 +1857,7 @@ ieee80211_rx_h_mesh_fwding(struct ieee80211_rx_data *rx)

mesh_hdr->ttl--;

- if (status->rx_flags & IEEE80211_RX_RA_MATCH) {
+ if (status->rx_flags & MAC80211_RX_RA_MATCH) {
if (!mesh_hdr->ttl)
IEEE80211_IFSTA_MESH_CTR_INC(&rx->sdata->u.mesh,
dropped_frames_ttl);
@@ -2096,7 +2096,7 @@ ieee80211_rx_h_mgmt_check(struct ieee80211_rx_data *rx)
if (!ieee80211_is_mgmt(mgmt->frame_control))
return RX_DROP_MONITOR;

- if (!(status->rx_flags & IEEE80211_RX_RA_MATCH))
+ if (!(status->rx_flags & MAC80211_RX_RA_MATCH))
return RX_DROP_MONITOR;

if (ieee80211_drop_unencrypted_mgmt(rx))
@@ -2124,7 +2124,7 @@ ieee80211_rx_h_action(struct ieee80211_rx_data *rx)
if (!rx->sta && mgmt->u.action.category != WLAN_CATEGORY_PUBLIC)
return RX_DROP_UNUSABLE;

- if (!(status->rx_flags & IEEE80211_RX_RA_MATCH))
+ if (!(status->rx_flags & MAC80211_RX_RA_MATCH))
return RX_DROP_UNUSABLE;

switch (mgmt->u.action.category) {
@@ -2223,7 +2223,7 @@ ieee80211_rx_h_action(struct ieee80211_rx_data *rx)
return RX_CONTINUE;

invalid:
- status->rx_flags |= IEEE80211_RX_MALFORMED_ACTION_FRM;
+ status->rx_flags |= MAC80211_RX_MALFORMED_ACTION_FRM;
/* will return in the next handlers */
return RX_CONTINUE;

@@ -2248,7 +2248,7 @@ ieee80211_rx_h_userspace_mgmt(struct ieee80211_rx_data *rx)
struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(rx->skb);

/* skip known-bad action frames and return them in the next handler */
- if (status->rx_flags & IEEE80211_RX_MALFORMED_ACTION_FRM)
+ if (status->rx_flags & MAC80211_RX_MALFORMED_ACTION_FRM)
return RX_CONTINUE;

/*
@@ -2293,7 +2293,7 @@ ieee80211_rx_h_action_return(struct ieee80211_rx_data *rx)
* registration mechanisms, but older ones still use cooked
* monitor interfaces so push all frames there.
*/
- if (!(status->rx_flags & IEEE80211_RX_MALFORMED_ACTION_FRM) &&
+ if (!(status->rx_flags & MAC80211_RX_MALFORMED_ACTION_FRM) &&
(sdata->vif.type == NL80211_IFTYPE_AP ||
sdata->vif.type == NL80211_IFTYPE_AP_VLAN))
return RX_DROP_MONITOR;
@@ -2373,7 +2373,7 @@ ieee80211_rx_h_mgmt(struct ieee80211_rx_data *rx)
return RX_QUEUED;
}

-/* TODO: use IEEE80211_RX_FRAGMENTED */
+/* TODO: use MAC80211_RX_FRAGMENTED */
static void ieee80211_rx_cooked_monitor(struct ieee80211_rx_data *rx,
struct ieee80211_rate *rate)
{
@@ -2626,7 +2626,7 @@ static int prepare_for_handlers(struct ieee80211_rx_data *rx,
if (!(sdata->dev->flags & IFF_PROMISC) ||
sdata->u.mgd.use_4addr)
return 0;
- status->rx_flags &= ~IEEE80211_RX_RA_MATCH;
+ status->rx_flags &= ~MAC80211_RX_RA_MATCH;
}
break;
case NL80211_IFTYPE_ADHOC:
@@ -2636,15 +2636,15 @@ static int prepare_for_handlers(struct ieee80211_rx_data *rx,
return 1;
}
else if (!ieee80211_bssid_match(bssid, sdata->u.ibss.bssid)) {
- if (!(status->rx_flags & IEEE80211_RX_IN_SCAN))
+ if (!(status->rx_flags & MAC80211_RX_IN_SCAN))
return 0;
- status->rx_flags &= ~IEEE80211_RX_RA_MATCH;
+ status->rx_flags &= ~MAC80211_RX_RA_MATCH;
} else if (!multicast &&
compare_ether_addr(sdata->vif.addr,
hdr->addr1) != 0) {
if (!(sdata->dev->flags & IFF_PROMISC))
return 0;
- status->rx_flags &= ~IEEE80211_RX_RA_MATCH;
+ status->rx_flags &= ~MAC80211_RX_RA_MATCH;
} else if (!rx->sta) {
int rate_idx;
if (status->flag & RX_FLAG_HT)
@@ -2662,7 +2662,7 @@ static int prepare_for_handlers(struct ieee80211_rx_data *rx,
if (!(sdata->dev->flags & IFF_PROMISC))
return 0;

- status->rx_flags &= ~IEEE80211_RX_RA_MATCH;
+ status->rx_flags &= ~MAC80211_RX_RA_MATCH;
}
break;
case NL80211_IFTYPE_AP_VLAN:
@@ -2673,10 +2673,10 @@ static int prepare_for_handlers(struct ieee80211_rx_data *rx,
return 0;
} else if (!ieee80211_bssid_match(bssid,
sdata->vif.addr)) {
- if (!(status->rx_flags & IEEE80211_RX_IN_SCAN) &&
+ if (!(status->rx_flags & MAC80211_RX_IN_SCAN) &&
!ieee80211_is_beacon(hdr->frame_control))
return 0;
- status->rx_flags &= ~IEEE80211_RX_RA_MATCH;
+ status->rx_flags &= ~MAC80211_RX_RA_MATCH;
}
break;
case NL80211_IFTYPE_WDS:
@@ -2710,7 +2710,7 @@ static bool ieee80211_prepare_and_rx_handle(struct ieee80211_rx_data *rx,
int prepares;

rx->skb = skb;
- status->rx_flags |= IEEE80211_RX_RA_MATCH;
+ status->rx_flags |= MAC80211_RX_RA_MATCH;
prepares = prepare_for_handlers(rx, hdr);

if (!prepares)
@@ -2760,7 +2760,7 @@ static void __ieee80211_rx_handle_packet(struct ieee80211_hw *hw,

if (unlikely(test_bit(SCAN_HW_SCANNING, &local->scanning) ||
test_bit(SCAN_SW_SCANNING, &local->scanning)))
- status->rx_flags |= IEEE80211_RX_IN_SCAN;
+ status->rx_flags |= MAC80211_RX_IN_SCAN;

if (ieee80211_is_mgmt(fc))
err = skb_linearize(skb);


2011-05-29 20:06:44

by Kalle Valo

[permalink] [raw]
Subject: [RFC PATCH 22/27] mac80211: rename ieee80211_sub_if_data_flags to mac80211_sub_if_data_flags

Also convert enum sdata_queue_type at the same time.

Signed-off-by: Kalle Valo <[email protected]>
---
net/mac80211/agg-tx.c | 4 ++--
net/mac80211/cfg.c | 4 ++--
net/mac80211/iface.c | 20 ++++++++++----------
net/mac80211/mac80211_i.h | 26 +++++++++++++-------------
net/mac80211/mlme.c | 4 ++--
net/mac80211/rx.c | 8 ++++----
net/mac80211/tx.c | 2 +-
net/mac80211/util.c | 12 ++++++------
8 files changed, 40 insertions(+), 40 deletions(-)

diff --git a/net/mac80211/agg-tx.c b/net/mac80211/agg-tx.c
index 0f19c8f..8bb1f92 100644
--- a/net/mac80211/agg-tx.c
+++ b/net/mac80211/agg-tx.c
@@ -594,7 +594,7 @@ void ieee80211_start_tx_ba_cb_irqsafe(struct ieee80211_vif *vif,
memcpy(&ra_tid->ra, ra, ETH_ALEN);
ra_tid->tid = tid;

- skb->pkt_type = IEEE80211_SDATA_QUEUE_AGG_START;
+ skb->pkt_type = MAC80211_SDATA_QUEUE_AGG_START;
skb_queue_tail(&sdata->skb_queue, skb);
ieee80211_queue_work(&local->hw, &sdata->work);
}
@@ -747,7 +747,7 @@ void ieee80211_stop_tx_ba_cb_irqsafe(struct ieee80211_vif *vif,
memcpy(&ra_tid->ra, ra, ETH_ALEN);
ra_tid->tid = tid;

- skb->pkt_type = IEEE80211_SDATA_QUEUE_AGG_STOP;
+ skb->pkt_type = MAC80211_SDATA_QUEUE_AGG_STOP;
skb_queue_tail(&sdata->skb_queue, skb);
ieee80211_queue_work(&local->hw, &sdata->work);
}
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 1954c9c..0b9b53c 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -1212,9 +1212,9 @@ static int ieee80211_change_bss(struct wiphy *wiphy,

if (params->ap_isolate >= 0) {
if (params->ap_isolate)
- sdata->flags |= IEEE80211_SDATA_DONT_BRIDGE_PACKETS;
+ sdata->flags |= MAC80211_SDATA_DONT_BRIDGE_PACKETS;
else
- sdata->flags &= ~IEEE80211_SDATA_DONT_BRIDGE_PACKETS;
+ sdata->flags &= ~MAC80211_SDATA_DONT_BRIDGE_PACKETS;
}

if (params->ht_opmode >= 0) {
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
index f28f68d..ccdc564 100644
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -316,10 +316,10 @@ static int ieee80211_do_open(struct net_device *dev, bool coming_up)
* which will check whether any increments here were done in
* error and sync them down to the hardware as filter flags.
*/
- if (sdata->flags & IEEE80211_SDATA_ALLMULTI)
+ if (sdata->flags & MAC80211_SDATA_ALLMULTI)
atomic_inc(&local->iff_allmultis);

- if (sdata->flags & IEEE80211_SDATA_PROMISC)
+ if (sdata->flags & MAC80211_SDATA_PROMISC)
atomic_inc(&local->iff_promiscs);

mutex_lock(&local->mtx);
@@ -421,10 +421,10 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata,
* on the master interface which will sync these down to the
* hardware as filter flags.
*/
- if (sdata->flags & IEEE80211_SDATA_ALLMULTI)
+ if (sdata->flags & MAC80211_SDATA_ALLMULTI)
atomic_dec(&local->iff_allmultis);

- if (sdata->flags & IEEE80211_SDATA_PROMISC)
+ if (sdata->flags & MAC80211_SDATA_PROMISC)
atomic_dec(&local->iff_promiscs);

if (sdata->vif.type == NL80211_IFTYPE_AP) {
@@ -584,15 +584,15 @@ static void ieee80211_set_multicast_list(struct net_device *dev)

allmulti = !!(dev->flags & IFF_ALLMULTI);
promisc = !!(dev->flags & IFF_PROMISC);
- sdata_allmulti = !!(sdata->flags & IEEE80211_SDATA_ALLMULTI);
- sdata_promisc = !!(sdata->flags & IEEE80211_SDATA_PROMISC);
+ sdata_allmulti = !!(sdata->flags & MAC80211_SDATA_ALLMULTI);
+ sdata_promisc = !!(sdata->flags & MAC80211_SDATA_PROMISC);

if (allmulti != sdata_allmulti) {
if (dev->flags & IFF_ALLMULTI)
atomic_inc(&local->iff_allmultis);
else
atomic_dec(&local->iff_allmultis);
- sdata->flags ^= IEEE80211_SDATA_ALLMULTI;
+ sdata->flags ^= MAC80211_SDATA_ALLMULTI;
}

if (promisc != sdata_promisc) {
@@ -600,7 +600,7 @@ static void ieee80211_set_multicast_list(struct net_device *dev)
atomic_inc(&local->iff_promiscs);
else
atomic_dec(&local->iff_promiscs);
- sdata->flags ^= IEEE80211_SDATA_PROMISC;
+ sdata->flags ^= MAC80211_SDATA_PROMISC;
}
spin_lock_bh(&local->filter_lock);
__hw_addr_sync(&local->mc_list, &dev->mc, dev->addr_len);
@@ -730,11 +730,11 @@ static void ieee80211_iface_work(struct work_struct *work)
while ((skb = skb_dequeue(&sdata->skb_queue))) {
struct ieee80211_mgmt *mgmt = (void *)skb->data;

- if (skb->pkt_type == IEEE80211_SDATA_QUEUE_AGG_START) {
+ if (skb->pkt_type == MAC80211_SDATA_QUEUE_AGG_START) {
ra_tid = (void *)&skb->cb;
ieee80211_start_tx_ba_cb(&sdata->vif, ra_tid->ra,
ra_tid->tid);
- } else if (skb->pkt_type == IEEE80211_SDATA_QUEUE_AGG_STOP) {
+ } else if (skb->pkt_type == MAC80211_SDATA_QUEUE_AGG_STOP) {
ra_tid = (void *)&skb->cb;
ieee80211_stop_tx_ba_cb(&sdata->vif, ra_tid->ra,
ra_tid->tid);
diff --git a/net/mac80211/mac80211_i.h b/net/mac80211/mac80211_i.h
index 43bfc2f..5ae43dc 100644
--- a/net/mac80211/mac80211_i.h
+++ b/net/mac80211/mac80211_i.h
@@ -507,20 +507,20 @@ struct mac80211_if_mesh {
#endif

/**
- * enum ieee80211_sub_if_data_flags - virtual interface flags
+ * enum mac80211_sub_if_data_flags - virtual interface flags
*
- * @IEEE80211_SDATA_ALLMULTI: interface wants all multicast packets
- * @IEEE80211_SDATA_PROMISC: interface is promisc
- * @IEEE80211_SDATA_OPERATING_GMODE: operating in G-only mode
- * @IEEE80211_SDATA_DONT_BRIDGE_PACKETS: bridge packets between
+ * @MAC80211_SDATA_ALLMULTI: interface wants all multicast packets
+ * @MAC80211_SDATA_PROMISC: interface is promisc
+ * @MAC80211_SDATA_OPERATING_GMODE: operating in G-only mode
+ * @MAC80211_SDATA_DONT_BRIDGE_PACKETS: bridge packets between
* associated stations and deliver multicast frames both
* back to wireless media and to the local net stack.
*/
-enum ieee80211_sub_if_data_flags {
- IEEE80211_SDATA_ALLMULTI = BIT(0),
- IEEE80211_SDATA_PROMISC = BIT(1),
- IEEE80211_SDATA_OPERATING_GMODE = BIT(2),
- IEEE80211_SDATA_DONT_BRIDGE_PACKETS = BIT(3),
+enum mac80211_sub_if_data_flags {
+ MAC80211_SDATA_ALLMULTI = BIT(0),
+ MAC80211_SDATA_PROMISC = BIT(1),
+ MAC80211_SDATA_OPERATING_GMODE = BIT(2),
+ MAC80211_SDATA_DONT_BRIDGE_PACKETS = BIT(3),
};

/**
@@ -622,9 +622,9 @@ struct ieee80211_sub_if_data *vif_to_sdata(struct ieee80211_vif *p)
}

enum sdata_queue_type {
- IEEE80211_SDATA_QUEUE_TYPE_FRAME = 0,
- IEEE80211_SDATA_QUEUE_AGG_START = 1,
- IEEE80211_SDATA_QUEUE_AGG_STOP = 2,
+ MAC80211_SDATA_QUEUE_TYPE_FRAME = 0,
+ MAC80211_SDATA_QUEUE_AGG_START = 1,
+ MAC80211_SDATA_QUEUE_AGG_STOP = 2,
};

enum {
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 55c97b5..527bd26 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -1527,9 +1527,9 @@ static bool ieee80211_assoc_success(struct mac80211_work *wk,
/* cf. IEEE 802.11 9.2.12 */
if (wk->chan->band == IEEE80211_BAND_2GHZ &&
have_higher_than_11mbit)
- sdata->flags |= IEEE80211_SDATA_OPERATING_GMODE;
+ sdata->flags |= MAC80211_SDATA_OPERATING_GMODE;
else
- sdata->flags &= ~IEEE80211_SDATA_OPERATING_GMODE;
+ sdata->flags &= ~MAC80211_SDATA_OPERATING_GMODE;

if (elems.ht_cap_elem && !(ifmgd->flags & MAC80211_STA_DISABLE_11N))
ieee80211_ht_cap_ie_to_sta_ht_cap(sband,
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index 3c55ec4..d4c83cb 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -781,7 +781,7 @@ static void ieee80211_rx_reorder_ampdu(struct mac80211_rx_data *rx)
/* if this mpdu is fragmented - terminate rx aggregation session */
sc = le16_to_cpu(hdr->seq_ctrl);
if (sc & IEEE80211_SCTL_FRAG) {
- skb->pkt_type = IEEE80211_SDATA_QUEUE_TYPE_FRAME;
+ skb->pkt_type = MAC80211_SDATA_QUEUE_TYPE_FRAME;
skb_queue_tail(&rx->sdata->skb_queue, skb);
ieee80211_queue_work(&local->hw, &rx->sdata->work);
return;
@@ -1674,7 +1674,7 @@ ieee80211_deliver_skb(struct mac80211_rx_data *rx)

if ((sdata->vif.type == NL80211_IFTYPE_AP ||
sdata->vif.type == NL80211_IFTYPE_AP_VLAN) &&
- !(sdata->flags & IEEE80211_SDATA_DONT_BRIDGE_PACKETS) &&
+ !(sdata->flags & MAC80211_SDATA_DONT_BRIDGE_PACKETS) &&
(status->rx_flags & MAC80211_RX_RA_MATCH) &&
(sdata->vif.type != NL80211_IFTYPE_AP_VLAN || !sdata->u.vlan.sta)) {
if (is_multicast_ether_addr(ehdr->h_dest)) {
@@ -2234,7 +2234,7 @@ ieee80211_rx_h_action(struct mac80211_rx_data *rx)
return RX_QUEUED;

queue:
- rx->skb->pkt_type = IEEE80211_SDATA_QUEUE_TYPE_FRAME;
+ rx->skb->pkt_type = MAC80211_SDATA_QUEUE_TYPE_FRAME;
skb_queue_tail(&sdata->skb_queue, rx->skb);
ieee80211_queue_work(&local->hw, &sdata->work);
if (rx->sta)
@@ -2364,7 +2364,7 @@ ieee80211_rx_h_mgmt(struct mac80211_rx_data *rx)
}

/* queue up frame and kick off work to process it */
- rx->skb->pkt_type = IEEE80211_SDATA_QUEUE_TYPE_FRAME;
+ rx->skb->pkt_type = MAC80211_SDATA_QUEUE_TYPE_FRAME;
skb_queue_tail(&sdata->skb_queue, rx->skb);
ieee80211_queue_work(&rx->local->hw, &sdata->work);
if (rx->sta)
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 2a8c1c0..fc86744 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -126,7 +126,7 @@ static __le16 ieee80211_duration(struct mac80211_tx_data *tx, int group_addr,
switch (sband->band) {
case IEEE80211_BAND_2GHZ: {
u32 flag;
- if (tx->sdata->flags & IEEE80211_SDATA_OPERATING_GMODE)
+ if (tx->sdata->flags & MAC80211_SDATA_OPERATING_GMODE)
flag = IEEE80211_RATE_MANDATORY_G;
else
flag = IEEE80211_RATE_MANDATORY_B;
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index 40b0fbe..3766f2e 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -174,7 +174,7 @@ __le16 ieee80211_generic_frame_duration(struct ieee80211_hw *hw,
if (vif) {
sdata = vif_to_sdata(vif);
short_preamble = sdata->vif.bss_conf.use_short_preamble;
- if (sdata->flags & IEEE80211_SDATA_OPERATING_GMODE)
+ if (sdata->flags & MAC80211_SDATA_OPERATING_GMODE)
erp = rate->flags & IEEE80211_RATE_ERP_G;
}

@@ -207,7 +207,7 @@ __le16 ieee80211_rts_duration(struct ieee80211_hw *hw,
if (vif) {
sdata = vif_to_sdata(vif);
short_preamble = sdata->vif.bss_conf.use_short_preamble;
- if (sdata->flags & IEEE80211_SDATA_OPERATING_GMODE)
+ if (sdata->flags & MAC80211_SDATA_OPERATING_GMODE)
erp = rate->flags & IEEE80211_RATE_ERP_G;
}

@@ -247,7 +247,7 @@ __le16 ieee80211_ctstoself_duration(struct ieee80211_hw *hw,
if (vif) {
sdata = vif_to_sdata(vif);
short_preamble = sdata->vif.bss_conf.use_short_preamble;
- if (sdata->flags & IEEE80211_SDATA_OPERATING_GMODE)
+ if (sdata->flags & MAC80211_SDATA_OPERATING_GMODE)
erp = rate->flags & IEEE80211_RATE_ERP_G;
}

@@ -753,7 +753,7 @@ void ieee80211_set_wmm_default(struct ieee80211_sub_if_data *sdata)
memset(&qparam, 0, sizeof(qparam));

use_11b = (local->hw.conf.channel->band == IEEE80211_BAND_2GHZ) &&
- !(sdata->flags & IEEE80211_SDATA_OPERATING_GMODE);
+ !(sdata->flags & MAC80211_SDATA_OPERATING_GMODE);

for (queue = 0; queue < local_to_hw(local)->queues; queue++) {
/* Set defaults according to 802.11-2007 Table 7-37 */
@@ -826,9 +826,9 @@ void ieee80211_sta_def_wmm_params(struct ieee80211_sub_if_data *sdata,

if (local->hw.conf.channel->band == IEEE80211_BAND_2GHZ &&
have_higher_than_11mbit)
- sdata->flags |= IEEE80211_SDATA_OPERATING_GMODE;
+ sdata->flags |= MAC80211_SDATA_OPERATING_GMODE;
else
- sdata->flags &= ~IEEE80211_SDATA_OPERATING_GMODE;
+ sdata->flags &= ~MAC80211_SDATA_OPERATING_GMODE;

ieee80211_set_wmm_default(sdata);
}


2011-05-29 20:04:54

by Kalle Valo

[permalink] [raw]
Subject: [RFC PATCH 06/27] mac80211: rename ieee80211_i.h to mac80211_i.h

Signed-off-by: Kalle Valo <[email protected]>
---
net/mac80211/agg-rx.c | 2
net/mac80211/agg-tx.c | 2
net/mac80211/cfg.c | 2
net/mac80211/chan.c | 2
net/mac80211/debugfs.c | 2
net/mac80211/debugfs_key.c | 2
net/mac80211/debugfs_netdev.c | 2
net/mac80211/debugfs_sta.c | 2
net/mac80211/driver-ops.h | 2
net/mac80211/driver-trace.h | 2
net/mac80211/event.c | 2
net/mac80211/ht.c | 2
net/mac80211/ibss.c | 2
net/mac80211/ieee80211_i.h | 1409 -----------------------------------------
net/mac80211/iface.c | 2
net/mac80211/key.c | 2
net/mac80211/led.h | 2
net/mac80211/mac80211_i.h | 1409 +++++++++++++++++++++++++++++++++++++++++
net/mac80211/main.c | 2
net/mac80211/mesh.c | 2
net/mac80211/mesh.h | 2
net/mac80211/mesh_pathtbl.c | 2
net/mac80211/mesh_plink.c | 2
net/mac80211/mlme.c | 2
net/mac80211/offchannel.c | 2
net/mac80211/pm.c | 2
net/mac80211/rate.c | 2
net/mac80211/rate.h | 2
net/mac80211/rx.c | 2
net/mac80211/scan.c | 2
net/mac80211/spectmgmt.c | 2
net/mac80211/sta_info.c | 2
net/mac80211/status.c | 2
net/mac80211/tx.c | 2
net/mac80211/util.c | 2
net/mac80211/wep.c | 2
net/mac80211/wep.h | 2
net/mac80211/wme.c | 2
net/mac80211/wme.h | 2
net/mac80211/work.c | 2
net/mac80211/wpa.c | 2
net/mac80211/wpa.h | 2
42 files changed, 1449 insertions(+), 1449 deletions(-)
delete mode 100644 net/mac80211/ieee80211_i.h
create mode 100644 net/mac80211/mac80211_i.h

diff --git a/net/mac80211/agg-rx.c b/net/mac80211/agg-rx.c
index 9c0d76c..9e92b73 100644
--- a/net/mac80211/agg-rx.c
+++ b/net/mac80211/agg-rx.c
@@ -39,7 +39,7 @@
#include <linux/ieee80211.h>
#include <linux/slab.h>
#include <net/mac80211.h>
-#include "ieee80211_i.h"
+#include "mac80211_i.h"
#include "driver-ops.h"

static void ieee80211_free_tid_rx(struct rcu_head *h)
diff --git a/net/mac80211/agg-tx.c b/net/mac80211/agg-tx.c
index cd5125f..5f5a7ec 100644
--- a/net/mac80211/agg-tx.c
+++ b/net/mac80211/agg-tx.c
@@ -16,7 +16,7 @@
#include <linux/ieee80211.h>
#include <linux/slab.h>
#include <net/mac80211.h>
-#include "ieee80211_i.h"
+#include "mac80211_i.h"
#include "driver-ops.h"
#include "wme.h"

diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index be70c70..d7ac1f3 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -13,7 +13,7 @@
#include <net/net_namespace.h>
#include <linux/rcupdate.h>
#include <net/cfg80211.h>
-#include "ieee80211_i.h"
+#include "mac80211_i.h"
#include "driver-ops.h"
#include "cfg.h"
#include "rate.h"
diff --git a/net/mac80211/chan.c b/net/mac80211/chan.c
index 889c3e9..a412c4a 100644
--- a/net/mac80211/chan.c
+++ b/net/mac80211/chan.c
@@ -3,7 +3,7 @@
*/

#include <linux/nl80211.h>
-#include "ieee80211_i.h"
+#include "mac80211_i.h"

static enum ieee80211_chan_mode
__ieee80211_get_channel_mode(struct ieee80211_local *local,
diff --git a/net/mac80211/debugfs.c b/net/mac80211/debugfs.c
index 186e02f..e8bd10a 100644
--- a/net/mac80211/debugfs.c
+++ b/net/mac80211/debugfs.c
@@ -10,7 +10,7 @@

#include <linux/debugfs.h>
#include <linux/rtnetlink.h>
-#include "ieee80211_i.h"
+#include "mac80211_i.h"
#include "driver-ops.h"
#include "rate.h"
#include "debugfs.h"
diff --git a/net/mac80211/debugfs_key.c b/net/mac80211/debugfs_key.c
index 33c58b8..958791f 100644
--- a/net/mac80211/debugfs_key.c
+++ b/net/mac80211/debugfs_key.c
@@ -10,7 +10,7 @@

#include <linux/kobject.h>
#include <linux/slab.h>
-#include "ieee80211_i.h"
+#include "mac80211_i.h"
#include "key.h"
#include "debugfs.h"
#include "debugfs_key.h"
diff --git a/net/mac80211/debugfs_netdev.c b/net/mac80211/debugfs_netdev.c
index 9ea7c0d..950c1d5 100644
--- a/net/mac80211/debugfs_netdev.c
+++ b/net/mac80211/debugfs_netdev.c
@@ -17,7 +17,7 @@
#include <linux/notifier.h>
#include <net/mac80211.h>
#include <net/cfg80211.h>
-#include "ieee80211_i.h"
+#include "mac80211_i.h"
#include "rate.h"
#include "debugfs.h"
#include "debugfs_netdev.h"
diff --git a/net/mac80211/debugfs_sta.c b/net/mac80211/debugfs_sta.c
index a01d213..dc12396 100644
--- a/net/mac80211/debugfs_sta.c
+++ b/net/mac80211/debugfs_sta.c
@@ -10,7 +10,7 @@

#include <linux/debugfs.h>
#include <linux/ieee80211.h>
-#include "ieee80211_i.h"
+#include "mac80211_i.h"
#include "debugfs.h"
#include "debugfs_sta.h"
#include "sta_info.h"
diff --git a/net/mac80211/driver-ops.h b/net/mac80211/driver-ops.h
index eebf7a6..06236f6 100644
--- a/net/mac80211/driver-ops.h
+++ b/net/mac80211/driver-ops.h
@@ -2,7 +2,7 @@
#define __MAC80211_DRIVER_OPS

#include <net/mac80211.h>
-#include "ieee80211_i.h"
+#include "mac80211_i.h"
#include "driver-trace.h"

static inline void drv_tx(struct ieee80211_local *local, struct sk_buff *skb)
diff --git a/net/mac80211/driver-trace.h b/net/mac80211/driver-trace.h
index ed9edcb..399ae8c 100644
--- a/net/mac80211/driver-trace.h
+++ b/net/mac80211/driver-trace.h
@@ -3,7 +3,7 @@

#include <linux/tracepoint.h>
#include <net/mac80211.h>
-#include "ieee80211_i.h"
+#include "mac80211_i.h"

#if !defined(CONFIG_MAC80211_DRIVER_API_TRACER) || defined(__CHECKER__)
#undef TRACE_EVENT
diff --git a/net/mac80211/event.c b/net/mac80211/event.c
index 01ae759..d888b5a 100644
--- a/net/mac80211/event.c
+++ b/net/mac80211/event.c
@@ -8,7 +8,7 @@
* mac80211 - events
*/
#include <net/cfg80211.h>
-#include "ieee80211_i.h"
+#include "mac80211_i.h"

/*
* Indicate a failed Michael MIC to userspace. If the caller knows the TSC of
diff --git a/net/mac80211/ht.c b/net/mac80211/ht.c
index 591add2..b931771 100644
--- a/net/mac80211/ht.c
+++ b/net/mac80211/ht.c
@@ -15,7 +15,7 @@

#include <linux/ieee80211.h>
#include <net/mac80211.h>
-#include "ieee80211_i.h"
+#include "mac80211_i.h"
#include "rate.h"

void ieee80211_ht_cap_ie_to_sta_ht_cap(struct ieee80211_supported_band *sband,
diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c
index 421eaa6..917041a 100644
--- a/net/mac80211/ibss.c
+++ b/net/mac80211/ibss.c
@@ -22,7 +22,7 @@
#include <net/mac80211.h>
#include <asm/unaligned.h>

-#include "ieee80211_i.h"
+#include "mac80211_i.h"
#include "driver-ops.h"
#include "rate.h"

diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
deleted file mode 100644
index 2025af5..0000000
--- a/net/mac80211/ieee80211_i.h
+++ /dev/null
@@ -1,1409 +0,0 @@
-/*
- * Copyright 2002-2005, Instant802 Networks, Inc.
- * Copyright 2005, Devicescape Software, Inc.
- * Copyright 2006-2007 Jiri Benc <[email protected]>
- * Copyright 2007-2010 Johannes Berg <[email protected]>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-
-#ifndef IEEE80211_I_H
-#define IEEE80211_I_H
-
-#include <linux/kernel.h>
-#include <linux/device.h>
-#include <linux/if_ether.h>
-#include <linux/interrupt.h>
-#include <linux/list.h>
-#include <linux/netdevice.h>
-#include <linux/skbuff.h>
-#include <linux/workqueue.h>
-#include <linux/types.h>
-#include <linux/spinlock.h>
-#include <linux/etherdevice.h>
-#include <linux/leds.h>
-#include <net/ieee80211_radiotap.h>
-#include <net/cfg80211.h>
-#include <net/mac80211.h>
-#include "key.h"
-#include "sta_info.h"
-
-struct ieee80211_local;
-
-/* Maximum number of broadcast/multicast frames to buffer when some of the
- * associated stations are using power saving. */
-#define AP_MAX_BC_BUFFER 128
-
-/* Maximum number of frames buffered to all STAs, including multicast frames.
- * Note: increasing this limit increases the potential memory requirement. Each
- * frame can be up to about 2 kB long. */
-#define TOTAL_MAX_TX_BUFFER 512
-
-/* Required encryption head and tailroom */
-#define IEEE80211_ENCRYPT_HEADROOM 8
-#define IEEE80211_ENCRYPT_TAILROOM 18
-
-/* IEEE 802.11 (Ch. 9.5 Defragmentation) requires support for concurrent
- * reception of at least three fragmented frames. This limit can be increased
- * by changing this define, at the cost of slower frame reassembly and
- * increased memory use (about 2 kB of RAM per entry). */
-#define IEEE80211_FRAGMENT_MAX 4
-
-#define TU_TO_EXP_TIME(x) (jiffies + usecs_to_jiffies((x) * 1024))
-
-#define IEEE80211_DEFAULT_UAPSD_QUEUES \
- (IEEE80211_WMM_IE_STA_QOSINFO_AC_BK | \
- IEEE80211_WMM_IE_STA_QOSINFO_AC_BE | \
- IEEE80211_WMM_IE_STA_QOSINFO_AC_VI | \
- IEEE80211_WMM_IE_STA_QOSINFO_AC_VO)
-
-#define IEEE80211_DEFAULT_MAX_SP_LEN \
- IEEE80211_WMM_IE_STA_QOSINFO_SP_ALL
-
-struct ieee80211_fragment_entry {
- unsigned long first_frag_time;
- unsigned int seq;
- unsigned int rx_queue;
- unsigned int last_frag;
- unsigned int extra_len;
- struct sk_buff_head skb_list;
- int ccmp; /* Whether fragments were encrypted with CCMP */
- u8 last_pn[6]; /* PN of the last fragment if CCMP was used */
-};
-
-
-struct ieee80211_bss {
- /* don't want to look up all the time */
- size_t ssid_len;
- u8 ssid[IEEE80211_MAX_SSID_LEN];
-
- u8 dtim_period;
-
- bool wmm_used;
- bool uapsd_supported;
-
- unsigned long last_probe_resp;
-
-#ifdef CONFIG_MAC80211_MESH
- u8 *mesh_id;
- size_t mesh_id_len;
- u8 *mesh_cfg;
-#endif
-
-#define IEEE80211_MAX_SUPP_RATES 32
- u8 supp_rates[IEEE80211_MAX_SUPP_RATES];
- size_t supp_rates_len;
-
- /*
- * During association, we save an ERP value from a probe response so
- * that we can feed ERP info to the driver when handling the
- * association completes. these fields probably won't be up-to-date
- * otherwise, you probably don't want to use them.
- */
- bool has_erp_value;
- u8 erp_value;
-};
-
-static inline u8 *bss_mesh_cfg(struct ieee80211_bss *bss)
-{
-#ifdef CONFIG_MAC80211_MESH
- return bss->mesh_cfg;
-#endif
- return NULL;
-}
-
-static inline u8 *bss_mesh_id(struct ieee80211_bss *bss)
-{
-#ifdef CONFIG_MAC80211_MESH
- return bss->mesh_id;
-#endif
- return NULL;
-}
-
-static inline u8 bss_mesh_id_len(struct ieee80211_bss *bss)
-{
-#ifdef CONFIG_MAC80211_MESH
- return bss->mesh_id_len;
-#endif
- return 0;
-}
-
-
-typedef unsigned __bitwise__ ieee80211_tx_result;
-#define TX_CONTINUE ((__force ieee80211_tx_result) 0u)
-#define TX_DROP ((__force ieee80211_tx_result) 1u)
-#define TX_QUEUED ((__force ieee80211_tx_result) 2u)
-
-#define IEEE80211_TX_FRAGMENTED BIT(0)
-#define IEEE80211_TX_UNICAST BIT(1)
-#define IEEE80211_TX_PS_BUFFERED BIT(2)
-
-struct ieee80211_tx_data {
- struct sk_buff *skb;
- struct ieee80211_local *local;
- struct ieee80211_sub_if_data *sdata;
- struct sta_info *sta;
- struct ieee80211_key *key;
-
- struct ieee80211_channel *channel;
-
- u16 ethertype;
- unsigned int flags;
-};
-
-
-typedef unsigned __bitwise__ ieee80211_rx_result;
-#define RX_CONTINUE ((__force ieee80211_rx_result) 0u)
-#define RX_DROP_UNUSABLE ((__force ieee80211_rx_result) 1u)
-#define RX_DROP_MONITOR ((__force ieee80211_rx_result) 2u)
-#define RX_QUEUED ((__force ieee80211_rx_result) 3u)
-
-/**
- * enum ieee80211_packet_rx_flags - packet RX flags
- * @IEEE80211_RX_RA_MATCH: frame is destined to interface currently processed
- * (incl. multicast frames)
- * @IEEE80211_RX_IN_SCAN: received while scanning
- * @IEEE80211_RX_FRAGMENTED: fragmented frame
- * @IEEE80211_RX_AMSDU: a-MSDU packet
- * @IEEE80211_RX_MALFORMED_ACTION_FRM: action frame is malformed
- * @IEEE80211_RX_DEFERRED_RELEASE: frame was subjected to receive reordering
- *
- * These are per-frame flags that are attached to a frame in the
- * @rx_flags field of &struct ieee80211_rx_status.
- */
-enum ieee80211_packet_rx_flags {
- IEEE80211_RX_IN_SCAN = BIT(0),
- IEEE80211_RX_RA_MATCH = BIT(1),
- IEEE80211_RX_FRAGMENTED = BIT(2),
- IEEE80211_RX_AMSDU = BIT(3),
- IEEE80211_RX_MALFORMED_ACTION_FRM = BIT(4),
- IEEE80211_RX_DEFERRED_RELEASE = BIT(5),
-};
-
-/**
- * enum ieee80211_rx_flags - RX data flags
- *
- * @IEEE80211_RX_CMNTR: received on cooked monitor already
- *
- * These flags are used across handling multiple interfaces
- * for a single frame.
- */
-enum ieee80211_rx_flags {
- IEEE80211_RX_CMNTR = BIT(0),
-};
-
-struct ieee80211_rx_data {
- struct sk_buff *skb;
- struct ieee80211_local *local;
- struct ieee80211_sub_if_data *sdata;
- struct sta_info *sta;
- struct ieee80211_key *key;
-
- unsigned int flags;
- int queue;
- u32 tkip_iv32;
- u16 tkip_iv16;
-};
-
-struct beacon_data {
- u8 *head, *tail;
- int head_len, tail_len;
- int dtim_period;
-};
-
-struct ieee80211_if_ap {
- struct beacon_data __rcu *beacon;
-
- struct list_head vlans;
-
- /* yes, this looks ugly, but guarantees that we can later use
- * bitmap_empty :)
- * NB: don't touch this bitmap, use sta_info_{set,clear}_tim_bit */
- u8 tim[sizeof(unsigned long) * BITS_TO_LONGS(IEEE80211_MAX_AID + 1)];
- struct sk_buff_head ps_bc_buf;
- atomic_t num_sta_ps; /* number of stations in PS mode */
- int dtim_count;
- bool dtim_bc_mc;
-};
-
-struct ieee80211_if_wds {
- struct sta_info *sta;
- u8 remote_addr[ETH_ALEN];
-};
-
-struct ieee80211_if_vlan {
- struct list_head list;
-
- /* used for all tx if the VLAN is configured to 4-addr mode */
- struct sta_info __rcu *sta;
-};
-
-struct mesh_stats {
- __u32 fwded_mcast; /* Mesh forwarded multicast frames */
- __u32 fwded_unicast; /* Mesh forwarded unicast frames */
- __u32 fwded_frames; /* Mesh total forwarded frames */
- __u32 dropped_frames_ttl; /* Not transmitted since mesh_ttl == 0*/
- __u32 dropped_frames_no_route; /* Not transmitted, no route found */
- atomic_t estab_plinks;
-};
-
-#define PREQ_Q_F_START 0x1
-#define PREQ_Q_F_REFRESH 0x2
-struct mesh_preq_queue {
- struct list_head list;
- u8 dst[ETH_ALEN];
- u8 flags;
-};
-
-enum ieee80211_work_type {
- IEEE80211_WORK_ABORT,
- IEEE80211_WORK_DIRECT_PROBE,
- IEEE80211_WORK_AUTH,
- IEEE80211_WORK_ASSOC_BEACON_WAIT,
- IEEE80211_WORK_ASSOC,
- IEEE80211_WORK_REMAIN_ON_CHANNEL,
- IEEE80211_WORK_OFFCHANNEL_TX,
-};
-
-/**
- * enum work_done_result - indicates what to do after work was done
- *
- * @WORK_DONE_DESTROY: This work item is no longer needed, destroy.
- * @WORK_DONE_REQUEUE: This work item was reset to be reused, and
- * should be requeued.
- */
-enum work_done_result {
- WORK_DONE_DESTROY,
- WORK_DONE_REQUEUE,
-};
-
-struct ieee80211_work {
- struct list_head list;
-
- struct rcu_head rcu_head;
-
- struct ieee80211_sub_if_data *sdata;
-
- enum work_done_result (*done)(struct ieee80211_work *wk,
- struct sk_buff *skb);
-
- struct ieee80211_channel *chan;
- enum nl80211_channel_type chan_type;
-
- unsigned long timeout;
- enum ieee80211_work_type type;
-
- u8 filter_ta[ETH_ALEN];
-
- bool started;
-
- union {
- struct {
- int tries;
- u16 algorithm, transaction;
- u8 ssid[IEEE80211_MAX_SSID_LEN];
- u8 ssid_len;
- u8 key[WLAN_KEY_LEN_WEP104];
- u8 key_len, key_idx;
- bool privacy;
- } probe_auth;
- struct {
- struct cfg80211_bss *bss;
- const u8 *supp_rates;
- const u8 *ht_information_ie;
- enum ieee80211_smps_mode smps;
- int tries;
- u16 capability;
- u8 prev_bssid[ETH_ALEN];
- u8 ssid[IEEE80211_MAX_SSID_LEN];
- u8 ssid_len;
- u8 supp_rates_len;
- bool wmm_used, use_11n, uapsd_used;
- } assoc;
- struct {
- u32 duration;
- } remain;
- struct {
- struct sk_buff *frame;
- u32 wait;
- } offchan_tx;
- };
-
- int ie_len;
- /* must be last */
- u8 ie[0];
-};
-
-/* flags used in struct ieee80211_if_managed.flags */
-enum ieee80211_sta_flags {
- IEEE80211_STA_BEACON_POLL = BIT(0),
- IEEE80211_STA_CONNECTION_POLL = BIT(1),
- IEEE80211_STA_CONTROL_PORT = BIT(2),
- IEEE80211_STA_DISABLE_11N = BIT(4),
- IEEE80211_STA_CSA_RECEIVED = BIT(5),
- IEEE80211_STA_MFP_ENABLED = BIT(6),
- IEEE80211_STA_UAPSD_ENABLED = BIT(7),
- IEEE80211_STA_NULLFUNC_ACKED = BIT(8),
- IEEE80211_STA_RESET_SIGNAL_AVE = BIT(9),
-};
-
-struct ieee80211_if_managed {
- struct timer_list timer;
- struct timer_list conn_mon_timer;
- struct timer_list bcn_mon_timer;
- struct timer_list chswitch_timer;
- struct work_struct monitor_work;
- struct work_struct chswitch_work;
- struct work_struct beacon_connection_loss_work;
-
- unsigned long beacon_timeout;
- unsigned long probe_timeout;
- int probe_send_count;
- bool nullfunc_failed;
-
- struct mutex mtx;
- struct cfg80211_bss *associated;
-
- u8 bssid[ETH_ALEN];
-
- u16 aid;
-
- unsigned long timers_running; /* used for quiesce/restart */
- bool powersave; /* powersave requested for this iface */
- enum ieee80211_smps_mode req_smps, /* requested smps mode */
- ap_smps, /* smps mode AP thinks we're in */
- driver_smps_mode; /* smps mode request */
-
- struct work_struct request_smps_work;
-
- unsigned int flags;
-
- bool beacon_crc_valid;
- u32 beacon_crc;
-
- enum {
- IEEE80211_MFP_DISABLED,
- IEEE80211_MFP_OPTIONAL,
- IEEE80211_MFP_REQUIRED
- } mfp; /* management frame protection */
-
- int wmm_last_param_set;
-
- u8 use_4addr;
-
- /* Signal strength from the last Beacon frame in the current BSS. */
- int last_beacon_signal;
-
- /*
- * Weighted average of the signal strength from Beacon frames in the
- * current BSS. This is in units of 1/16 of the signal unit to maintain
- * accuracy and to speed up calculations, i.e., the value need to be
- * divided by 16 to get the actual value.
- */
- int ave_beacon_signal;
-
- /*
- * Number of Beacon frames used in ave_beacon_signal. This can be used
- * to avoid generating less reliable cqm events that would be based
- * only on couple of received frames.
- */
- unsigned int count_beacon_signal;
-
- /*
- * Last Beacon frame signal strength average (ave_beacon_signal / 16)
- * that triggered a cqm event. 0 indicates that no event has been
- * generated for the current association.
- */
- int last_cqm_event_signal;
-};
-
-struct ieee80211_if_ibss {
- struct timer_list timer;
-
- struct mutex mtx;
-
- unsigned long last_scan_completed;
-
- u32 basic_rates;
-
- bool timer_running;
-
- bool fixed_bssid;
- bool fixed_channel;
- bool privacy;
-
- u8 bssid[ETH_ALEN];
- u8 ssid[IEEE80211_MAX_SSID_LEN];
- u8 ssid_len, ie_len;
- u8 *ie;
- struct ieee80211_channel *channel;
-
- unsigned long ibss_join_req;
- /* probe response/beacon for IBSS */
- struct sk_buff __rcu *presp;
- struct sk_buff *skb;
-
- enum {
- IEEE80211_IBSS_MLME_SEARCH,
- IEEE80211_IBSS_MLME_JOINED,
- } state;
-};
-
-struct ieee80211_if_mesh {
- struct timer_list housekeeping_timer;
- struct timer_list mesh_path_timer;
- struct timer_list mesh_path_root_timer;
-
- unsigned long timers_running;
-
- unsigned long wrkq_flags;
-
- u8 mesh_id[IEEE80211_MAX_MESH_ID_LEN];
- size_t mesh_id_len;
- /* Active Path Selection Protocol Identifier */
- u8 mesh_pp_id;
- /* Active Path Selection Metric Identifier */
- u8 mesh_pm_id;
- /* Congestion Control Mode Identifier */
- u8 mesh_cc_id;
- /* Synchronization Protocol Identifier */
- u8 mesh_sp_id;
- /* Authentication Protocol Identifier */
- u8 mesh_auth_id;
- /* Local mesh Sequence Number */
- u32 sn;
- /* Last used PREQ ID */
- u32 preq_id;
- atomic_t mpaths;
- /* Timestamp of last SN update */
- unsigned long last_sn_update;
- /* Timestamp of last SN sent */
- unsigned long last_preq;
- struct mesh_rmc *rmc;
- spinlock_t mesh_preq_queue_lock;
- struct mesh_preq_queue preq_queue;
- int preq_queue_len;
- struct mesh_stats mshstats;
- struct mesh_config mshcfg;
- u32 mesh_seqnum;
- bool accepting_plinks;
- const u8 *ie;
- u8 ie_len;
- enum {
- IEEE80211_MESH_SEC_NONE = 0x0,
- IEEE80211_MESH_SEC_AUTHED = 0x1,
- IEEE80211_MESH_SEC_SECURED = 0x2,
- } security;
-};
-
-#ifdef CONFIG_MAC80211_MESH
-#define IEEE80211_IFSTA_MESH_CTR_INC(msh, name) \
- do { (msh)->mshstats.name++; } while (0)
-#else
-#define IEEE80211_IFSTA_MESH_CTR_INC(msh, name) \
- do { } while (0)
-#endif
-
-/**
- * enum ieee80211_sub_if_data_flags - virtual interface flags
- *
- * @IEEE80211_SDATA_ALLMULTI: interface wants all multicast packets
- * @IEEE80211_SDATA_PROMISC: interface is promisc
- * @IEEE80211_SDATA_OPERATING_GMODE: operating in G-only mode
- * @IEEE80211_SDATA_DONT_BRIDGE_PACKETS: bridge packets between
- * associated stations and deliver multicast frames both
- * back to wireless media and to the local net stack.
- */
-enum ieee80211_sub_if_data_flags {
- IEEE80211_SDATA_ALLMULTI = BIT(0),
- IEEE80211_SDATA_PROMISC = BIT(1),
- IEEE80211_SDATA_OPERATING_GMODE = BIT(2),
- IEEE80211_SDATA_DONT_BRIDGE_PACKETS = BIT(3),
-};
-
-/**
- * enum ieee80211_sdata_state_bits - virtual interface state bits
- * @SDATA_STATE_RUNNING: virtual interface is up & running; this
- * mirrors netif_running() but is separate for interface type
- * change handling while the interface is up
- * @SDATA_STATE_OFFCHANNEL: This interface is currently in offchannel
- * mode, so queues are stopped
- */
-enum ieee80211_sdata_state_bits {
- SDATA_STATE_RUNNING,
- SDATA_STATE_OFFCHANNEL,
-};
-
-struct ieee80211_sub_if_data {
- struct list_head list;
-
- struct wireless_dev wdev;
-
- /* keys */
- struct list_head key_list;
-
- struct net_device *dev;
- struct ieee80211_local *local;
-
- unsigned int flags;
-
- unsigned long state;
-
- int drop_unencrypted;
-
- char name[IFNAMSIZ];
-
- /*
- * keep track of whether the HT opmode (stored in
- * vif.bss_info.ht_operation_mode) is valid.
- */
- bool ht_opmode_valid;
-
- /* to detect idle changes */
- bool old_idle;
-
- /* Fragment table for host-based reassembly */
- struct ieee80211_fragment_entry fragments[IEEE80211_FRAGMENT_MAX];
- unsigned int fragment_next;
-
- struct ieee80211_key __rcu *keys[NUM_DEFAULT_KEYS + NUM_DEFAULT_MGMT_KEYS];
- struct ieee80211_key __rcu *default_unicast_key;
- struct ieee80211_key __rcu *default_multicast_key;
- struct ieee80211_key __rcu *default_mgmt_key;
-
- u16 sequence_number;
- __be16 control_port_protocol;
- bool control_port_no_encrypt;
-
- struct work_struct work;
- struct sk_buff_head skb_queue;
-
- bool arp_filter_state;
-
- /*
- * AP this belongs to: self in AP mode and
- * corresponding AP in VLAN mode, NULL for
- * all others (might be needed later in IBSS)
- */
- struct ieee80211_if_ap *bss;
-
- /* bitmap of allowed (non-MCS) rate indexes for rate control */
- u32 rc_rateidx_mask[IEEE80211_NUM_BANDS];
-
- union {
- struct ieee80211_if_ap ap;
- struct ieee80211_if_wds wds;
- struct ieee80211_if_vlan vlan;
- struct ieee80211_if_managed mgd;
- struct ieee80211_if_ibss ibss;
- struct ieee80211_if_mesh mesh;
- u32 mntr_flags;
- } u;
-
-#ifdef CONFIG_MAC80211_DEBUGFS
- struct {
- struct dentry *dir;
- struct dentry *subdir_stations;
- struct dentry *default_unicast_key;
- struct dentry *default_multicast_key;
- struct dentry *default_mgmt_key;
- } debugfs;
-#endif
- /* must be last, dynamically sized area in this! */
- struct ieee80211_vif vif;
-};
-
-static inline
-struct ieee80211_sub_if_data *vif_to_sdata(struct ieee80211_vif *p)
-{
- return container_of(p, struct ieee80211_sub_if_data, vif);
-}
-
-enum sdata_queue_type {
- IEEE80211_SDATA_QUEUE_TYPE_FRAME = 0,
- IEEE80211_SDATA_QUEUE_AGG_START = 1,
- IEEE80211_SDATA_QUEUE_AGG_STOP = 2,
-};
-
-enum {
- IEEE80211_RX_MSG = 1,
- IEEE80211_TX_STATUS_MSG = 2,
-};
-
-enum queue_stop_reason {
- IEEE80211_QUEUE_STOP_REASON_DRIVER,
- IEEE80211_QUEUE_STOP_REASON_PS,
- IEEE80211_QUEUE_STOP_REASON_CSA,
- IEEE80211_QUEUE_STOP_REASON_AGGREGATION,
- IEEE80211_QUEUE_STOP_REASON_SUSPEND,
- IEEE80211_QUEUE_STOP_REASON_SKB_ADD,
-};
-
-#ifdef CONFIG_MAC80211_LEDS
-struct tpt_led_trigger {
- struct led_trigger trig;
- char name[32];
- const struct ieee80211_tpt_blink *blink_table;
- unsigned int blink_table_len;
- struct timer_list timer;
- unsigned long prev_traffic;
- unsigned long tx_bytes, rx_bytes;
- unsigned int active, want;
- bool running;
-};
-#endif
-
-/**
- * mac80211 scan flags - currently active scan mode
- *
- * @SCAN_SW_SCANNING: We're currently in the process of scanning but may as
- * well be on the operating channel
- * @SCAN_HW_SCANNING: The hardware is scanning for us, we have no way to
- * determine if we are on the operating channel or not
- * @SCAN_COMPLETED: Set for our scan work function when the driver reported
- * that the scan completed.
- * @SCAN_ABORTED: Set for our scan work function when the driver reported
- * a scan complete for an aborted scan.
- */
-enum {
- SCAN_SW_SCANNING,
- SCAN_HW_SCANNING,
- SCAN_COMPLETED,
- SCAN_ABORTED,
-};
-
-/**
- * enum mac80211_scan_state - scan state machine states
- *
- * @SCAN_DECISION: Main entry point to the scan state machine, this state
- * determines if we should keep on scanning or switch back to the
- * operating channel
- * @SCAN_SET_CHANNEL: Set the next channel to be scanned
- * @SCAN_SEND_PROBE: Send probe requests and wait for probe responses
- * @SCAN_LEAVE_OPER_CHANNEL: Leave the operating channel, notify the AP
- * about us leaving the channel and stop all associated STA interfaces
- * @SCAN_ENTER_OPER_CHANNEL: Enter the operating channel again, notify the
- * AP about us being back and restart all associated STA interfaces
- */
-enum mac80211_scan_state {
- SCAN_DECISION,
- SCAN_SET_CHANNEL,
- SCAN_SEND_PROBE,
- SCAN_LEAVE_OPER_CHANNEL,
- SCAN_ENTER_OPER_CHANNEL,
-};
-
-struct ieee80211_local {
- /* embed the driver visible part.
- * don't cast (use the static inlines below), but we keep
- * it first anyway so they become a no-op */
- struct ieee80211_hw hw;
-
- const struct ieee80211_ops *ops;
-
- /*
- * work stuff, potentially off-channel (in the future)
- */
- struct list_head work_list;
- struct timer_list work_timer;
- struct work_struct work_work;
- struct sk_buff_head work_skb_queue;
-
- /*
- * private workqueue to mac80211. mac80211 makes this accessible
- * via ieee80211_queue_work()
- */
- struct workqueue_struct *workqueue;
-
- unsigned long queue_stop_reasons[IEEE80211_MAX_QUEUES];
- /* also used to protect ampdu_ac_queue and amdpu_ac_stop_refcnt */
- spinlock_t queue_stop_reason_lock;
-
- int open_count;
- int monitors, cooked_mntrs;
- /* number of interfaces with corresponding FIF_ flags */
- int fif_fcsfail, fif_plcpfail, fif_control, fif_other_bss, fif_pspoll,
- fif_probe_req;
- int probe_req_reg;
- unsigned int filter_flags; /* FIF_* */
-
- bool wiphy_ciphers_allocated;
-
- /* protects the aggregated multicast list and filter calls */
- spinlock_t filter_lock;
-
- /* used for uploading changed mc list */
- struct work_struct reconfig_filter;
-
- /* used to reconfigure hardware SM PS */
- struct work_struct recalc_smps;
-
- /* aggregated multicast list */
- struct netdev_hw_addr_list mc_list;
-
- bool tim_in_locked_section; /* see ieee80211_beacon_get() */
-
- /*
- * suspended is true if we finished all the suspend _and_ we have
- * not yet come up from resume. This is to be used by mac80211
- * to ensure driver sanity during suspend and mac80211's own
- * sanity. It can eventually be used for WoW as well.
- */
- bool suspended;
-
- /*
- * Resuming is true while suspended, but when we're reprogramming the
- * hardware -- at that time it's allowed to use ieee80211_queue_work()
- * again even though some other parts of the stack are still suspended
- * and we still drop received frames to avoid waking the stack.
- */
- bool resuming;
-
- /*
- * quiescing is true during the suspend process _only_ to
- * ease timer cancelling etc.
- */
- bool quiescing;
-
- /* device is started */
- bool started;
-
- /* wowlan is enabled -- don't reconfig on resume */
- bool wowlan;
-
- int tx_headroom; /* required headroom for hardware/radiotap */
-
- /* count for keys needing tailroom space allocation */
- int crypto_tx_tailroom_needed_cnt;
-
- /* Tasklet and skb queue to process calls from IRQ mode. All frames
- * added to skb_queue will be processed, but frames in
- * skb_queue_unreliable may be dropped if the total length of these
- * queues increases over the limit. */
-#define IEEE80211_IRQSAFE_QUEUE_LIMIT 128
- struct tasklet_struct tasklet;
- struct sk_buff_head skb_queue;
- struct sk_buff_head skb_queue_unreliable;
-
- /*
- * Internal FIFO queue which is shared between multiple rx path
- * stages. Its main task is to provide a serialization mechanism,
- * so all rx handlers can enjoy having exclusive access to their
- * private data structures.
- */
- struct sk_buff_head rx_skb_queue;
- bool running_rx_handler; /* protected by rx_skb_queue.lock */
-
- /* Station data */
- /*
- * The mutex only protects the list and counter,
- * reads are done in RCU.
- * Additionally, the lock protects the hash table,
- * the pending list and each BSS's TIM bitmap.
- */
- struct mutex sta_mtx;
- spinlock_t sta_lock;
- unsigned long num_sta;
- struct list_head sta_list, sta_pending_list;
- struct sta_info __rcu *sta_hash[STA_HASH_SIZE];
- struct timer_list sta_cleanup;
- struct work_struct sta_finish_work;
- int sta_generation;
-
- struct sk_buff_head pending[IEEE80211_MAX_QUEUES];
- struct tasklet_struct tx_pending_tasklet;
-
- atomic_t agg_queue_stop[IEEE80211_MAX_QUEUES];
-
- /* number of interfaces with corresponding IFF_ flags */
- atomic_t iff_allmultis, iff_promiscs;
-
- struct rate_control_ref *rate_ctrl;
-
- struct crypto_cipher *wep_tx_tfm;
- struct crypto_cipher *wep_rx_tfm;
- u32 wep_iv;
-
- /* see iface.c */
- struct list_head interfaces;
- struct mutex iflist_mtx;
-
- /*
- * Key mutex, protects sdata's key_list and sta_info's
- * key pointers (write access, they're RCU.)
- */
- struct mutex key_mtx;
-
- /* mutex for scan and work locking */
- struct mutex mtx;
-
- /* Scanning and BSS list */
- unsigned long scanning;
- struct cfg80211_ssid scan_ssid;
- struct cfg80211_scan_request *int_scan_req;
- struct cfg80211_scan_request *scan_req, *hw_scan_req;
- struct ieee80211_channel *scan_channel;
- enum ieee80211_band hw_scan_band;
- int scan_channel_idx;
- int scan_ies_len;
-
- bool sched_scanning;
- struct ieee80211_sched_scan_ies sched_scan_ies;
- struct work_struct sched_scan_stopped_work;
-
- unsigned long leave_oper_channel_time;
- enum mac80211_scan_state next_scan_state;
- struct delayed_work scan_work;
- struct ieee80211_sub_if_data *scan_sdata;
- enum nl80211_channel_type _oper_channel_type;
- struct ieee80211_channel *oper_channel, *csa_channel;
-
- /* Temporary remain-on-channel for off-channel operations */
- struct ieee80211_channel *tmp_channel;
- enum nl80211_channel_type tmp_channel_type;
-
- /* SNMP counters */
- /* dot11CountersTable */
- u32 dot11TransmittedFragmentCount;
- u32 dot11MulticastTransmittedFrameCount;
- u32 dot11FailedCount;
- u32 dot11RetryCount;
- u32 dot11MultipleRetryCount;
- u32 dot11FrameDuplicateCount;
- u32 dot11ReceivedFragmentCount;
- u32 dot11MulticastReceivedFrameCount;
- u32 dot11TransmittedFrameCount;
-
-#ifdef CONFIG_MAC80211_LEDS
- int tx_led_counter, rx_led_counter;
- struct led_trigger *tx_led, *rx_led, *assoc_led, *radio_led;
- struct tpt_led_trigger *tpt_led_trigger;
- char tx_led_name[32], rx_led_name[32],
- assoc_led_name[32], radio_led_name[32];
-#endif
-
-#ifdef CONFIG_MAC80211_DEBUG_COUNTERS
- /* TX/RX handler statistics */
- unsigned int tx_handlers_drop;
- unsigned int tx_handlers_queued;
- unsigned int tx_handlers_drop_unencrypted;
- unsigned int tx_handlers_drop_fragment;
- unsigned int tx_handlers_drop_wep;
- unsigned int tx_handlers_drop_not_assoc;
- unsigned int tx_handlers_drop_unauth_port;
- unsigned int rx_handlers_drop;
- unsigned int rx_handlers_queued;
- unsigned int rx_handlers_drop_nullfunc;
- unsigned int rx_handlers_drop_defrag;
- unsigned int rx_handlers_drop_short;
- unsigned int rx_handlers_drop_passive_scan;
- unsigned int tx_expand_skb_head;
- unsigned int tx_expand_skb_head_cloned;
- unsigned int rx_expand_skb_head;
- unsigned int rx_expand_skb_head2;
- unsigned int rx_handlers_fragments;
- unsigned int tx_status_drop;
-#define I802_DEBUG_INC(c) (c)++
-#else /* CONFIG_MAC80211_DEBUG_COUNTERS */
-#define I802_DEBUG_INC(c) do { } while (0)
-#endif /* CONFIG_MAC80211_DEBUG_COUNTERS */
-
-
- int total_ps_buffered; /* total number of all buffered unicast and
- * multicast packets for power saving stations
- */
- int wifi_wme_noack_test;
- unsigned int wmm_acm; /* bit field of ACM bits (BIT(802.1D tag)) */
-
- /*
- * Bitmask of enabled u-apsd queues,
- * IEEE80211_WMM_IE_STA_QOSINFO_AC_BE & co. Needs a new association
- * to take effect.
- */
- unsigned int uapsd_queues;
-
- /*
- * Maximum number of buffered frames AP can deliver during a
- * service period, IEEE80211_WMM_IE_STA_QOSINFO_SP_ALL or similar.
- * Needs a new association to take effect.
- */
- unsigned int uapsd_max_sp_len;
-
- bool pspolling;
- bool offchannel_ps_enabled;
- /*
- * PS can only be enabled when we have exactly one managed
- * interface (and monitors) in PS, this then points there.
- */
- struct ieee80211_sub_if_data *ps_sdata;
- struct work_struct dynamic_ps_enable_work;
- struct work_struct dynamic_ps_disable_work;
- struct timer_list dynamic_ps_timer;
- struct notifier_block network_latency_notifier;
- struct notifier_block ifa_notifier;
-
- /*
- * The dynamic ps timeout configured from user space via WEXT -
- * this will override whatever chosen by mac80211 internally.
- */
- int dynamic_ps_forced_timeout;
- int dynamic_ps_user_timeout;
- bool disable_dynamic_ps;
-
- int user_power_level; /* in dBm */
- int power_constr_level; /* in dBm */
-
- enum ieee80211_smps_mode smps_mode;
-
- struct work_struct restart_work;
-
-#ifdef CONFIG_MAC80211_DEBUGFS
- struct local_debugfsdentries {
- struct dentry *rcdir;
- struct dentry *keys;
- } debugfs;
-#endif
-
- struct ieee80211_channel *hw_roc_channel;
- struct net_device *hw_roc_dev;
- struct sk_buff *hw_roc_skb, *hw_roc_skb_for_status;
- struct work_struct hw_roc_start, hw_roc_done;
- enum nl80211_channel_type hw_roc_channel_type;
- unsigned int hw_roc_duration;
- u32 hw_roc_cookie;
- bool hw_roc_for_tx;
- unsigned long hw_offchan_tx_cookie;
-
- /* dummy netdev for use w/ NAPI */
- struct net_device napi_dev;
-
- struct napi_struct napi;
-};
-
-static inline struct ieee80211_sub_if_data *
-IEEE80211_DEV_TO_SUB_IF(struct net_device *dev)
-{
- return netdev_priv(dev);
-}
-
-/* this struct represents 802.11n's RA/TID combination */
-struct ieee80211_ra_tid {
- u8 ra[ETH_ALEN];
- u16 tid;
-};
-
-/* Parsed Information Elements */
-struct ieee802_11_elems {
- u8 *ie_start;
- size_t total_len;
-
- /* pointers to IEs */
- u8 *ssid;
- u8 *supp_rates;
- u8 *fh_params;
- u8 *ds_params;
- u8 *cf_params;
- struct ieee80211_tim_ie *tim;
- u8 *ibss_params;
- u8 *challenge;
- u8 *wpa;
- u8 *rsn;
- u8 *erp_info;
- u8 *ext_supp_rates;
- u8 *wmm_info;
- u8 *wmm_param;
- struct ieee80211_ht_cap *ht_cap_elem;
- struct ieee80211_ht_info *ht_info_elem;
- struct ieee80211_meshconf_ie *mesh_config;
- u8 *mesh_id;
- u8 *peer_link;
- u8 *preq;
- u8 *prep;
- u8 *perr;
- struct ieee80211_rann_ie *rann;
- u8 *ch_switch_elem;
- u8 *country_elem;
- u8 *pwr_constr_elem;
- u8 *quiet_elem; /* first quite element */
- u8 *timeout_int;
-
- /* length of them, respectively */
- u8 ssid_len;
- u8 supp_rates_len;
- u8 fh_params_len;
- u8 ds_params_len;
- u8 cf_params_len;
- u8 tim_len;
- u8 ibss_params_len;
- u8 challenge_len;
- u8 wpa_len;
- u8 rsn_len;
- u8 erp_info_len;
- u8 ext_supp_rates_len;
- u8 wmm_info_len;
- u8 wmm_param_len;
- u8 mesh_id_len;
- u8 peer_link_len;
- u8 preq_len;
- u8 prep_len;
- u8 perr_len;
- u8 ch_switch_elem_len;
- u8 country_elem_len;
- u8 pwr_constr_elem_len;
- u8 quiet_elem_len;
- u8 num_of_quiet_elem; /* can be more the one */
- u8 timeout_int_len;
-};
-
-static inline struct ieee80211_local *hw_to_local(
- struct ieee80211_hw *hw)
-{
- return container_of(hw, struct ieee80211_local, hw);
-}
-
-static inline struct ieee80211_hw *local_to_hw(
- struct ieee80211_local *local)
-{
- return &local->hw;
-}
-
-
-static inline int ieee80211_bssid_match(const u8 *raddr, const u8 *addr)
-{
- return compare_ether_addr(raddr, addr) == 0 ||
- is_broadcast_ether_addr(raddr);
-}
-
-
-int ieee80211_hw_config(struct ieee80211_local *local, u32 changed);
-void ieee80211_tx_set_protected(struct ieee80211_tx_data *tx);
-void ieee80211_bss_info_change_notify(struct ieee80211_sub_if_data *sdata,
- u32 changed);
-void ieee80211_configure_filter(struct ieee80211_local *local);
-u32 ieee80211_reset_erp_info(struct ieee80211_sub_if_data *sdata);
-
-/* STA code */
-void ieee80211_sta_setup_sdata(struct ieee80211_sub_if_data *sdata);
-int ieee80211_mgd_auth(struct ieee80211_sub_if_data *sdata,
- struct cfg80211_auth_request *req);
-int ieee80211_mgd_assoc(struct ieee80211_sub_if_data *sdata,
- struct cfg80211_assoc_request *req);
-int ieee80211_mgd_deauth(struct ieee80211_sub_if_data *sdata,
- struct cfg80211_deauth_request *req,
- void *cookie);
-int ieee80211_mgd_disassoc(struct ieee80211_sub_if_data *sdata,
- struct cfg80211_disassoc_request *req,
- void *cookie);
-void ieee80211_send_pspoll(struct ieee80211_local *local,
- struct ieee80211_sub_if_data *sdata);
-void ieee80211_recalc_ps(struct ieee80211_local *local, s32 latency);
-int ieee80211_max_network_latency(struct notifier_block *nb,
- unsigned long data, void *dummy);
-int ieee80211_set_arp_filter(struct ieee80211_sub_if_data *sdata);
-void ieee80211_sta_process_chanswitch(struct ieee80211_sub_if_data *sdata,
- struct ieee80211_channel_sw_ie *sw_elem,
- struct ieee80211_bss *bss,
- u64 timestamp);
-void ieee80211_sta_quiesce(struct ieee80211_sub_if_data *sdata);
-void ieee80211_sta_restart(struct ieee80211_sub_if_data *sdata);
-void ieee80211_sta_work(struct ieee80211_sub_if_data *sdata);
-void ieee80211_sta_rx_queued_mgmt(struct ieee80211_sub_if_data *sdata,
- struct sk_buff *skb);
-void ieee80211_sta_reset_beacon_monitor(struct ieee80211_sub_if_data *sdata);
-void ieee80211_sta_reset_conn_monitor(struct ieee80211_sub_if_data *sdata);
-
-/* IBSS code */
-void ieee80211_ibss_notify_scan_completed(struct ieee80211_local *local);
-void ieee80211_ibss_setup_sdata(struct ieee80211_sub_if_data *sdata);
-struct sta_info *ieee80211_ibss_add_sta(struct ieee80211_sub_if_data *sdata,
- u8 *bssid, u8 *addr, u32 supp_rates,
- gfp_t gfp);
-int ieee80211_ibss_join(struct ieee80211_sub_if_data *sdata,
- struct cfg80211_ibss_params *params);
-int ieee80211_ibss_leave(struct ieee80211_sub_if_data *sdata);
-void ieee80211_ibss_quiesce(struct ieee80211_sub_if_data *sdata);
-void ieee80211_ibss_restart(struct ieee80211_sub_if_data *sdata);
-void ieee80211_ibss_work(struct ieee80211_sub_if_data *sdata);
-void ieee80211_ibss_rx_queued_mgmt(struct ieee80211_sub_if_data *sdata,
- struct sk_buff *skb);
-
-/* mesh code */
-void ieee80211_mesh_work(struct ieee80211_sub_if_data *sdata);
-void ieee80211_mesh_rx_queued_mgmt(struct ieee80211_sub_if_data *sdata,
- struct sk_buff *skb);
-
-/* scan/BSS handling */
-void ieee80211_scan_work(struct work_struct *work);
-int ieee80211_request_internal_scan(struct ieee80211_sub_if_data *sdata,
- const u8 *ssid, u8 ssid_len,
- struct ieee80211_channel *chan);
-int ieee80211_request_scan(struct ieee80211_sub_if_data *sdata,
- struct cfg80211_scan_request *req);
-void ieee80211_scan_cancel(struct ieee80211_local *local);
-ieee80211_rx_result
-ieee80211_scan_rx(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb);
-
-void ieee80211_mlme_notify_scan_completed(struct ieee80211_local *local);
-struct ieee80211_bss *
-ieee80211_bss_info_update(struct ieee80211_local *local,
- struct ieee80211_rx_status *rx_status,
- struct ieee80211_mgmt *mgmt,
- size_t len,
- struct ieee802_11_elems *elems,
- struct ieee80211_channel *channel,
- bool beacon);
-struct ieee80211_bss *
-ieee80211_rx_bss_get(struct ieee80211_local *local, u8 *bssid, int freq,
- u8 *ssid, u8 ssid_len);
-void ieee80211_rx_bss_put(struct ieee80211_local *local,
- struct ieee80211_bss *bss);
-
-/* scheduled scan handling */
-int ieee80211_request_sched_scan_start(struct ieee80211_sub_if_data *sdata,
- struct cfg80211_sched_scan_request *req);
-int ieee80211_request_sched_scan_stop(struct ieee80211_sub_if_data *sdata);
-void ieee80211_sched_scan_stopped_work(struct work_struct *work);
-
-/* off-channel helpers */
-bool ieee80211_cfg_on_oper_channel(struct ieee80211_local *local);
-void ieee80211_offchannel_enable_all_ps(struct ieee80211_local *local,
- bool tell_ap);
-void ieee80211_offchannel_stop_vifs(struct ieee80211_local *local,
- bool offchannel_ps_enable);
-void ieee80211_offchannel_return(struct ieee80211_local *local,
- bool enable_beaconing,
- bool offchannel_ps_disable);
-void ieee80211_hw_roc_setup(struct ieee80211_local *local);
-
-/* interface handling */
-int ieee80211_iface_init(void);
-void ieee80211_iface_exit(void);
-int ieee80211_if_add(struct ieee80211_local *local, const char *name,
- struct net_device **new_dev, enum nl80211_iftype type,
- struct vif_params *params);
-int ieee80211_if_change_type(struct ieee80211_sub_if_data *sdata,
- enum nl80211_iftype type);
-void ieee80211_if_remove(struct ieee80211_sub_if_data *sdata);
-void ieee80211_remove_interfaces(struct ieee80211_local *local);
-u32 __ieee80211_recalc_idle(struct ieee80211_local *local);
-void ieee80211_recalc_idle(struct ieee80211_local *local);
-void ieee80211_adjust_monitor_flags(struct ieee80211_sub_if_data *sdata,
- const int offset);
-
-static inline bool ieee80211_sdata_running(struct ieee80211_sub_if_data *sdata)
-{
- return test_bit(SDATA_STATE_RUNNING, &sdata->state);
-}
-
-/* tx handling */
-void ieee80211_clear_tx_pending(struct ieee80211_local *local);
-void ieee80211_tx_pending(unsigned long data);
-netdev_tx_t ieee80211_monitor_start_xmit(struct sk_buff *skb,
- struct net_device *dev);
-netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb,
- struct net_device *dev);
-
-/*
- * radiotap header for status frames
- */
-struct ieee80211_tx_status_rtap_hdr {
- struct ieee80211_radiotap_header hdr;
- u8 rate;
- u8 padding_for_rate;
- __le16 tx_flags;
- u8 data_retries;
-} __packed;
-
-
-/* HT */
-void ieee80211_ht_cap_ie_to_sta_ht_cap(struct ieee80211_supported_band *sband,
- struct ieee80211_ht_cap *ht_cap_ie,
- struct ieee80211_sta_ht_cap *ht_cap);
-void ieee80211_send_bar(struct ieee80211_sub_if_data *sdata, u8 *ra, u16 tid, u16 ssn);
-void ieee80211_send_delba(struct ieee80211_sub_if_data *sdata,
- const u8 *da, u16 tid,
- u16 initiator, u16 reason_code);
-int ieee80211_send_smps_action(struct ieee80211_sub_if_data *sdata,
- enum ieee80211_smps_mode smps, const u8 *da,
- const u8 *bssid);
-void ieee80211_request_smps_work(struct work_struct *work);
-
-void ___ieee80211_stop_rx_ba_session(struct sta_info *sta, u16 tid,
- u16 initiator, u16 reason, bool stop);
-void __ieee80211_stop_rx_ba_session(struct sta_info *sta, u16 tid,
- u16 initiator, u16 reason, bool stop);
-void ieee80211_sta_tear_down_BA_sessions(struct sta_info *sta, bool tx);
-void ieee80211_process_delba(struct ieee80211_sub_if_data *sdata,
- struct sta_info *sta,
- struct ieee80211_mgmt *mgmt, size_t len);
-void ieee80211_process_addba_resp(struct ieee80211_local *local,
- struct sta_info *sta,
- struct ieee80211_mgmt *mgmt,
- size_t len);
-void ieee80211_process_addba_request(struct ieee80211_local *local,
- struct sta_info *sta,
- struct ieee80211_mgmt *mgmt,
- size_t len);
-
-int __ieee80211_stop_tx_ba_session(struct sta_info *sta, u16 tid,
- enum ieee80211_back_parties initiator,
- bool tx);
-int ___ieee80211_stop_tx_ba_session(struct sta_info *sta, u16 tid,
- enum ieee80211_back_parties initiator,
- bool tx);
-void ieee80211_start_tx_ba_cb(struct ieee80211_vif *vif, u8 *ra, u16 tid);
-void ieee80211_stop_tx_ba_cb(struct ieee80211_vif *vif, u8 *ra, u8 tid);
-void ieee80211_ba_session_work(struct work_struct *work);
-void ieee80211_tx_ba_session_handle_start(struct sta_info *sta, int tid);
-void ieee80211_release_reorder_timeout(struct sta_info *sta, int tid);
-
-/* Spectrum management */
-void ieee80211_process_measurement_req(struct ieee80211_sub_if_data *sdata,
- struct ieee80211_mgmt *mgmt,
- size_t len);
-
-/* Suspend/resume and hw reconfiguration */
-int ieee80211_reconfig(struct ieee80211_local *local);
-void ieee80211_stop_device(struct ieee80211_local *local);
-
-#ifdef CONFIG_PM
-int __ieee80211_suspend(struct ieee80211_hw *hw,
- struct cfg80211_wowlan *wowlan);
-
-static inline int __ieee80211_resume(struct ieee80211_hw *hw)
-{
- struct ieee80211_local *local = hw_to_local(hw);
-
- WARN(test_bit(SCAN_HW_SCANNING, &local->scanning),
- "%s: resume with hardware scan still in progress\n",
- wiphy_name(hw->wiphy));
-
- return ieee80211_reconfig(hw_to_local(hw));
-}
-#else
-static inline int __ieee80211_suspend(struct ieee80211_hw *hw,
- struct cfg80211_wowlan *wowlan)
-{
- return 0;
-}
-
-static inline int __ieee80211_resume(struct ieee80211_hw *hw)
-{
- return 0;
-}
-#endif
-
-/* utility functions/constants */
-extern void *mac80211_wiphy_privid; /* for wiphy privid */
-u8 *ieee80211_get_bssid(struct ieee80211_hdr *hdr, size_t len,
- enum nl80211_iftype type);
-int ieee80211_frame_duration(struct ieee80211_local *local, size_t len,
- int rate, int erp, int short_preamble);
-void mac80211_ev_michael_mic_failure(struct ieee80211_sub_if_data *sdata, int keyidx,
- struct ieee80211_hdr *hdr, const u8 *tsc,
- gfp_t gfp);
-void ieee80211_set_wmm_default(struct ieee80211_sub_if_data *sdata);
-void ieee80211_tx_skb(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb);
-void ieee802_11_parse_elems(u8 *start, size_t len,
- struct ieee802_11_elems *elems);
-u32 ieee802_11_parse_elems_crc(u8 *start, size_t len,
- struct ieee802_11_elems *elems,
- u64 filter, u32 crc);
-u32 ieee80211_mandatory_rates(struct ieee80211_local *local,
- enum ieee80211_band band);
-
-void ieee80211_dynamic_ps_enable_work(struct work_struct *work);
-void ieee80211_dynamic_ps_disable_work(struct work_struct *work);
-void ieee80211_dynamic_ps_timer(unsigned long data);
-void ieee80211_send_nullfunc(struct ieee80211_local *local,
- struct ieee80211_sub_if_data *sdata,
- int powersave);
-void ieee80211_sta_rx_notify(struct ieee80211_sub_if_data *sdata,
- struct ieee80211_hdr *hdr);
-void ieee80211_sta_tx_notify(struct ieee80211_sub_if_data *sdata,
- struct ieee80211_hdr *hdr, bool ack);
-void ieee80211_beacon_connection_loss_work(struct work_struct *work);
-
-void ieee80211_wake_queues_by_reason(struct ieee80211_hw *hw,
- enum queue_stop_reason reason);
-void ieee80211_stop_queues_by_reason(struct ieee80211_hw *hw,
- enum queue_stop_reason reason);
-void ieee80211_wake_queue_by_reason(struct ieee80211_hw *hw, int queue,
- enum queue_stop_reason reason);
-void ieee80211_stop_queue_by_reason(struct ieee80211_hw *hw, int queue,
- enum queue_stop_reason reason);
-void ieee80211_add_pending_skb(struct ieee80211_local *local,
- struct sk_buff *skb);
-int ieee80211_add_pending_skbs(struct ieee80211_local *local,
- struct sk_buff_head *skbs);
-int ieee80211_add_pending_skbs_fn(struct ieee80211_local *local,
- struct sk_buff_head *skbs,
- void (*fn)(void *data), void *data);
-
-void ieee80211_send_auth(struct ieee80211_sub_if_data *sdata,
- u16 transaction, u16 auth_alg,
- u8 *extra, size_t extra_len, const u8 *bssid,
- const u8 *key, u8 key_len, u8 key_idx);
-int ieee80211_build_preq_ies(struct ieee80211_local *local, u8 *buffer,
- const u8 *ie, size_t ie_len,
- enum ieee80211_band band, u32 rate_mask,
- u8 channel);
-struct sk_buff *ieee80211_build_probe_req(struct ieee80211_sub_if_data *sdata,
- u8 *dst,
- const u8 *ssid, size_t ssid_len,
- const u8 *ie, size_t ie_len);
-void ieee80211_send_probe_req(struct ieee80211_sub_if_data *sdata, u8 *dst,
- const u8 *ssid, size_t ssid_len,
- const u8 *ie, size_t ie_len);
-
-void ieee80211_sta_def_wmm_params(struct ieee80211_sub_if_data *sdata,
- const size_t supp_rates_len,
- const u8 *supp_rates);
-u32 ieee80211_sta_get_rates(struct ieee80211_local *local,
- struct ieee802_11_elems *elems,
- enum ieee80211_band band);
-int __ieee80211_request_smps(struct ieee80211_sub_if_data *sdata,
- enum ieee80211_smps_mode smps_mode);
-void ieee80211_recalc_smps(struct ieee80211_local *local);
-
-size_t ieee80211_ie_split(const u8 *ies, size_t ielen,
- const u8 *ids, int n_ids, size_t offset);
-size_t ieee80211_ie_split_vendor(const u8 *ies, size_t ielen, size_t offset);
-
-/* internal work items */
-void ieee80211_work_init(struct ieee80211_local *local);
-void ieee80211_add_work(struct ieee80211_work *wk);
-void free_work(struct ieee80211_work *wk);
-void ieee80211_work_purge(struct ieee80211_sub_if_data *sdata);
-ieee80211_rx_result ieee80211_work_rx_mgmt(struct ieee80211_sub_if_data *sdata,
- struct sk_buff *skb);
-int ieee80211_wk_remain_on_channel(struct ieee80211_sub_if_data *sdata,
- struct ieee80211_channel *chan,
- enum nl80211_channel_type channel_type,
- unsigned int duration, u64 *cookie);
-int ieee80211_wk_cancel_remain_on_channel(
- struct ieee80211_sub_if_data *sdata, u64 cookie);
-
-/* channel management */
-enum ieee80211_chan_mode {
- CHAN_MODE_UNDEFINED,
- CHAN_MODE_HOPPING,
- CHAN_MODE_FIXED,
-};
-
-enum ieee80211_chan_mode
-ieee80211_get_channel_mode(struct ieee80211_local *local,
- struct ieee80211_sub_if_data *ignore);
-bool ieee80211_set_channel_type(struct ieee80211_local *local,
- struct ieee80211_sub_if_data *sdata,
- enum nl80211_channel_type chantype);
-
-#ifdef CONFIG_MAC80211_NOINLINE
-#define debug_noinline noinline
-#else
-#define debug_noinline
-#endif
-
-#endif /* IEEE80211_I_H */
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
index dee30ae..08e987e 100644
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -17,7 +17,7 @@
#include <linux/rtnetlink.h>
#include <net/mac80211.h>
#include <net/ieee80211_radiotap.h>
-#include "ieee80211_i.h"
+#include "mac80211_i.h"
#include "sta_info.h"
#include "debugfs_netdev.h"
#include "mesh.h"
diff --git a/net/mac80211/key.c b/net/mac80211/key.c
index 31afd71..6093e51 100644
--- a/net/mac80211/key.c
+++ b/net/mac80211/key.c
@@ -16,7 +16,7 @@
#include <linux/rtnetlink.h>
#include <linux/slab.h>
#include <net/mac80211.h>
-#include "ieee80211_i.h"
+#include "mac80211_i.h"
#include "driver-ops.h"
#include "debugfs_key.h"
#include "aes_ccm.h"
diff --git a/net/mac80211/led.h b/net/mac80211/led.h
index e0275d9..9be15dd 100644
--- a/net/mac80211/led.h
+++ b/net/mac80211/led.h
@@ -9,7 +9,7 @@
#include <linux/list.h>
#include <linux/spinlock.h>
#include <linux/leds.h>
-#include "ieee80211_i.h"
+#include "mac80211_i.h"

#ifdef CONFIG_MAC80211_LEDS
void ieee80211_led_rx(struct ieee80211_local *local);
diff --git a/net/mac80211/mac80211_i.h b/net/mac80211/mac80211_i.h
new file mode 100644
index 0000000..cb1ec5f
--- /dev/null
+++ b/net/mac80211/mac80211_i.h
@@ -0,0 +1,1409 @@
+/*
+ * Copyright 2002-2005, Instant802 Networks, Inc.
+ * Copyright 2005, Devicescape Software, Inc.
+ * Copyright 2006-2007 Jiri Benc <[email protected]>
+ * Copyright 2007-2010 Johannes Berg <[email protected]>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#ifndef MAC80211_I_H
+#define MAC80211_I_H
+
+#include <linux/kernel.h>
+#include <linux/device.h>
+#include <linux/if_ether.h>
+#include <linux/interrupt.h>
+#include <linux/list.h>
+#include <linux/netdevice.h>
+#include <linux/skbuff.h>
+#include <linux/workqueue.h>
+#include <linux/types.h>
+#include <linux/spinlock.h>
+#include <linux/etherdevice.h>
+#include <linux/leds.h>
+#include <net/ieee80211_radiotap.h>
+#include <net/cfg80211.h>
+#include <net/mac80211.h>
+#include "key.h"
+#include "sta_info.h"
+
+struct ieee80211_local;
+
+/* Maximum number of broadcast/multicast frames to buffer when some of the
+ * associated stations are using power saving. */
+#define AP_MAX_BC_BUFFER 128
+
+/* Maximum number of frames buffered to all STAs, including multicast frames.
+ * Note: increasing this limit increases the potential memory requirement. Each
+ * frame can be up to about 2 kB long. */
+#define TOTAL_MAX_TX_BUFFER 512
+
+/* Required encryption head and tailroom */
+#define IEEE80211_ENCRYPT_HEADROOM 8
+#define IEEE80211_ENCRYPT_TAILROOM 18
+
+/* IEEE 802.11 (Ch. 9.5 Defragmentation) requires support for concurrent
+ * reception of at least three fragmented frames. This limit can be increased
+ * by changing this define, at the cost of slower frame reassembly and
+ * increased memory use (about 2 kB of RAM per entry). */
+#define IEEE80211_FRAGMENT_MAX 4
+
+#define TU_TO_EXP_TIME(x) (jiffies + usecs_to_jiffies((x) * 1024))
+
+#define IEEE80211_DEFAULT_UAPSD_QUEUES \
+ (IEEE80211_WMM_IE_STA_QOSINFO_AC_BK | \
+ IEEE80211_WMM_IE_STA_QOSINFO_AC_BE | \
+ IEEE80211_WMM_IE_STA_QOSINFO_AC_VI | \
+ IEEE80211_WMM_IE_STA_QOSINFO_AC_VO)
+
+#define IEEE80211_DEFAULT_MAX_SP_LEN \
+ IEEE80211_WMM_IE_STA_QOSINFO_SP_ALL
+
+struct ieee80211_fragment_entry {
+ unsigned long first_frag_time;
+ unsigned int seq;
+ unsigned int rx_queue;
+ unsigned int last_frag;
+ unsigned int extra_len;
+ struct sk_buff_head skb_list;
+ int ccmp; /* Whether fragments were encrypted with CCMP */
+ u8 last_pn[6]; /* PN of the last fragment if CCMP was used */
+};
+
+
+struct ieee80211_bss {
+ /* don't want to look up all the time */
+ size_t ssid_len;
+ u8 ssid[IEEE80211_MAX_SSID_LEN];
+
+ u8 dtim_period;
+
+ bool wmm_used;
+ bool uapsd_supported;
+
+ unsigned long last_probe_resp;
+
+#ifdef CONFIG_MAC80211_MESH
+ u8 *mesh_id;
+ size_t mesh_id_len;
+ u8 *mesh_cfg;
+#endif
+
+#define IEEE80211_MAX_SUPP_RATES 32
+ u8 supp_rates[IEEE80211_MAX_SUPP_RATES];
+ size_t supp_rates_len;
+
+ /*
+ * During association, we save an ERP value from a probe response so
+ * that we can feed ERP info to the driver when handling the
+ * association completes. these fields probably won't be up-to-date
+ * otherwise, you probably don't want to use them.
+ */
+ bool has_erp_value;
+ u8 erp_value;
+};
+
+static inline u8 *bss_mesh_cfg(struct ieee80211_bss *bss)
+{
+#ifdef CONFIG_MAC80211_MESH
+ return bss->mesh_cfg;
+#endif
+ return NULL;
+}
+
+static inline u8 *bss_mesh_id(struct ieee80211_bss *bss)
+{
+#ifdef CONFIG_MAC80211_MESH
+ return bss->mesh_id;
+#endif
+ return NULL;
+}
+
+static inline u8 bss_mesh_id_len(struct ieee80211_bss *bss)
+{
+#ifdef CONFIG_MAC80211_MESH
+ return bss->mesh_id_len;
+#endif
+ return 0;
+}
+
+
+typedef unsigned __bitwise__ ieee80211_tx_result;
+#define TX_CONTINUE ((__force ieee80211_tx_result) 0u)
+#define TX_DROP ((__force ieee80211_tx_result) 1u)
+#define TX_QUEUED ((__force ieee80211_tx_result) 2u)
+
+#define IEEE80211_TX_FRAGMENTED BIT(0)
+#define IEEE80211_TX_UNICAST BIT(1)
+#define IEEE80211_TX_PS_BUFFERED BIT(2)
+
+struct ieee80211_tx_data {
+ struct sk_buff *skb;
+ struct ieee80211_local *local;
+ struct ieee80211_sub_if_data *sdata;
+ struct sta_info *sta;
+ struct ieee80211_key *key;
+
+ struct ieee80211_channel *channel;
+
+ u16 ethertype;
+ unsigned int flags;
+};
+
+
+typedef unsigned __bitwise__ ieee80211_rx_result;
+#define RX_CONTINUE ((__force ieee80211_rx_result) 0u)
+#define RX_DROP_UNUSABLE ((__force ieee80211_rx_result) 1u)
+#define RX_DROP_MONITOR ((__force ieee80211_rx_result) 2u)
+#define RX_QUEUED ((__force ieee80211_rx_result) 3u)
+
+/**
+ * enum ieee80211_packet_rx_flags - packet RX flags
+ * @IEEE80211_RX_RA_MATCH: frame is destined to interface currently processed
+ * (incl. multicast frames)
+ * @IEEE80211_RX_IN_SCAN: received while scanning
+ * @IEEE80211_RX_FRAGMENTED: fragmented frame
+ * @IEEE80211_RX_AMSDU: a-MSDU packet
+ * @IEEE80211_RX_MALFORMED_ACTION_FRM: action frame is malformed
+ * @IEEE80211_RX_DEFERRED_RELEASE: frame was subjected to receive reordering
+ *
+ * These are per-frame flags that are attached to a frame in the
+ * @rx_flags field of &struct ieee80211_rx_status.
+ */
+enum ieee80211_packet_rx_flags {
+ IEEE80211_RX_IN_SCAN = BIT(0),
+ IEEE80211_RX_RA_MATCH = BIT(1),
+ IEEE80211_RX_FRAGMENTED = BIT(2),
+ IEEE80211_RX_AMSDU = BIT(3),
+ IEEE80211_RX_MALFORMED_ACTION_FRM = BIT(4),
+ IEEE80211_RX_DEFERRED_RELEASE = BIT(5),
+};
+
+/**
+ * enum ieee80211_rx_flags - RX data flags
+ *
+ * @IEEE80211_RX_CMNTR: received on cooked monitor already
+ *
+ * These flags are used across handling multiple interfaces
+ * for a single frame.
+ */
+enum ieee80211_rx_flags {
+ IEEE80211_RX_CMNTR = BIT(0),
+};
+
+struct ieee80211_rx_data {
+ struct sk_buff *skb;
+ struct ieee80211_local *local;
+ struct ieee80211_sub_if_data *sdata;
+ struct sta_info *sta;
+ struct ieee80211_key *key;
+
+ unsigned int flags;
+ int queue;
+ u32 tkip_iv32;
+ u16 tkip_iv16;
+};
+
+struct beacon_data {
+ u8 *head, *tail;
+ int head_len, tail_len;
+ int dtim_period;
+};
+
+struct ieee80211_if_ap {
+ struct beacon_data __rcu *beacon;
+
+ struct list_head vlans;
+
+ /* yes, this looks ugly, but guarantees that we can later use
+ * bitmap_empty :)
+ * NB: don't touch this bitmap, use sta_info_{set,clear}_tim_bit */
+ u8 tim[sizeof(unsigned long) * BITS_TO_LONGS(IEEE80211_MAX_AID + 1)];
+ struct sk_buff_head ps_bc_buf;
+ atomic_t num_sta_ps; /* number of stations in PS mode */
+ int dtim_count;
+ bool dtim_bc_mc;
+};
+
+struct ieee80211_if_wds {
+ struct sta_info *sta;
+ u8 remote_addr[ETH_ALEN];
+};
+
+struct ieee80211_if_vlan {
+ struct list_head list;
+
+ /* used for all tx if the VLAN is configured to 4-addr mode */
+ struct sta_info __rcu *sta;
+};
+
+struct mesh_stats {
+ __u32 fwded_mcast; /* Mesh forwarded multicast frames */
+ __u32 fwded_unicast; /* Mesh forwarded unicast frames */
+ __u32 fwded_frames; /* Mesh total forwarded frames */
+ __u32 dropped_frames_ttl; /* Not transmitted since mesh_ttl == 0*/
+ __u32 dropped_frames_no_route; /* Not transmitted, no route found */
+ atomic_t estab_plinks;
+};
+
+#define PREQ_Q_F_START 0x1
+#define PREQ_Q_F_REFRESH 0x2
+struct mesh_preq_queue {
+ struct list_head list;
+ u8 dst[ETH_ALEN];
+ u8 flags;
+};
+
+enum ieee80211_work_type {
+ IEEE80211_WORK_ABORT,
+ IEEE80211_WORK_DIRECT_PROBE,
+ IEEE80211_WORK_AUTH,
+ IEEE80211_WORK_ASSOC_BEACON_WAIT,
+ IEEE80211_WORK_ASSOC,
+ IEEE80211_WORK_REMAIN_ON_CHANNEL,
+ IEEE80211_WORK_OFFCHANNEL_TX,
+};
+
+/**
+ * enum work_done_result - indicates what to do after work was done
+ *
+ * @WORK_DONE_DESTROY: This work item is no longer needed, destroy.
+ * @WORK_DONE_REQUEUE: This work item was reset to be reused, and
+ * should be requeued.
+ */
+enum work_done_result {
+ WORK_DONE_DESTROY,
+ WORK_DONE_REQUEUE,
+};
+
+struct ieee80211_work {
+ struct list_head list;
+
+ struct rcu_head rcu_head;
+
+ struct ieee80211_sub_if_data *sdata;
+
+ enum work_done_result (*done)(struct ieee80211_work *wk,
+ struct sk_buff *skb);
+
+ struct ieee80211_channel *chan;
+ enum nl80211_channel_type chan_type;
+
+ unsigned long timeout;
+ enum ieee80211_work_type type;
+
+ u8 filter_ta[ETH_ALEN];
+
+ bool started;
+
+ union {
+ struct {
+ int tries;
+ u16 algorithm, transaction;
+ u8 ssid[IEEE80211_MAX_SSID_LEN];
+ u8 ssid_len;
+ u8 key[WLAN_KEY_LEN_WEP104];
+ u8 key_len, key_idx;
+ bool privacy;
+ } probe_auth;
+ struct {
+ struct cfg80211_bss *bss;
+ const u8 *supp_rates;
+ const u8 *ht_information_ie;
+ enum ieee80211_smps_mode smps;
+ int tries;
+ u16 capability;
+ u8 prev_bssid[ETH_ALEN];
+ u8 ssid[IEEE80211_MAX_SSID_LEN];
+ u8 ssid_len;
+ u8 supp_rates_len;
+ bool wmm_used, use_11n, uapsd_used;
+ } assoc;
+ struct {
+ u32 duration;
+ } remain;
+ struct {
+ struct sk_buff *frame;
+ u32 wait;
+ } offchan_tx;
+ };
+
+ int ie_len;
+ /* must be last */
+ u8 ie[0];
+};
+
+/* flags used in struct ieee80211_if_managed.flags */
+enum ieee80211_sta_flags {
+ IEEE80211_STA_BEACON_POLL = BIT(0),
+ IEEE80211_STA_CONNECTION_POLL = BIT(1),
+ IEEE80211_STA_CONTROL_PORT = BIT(2),
+ IEEE80211_STA_DISABLE_11N = BIT(4),
+ IEEE80211_STA_CSA_RECEIVED = BIT(5),
+ IEEE80211_STA_MFP_ENABLED = BIT(6),
+ IEEE80211_STA_UAPSD_ENABLED = BIT(7),
+ IEEE80211_STA_NULLFUNC_ACKED = BIT(8),
+ IEEE80211_STA_RESET_SIGNAL_AVE = BIT(9),
+};
+
+struct ieee80211_if_managed {
+ struct timer_list timer;
+ struct timer_list conn_mon_timer;
+ struct timer_list bcn_mon_timer;
+ struct timer_list chswitch_timer;
+ struct work_struct monitor_work;
+ struct work_struct chswitch_work;
+ struct work_struct beacon_connection_loss_work;
+
+ unsigned long beacon_timeout;
+ unsigned long probe_timeout;
+ int probe_send_count;
+ bool nullfunc_failed;
+
+ struct mutex mtx;
+ struct cfg80211_bss *associated;
+
+ u8 bssid[ETH_ALEN];
+
+ u16 aid;
+
+ unsigned long timers_running; /* used for quiesce/restart */
+ bool powersave; /* powersave requested for this iface */
+ enum ieee80211_smps_mode req_smps, /* requested smps mode */
+ ap_smps, /* smps mode AP thinks we're in */
+ driver_smps_mode; /* smps mode request */
+
+ struct work_struct request_smps_work;
+
+ unsigned int flags;
+
+ bool beacon_crc_valid;
+ u32 beacon_crc;
+
+ enum {
+ IEEE80211_MFP_DISABLED,
+ IEEE80211_MFP_OPTIONAL,
+ IEEE80211_MFP_REQUIRED
+ } mfp; /* management frame protection */
+
+ int wmm_last_param_set;
+
+ u8 use_4addr;
+
+ /* Signal strength from the last Beacon frame in the current BSS. */
+ int last_beacon_signal;
+
+ /*
+ * Weighted average of the signal strength from Beacon frames in the
+ * current BSS. This is in units of 1/16 of the signal unit to maintain
+ * accuracy and to speed up calculations, i.e., the value need to be
+ * divided by 16 to get the actual value.
+ */
+ int ave_beacon_signal;
+
+ /*
+ * Number of Beacon frames used in ave_beacon_signal. This can be used
+ * to avoid generating less reliable cqm events that would be based
+ * only on couple of received frames.
+ */
+ unsigned int count_beacon_signal;
+
+ /*
+ * Last Beacon frame signal strength average (ave_beacon_signal / 16)
+ * that triggered a cqm event. 0 indicates that no event has been
+ * generated for the current association.
+ */
+ int last_cqm_event_signal;
+};
+
+struct ieee80211_if_ibss {
+ struct timer_list timer;
+
+ struct mutex mtx;
+
+ unsigned long last_scan_completed;
+
+ u32 basic_rates;
+
+ bool timer_running;
+
+ bool fixed_bssid;
+ bool fixed_channel;
+ bool privacy;
+
+ u8 bssid[ETH_ALEN];
+ u8 ssid[IEEE80211_MAX_SSID_LEN];
+ u8 ssid_len, ie_len;
+ u8 *ie;
+ struct ieee80211_channel *channel;
+
+ unsigned long ibss_join_req;
+ /* probe response/beacon for IBSS */
+ struct sk_buff __rcu *presp;
+ struct sk_buff *skb;
+
+ enum {
+ IEEE80211_IBSS_MLME_SEARCH,
+ IEEE80211_IBSS_MLME_JOINED,
+ } state;
+};
+
+struct ieee80211_if_mesh {
+ struct timer_list housekeeping_timer;
+ struct timer_list mesh_path_timer;
+ struct timer_list mesh_path_root_timer;
+
+ unsigned long timers_running;
+
+ unsigned long wrkq_flags;
+
+ u8 mesh_id[IEEE80211_MAX_MESH_ID_LEN];
+ size_t mesh_id_len;
+ /* Active Path Selection Protocol Identifier */
+ u8 mesh_pp_id;
+ /* Active Path Selection Metric Identifier */
+ u8 mesh_pm_id;
+ /* Congestion Control Mode Identifier */
+ u8 mesh_cc_id;
+ /* Synchronization Protocol Identifier */
+ u8 mesh_sp_id;
+ /* Authentication Protocol Identifier */
+ u8 mesh_auth_id;
+ /* Local mesh Sequence Number */
+ u32 sn;
+ /* Last used PREQ ID */
+ u32 preq_id;
+ atomic_t mpaths;
+ /* Timestamp of last SN update */
+ unsigned long last_sn_update;
+ /* Timestamp of last SN sent */
+ unsigned long last_preq;
+ struct mesh_rmc *rmc;
+ spinlock_t mesh_preq_queue_lock;
+ struct mesh_preq_queue preq_queue;
+ int preq_queue_len;
+ struct mesh_stats mshstats;
+ struct mesh_config mshcfg;
+ u32 mesh_seqnum;
+ bool accepting_plinks;
+ const u8 *ie;
+ u8 ie_len;
+ enum {
+ IEEE80211_MESH_SEC_NONE = 0x0,
+ IEEE80211_MESH_SEC_AUTHED = 0x1,
+ IEEE80211_MESH_SEC_SECURED = 0x2,
+ } security;
+};
+
+#ifdef CONFIG_MAC80211_MESH
+#define IEEE80211_IFSTA_MESH_CTR_INC(msh, name) \
+ do { (msh)->mshstats.name++; } while (0)
+#else
+#define IEEE80211_IFSTA_MESH_CTR_INC(msh, name) \
+ do { } while (0)
+#endif
+
+/**
+ * enum ieee80211_sub_if_data_flags - virtual interface flags
+ *
+ * @IEEE80211_SDATA_ALLMULTI: interface wants all multicast packets
+ * @IEEE80211_SDATA_PROMISC: interface is promisc
+ * @IEEE80211_SDATA_OPERATING_GMODE: operating in G-only mode
+ * @IEEE80211_SDATA_DONT_BRIDGE_PACKETS: bridge packets between
+ * associated stations and deliver multicast frames both
+ * back to wireless media and to the local net stack.
+ */
+enum ieee80211_sub_if_data_flags {
+ IEEE80211_SDATA_ALLMULTI = BIT(0),
+ IEEE80211_SDATA_PROMISC = BIT(1),
+ IEEE80211_SDATA_OPERATING_GMODE = BIT(2),
+ IEEE80211_SDATA_DONT_BRIDGE_PACKETS = BIT(3),
+};
+
+/**
+ * enum ieee80211_sdata_state_bits - virtual interface state bits
+ * @SDATA_STATE_RUNNING: virtual interface is up & running; this
+ * mirrors netif_running() but is separate for interface type
+ * change handling while the interface is up
+ * @SDATA_STATE_OFFCHANNEL: This interface is currently in offchannel
+ * mode, so queues are stopped
+ */
+enum ieee80211_sdata_state_bits {
+ SDATA_STATE_RUNNING,
+ SDATA_STATE_OFFCHANNEL,
+};
+
+struct ieee80211_sub_if_data {
+ struct list_head list;
+
+ struct wireless_dev wdev;
+
+ /* keys */
+ struct list_head key_list;
+
+ struct net_device *dev;
+ struct ieee80211_local *local;
+
+ unsigned int flags;
+
+ unsigned long state;
+
+ int drop_unencrypted;
+
+ char name[IFNAMSIZ];
+
+ /*
+ * keep track of whether the HT opmode (stored in
+ * vif.bss_info.ht_operation_mode) is valid.
+ */
+ bool ht_opmode_valid;
+
+ /* to detect idle changes */
+ bool old_idle;
+
+ /* Fragment table for host-based reassembly */
+ struct ieee80211_fragment_entry fragments[IEEE80211_FRAGMENT_MAX];
+ unsigned int fragment_next;
+
+ struct ieee80211_key __rcu *keys[NUM_DEFAULT_KEYS + NUM_DEFAULT_MGMT_KEYS];
+ struct ieee80211_key __rcu *default_unicast_key;
+ struct ieee80211_key __rcu *default_multicast_key;
+ struct ieee80211_key __rcu *default_mgmt_key;
+
+ u16 sequence_number;
+ __be16 control_port_protocol;
+ bool control_port_no_encrypt;
+
+ struct work_struct work;
+ struct sk_buff_head skb_queue;
+
+ bool arp_filter_state;
+
+ /*
+ * AP this belongs to: self in AP mode and
+ * corresponding AP in VLAN mode, NULL for
+ * all others (might be needed later in IBSS)
+ */
+ struct ieee80211_if_ap *bss;
+
+ /* bitmap of allowed (non-MCS) rate indexes for rate control */
+ u32 rc_rateidx_mask[IEEE80211_NUM_BANDS];
+
+ union {
+ struct ieee80211_if_ap ap;
+ struct ieee80211_if_wds wds;
+ struct ieee80211_if_vlan vlan;
+ struct ieee80211_if_managed mgd;
+ struct ieee80211_if_ibss ibss;
+ struct ieee80211_if_mesh mesh;
+ u32 mntr_flags;
+ } u;
+
+#ifdef CONFIG_MAC80211_DEBUGFS
+ struct {
+ struct dentry *dir;
+ struct dentry *subdir_stations;
+ struct dentry *default_unicast_key;
+ struct dentry *default_multicast_key;
+ struct dentry *default_mgmt_key;
+ } debugfs;
+#endif
+ /* must be last, dynamically sized area in this! */
+ struct ieee80211_vif vif;
+};
+
+static inline
+struct ieee80211_sub_if_data *vif_to_sdata(struct ieee80211_vif *p)
+{
+ return container_of(p, struct ieee80211_sub_if_data, vif);
+}
+
+enum sdata_queue_type {
+ IEEE80211_SDATA_QUEUE_TYPE_FRAME = 0,
+ IEEE80211_SDATA_QUEUE_AGG_START = 1,
+ IEEE80211_SDATA_QUEUE_AGG_STOP = 2,
+};
+
+enum {
+ IEEE80211_RX_MSG = 1,
+ IEEE80211_TX_STATUS_MSG = 2,
+};
+
+enum queue_stop_reason {
+ IEEE80211_QUEUE_STOP_REASON_DRIVER,
+ IEEE80211_QUEUE_STOP_REASON_PS,
+ IEEE80211_QUEUE_STOP_REASON_CSA,
+ IEEE80211_QUEUE_STOP_REASON_AGGREGATION,
+ IEEE80211_QUEUE_STOP_REASON_SUSPEND,
+ IEEE80211_QUEUE_STOP_REASON_SKB_ADD,
+};
+
+#ifdef CONFIG_MAC80211_LEDS
+struct tpt_led_trigger {
+ struct led_trigger trig;
+ char name[32];
+ const struct ieee80211_tpt_blink *blink_table;
+ unsigned int blink_table_len;
+ struct timer_list timer;
+ unsigned long prev_traffic;
+ unsigned long tx_bytes, rx_bytes;
+ unsigned int active, want;
+ bool running;
+};
+#endif
+
+/**
+ * mac80211 scan flags - currently active scan mode
+ *
+ * @SCAN_SW_SCANNING: We're currently in the process of scanning but may as
+ * well be on the operating channel
+ * @SCAN_HW_SCANNING: The hardware is scanning for us, we have no way to
+ * determine if we are on the operating channel or not
+ * @SCAN_COMPLETED: Set for our scan work function when the driver reported
+ * that the scan completed.
+ * @SCAN_ABORTED: Set for our scan work function when the driver reported
+ * a scan complete for an aborted scan.
+ */
+enum {
+ SCAN_SW_SCANNING,
+ SCAN_HW_SCANNING,
+ SCAN_COMPLETED,
+ SCAN_ABORTED,
+};
+
+/**
+ * enum mac80211_scan_state - scan state machine states
+ *
+ * @SCAN_DECISION: Main entry point to the scan state machine, this state
+ * determines if we should keep on scanning or switch back to the
+ * operating channel
+ * @SCAN_SET_CHANNEL: Set the next channel to be scanned
+ * @SCAN_SEND_PROBE: Send probe requests and wait for probe responses
+ * @SCAN_LEAVE_OPER_CHANNEL: Leave the operating channel, notify the AP
+ * about us leaving the channel and stop all associated STA interfaces
+ * @SCAN_ENTER_OPER_CHANNEL: Enter the operating channel again, notify the
+ * AP about us being back and restart all associated STA interfaces
+ */
+enum mac80211_scan_state {
+ SCAN_DECISION,
+ SCAN_SET_CHANNEL,
+ SCAN_SEND_PROBE,
+ SCAN_LEAVE_OPER_CHANNEL,
+ SCAN_ENTER_OPER_CHANNEL,
+};
+
+struct ieee80211_local {
+ /* embed the driver visible part.
+ * don't cast (use the static inlines below), but we keep
+ * it first anyway so they become a no-op */
+ struct ieee80211_hw hw;
+
+ const struct ieee80211_ops *ops;
+
+ /*
+ * work stuff, potentially off-channel (in the future)
+ */
+ struct list_head work_list;
+ struct timer_list work_timer;
+ struct work_struct work_work;
+ struct sk_buff_head work_skb_queue;
+
+ /*
+ * private workqueue to mac80211. mac80211 makes this accessible
+ * via ieee80211_queue_work()
+ */
+ struct workqueue_struct *workqueue;
+
+ unsigned long queue_stop_reasons[IEEE80211_MAX_QUEUES];
+ /* also used to protect ampdu_ac_queue and amdpu_ac_stop_refcnt */
+ spinlock_t queue_stop_reason_lock;
+
+ int open_count;
+ int monitors, cooked_mntrs;
+ /* number of interfaces with corresponding FIF_ flags */
+ int fif_fcsfail, fif_plcpfail, fif_control, fif_other_bss, fif_pspoll,
+ fif_probe_req;
+ int probe_req_reg;
+ unsigned int filter_flags; /* FIF_* */
+
+ bool wiphy_ciphers_allocated;
+
+ /* protects the aggregated multicast list and filter calls */
+ spinlock_t filter_lock;
+
+ /* used for uploading changed mc list */
+ struct work_struct reconfig_filter;
+
+ /* used to reconfigure hardware SM PS */
+ struct work_struct recalc_smps;
+
+ /* aggregated multicast list */
+ struct netdev_hw_addr_list mc_list;
+
+ bool tim_in_locked_section; /* see ieee80211_beacon_get() */
+
+ /*
+ * suspended is true if we finished all the suspend _and_ we have
+ * not yet come up from resume. This is to be used by mac80211
+ * to ensure driver sanity during suspend and mac80211's own
+ * sanity. It can eventually be used for WoW as well.
+ */
+ bool suspended;
+
+ /*
+ * Resuming is true while suspended, but when we're reprogramming the
+ * hardware -- at that time it's allowed to use ieee80211_queue_work()
+ * again even though some other parts of the stack are still suspended
+ * and we still drop received frames to avoid waking the stack.
+ */
+ bool resuming;
+
+ /*
+ * quiescing is true during the suspend process _only_ to
+ * ease timer cancelling etc.
+ */
+ bool quiescing;
+
+ /* device is started */
+ bool started;
+
+ /* wowlan is enabled -- don't reconfig on resume */
+ bool wowlan;
+
+ int tx_headroom; /* required headroom for hardware/radiotap */
+
+ /* count for keys needing tailroom space allocation */
+ int crypto_tx_tailroom_needed_cnt;
+
+ /* Tasklet and skb queue to process calls from IRQ mode. All frames
+ * added to skb_queue will be processed, but frames in
+ * skb_queue_unreliable may be dropped if the total length of these
+ * queues increases over the limit. */
+#define IEEE80211_IRQSAFE_QUEUE_LIMIT 128
+ struct tasklet_struct tasklet;
+ struct sk_buff_head skb_queue;
+ struct sk_buff_head skb_queue_unreliable;
+
+ /*
+ * Internal FIFO queue which is shared between multiple rx path
+ * stages. Its main task is to provide a serialization mechanism,
+ * so all rx handlers can enjoy having exclusive access to their
+ * private data structures.
+ */
+ struct sk_buff_head rx_skb_queue;
+ bool running_rx_handler; /* protected by rx_skb_queue.lock */
+
+ /* Station data */
+ /*
+ * The mutex only protects the list and counter,
+ * reads are done in RCU.
+ * Additionally, the lock protects the hash table,
+ * the pending list and each BSS's TIM bitmap.
+ */
+ struct mutex sta_mtx;
+ spinlock_t sta_lock;
+ unsigned long num_sta;
+ struct list_head sta_list, sta_pending_list;
+ struct sta_info __rcu *sta_hash[STA_HASH_SIZE];
+ struct timer_list sta_cleanup;
+ struct work_struct sta_finish_work;
+ int sta_generation;
+
+ struct sk_buff_head pending[IEEE80211_MAX_QUEUES];
+ struct tasklet_struct tx_pending_tasklet;
+
+ atomic_t agg_queue_stop[IEEE80211_MAX_QUEUES];
+
+ /* number of interfaces with corresponding IFF_ flags */
+ atomic_t iff_allmultis, iff_promiscs;
+
+ struct rate_control_ref *rate_ctrl;
+
+ struct crypto_cipher *wep_tx_tfm;
+ struct crypto_cipher *wep_rx_tfm;
+ u32 wep_iv;
+
+ /* see iface.c */
+ struct list_head interfaces;
+ struct mutex iflist_mtx;
+
+ /*
+ * Key mutex, protects sdata's key_list and sta_info's
+ * key pointers (write access, they're RCU.)
+ */
+ struct mutex key_mtx;
+
+ /* mutex for scan and work locking */
+ struct mutex mtx;
+
+ /* Scanning and BSS list */
+ unsigned long scanning;
+ struct cfg80211_ssid scan_ssid;
+ struct cfg80211_scan_request *int_scan_req;
+ struct cfg80211_scan_request *scan_req, *hw_scan_req;
+ struct ieee80211_channel *scan_channel;
+ enum ieee80211_band hw_scan_band;
+ int scan_channel_idx;
+ int scan_ies_len;
+
+ bool sched_scanning;
+ struct ieee80211_sched_scan_ies sched_scan_ies;
+ struct work_struct sched_scan_stopped_work;
+
+ unsigned long leave_oper_channel_time;
+ enum mac80211_scan_state next_scan_state;
+ struct delayed_work scan_work;
+ struct ieee80211_sub_if_data *scan_sdata;
+ enum nl80211_channel_type _oper_channel_type;
+ struct ieee80211_channel *oper_channel, *csa_channel;
+
+ /* Temporary remain-on-channel for off-channel operations */
+ struct ieee80211_channel *tmp_channel;
+ enum nl80211_channel_type tmp_channel_type;
+
+ /* SNMP counters */
+ /* dot11CountersTable */
+ u32 dot11TransmittedFragmentCount;
+ u32 dot11MulticastTransmittedFrameCount;
+ u32 dot11FailedCount;
+ u32 dot11RetryCount;
+ u32 dot11MultipleRetryCount;
+ u32 dot11FrameDuplicateCount;
+ u32 dot11ReceivedFragmentCount;
+ u32 dot11MulticastReceivedFrameCount;
+ u32 dot11TransmittedFrameCount;
+
+#ifdef CONFIG_MAC80211_LEDS
+ int tx_led_counter, rx_led_counter;
+ struct led_trigger *tx_led, *rx_led, *assoc_led, *radio_led;
+ struct tpt_led_trigger *tpt_led_trigger;
+ char tx_led_name[32], rx_led_name[32],
+ assoc_led_name[32], radio_led_name[32];
+#endif
+
+#ifdef CONFIG_MAC80211_DEBUG_COUNTERS
+ /* TX/RX handler statistics */
+ unsigned int tx_handlers_drop;
+ unsigned int tx_handlers_queued;
+ unsigned int tx_handlers_drop_unencrypted;
+ unsigned int tx_handlers_drop_fragment;
+ unsigned int tx_handlers_drop_wep;
+ unsigned int tx_handlers_drop_not_assoc;
+ unsigned int tx_handlers_drop_unauth_port;
+ unsigned int rx_handlers_drop;
+ unsigned int rx_handlers_queued;
+ unsigned int rx_handlers_drop_nullfunc;
+ unsigned int rx_handlers_drop_defrag;
+ unsigned int rx_handlers_drop_short;
+ unsigned int rx_handlers_drop_passive_scan;
+ unsigned int tx_expand_skb_head;
+ unsigned int tx_expand_skb_head_cloned;
+ unsigned int rx_expand_skb_head;
+ unsigned int rx_expand_skb_head2;
+ unsigned int rx_handlers_fragments;
+ unsigned int tx_status_drop;
+#define I802_DEBUG_INC(c) (c)++
+#else /* CONFIG_MAC80211_DEBUG_COUNTERS */
+#define I802_DEBUG_INC(c) do { } while (0)
+#endif /* CONFIG_MAC80211_DEBUG_COUNTERS */
+
+
+ int total_ps_buffered; /* total number of all buffered unicast and
+ * multicast packets for power saving stations
+ */
+ int wifi_wme_noack_test;
+ unsigned int wmm_acm; /* bit field of ACM bits (BIT(802.1D tag)) */
+
+ /*
+ * Bitmask of enabled u-apsd queues,
+ * IEEE80211_WMM_IE_STA_QOSINFO_AC_BE & co. Needs a new association
+ * to take effect.
+ */
+ unsigned int uapsd_queues;
+
+ /*
+ * Maximum number of buffered frames AP can deliver during a
+ * service period, IEEE80211_WMM_IE_STA_QOSINFO_SP_ALL or similar.
+ * Needs a new association to take effect.
+ */
+ unsigned int uapsd_max_sp_len;
+
+ bool pspolling;
+ bool offchannel_ps_enabled;
+ /*
+ * PS can only be enabled when we have exactly one managed
+ * interface (and monitors) in PS, this then points there.
+ */
+ struct ieee80211_sub_if_data *ps_sdata;
+ struct work_struct dynamic_ps_enable_work;
+ struct work_struct dynamic_ps_disable_work;
+ struct timer_list dynamic_ps_timer;
+ struct notifier_block network_latency_notifier;
+ struct notifier_block ifa_notifier;
+
+ /*
+ * The dynamic ps timeout configured from user space via WEXT -
+ * this will override whatever chosen by mac80211 internally.
+ */
+ int dynamic_ps_forced_timeout;
+ int dynamic_ps_user_timeout;
+ bool disable_dynamic_ps;
+
+ int user_power_level; /* in dBm */
+ int power_constr_level; /* in dBm */
+
+ enum ieee80211_smps_mode smps_mode;
+
+ struct work_struct restart_work;
+
+#ifdef CONFIG_MAC80211_DEBUGFS
+ struct local_debugfsdentries {
+ struct dentry *rcdir;
+ struct dentry *keys;
+ } debugfs;
+#endif
+
+ struct ieee80211_channel *hw_roc_channel;
+ struct net_device *hw_roc_dev;
+ struct sk_buff *hw_roc_skb, *hw_roc_skb_for_status;
+ struct work_struct hw_roc_start, hw_roc_done;
+ enum nl80211_channel_type hw_roc_channel_type;
+ unsigned int hw_roc_duration;
+ u32 hw_roc_cookie;
+ bool hw_roc_for_tx;
+ unsigned long hw_offchan_tx_cookie;
+
+ /* dummy netdev for use w/ NAPI */
+ struct net_device napi_dev;
+
+ struct napi_struct napi;
+};
+
+static inline struct ieee80211_sub_if_data *
+IEEE80211_DEV_TO_SUB_IF(struct net_device *dev)
+{
+ return netdev_priv(dev);
+}
+
+/* this struct represents 802.11n's RA/TID combination */
+struct ieee80211_ra_tid {
+ u8 ra[ETH_ALEN];
+ u16 tid;
+};
+
+/* Parsed Information Elements */
+struct ieee802_11_elems {
+ u8 *ie_start;
+ size_t total_len;
+
+ /* pointers to IEs */
+ u8 *ssid;
+ u8 *supp_rates;
+ u8 *fh_params;
+ u8 *ds_params;
+ u8 *cf_params;
+ struct ieee80211_tim_ie *tim;
+ u8 *ibss_params;
+ u8 *challenge;
+ u8 *wpa;
+ u8 *rsn;
+ u8 *erp_info;
+ u8 *ext_supp_rates;
+ u8 *wmm_info;
+ u8 *wmm_param;
+ struct ieee80211_ht_cap *ht_cap_elem;
+ struct ieee80211_ht_info *ht_info_elem;
+ struct ieee80211_meshconf_ie *mesh_config;
+ u8 *mesh_id;
+ u8 *peer_link;
+ u8 *preq;
+ u8 *prep;
+ u8 *perr;
+ struct ieee80211_rann_ie *rann;
+ u8 *ch_switch_elem;
+ u8 *country_elem;
+ u8 *pwr_constr_elem;
+ u8 *quiet_elem; /* first quite element */
+ u8 *timeout_int;
+
+ /* length of them, respectively */
+ u8 ssid_len;
+ u8 supp_rates_len;
+ u8 fh_params_len;
+ u8 ds_params_len;
+ u8 cf_params_len;
+ u8 tim_len;
+ u8 ibss_params_len;
+ u8 challenge_len;
+ u8 wpa_len;
+ u8 rsn_len;
+ u8 erp_info_len;
+ u8 ext_supp_rates_len;
+ u8 wmm_info_len;
+ u8 wmm_param_len;
+ u8 mesh_id_len;
+ u8 peer_link_len;
+ u8 preq_len;
+ u8 prep_len;
+ u8 perr_len;
+ u8 ch_switch_elem_len;
+ u8 country_elem_len;
+ u8 pwr_constr_elem_len;
+ u8 quiet_elem_len;
+ u8 num_of_quiet_elem; /* can be more the one */
+ u8 timeout_int_len;
+};
+
+static inline struct ieee80211_local *hw_to_local(
+ struct ieee80211_hw *hw)
+{
+ return container_of(hw, struct ieee80211_local, hw);
+}
+
+static inline struct ieee80211_hw *local_to_hw(
+ struct ieee80211_local *local)
+{
+ return &local->hw;
+}
+
+
+static inline int ieee80211_bssid_match(const u8 *raddr, const u8 *addr)
+{
+ return compare_ether_addr(raddr, addr) == 0 ||
+ is_broadcast_ether_addr(raddr);
+}
+
+
+int ieee80211_hw_config(struct ieee80211_local *local, u32 changed);
+void ieee80211_tx_set_protected(struct ieee80211_tx_data *tx);
+void ieee80211_bss_info_change_notify(struct ieee80211_sub_if_data *sdata,
+ u32 changed);
+void ieee80211_configure_filter(struct ieee80211_local *local);
+u32 ieee80211_reset_erp_info(struct ieee80211_sub_if_data *sdata);
+
+/* STA code */
+void ieee80211_sta_setup_sdata(struct ieee80211_sub_if_data *sdata);
+int ieee80211_mgd_auth(struct ieee80211_sub_if_data *sdata,
+ struct cfg80211_auth_request *req);
+int ieee80211_mgd_assoc(struct ieee80211_sub_if_data *sdata,
+ struct cfg80211_assoc_request *req);
+int ieee80211_mgd_deauth(struct ieee80211_sub_if_data *sdata,
+ struct cfg80211_deauth_request *req,
+ void *cookie);
+int ieee80211_mgd_disassoc(struct ieee80211_sub_if_data *sdata,
+ struct cfg80211_disassoc_request *req,
+ void *cookie);
+void ieee80211_send_pspoll(struct ieee80211_local *local,
+ struct ieee80211_sub_if_data *sdata);
+void ieee80211_recalc_ps(struct ieee80211_local *local, s32 latency);
+int ieee80211_max_network_latency(struct notifier_block *nb,
+ unsigned long data, void *dummy);
+int ieee80211_set_arp_filter(struct ieee80211_sub_if_data *sdata);
+void ieee80211_sta_process_chanswitch(struct ieee80211_sub_if_data *sdata,
+ struct ieee80211_channel_sw_ie *sw_elem,
+ struct ieee80211_bss *bss,
+ u64 timestamp);
+void ieee80211_sta_quiesce(struct ieee80211_sub_if_data *sdata);
+void ieee80211_sta_restart(struct ieee80211_sub_if_data *sdata);
+void ieee80211_sta_work(struct ieee80211_sub_if_data *sdata);
+void ieee80211_sta_rx_queued_mgmt(struct ieee80211_sub_if_data *sdata,
+ struct sk_buff *skb);
+void ieee80211_sta_reset_beacon_monitor(struct ieee80211_sub_if_data *sdata);
+void ieee80211_sta_reset_conn_monitor(struct ieee80211_sub_if_data *sdata);
+
+/* IBSS code */
+void ieee80211_ibss_notify_scan_completed(struct ieee80211_local *local);
+void ieee80211_ibss_setup_sdata(struct ieee80211_sub_if_data *sdata);
+struct sta_info *ieee80211_ibss_add_sta(struct ieee80211_sub_if_data *sdata,
+ u8 *bssid, u8 *addr, u32 supp_rates,
+ gfp_t gfp);
+int ieee80211_ibss_join(struct ieee80211_sub_if_data *sdata,
+ struct cfg80211_ibss_params *params);
+int ieee80211_ibss_leave(struct ieee80211_sub_if_data *sdata);
+void ieee80211_ibss_quiesce(struct ieee80211_sub_if_data *sdata);
+void ieee80211_ibss_restart(struct ieee80211_sub_if_data *sdata);
+void ieee80211_ibss_work(struct ieee80211_sub_if_data *sdata);
+void ieee80211_ibss_rx_queued_mgmt(struct ieee80211_sub_if_data *sdata,
+ struct sk_buff *skb);
+
+/* mesh code */
+void ieee80211_mesh_work(struct ieee80211_sub_if_data *sdata);
+void ieee80211_mesh_rx_queued_mgmt(struct ieee80211_sub_if_data *sdata,
+ struct sk_buff *skb);
+
+/* scan/BSS handling */
+void ieee80211_scan_work(struct work_struct *work);
+int ieee80211_request_internal_scan(struct ieee80211_sub_if_data *sdata,
+ const u8 *ssid, u8 ssid_len,
+ struct ieee80211_channel *chan);
+int ieee80211_request_scan(struct ieee80211_sub_if_data *sdata,
+ struct cfg80211_scan_request *req);
+void ieee80211_scan_cancel(struct ieee80211_local *local);
+ieee80211_rx_result
+ieee80211_scan_rx(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb);
+
+void ieee80211_mlme_notify_scan_completed(struct ieee80211_local *local);
+struct ieee80211_bss *
+ieee80211_bss_info_update(struct ieee80211_local *local,
+ struct ieee80211_rx_status *rx_status,
+ struct ieee80211_mgmt *mgmt,
+ size_t len,
+ struct ieee802_11_elems *elems,
+ struct ieee80211_channel *channel,
+ bool beacon);
+struct ieee80211_bss *
+ieee80211_rx_bss_get(struct ieee80211_local *local, u8 *bssid, int freq,
+ u8 *ssid, u8 ssid_len);
+void ieee80211_rx_bss_put(struct ieee80211_local *local,
+ struct ieee80211_bss *bss);
+
+/* scheduled scan handling */
+int ieee80211_request_sched_scan_start(struct ieee80211_sub_if_data *sdata,
+ struct cfg80211_sched_scan_request *req);
+int ieee80211_request_sched_scan_stop(struct ieee80211_sub_if_data *sdata);
+void ieee80211_sched_scan_stopped_work(struct work_struct *work);
+
+/* off-channel helpers */
+bool ieee80211_cfg_on_oper_channel(struct ieee80211_local *local);
+void ieee80211_offchannel_enable_all_ps(struct ieee80211_local *local,
+ bool tell_ap);
+void ieee80211_offchannel_stop_vifs(struct ieee80211_local *local,
+ bool offchannel_ps_enable);
+void ieee80211_offchannel_return(struct ieee80211_local *local,
+ bool enable_beaconing,
+ bool offchannel_ps_disable);
+void ieee80211_hw_roc_setup(struct ieee80211_local *local);
+
+/* interface handling */
+int ieee80211_iface_init(void);
+void ieee80211_iface_exit(void);
+int ieee80211_if_add(struct ieee80211_local *local, const char *name,
+ struct net_device **new_dev, enum nl80211_iftype type,
+ struct vif_params *params);
+int ieee80211_if_change_type(struct ieee80211_sub_if_data *sdata,
+ enum nl80211_iftype type);
+void ieee80211_if_remove(struct ieee80211_sub_if_data *sdata);
+void ieee80211_remove_interfaces(struct ieee80211_local *local);
+u32 __ieee80211_recalc_idle(struct ieee80211_local *local);
+void ieee80211_recalc_idle(struct ieee80211_local *local);
+void ieee80211_adjust_monitor_flags(struct ieee80211_sub_if_data *sdata,
+ const int offset);
+
+static inline bool ieee80211_sdata_running(struct ieee80211_sub_if_data *sdata)
+{
+ return test_bit(SDATA_STATE_RUNNING, &sdata->state);
+}
+
+/* tx handling */
+void ieee80211_clear_tx_pending(struct ieee80211_local *local);
+void ieee80211_tx_pending(unsigned long data);
+netdev_tx_t ieee80211_monitor_start_xmit(struct sk_buff *skb,
+ struct net_device *dev);
+netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb,
+ struct net_device *dev);
+
+/*
+ * radiotap header for status frames
+ */
+struct ieee80211_tx_status_rtap_hdr {
+ struct ieee80211_radiotap_header hdr;
+ u8 rate;
+ u8 padding_for_rate;
+ __le16 tx_flags;
+ u8 data_retries;
+} __packed;
+
+
+/* HT */
+void ieee80211_ht_cap_ie_to_sta_ht_cap(struct ieee80211_supported_band *sband,
+ struct ieee80211_ht_cap *ht_cap_ie,
+ struct ieee80211_sta_ht_cap *ht_cap);
+void ieee80211_send_bar(struct ieee80211_sub_if_data *sdata, u8 *ra, u16 tid, u16 ssn);
+void ieee80211_send_delba(struct ieee80211_sub_if_data *sdata,
+ const u8 *da, u16 tid,
+ u16 initiator, u16 reason_code);
+int ieee80211_send_smps_action(struct ieee80211_sub_if_data *sdata,
+ enum ieee80211_smps_mode smps, const u8 *da,
+ const u8 *bssid);
+void ieee80211_request_smps_work(struct work_struct *work);
+
+void ___ieee80211_stop_rx_ba_session(struct sta_info *sta, u16 tid,
+ u16 initiator, u16 reason, bool stop);
+void __ieee80211_stop_rx_ba_session(struct sta_info *sta, u16 tid,
+ u16 initiator, u16 reason, bool stop);
+void ieee80211_sta_tear_down_BA_sessions(struct sta_info *sta, bool tx);
+void ieee80211_process_delba(struct ieee80211_sub_if_data *sdata,
+ struct sta_info *sta,
+ struct ieee80211_mgmt *mgmt, size_t len);
+void ieee80211_process_addba_resp(struct ieee80211_local *local,
+ struct sta_info *sta,
+ struct ieee80211_mgmt *mgmt,
+ size_t len);
+void ieee80211_process_addba_request(struct ieee80211_local *local,
+ struct sta_info *sta,
+ struct ieee80211_mgmt *mgmt,
+ size_t len);
+
+int __ieee80211_stop_tx_ba_session(struct sta_info *sta, u16 tid,
+ enum ieee80211_back_parties initiator,
+ bool tx);
+int ___ieee80211_stop_tx_ba_session(struct sta_info *sta, u16 tid,
+ enum ieee80211_back_parties initiator,
+ bool tx);
+void ieee80211_start_tx_ba_cb(struct ieee80211_vif *vif, u8 *ra, u16 tid);
+void ieee80211_stop_tx_ba_cb(struct ieee80211_vif *vif, u8 *ra, u8 tid);
+void ieee80211_ba_session_work(struct work_struct *work);
+void ieee80211_tx_ba_session_handle_start(struct sta_info *sta, int tid);
+void ieee80211_release_reorder_timeout(struct sta_info *sta, int tid);
+
+/* Spectrum management */
+void ieee80211_process_measurement_req(struct ieee80211_sub_if_data *sdata,
+ struct ieee80211_mgmt *mgmt,
+ size_t len);
+
+/* Suspend/resume and hw reconfiguration */
+int ieee80211_reconfig(struct ieee80211_local *local);
+void ieee80211_stop_device(struct ieee80211_local *local);
+
+#ifdef CONFIG_PM
+int __ieee80211_suspend(struct ieee80211_hw *hw,
+ struct cfg80211_wowlan *wowlan);
+
+static inline int __ieee80211_resume(struct ieee80211_hw *hw)
+{
+ struct ieee80211_local *local = hw_to_local(hw);
+
+ WARN(test_bit(SCAN_HW_SCANNING, &local->scanning),
+ "%s: resume with hardware scan still in progress\n",
+ wiphy_name(hw->wiphy));
+
+ return ieee80211_reconfig(hw_to_local(hw));
+}
+#else
+static inline int __ieee80211_suspend(struct ieee80211_hw *hw,
+ struct cfg80211_wowlan *wowlan)
+{
+ return 0;
+}
+
+static inline int __ieee80211_resume(struct ieee80211_hw *hw)
+{
+ return 0;
+}
+#endif
+
+/* utility functions/constants */
+extern void *mac80211_wiphy_privid; /* for wiphy privid */
+u8 *ieee80211_get_bssid(struct ieee80211_hdr *hdr, size_t len,
+ enum nl80211_iftype type);
+int ieee80211_frame_duration(struct ieee80211_local *local, size_t len,
+ int rate, int erp, int short_preamble);
+void mac80211_ev_michael_mic_failure(struct ieee80211_sub_if_data *sdata, int keyidx,
+ struct ieee80211_hdr *hdr, const u8 *tsc,
+ gfp_t gfp);
+void ieee80211_set_wmm_default(struct ieee80211_sub_if_data *sdata);
+void ieee80211_tx_skb(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb);
+void ieee802_11_parse_elems(u8 *start, size_t len,
+ struct ieee802_11_elems *elems);
+u32 ieee802_11_parse_elems_crc(u8 *start, size_t len,
+ struct ieee802_11_elems *elems,
+ u64 filter, u32 crc);
+u32 ieee80211_mandatory_rates(struct ieee80211_local *local,
+ enum ieee80211_band band);
+
+void ieee80211_dynamic_ps_enable_work(struct work_struct *work);
+void ieee80211_dynamic_ps_disable_work(struct work_struct *work);
+void ieee80211_dynamic_ps_timer(unsigned long data);
+void ieee80211_send_nullfunc(struct ieee80211_local *local,
+ struct ieee80211_sub_if_data *sdata,
+ int powersave);
+void ieee80211_sta_rx_notify(struct ieee80211_sub_if_data *sdata,
+ struct ieee80211_hdr *hdr);
+void ieee80211_sta_tx_notify(struct ieee80211_sub_if_data *sdata,
+ struct ieee80211_hdr *hdr, bool ack);
+void ieee80211_beacon_connection_loss_work(struct work_struct *work);
+
+void ieee80211_wake_queues_by_reason(struct ieee80211_hw *hw,
+ enum queue_stop_reason reason);
+void ieee80211_stop_queues_by_reason(struct ieee80211_hw *hw,
+ enum queue_stop_reason reason);
+void ieee80211_wake_queue_by_reason(struct ieee80211_hw *hw, int queue,
+ enum queue_stop_reason reason);
+void ieee80211_stop_queue_by_reason(struct ieee80211_hw *hw, int queue,
+ enum queue_stop_reason reason);
+void ieee80211_add_pending_skb(struct ieee80211_local *local,
+ struct sk_buff *skb);
+int ieee80211_add_pending_skbs(struct ieee80211_local *local,
+ struct sk_buff_head *skbs);
+int ieee80211_add_pending_skbs_fn(struct ieee80211_local *local,
+ struct sk_buff_head *skbs,
+ void (*fn)(void *data), void *data);
+
+void ieee80211_send_auth(struct ieee80211_sub_if_data *sdata,
+ u16 transaction, u16 auth_alg,
+ u8 *extra, size_t extra_len, const u8 *bssid,
+ const u8 *key, u8 key_len, u8 key_idx);
+int ieee80211_build_preq_ies(struct ieee80211_local *local, u8 *buffer,
+ const u8 *ie, size_t ie_len,
+ enum ieee80211_band band, u32 rate_mask,
+ u8 channel);
+struct sk_buff *ieee80211_build_probe_req(struct ieee80211_sub_if_data *sdata,
+ u8 *dst,
+ const u8 *ssid, size_t ssid_len,
+ const u8 *ie, size_t ie_len);
+void ieee80211_send_probe_req(struct ieee80211_sub_if_data *sdata, u8 *dst,
+ const u8 *ssid, size_t ssid_len,
+ const u8 *ie, size_t ie_len);
+
+void ieee80211_sta_def_wmm_params(struct ieee80211_sub_if_data *sdata,
+ const size_t supp_rates_len,
+ const u8 *supp_rates);
+u32 ieee80211_sta_get_rates(struct ieee80211_local *local,
+ struct ieee802_11_elems *elems,
+ enum ieee80211_band band);
+int __ieee80211_request_smps(struct ieee80211_sub_if_data *sdata,
+ enum ieee80211_smps_mode smps_mode);
+void ieee80211_recalc_smps(struct ieee80211_local *local);
+
+size_t ieee80211_ie_split(const u8 *ies, size_t ielen,
+ const u8 *ids, int n_ids, size_t offset);
+size_t ieee80211_ie_split_vendor(const u8 *ies, size_t ielen, size_t offset);
+
+/* internal work items */
+void ieee80211_work_init(struct ieee80211_local *local);
+void ieee80211_add_work(struct ieee80211_work *wk);
+void free_work(struct ieee80211_work *wk);
+void ieee80211_work_purge(struct ieee80211_sub_if_data *sdata);
+ieee80211_rx_result ieee80211_work_rx_mgmt(struct ieee80211_sub_if_data *sdata,
+ struct sk_buff *skb);
+int ieee80211_wk_remain_on_channel(struct ieee80211_sub_if_data *sdata,
+ struct ieee80211_channel *chan,
+ enum nl80211_channel_type channel_type,
+ unsigned int duration, u64 *cookie);
+int ieee80211_wk_cancel_remain_on_channel(
+ struct ieee80211_sub_if_data *sdata, u64 cookie);
+
+/* channel management */
+enum ieee80211_chan_mode {
+ CHAN_MODE_UNDEFINED,
+ CHAN_MODE_HOPPING,
+ CHAN_MODE_FIXED,
+};
+
+enum ieee80211_chan_mode
+ieee80211_get_channel_mode(struct ieee80211_local *local,
+ struct ieee80211_sub_if_data *ignore);
+bool ieee80211_set_channel_type(struct ieee80211_local *local,
+ struct ieee80211_sub_if_data *sdata,
+ enum nl80211_channel_type chantype);
+
+#ifdef CONFIG_MAC80211_NOINLINE
+#define debug_noinline noinline
+#else
+#define debug_noinline
+#endif
+
+#endif /* MAC80211_I_H */
diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index 866f269..0186aba 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -24,7 +24,7 @@
#include <net/net_namespace.h>
#include <net/cfg80211.h>

-#include "ieee80211_i.h"
+#include "mac80211_i.h"
#include "driver-ops.h"
#include "rate.h"
#include "mesh.h"
diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c
index 29e9980..69b284c 100644
--- a/net/mac80211/mesh.c
+++ b/net/mac80211/mesh.c
@@ -10,7 +10,7 @@

#include <linux/slab.h>
#include <asm/unaligned.h>
-#include "ieee80211_i.h"
+#include "mac80211_i.h"
#include "mesh.h"

#define IEEE80211_MESH_PEER_INACTIVITY_LIMIT (1800 * HZ)
diff --git a/net/mac80211/mesh.h b/net/mac80211/mesh.h
index 249e733..df4a9a1 100644
--- a/net/mac80211/mesh.h
+++ b/net/mac80211/mesh.h
@@ -14,7 +14,7 @@
#include <linux/types.h>
#include <linux/jhash.h>
#include <asm/unaligned.h>
-#include "ieee80211_i.h"
+#include "mac80211_i.h"


/* Data structures */
diff --git a/net/mac80211/mesh_pathtbl.c b/net/mac80211/mesh_pathtbl.c
index 0d2faac..bf7989c 100644
--- a/net/mac80211/mesh_pathtbl.c
+++ b/net/mac80211/mesh_pathtbl.c
@@ -14,7 +14,7 @@
#include <linux/spinlock.h>
#include <linux/string.h>
#include <net/mac80211.h>
-#include "ieee80211_i.h"
+#include "mac80211_i.h"
#include "mesh.h"

/* There will be initially 2^INIT_PATHS_SIZE_ORDER buckets */
diff --git a/net/mac80211/mesh_plink.c b/net/mac80211/mesh_plink.c
index f4adc09..1832c46 100644
--- a/net/mac80211/mesh_plink.c
+++ b/net/mac80211/mesh_plink.c
@@ -9,7 +9,7 @@
#include <linux/gfp.h>
#include <linux/kernel.h>
#include <linux/random.h>
-#include "ieee80211_i.h"
+#include "mac80211_i.h"
#include "rate.h"
#include "mesh.h"

diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 456cccf..b1692a6 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -23,7 +23,7 @@
#include <net/mac80211.h>
#include <asm/unaligned.h>

-#include "ieee80211_i.h"
+#include "mac80211_i.h"
#include "driver-ops.h"
#include "rate.h"
#include "led.h"
diff --git a/net/mac80211/offchannel.c b/net/mac80211/offchannel.c
index 13427b1..f6047f9 100644
--- a/net/mac80211/offchannel.c
+++ b/net/mac80211/offchannel.c
@@ -13,7 +13,7 @@
* published by the Free Software Foundation.
*/
#include <net/mac80211.h>
-#include "ieee80211_i.h"
+#include "mac80211_i.h"
#include "driver-trace.h"

/*
diff --git a/net/mac80211/pm.c b/net/mac80211/pm.c
index 730778a..75cdb9f 100644
--- a/net/mac80211/pm.c
+++ b/net/mac80211/pm.c
@@ -1,7 +1,7 @@
#include <net/mac80211.h>
#include <net/rtnetlink.h>

-#include "ieee80211_i.h"
+#include "mac80211_i.h"
#include "mesh.h"
#include "driver-ops.h"
#include "led.h"
diff --git a/net/mac80211/rate.c b/net/mac80211/rate.c
index 3d5a2cb..88e2659 100644
--- a/net/mac80211/rate.c
+++ b/net/mac80211/rate.c
@@ -12,7 +12,7 @@
#include <linux/rtnetlink.h>
#include <linux/slab.h>
#include "rate.h"
-#include "ieee80211_i.h"
+#include "mac80211_i.h"
#include "debugfs.h"

struct rate_control_alg {
diff --git a/net/mac80211/rate.h b/net/mac80211/rate.h
index 168427b..b22c1de 100644
--- a/net/mac80211/rate.h
+++ b/net/mac80211/rate.h
@@ -16,7 +16,7 @@
#include <linux/types.h>
#include <linux/kref.h>
#include <net/mac80211.h>
-#include "ieee80211_i.h"
+#include "mac80211_i.h"
#include "sta_info.h"

struct rate_control_ref {
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index 7fa8c6b..3c0dbf2 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -19,7 +19,7 @@
#include <net/mac80211.h>
#include <net/ieee80211_radiotap.h>

-#include "ieee80211_i.h"
+#include "mac80211_i.h"
#include "driver-ops.h"
#include "led.h"
#include "mesh.h"
diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c
index 58ffa7d..c21b720 100644
--- a/net/mac80211/scan.c
+++ b/net/mac80211/scan.c
@@ -19,7 +19,7 @@
#include <linux/slab.h>
#include <net/mac80211.h>

-#include "ieee80211_i.h"
+#include "mac80211_i.h"
#include "driver-ops.h"
#include "mesh.h"

diff --git a/net/mac80211/spectmgmt.c b/net/mac80211/spectmgmt.c
index 7733f66..667cc06 100644
--- a/net/mac80211/spectmgmt.c
+++ b/net/mac80211/spectmgmt.c
@@ -17,7 +17,7 @@
#include <linux/ieee80211.h>
#include <net/cfg80211.h>
#include <net/mac80211.h>
-#include "ieee80211_i.h"
+#include "mac80211_i.h"
#include "sta_info.h"
#include "wme.h"

diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c
index b83870b..e125bc4 100644
--- a/net/mac80211/sta_info.c
+++ b/net/mac80211/sta_info.c
@@ -18,7 +18,7 @@
#include <linux/rtnetlink.h>

#include <net/mac80211.h>
-#include "ieee80211_i.h"
+#include "mac80211_i.h"
#include "driver-ops.h"
#include "rate.h"
#include "sta_info.h"
diff --git a/net/mac80211/status.c b/net/mac80211/status.c
index 1658efa..b69e8af 100644
--- a/net/mac80211/status.c
+++ b/net/mac80211/status.c
@@ -10,7 +10,7 @@
*/

#include <net/mac80211.h>
-#include "ieee80211_i.h"
+#include "mac80211_i.h"
#include "rate.h"
#include "mesh.h"
#include "led.h"
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 64e0f75..3aa5836 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -24,7 +24,7 @@
#include <net/mac80211.h>
#include <asm/unaligned.h>

-#include "ieee80211_i.h"
+#include "mac80211_i.h"
#include "driver-ops.h"
#include "led.h"
#include "mesh.h"
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index d3fe2d2..4be7132 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -24,7 +24,7 @@
#include <net/cfg80211.h>
#include <net/rtnetlink.h>

-#include "ieee80211_i.h"
+#include "mac80211_i.h"
#include "driver-ops.h"
#include "rate.h"
#include "mesh.h"
diff --git a/net/mac80211/wep.c b/net/mac80211/wep.c
index a1c6bfd..cf15e91 100644
--- a/net/mac80211/wep.c
+++ b/net/mac80211/wep.c
@@ -21,7 +21,7 @@
#include <asm/unaligned.h>

#include <net/mac80211.h>
-#include "ieee80211_i.h"
+#include "mac80211_i.h"
#include "wep.h"


diff --git a/net/mac80211/wep.h b/net/mac80211/wep.h
index 01e5484..f265c02 100644
--- a/net/mac80211/wep.h
+++ b/net/mac80211/wep.h
@@ -13,7 +13,7 @@

#include <linux/skbuff.h>
#include <linux/types.h>
-#include "ieee80211_i.h"
+#include "mac80211_i.h"
#include "key.h"

int ieee80211_wep_init(struct ieee80211_local *local);
diff --git a/net/mac80211/wme.c b/net/mac80211/wme.c
index 28bc084..74f60ab 100644
--- a/net/mac80211/wme.c
+++ b/net/mac80211/wme.c
@@ -15,7 +15,7 @@
#include <net/pkt_sched.h>

#include <net/mac80211.h>
-#include "ieee80211_i.h"
+#include "mac80211_i.h"
#include "wme.h"

/* Default mapping in classifier to work with default
diff --git a/net/mac80211/wme.h b/net/mac80211/wme.h
index 6053b1c..32f17c1 100644
--- a/net/mac80211/wme.h
+++ b/net/mac80211/wme.h
@@ -11,7 +11,7 @@
#define _WME_H

#include <linux/netdevice.h>
-#include "ieee80211_i.h"
+#include "mac80211_i.h"

#define QOS_CONTROL_ACK_POLICY_NORMAL 0
#define QOS_CONTROL_ACK_POLICY_NOACK 1
diff --git a/net/mac80211/work.c b/net/mac80211/work.c
index a94b312..bfc4ba7 100644
--- a/net/mac80211/work.c
+++ b/net/mac80211/work.c
@@ -23,7 +23,7 @@
#include <net/mac80211.h>
#include <asm/unaligned.h>

-#include "ieee80211_i.h"
+#include "mac80211_i.h"
#include "rate.h"

#define IEEE80211_AUTH_TIMEOUT (HZ / 5)
diff --git a/net/mac80211/wpa.c b/net/mac80211/wpa.c
index 9dc3b5f..6bc548f 100644
--- a/net/mac80211/wpa.c
+++ b/net/mac80211/wpa.c
@@ -16,7 +16,7 @@
#include <asm/unaligned.h>
#include <net/mac80211.h>

-#include "ieee80211_i.h"
+#include "mac80211_i.h"
#include "michael.h"
#include "tkip.h"
#include "aes_ccm.h"
diff --git a/net/mac80211/wpa.h b/net/mac80211/wpa.h
index baba060..2f4aa1b 100644
--- a/net/mac80211/wpa.h
+++ b/net/mac80211/wpa.h
@@ -11,7 +11,7 @@

#include <linux/skbuff.h>
#include <linux/types.h>
-#include "ieee80211_i.h"
+#include "mac80211_i.h"

ieee80211_tx_result
ieee80211_tx_h_michael_mic_add(struct ieee80211_tx_data *tx);


2011-05-29 20:04:46

by Kalle Valo

[permalink] [raw]
Subject: [RFC PATCH 05/27] mac80211: switch mac80211.h to use mac80211 prefix

It's very confusing that mac80211 uses ieee80211_ prefix everywhere and then we
have the generic net/ieee80211.h and cfg80211 also using ieee80211_ prefix.

To make it easier to the developers change mac80211 use mac80211_ prefix
everywhere. As this is a huge task, introduce new file mac80211-compat.h which
makes it possible to not break the build while the transition is in progress.
Once mac80211 and all the drivers have been changed to use the new prefix
mac80211-compat.h will be removed.

Signed-off-by: Kalle Valo <[email protected]>
---
include/net/mac80211-compat.h | 273 ++++++++
include/net/mac80211.h | 1428 +++++++++++++++++++++--------------------
2 files changed, 988 insertions(+), 713 deletions(-)
create mode 100644 include/net/mac80211-compat.h

diff --git a/include/net/mac80211-compat.h b/include/net/mac80211-compat.h
new file mode 100644
index 0000000..a314fca
--- /dev/null
+++ b/include/net/mac80211-compat.h
@@ -0,0 +1,273 @@
+/*
+ * mac80211 <-> driver interface
+ *
+ * Copyright 2002-2005, Devicescape Software, Inc.
+ * Copyright 2006-2007 Jiri Benc <[email protected]>
+ * Copyright 2007-2010 Johannes Berg <[email protected]>
+ * Copyright 2011 Kalle Valo <[email protected]>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#ifndef MAC80211_COMPAT_H
+#define MAC80211_COMPAT_H
+
+#define ieee80211_max_queues mac80211_max_queues
+#define IEEE80211_MAX_QUEUES MAC80211_MAX_QUEUES
+
+#define ieee80211_ac_numbers mac80211_ac_numbers
+#define IEEE80211_AC_VO MAC80211_AC_VO
+#define IEEE80211_AC_VI MAC80211_AC_VI
+#define IEEE80211_AC_BE MAC80211_AC_BE
+#define IEEE80211_AC_BK MAC80211_AC_BK
+
+#define ieee80211_tx_queue_params mac80211_tx_queue_params
+
+#define ieee80211_low_level_stats mac80211_low_level_stats
+
+#define ieee80211_bss_change mac80211_bss_change
+
+#define IEEE80211_BSS_ARP_ADDR_LIST_LEN MAC80211_BSS_ARP_ADDR_LIST_LEN
+
+#define ieee80211_bss_conf mac80211_bss_conf
+
+#define IEEE80211_TX_CTL_REQ_TX_STATUS MAC80211_TX_CTL_REQ_TX_STATUS
+#define IEEE80211_TX_CTL_ASSIGN_SEQ MAC80211_TX_CTL_ASSIGN_SEQ
+#define IEEE80211_TX_CTL_NO_ACK MAC80211_TX_CTL_NO_ACK
+#define IEEE80211_TX_CTL_CLEAR_PS_FILT MAC80211_TX_CTL_CLEAR_PS_FILT
+#define IEEE80211_TX_CTL_FIRST_FRAGMENT MAC80211_TX_CTL_FIRST_FRAGMENT
+#define IEEE80211_TX_CTL_SEND_AFTER_DTIM MAC80211_TX_CTL_SEND_AFTER_DTIM
+#define IEEE80211_TX_CTL_AMPDU MAC80211_TX_CTL_AMPDU
+#define IEEE80211_TX_CTL_INJECTED MAC80211_TX_CTL_INJECTED
+#define IEEE80211_TX_STAT_TX_FILTERED MAC80211_TX_STAT_TX_FILTERED
+#define IEEE80211_TX_STAT_ACK MAC80211_TX_STAT_ACK
+#define IEEE80211_TX_STAT_AMPDU MAC80211_TX_STAT_AMPDU
+#define IEEE80211_TX_STAT_AMPDU_NO_BACK MAC80211_TX_STAT_AMPDU_NO_BACK
+#define IEEE80211_TX_CTL_RATE_CTRL_PROBE MAC80211_TX_CTL_RATE_CTRL_PROBE
+#define IEEE80211_TX_INTFL_NEED_TXPROCESSING MAC80211_TX_INTFL_NEED_TXPROCESSING
+#define IEEE80211_TX_INTFL_RETRIED MAC80211_TX_INTFL_RETRIED
+#define IEEE80211_TX_INTFL_DONT_ENCRYPT MAC80211_TX_INTFL_DONT_ENCRYPT
+#define IEEE80211_TX_CTL_PSPOLL_RESPONSE MAC80211_TX_CTL_PSPOLL_RESPONSE
+#define IEEE80211_TX_CTL_MORE_FRAMES MAC80211_TX_CTL_MORE_FRAMES
+#define IEEE80211_TX_INTFL_RETRANSMISSION MAC80211_TX_INTFL_RETRANSMISSION
+#define IEEE80211_TX_INTFL_HAS_RADIOTAP MAC80211_TX_INTFL_HAS_RADIOTAP
+#define IEEE80211_TX_INTFL_NL80211_FRAME_TX MAC80211_TX_INTFL_NL80211_FRAME_TX
+#define IEEE80211_TX_CTL_LDPC MAC80211_TX_CTL_LDPC
+#define IEEE80211_TX_CTL_STBC MAC80211_TX_CTL_STBC
+#define IEEE80211_TX_CTL_TX_OFFCHAN MAC80211_TX_CTL_TX_OFFCHAN
+#define IEEE80211_TX_INTFL_TKIP_MIC_FAILURE MAC80211_TX_INTFL_TKIP_MIC_FAILURE
+
+#define IEEE80211_TX_CTL_STBC_SHIFT MAC80211_TX_CTL_STBC_SHIFT
+
+#define IEEE80211_TX_TEMPORARY_FLAGS MAC80211_TX_TEMPORARY_FLAGS
+
+#define IEEE80211_TX_RC_USE_RTS_CTS MAC80211_TX_RC_USE_RTS_CTS
+#define IEEE80211_TX_RC_USE_CTS_PROTECT MAC80211_TX_RC_USE_CTS_PROTECT
+#define IEEE80211_TX_RC_USE_SHORT_PREAMBLE MAC80211_TX_RC_USE_SHORT_PREAMBLE
+#define IEEE80211_TX_RC_MCS MAC80211_TX_RC_MCS
+#define IEEE80211_TX_RC_GREEN_FIELD MAC80211_TX_RC_GREEN_FIELD
+#define IEEE80211_TX_RC_40_MHZ_WIDTH MAC80211_TX_RC_40_MHZ_WIDTH
+#define IEEE80211_TX_RC_DUP_DATA MAC80211_TX_RC_DUP_DATA
+#define IEEE80211_TX_RC_SHORT_GI MAC80211_TX_RC_SHORT_GI
+
+#define IEEE80211_TX_INFO_DRIVER_DATA_SIZE MAC80211_TX_INFO_DRIVER_DATA_SIZE
+#define IEEE80211_TX_INFO_RATE_DRIVER_DATA_SIZE MAC80211_TX_INFO_RATE_DRIVER_DATA_SIZE
+#define IEEE80211_TX_MAX_RATES MAC80211_TX_MAX_RATES
+
+#define ieee80211_tx_rate mac80211_tx_rate
+#define ieee80211_tx_info mac80211_tx_info
+
+#define ieee80211_tx_info mac80211_tx_info
+#define ieee80211_rx_status mac80211_rx_status
+
+#define ieee80211_sched_scan_ies mac80211_sched_scan_ies
+
+#define IEEE80211_SKB_CB MAC80211_SKB_CB
+
+#define IEEE80211_SKB_RXCB MAC80211_SKB_RXCB
+
+#define ieee80211_tx_info_clear_status mac80211_tx_info_clear_status
+
+#define ieee80211_rx_status mac80211_rx_status
+
+#define ieee80211_conf_flags mac80211_conf_flags
+
+#define IEEE80211_CONF_MONITOR MAC80211_CONF_MONITOR
+#define IEEE80211_CONF_PS MAC80211_CONF_PS
+#define IEEE80211_CONF_IDLE MAC80211_CONF_IDLE
+#define IEEE80211_CONF_OFFCHANNEL MAC80211_CONF_OFFCHANNEL
+
+#define ieee80211_conf_changed mac80211_conf_changed
+
+#define IEEE80211_CONF_CHANGE_SMPS MAC80211_CONF_CHANGE_SMPS
+#define IEEE80211_CONF_CHANGE_LISTEN_INTERVAL MAC80211_CONF_CHANGE_LISTEN_INTERVAL
+#define IEEE80211_CONF_CHANGE_MONITOR MAC80211_CONF_CHANGE_MONITOR
+#define IEEE80211_CONF_CHANGE_PS MAC80211_CONF_CHANGE_PS
+#define IEEE80211_CONF_CHANGE_POWER MAC80211_CONF_CHANGE_POWER
+#define IEEE80211_CONF_CHANGE_CHANNEL MAC80211_CONF_CHANGE_CHANNEL
+#define IEEE80211_CONF_CHANGE_RETRY_LIMITS MAC80211_CONF_CHANGE_RETRY_LIMITS
+#define IEEE80211_CONF_CHANGE_IDLE MAC80211_CONF_CHANGE_IDLE
+
+#define ieee80211_smps_mode mac80211_smps_mode
+#define IEEE80211_SMPS_AUTOMATIC MAC80211_SMPS_AUTOMATIC
+#define IEEE80211_SMPS_OFF MAC80211_SMPS_OFF
+#define IEEE80211_SMPS_STATIC MAC80211_SMPS_STATIC
+#define IEEE80211_SMPS_DYNAMIC MAC80211_SMPS_DYNAMIC
+#define IEEE80211_SMPS_NUM_MODES MAC80211_SMPS_NUM_MODES
+
+#define ieee80211_conf mac80211_conf
+#define ieee80211_channel_switch mac80211_channel_switch
+#define ieee80211_vif mac80211_vif
+#define ieee80211_vif_is_mesh mac80211_vif_is_mesh
+
+#define ieee80211_key_flags mac80211_key_flags
+#define IEEE80211_KEY_FLAG_WMM_STA MAC80211_KEY_FLAG_WMM_STA
+#define IEEE80211_KEY_FLAG_GENERATE_IV MAC80211_KEY_FLAG_GENERATE_IV
+#define IEEE80211_KEY_FLAG_GENERATE_MMIC MAC80211_KEY_FLAG_GENERATE_MMIC
+#define IEEE80211_KEY_FLAG_PAIRWISE MAC80211_KEY_FLAG_PAIRWISE
+#define IEEE80211_KEY_FLAG_SW_MGMT MAC80211_KEY_FLAG_SW_MGMT
+
+#define ieee80211_key_conf mac80211_key_conf
+#define ieee80211_sta mac80211_sta
+
+#define ieee80211_tkip_key_type mac80211_tkip_key_type
+#define IEEE80211_TKIP_P1_KEY MAC80211_TKIP_P1_KEY
+#define IEEE80211_TKIP_P2_KEY MAC80211_TKIP_P2_KEY
+
+#define ieee80211_hw_flags mac80211_hw_flags
+
+#define IEEE80211_HW_HAS_RATE_CONTROL MAC80211_HW_HAS_RATE_CONTROL
+#define IEEE80211_HW_RX_INCLUDES_FCS MAC80211_HW_RX_INCLUDES_FCS
+#define IEEE80211_HW_HOST_BROADCAST_PS_BUFFERING MAC80211_HW_HOST_BROADCAST_PS_BUFFERING
+#define IEEE80211_HW_2GHZ_SHORT_SLOT_INCAPABLE MAC80211_HW_2GHZ_SHORT_SLOT_INCAPABLE
+#define IEEE80211_HW_2GHZ_SHORT_PREAMBLE_INCAPABLE MAC80211_HW_2GHZ_SHORT_PREAMBLE_INCAPABLE
+#define IEEE80211_HW_SIGNAL_UNSPEC MAC80211_HW_SIGNAL_UNSPEC
+#define IEEE80211_HW_SIGNAL_DBM MAC80211_HW_SIGNAL_DBM
+#define IEEE80211_HW_NEED_DTIM_PERIOD MAC80211_HW_NEED_DTIM_PERIOD
+#define IEEE80211_HW_SPECTRUM_MGMT MAC80211_HW_SPECTRUM_MGMT
+#define IEEE80211_HW_AMPDU_AGGREGATION MAC80211_HW_AMPDU_AGGREGATION
+#define IEEE80211_HW_SUPPORTS_PS MAC80211_HW_SUPPORTS_PS
+#define IEEE80211_HW_PS_NULLFUNC_STACK MAC80211_HW_PS_NULLFUNC_STACK
+#define IEEE80211_HW_SUPPORTS_DYNAMIC_PS MAC80211_HW_SUPPORTS_DYNAMIC_PS
+#define IEEE80211_HW_MFP_CAPABLE MAC80211_HW_MFP_CAPABLE
+#define IEEE80211_HW_BEACON_FILTER MAC80211_HW_BEACON_FILTER
+#define IEEE80211_HW_SUPPORTS_STATIC_SMPS MAC80211_HW_SUPPORTS_STATIC_SMPS
+#define IEEE80211_HW_SUPPORTS_DYNAMIC_SMPS MAC80211_HW_SUPPORTS_DYNAMIC_SMPS
+#define IEEE80211_HW_SUPPORTS_UAPSD MAC80211_HW_SUPPORTS_UAPSD
+#define IEEE80211_HW_REPORTS_TX_ACK_STATUS MAC80211_HW_REPORTS_TX_ACK_STATUS
+#define IEEE80211_HW_CONNECTION_MONITOR MAC80211_HW_CONNECTION_MONITOR
+#define IEEE80211_HW_SUPPORTS_CQM_RSSI MAC80211_HW_SUPPORTS_CQM_RSSI
+#define IEEE80211_HW_SUPPORTS_PER_STA_GTK MAC80211_HW_SUPPORTS_PER_STA_GTK
+#define IEEE80211_HW_AP_LINK_PS MAC80211_HW_AP_LINK_PS
+
+#define ieee80211_hw mac80211_hw
+#define wiphy_to_ieee80211_hw wiphy_to_mac80211_hw
+#define SET_IEEE80211_DEV SET_MAC80211_DEV
+#define SET_IEEE80211_PERM_ADDR SET_MAC80211_PERM_ADDR
+
+#define ieee80211_get_tx_rate mac80211_get_tx_rate
+#define ieee80211_get_rts_cts_rate mac80211_get_rts_cts_rate
+#define ieee80211_get_alt_retry_rate mac80211_get_alt_retry_rate
+
+#define ieee80211_filter_flags mac80211_filter_flags
+
+#define ieee80211_ampdu_mlme_action mac80211_ampdu_mlme_action
+#define IEEE80211_AMPDU_RX_START MAC80211_AMPDU_RX_START
+#define IEEE80211_AMPDU_RX_STOP MAC80211_AMPDU_RX_STOP
+#define IEEE80211_AMPDU_TX_START MAC80211_AMPDU_TX_START
+#define IEEE80211_AMPDU_TX_STOP MAC80211_AMPDU_TX_STOP
+#define IEEE80211_AMPDU_TX_OPERATIONAL MAC80211_AMPDU_TX_OPERATIONAL
+
+#define ieee80211_ops mac80211_ops
+#define ieee80211_alloc_hw mac80211_alloc_hw
+#define ieee80211_register_hw mac80211_register_hw
+#define ieee80211_tpt_blink mac80211_tpt_blink
+
+#define ieee80211_tpt_led_trigger_flags mac80211_tpt_led_trigger_flags
+#define IEEE80211_TPT_LEDTRIG_FL_RADIO MAC80211_TPT_LEDTRIG_FL_RADIO
+#define IEEE80211_TPT_LEDTRIG_FL_WORK MAC80211_TPT_LEDTRIG_FL_WORK
+#define IEEE80211_TPT_LEDTRIG_FL_CONNECTED MAC80211_TPT_LEDTRIG_FL_CONNECTED
+
+#define __ieee80211_get_tx_led_name __mac80211_get_tx_led_name
+#define __ieee80211_get_rx_led_name __mac80211_get_rx_led_name
+#define __ieee80211_get_assoc_led_name __mac80211_get_assoc_led_name
+#define __ieee80211_get_radio_led_name __mac80211_get_radio_led_name
+#define __ieee80211_create_tpt_led_trigger __mac80211_create_tpt_led_trigger
+
+#define ieee80211_get_tx_led_name mac80211_get_tx_led_name
+#define ieee80211_get_rx_led_name mac80211_get_rx_led_name
+#define ieee80211_get_assoc_led_name mac80211_get_assoc_led_name
+#define ieee80211_get_radio_led_name mac80211_get_radio_led_name
+#define ieee80211_create_tpt_led_trigger mac80211_create_tpt_led_trigger
+#define ieee80211_unregister_hw mac80211_unregister_hw
+#define ieee80211_free_hw mac80211_free_hw
+#define ieee80211_restart_hw mac80211_restart_hw
+#define ieee80211_napi_schedule mac80211_napi_schedule
+#define ieee80211_napi_complete mac80211_napi_complete
+#define ieee80211_rx mac80211_rx
+#define ieee80211_rx_irqsafe mac80211_rx_irqsafe
+#define ieee80211_rx_ni mac80211_rx_ni
+#define ieee80211_sta_ps_transition mac80211_sta_ps_transition
+#define ieee80211_sta_ps_transition_ni mac80211_sta_ps_transition_ni
+#define IEEE80211_TX_STATUS_HEADROOM MAC80211_TX_STATUS_HEADROOM
+#define ieee80211_sta_set_tim mac80211_sta_set_tim
+#define ieee80211_tx_status mac80211_tx_status
+#define ieee80211_tx_status_ni mac80211_tx_status_ni
+#define ieee80211_tx_status_irqsafe mac80211_tx_status_irqsafe
+#define ieee80211_report_low_ack mac80211_report_low_ack
+#define ieee80211_beacon_get_tim mac80211_beacon_get_tim
+#define ieee80211_beacon_get mac80211_beacon_get
+#define ieee80211_pspoll_get mac80211_pspoll_get
+#define ieee80211_nullfunc_get mac80211_nullfunc_get
+#define ieee80211_probereq_get mac80211_probereq_get
+#define ieee80211_rts_get mac80211_rts_get
+#define ieee80211_rts_duration mac80211_rts_duration
+#define ieee80211_ctstoself_get mac80211_ctstoself_get
+#define ieee80211_ctstoself_duration mac80211_ctstoself_duration
+#define ieee80211_generic_frame_duration mac80211_generic_frame_duration
+#define ieee80211_get_buffered_bc mac80211_get_buffered_bc
+#define ieee80211_get_tkip_key mac80211_get_tkip_key
+#define ieee80211_wake_queue mac80211_wake_queue
+#define ieee80211_stop_queue mac80211_stop_queue
+#define ieee80211_queue_stopped mac80211_queue_stopped
+#define ieee80211_stop_queues mac80211_stop_queues
+#define ieee80211_wake_queues mac80211_wake_queues
+#define ieee80211_scan_completed mac80211_scan_completed
+#define ieee80211_sched_scan_results mac80211_sched_scan_results
+#define ieee80211_sched_scan_stopped mac80211_sched_scan_stopped
+#define ieee80211_iterate_active_interfaces mac80211_iterate_active_interfaces
+#define ieee80211_iterate_active_interfaces_atomic mac80211_iterate_active_interfaces_atomic
+#define ieee80211_queue_work mac80211_queue_work
+#define ieee80211_queue_delayed_work mac80211_queue_delayed_work
+#define ieee80211_start_tx_ba_session mac80211_start_tx_ba_session
+#define ieee80211_start_tx_ba_cb_irqsafe mac80211_start_tx_ba_cb_irqsafe
+#define ieee80211_stop_tx_ba_session mac80211_stop_tx_ba_session
+#define ieee80211_stop_tx_ba_cb_irqsafe mac80211_stop_tx_ba_cb_irqsafe
+#define ieee80211_find_sta mac80211_find_sta
+#define ieee80211_find_sta_by_ifaddr mac80211_find_sta_by_ifaddr
+#define ieee80211_sta_block_awake mac80211_sta_block_awake
+#define ieee80211_ap_probereq_get mac80211_ap_probereq_get
+#define ieee80211_beacon_loss mac80211_beacon_loss
+#define ieee80211_connection_loss mac80211_connection_loss
+#define ieee80211_disable_dyn_ps mac80211_disable_dyn_ps
+#define ieee80211_enable_dyn_ps mac80211_enable_dyn_ps
+#define ieee80211_cqm_rssi_notify mac80211_cqm_rssi_notify
+#define ieee80211_chswitch_done mac80211_chswitch_done
+#define ieee80211_request_smps mac80211_request_smps
+#define ieee80211_key_removed mac80211_key_removed
+#define ieee80211_ready_on_channel mac80211_ready_on_channel
+#define ieee80211_remain_on_channel_expired mac80211_remain_on_channel_expired
+
+#define IEEE80211_RC_HT_CHANGED MAC80211_RC_HT_CHANGED
+
+#define ieee80211_tx_rate_control mac80211_tx_rate_control
+
+#define ieee80211_rate_control_register mac80211_rate_control_register
+#define ieee80211_rate_control_unregister mac80211_rate_control_unregister
+
+#define ieee80211_iftype_p2p mac80211_iftype_p2p
+#define ieee80211_vif_type_p2p mac80211_vif_type_p2p
+
+#endif /* MAC80211_COMPAT_H */
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index e6d6a66..32a8e8b 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -21,6 +21,8 @@
#include <linux/ieee80211.h>
#include <net/cfg80211.h>

+#include <net/mac80211-compat.h>
+
/**
* DOC: Introduction
*
@@ -33,7 +35,7 @@
/**
* DOC: Calling mac80211 from interrupts
*
- * Only ieee80211_tx_status_irqsafe() and ieee80211_rx_irqsafe() can be
+ * Only mac80211_tx_status_irqsafe() and mac80211_rx_irqsafe() can be
* called in hardware interrupt context. The low-level driver must not call any
* other functions in hardware interrupt context. If there is a need for such
* call, the low-level driver should first ACK the interrupt and perform the
@@ -88,30 +90,30 @@
*/

/**
- * enum ieee80211_max_queues - maximum number of queues
+ * enum mac80211_max_queues - maximum number of queues
*
- * @IEEE80211_MAX_QUEUES: Maximum number of regular device queues.
+ * @MAC80211_MAX_QUEUES: Maximum number of regular device queues.
*/
-enum ieee80211_max_queues {
- IEEE80211_MAX_QUEUES = 4,
+enum mac80211_max_queues {
+ MAC80211_MAX_QUEUES = 4,
};

/**
- * enum ieee80211_ac_numbers - AC numbers as used in mac80211
- * @IEEE80211_AC_VO: voice
- * @IEEE80211_AC_VI: video
- * @IEEE80211_AC_BE: best effort
- * @IEEE80211_AC_BK: background
+ * enum mac80211_ac_numbers - AC numbers as used in mac80211
+ * @MAC80211_AC_VO: voice
+ * @MAC80211_AC_VI: video
+ * @MAC80211_AC_BE: best effort
+ * @MAC80211_AC_BK: background
*/
-enum ieee80211_ac_numbers {
- IEEE80211_AC_VO = 0,
- IEEE80211_AC_VI = 1,
- IEEE80211_AC_BE = 2,
- IEEE80211_AC_BK = 3,
+enum mac80211_ac_numbers {
+ MAC80211_AC_VO = 0,
+ MAC80211_AC_VI = 1,
+ MAC80211_AC_BE = 2,
+ MAC80211_AC_BK = 3,
};

/**
- * struct ieee80211_tx_queue_params - transmit queue configuration
+ * struct mac80211_tx_queue_params - transmit queue configuration
*
* The information provided in this structure is required for QoS
* transmit queue configuration. Cf. IEEE 802.11 7.3.2.29.
@@ -123,7 +125,7 @@ enum ieee80211_ac_numbers {
* @txop: maximum burst time in units of 32 usecs, 0 meaning disabled
* @uapsd: is U-APSD mode enabled for the queue
*/
-struct ieee80211_tx_queue_params {
+struct mac80211_tx_queue_params {
u16 txop;
u16 cw_min;
u16 cw_max;
@@ -131,7 +133,7 @@ struct ieee80211_tx_queue_params {
bool uapsd;
};

-struct ieee80211_low_level_stats {
+struct mac80211_low_level_stats {
unsigned int dot11ACKFailureCount;
unsigned int dot11RTSFailureCount;
unsigned int dot11FCSErrorCount;
@@ -139,7 +141,7 @@ struct ieee80211_low_level_stats {
};

/**
- * enum ieee80211_bss_change - BSS change notification flags
+ * enum mac80211_bss_change - BSS change notification flags
*
* These flags are used with the bss_info_changed() callback
* to indicate which BSS parameter changed.
@@ -165,7 +167,7 @@ struct ieee80211_low_level_stats {
* that it is only ever disabled for station mode.
* @BSS_CHANGED_IDLE: Idle changed for this BSS/interface.
*/
-enum ieee80211_bss_change {
+enum mac80211_bss_change {
BSS_CHANGED_ASSOC = 1<<0,
BSS_CHANGED_ERP_CTS_PROT = 1<<1,
BSS_CHANGED_ERP_PREAMBLE = 1<<2,
@@ -182,7 +184,7 @@ enum ieee80211_bss_change {
BSS_CHANGED_QOS = 1<<13,
BSS_CHANGED_IDLE = 1<<14,

- /* when adding here, make sure to change ieee80211_reconfig */
+ /* when adding here, make sure to change mac80211_reconfig */
};

/*
@@ -190,10 +192,10 @@ enum ieee80211_bss_change {
* of addresses for an interface increase beyond this value, hardware ARP
* filtering will be disabled.
*/
-#define IEEE80211_BSS_ARP_ADDR_LIST_LEN 4
+#define MAC80211_BSS_ARP_ADDR_LIST_LEN 4

/**
- * struct ieee80211_bss_conf - holds the BSS's changing parameters
+ * struct mac80211_bss_conf - holds the BSS's changing parameters
*
* This structure keeps information about a BSS (and an association
* to that BSS) that can change during the lifetime of the BSS.
@@ -205,13 +207,13 @@ enum ieee80211_bss_change {
* @use_cts_prot: use CTS protection
* @use_short_preamble: use 802.11b short preamble;
* if the hardware cannot handle this it must set the
- * IEEE80211_HW_2GHZ_SHORT_PREAMBLE_INCAPABLE hardware flag
+ * MAC80211_HW_2GHZ_SHORT_PREAMBLE_INCAPABLE hardware flag
* @use_short_slot: use short slot time (only relevant for ERP);
* if the hardware cannot handle this it must set the
- * IEEE80211_HW_2GHZ_SHORT_SLOT_INCAPABLE hardware flag
+ * MAC80211_HW_2GHZ_SHORT_SLOT_INCAPABLE hardware flag
* @dtim_period: num of beacons before the next DTIM, for beaconing,
* valid in station mode only while @assoc is true and if also
- * requested by %IEEE80211_HW_NEED_DTIM_PERIOD (cf. also hw conf
+ * requested by %MAC80211_HW_NEED_DTIM_PERIOD (cf. also hw conf
* @ps_dtim_period)
* @timestamp: beacon timestamp
* @beacon_int: beacon interval
@@ -225,7 +227,7 @@ enum ieee80211_bss_change {
* @channel_type: Channel type for this BSS -- the hardware might be
* configured for HT40+ while this BSS only uses no-HT, for
* example.
- * @ht_operation_mode: HT operation mode (like in &struct ieee80211_ht_info).
+ * @ht_operation_mode: HT operation mode (like in &struct mac80211_ht_info).
* This field is only valid when the channel type is one of the HT types.
* @cqm_rssi_thold: Connection quality monitor RSSI threshold, a zero value
* implies disabled
@@ -244,7 +246,7 @@ enum ieee80211_bss_change {
* hardware config which may be more appropriate depending on what
* your driver/device needs to do.
*/
-struct ieee80211_bss_conf {
+struct mac80211_bss_conf {
const u8 *bssid;
/* association related data */
bool assoc, ibss_joined;
@@ -264,7 +266,7 @@ struct ieee80211_bss_conf {
s32 cqm_rssi_thold;
u32 cqm_rssi_hyst;
enum nl80211_channel_type channel_type;
- __be32 arp_addr_list[IEEE80211_BSS_ARP_ADDR_LIST_LEN];
+ __be32 arp_addr_list[MAC80211_BSS_ARP_ADDR_LIST_LEN];
u8 arp_addr_cnt;
bool arp_filter_enabled;
bool qos;
@@ -274,13 +276,13 @@ struct ieee80211_bss_conf {
/**
* enum mac80211_tx_control_flags - flags to describe transmission information/status
*
- * These flags are used with the @flags member of &ieee80211_tx_info.
+ * These flags are used with the @flags member of &mac80211_tx_info.
*
- * @IEEE80211_TX_CTL_REQ_TX_STATUS: require TX status callback for this frame.
- * @IEEE80211_TX_CTL_ASSIGN_SEQ: The driver has to assign a sequence
+ * @MAC80211_TX_CTL_REQ_TX_STATUS: require TX status callback for this frame.
+ * @MAC80211_TX_CTL_ASSIGN_SEQ: The driver has to assign a sequence
* number to this frame, taking care of not overwriting the fragment
* number and increasing the sequence number only when the
- * IEEE80211_TX_CTL_FIRST_FRAGMENT flag is set. mac80211 will properly
+ * MAC80211_TX_CTL_FIRST_FRAGMENT flag is set. mac80211 will properly
* assign sequence numbers to QoS-data frames but cannot do so correctly
* for non-QoS-data and management frames because beacons need them from
* that counter as well and mac80211 cannot guarantee proper sequencing.
@@ -288,154 +290,154 @@ struct ieee80211_bss_conf {
* assign a sequence number to the frame or assign one itself. Cf. IEEE
* 802.11-2007 7.1.3.4.1 paragraph 3. This flag will always be set for
* beacons and always be clear for frames without a sequence number field.
- * @IEEE80211_TX_CTL_NO_ACK: tell the low level not to wait for an ack
- * @IEEE80211_TX_CTL_CLEAR_PS_FILT: clear powersave filter for destination
+ * @MAC80211_TX_CTL_NO_ACK: tell the low level not to wait for an ack
+ * @MAC80211_TX_CTL_CLEAR_PS_FILT: clear powersave filter for destination
* station
- * @IEEE80211_TX_CTL_FIRST_FRAGMENT: this is a first fragment of the frame
- * @IEEE80211_TX_CTL_SEND_AFTER_DTIM: send this frame after DTIM beacon
- * @IEEE80211_TX_CTL_AMPDU: this frame should be sent as part of an A-MPDU
- * @IEEE80211_TX_CTL_INJECTED: Frame was injected, internal to mac80211.
- * @IEEE80211_TX_STAT_TX_FILTERED: The frame was not transmitted
+ * @MAC80211_TX_CTL_FIRST_FRAGMENT: this is a first fragment of the frame
+ * @MAC80211_TX_CTL_SEND_AFTER_DTIM: send this frame after DTIM beacon
+ * @MAC80211_TX_CTL_AMPDU: this frame should be sent as part of an A-MPDU
+ * @MAC80211_TX_CTL_INJECTED: Frame was injected, internal to mac80211.
+ * @MAC80211_TX_STAT_TX_FILTERED: The frame was not transmitted
* because the destination STA was in powersave mode. Note that to
* avoid race conditions, the filter must be set by the hardware or
* firmware upon receiving a frame that indicates that the station
* went to sleep (must be done on device to filter frames already on
* the queue) and may only be unset after mac80211 gives the OK for
- * that by setting the IEEE80211_TX_CTL_CLEAR_PS_FILT (see above),
+ * that by setting the MAC80211_TX_CTL_CLEAR_PS_FILT (see above),
* since only then is it guaranteed that no more frames are in the
* hardware queue.
- * @IEEE80211_TX_STAT_ACK: Frame was acknowledged
- * @IEEE80211_TX_STAT_AMPDU: The frame was aggregated, so status
+ * @MAC80211_TX_STAT_ACK: Frame was acknowledged
+ * @MAC80211_TX_STAT_AMPDU: The frame was aggregated, so status
* is for the whole aggregation.
- * @IEEE80211_TX_STAT_AMPDU_NO_BACK: no block ack was returned,
+ * @MAC80211_TX_STAT_AMPDU_NO_BACK: no block ack was returned,
* so consider using block ack request (BAR).
- * @IEEE80211_TX_CTL_RATE_CTRL_PROBE: internal to mac80211, can be
+ * @MAC80211_TX_CTL_RATE_CTRL_PROBE: internal to mac80211, can be
* set by rate control algorithms to indicate probe rate, will
* be cleared for fragmented frames (except on the last fragment)
- * @IEEE80211_TX_INTFL_NEED_TXPROCESSING: completely internal to mac80211,
+ * @MAC80211_TX_INTFL_NEED_TXPROCESSING: completely internal to mac80211,
* used to indicate that a pending frame requires TX processing before
* it can be sent out.
- * @IEEE80211_TX_INTFL_RETRIED: completely internal to mac80211,
+ * @MAC80211_TX_INTFL_RETRIED: completely internal to mac80211,
* used to indicate that a frame was already retried due to PS
- * @IEEE80211_TX_INTFL_DONT_ENCRYPT: completely internal to mac80211,
+ * @MAC80211_TX_INTFL_DONT_ENCRYPT: completely internal to mac80211,
* used to indicate frame should not be encrypted
- * @IEEE80211_TX_CTL_PSPOLL_RESPONSE: (internal?)
+ * @MAC80211_TX_CTL_PSPOLL_RESPONSE: (internal?)
* This frame is a response to a PS-poll frame and should be sent
* although the station is in powersave mode.
- * @IEEE80211_TX_CTL_MORE_FRAMES: More frames will be passed to the
+ * @MAC80211_TX_CTL_MORE_FRAMES: More frames will be passed to the
* transmit function after the current frame, this can be used
* by drivers to kick the DMA queue only if unset or when the
* queue gets full.
- * @IEEE80211_TX_INTFL_RETRANSMISSION: This frame is being retransmitted
+ * @MAC80211_TX_INTFL_RETRANSMISSION: This frame is being retransmitted
* after TX status because the destination was asleep, it must not
* be modified again (no seqno assignment, crypto, etc.)
- * @IEEE80211_TX_INTFL_HAS_RADIOTAP: This frame was injected and still
+ * @MAC80211_TX_INTFL_HAS_RADIOTAP: This frame was injected and still
* has a radiotap header at skb->data.
- * @IEEE80211_TX_INTFL_NL80211_FRAME_TX: Frame was requested through nl80211
+ * @MAC80211_TX_INTFL_NL80211_FRAME_TX: Frame was requested through nl80211
* MLME command (internal to mac80211 to figure out whether to send TX
* status to user space)
- * @IEEE80211_TX_CTL_LDPC: tells the driver to use LDPC for this frame
- * @IEEE80211_TX_CTL_STBC: Enables Space-Time Block Coding (STBC) for this
+ * @MAC80211_TX_CTL_LDPC: tells the driver to use LDPC for this frame
+ * @MAC80211_TX_CTL_STBC: Enables Space-Time Block Coding (STBC) for this
* frame and selects the maximum number of streams that it can use.
- * @IEEE80211_TX_CTL_TX_OFFCHAN: Marks this packet to be transmitted on
+ * @MAC80211_TX_CTL_TX_OFFCHAN: Marks this packet to be transmitted on
* the off-channel channel when a remain-on-channel offload is done
* in hardware -- normal packets still flow and are expected to be
* handled properly by the device.
- * @IEEE80211_TX_INTFL_TKIP_MIC_FAILURE: Marks this packet to be used for TKIP
+ * @MAC80211_TX_INTFL_TKIP_MIC_FAILURE: Marks this packet to be used for TKIP
* testing. It will be sent out with incorrect Michael MIC key to allow
* TKIP countermeasures to be tested.
*
* Note: If you have to add new flags to the enumeration, then don't
- * forget to update %IEEE80211_TX_TEMPORARY_FLAGS when necessary.
+ * forget to update %MAC80211_TX_TEMPORARY_FLAGS when necessary.
*/
enum mac80211_tx_control_flags {
- IEEE80211_TX_CTL_REQ_TX_STATUS = BIT(0),
- IEEE80211_TX_CTL_ASSIGN_SEQ = BIT(1),
- IEEE80211_TX_CTL_NO_ACK = BIT(2),
- IEEE80211_TX_CTL_CLEAR_PS_FILT = BIT(3),
- IEEE80211_TX_CTL_FIRST_FRAGMENT = BIT(4),
- IEEE80211_TX_CTL_SEND_AFTER_DTIM = BIT(5),
- IEEE80211_TX_CTL_AMPDU = BIT(6),
- IEEE80211_TX_CTL_INJECTED = BIT(7),
- IEEE80211_TX_STAT_TX_FILTERED = BIT(8),
- IEEE80211_TX_STAT_ACK = BIT(9),
- IEEE80211_TX_STAT_AMPDU = BIT(10),
- IEEE80211_TX_STAT_AMPDU_NO_BACK = BIT(11),
- IEEE80211_TX_CTL_RATE_CTRL_PROBE = BIT(12),
- IEEE80211_TX_INTFL_NEED_TXPROCESSING = BIT(14),
- IEEE80211_TX_INTFL_RETRIED = BIT(15),
- IEEE80211_TX_INTFL_DONT_ENCRYPT = BIT(16),
- IEEE80211_TX_CTL_PSPOLL_RESPONSE = BIT(17),
- IEEE80211_TX_CTL_MORE_FRAMES = BIT(18),
- IEEE80211_TX_INTFL_RETRANSMISSION = BIT(19),
- IEEE80211_TX_INTFL_HAS_RADIOTAP = BIT(20),
- IEEE80211_TX_INTFL_NL80211_FRAME_TX = BIT(21),
- IEEE80211_TX_CTL_LDPC = BIT(22),
- IEEE80211_TX_CTL_STBC = BIT(23) | BIT(24),
- IEEE80211_TX_CTL_TX_OFFCHAN = BIT(25),
- IEEE80211_TX_INTFL_TKIP_MIC_FAILURE = BIT(26),
+ MAC80211_TX_CTL_REQ_TX_STATUS = BIT(0),
+ MAC80211_TX_CTL_ASSIGN_SEQ = BIT(1),
+ MAC80211_TX_CTL_NO_ACK = BIT(2),
+ MAC80211_TX_CTL_CLEAR_PS_FILT = BIT(3),
+ MAC80211_TX_CTL_FIRST_FRAGMENT = BIT(4),
+ MAC80211_TX_CTL_SEND_AFTER_DTIM = BIT(5),
+ MAC80211_TX_CTL_AMPDU = BIT(6),
+ MAC80211_TX_CTL_INJECTED = BIT(7),
+ MAC80211_TX_STAT_TX_FILTERED = BIT(8),
+ MAC80211_TX_STAT_ACK = BIT(9),
+ MAC80211_TX_STAT_AMPDU = BIT(10),
+ MAC80211_TX_STAT_AMPDU_NO_BACK = BIT(11),
+ MAC80211_TX_CTL_RATE_CTRL_PROBE = BIT(12),
+ MAC80211_TX_INTFL_NEED_TXPROCESSING = BIT(14),
+ MAC80211_TX_INTFL_RETRIED = BIT(15),
+ MAC80211_TX_INTFL_DONT_ENCRYPT = BIT(16),
+ MAC80211_TX_CTL_PSPOLL_RESPONSE = BIT(17),
+ MAC80211_TX_CTL_MORE_FRAMES = BIT(18),
+ MAC80211_TX_INTFL_RETRANSMISSION = BIT(19),
+ MAC80211_TX_INTFL_HAS_RADIOTAP = BIT(20),
+ MAC80211_TX_INTFL_NL80211_FRAME_TX = BIT(21),
+ MAC80211_TX_CTL_LDPC = BIT(22),
+ MAC80211_TX_CTL_STBC = BIT(23) | BIT(24),
+ MAC80211_TX_CTL_TX_OFFCHAN = BIT(25),
+ MAC80211_TX_INTFL_TKIP_MIC_FAILURE = BIT(26),
};

-#define IEEE80211_TX_CTL_STBC_SHIFT 23
+#define MAC80211_TX_CTL_STBC_SHIFT 23

/*
* This definition is used as a mask to clear all temporary flags, which are
* set by the tx handlers for each transmission attempt by the mac80211 stack.
*/
-#define IEEE80211_TX_TEMPORARY_FLAGS (IEEE80211_TX_CTL_NO_ACK | \
- IEEE80211_TX_CTL_CLEAR_PS_FILT | IEEE80211_TX_CTL_FIRST_FRAGMENT | \
- IEEE80211_TX_CTL_SEND_AFTER_DTIM | IEEE80211_TX_CTL_AMPDU | \
- IEEE80211_TX_STAT_TX_FILTERED | IEEE80211_TX_STAT_ACK | \
- IEEE80211_TX_STAT_AMPDU | IEEE80211_TX_STAT_AMPDU_NO_BACK | \
- IEEE80211_TX_CTL_RATE_CTRL_PROBE | IEEE80211_TX_CTL_PSPOLL_RESPONSE | \
- IEEE80211_TX_CTL_MORE_FRAMES | IEEE80211_TX_CTL_LDPC | \
- IEEE80211_TX_CTL_STBC)
+#define MAC80211_TX_TEMPORARY_FLAGS (MAC80211_TX_CTL_NO_ACK | \
+ MAC80211_TX_CTL_CLEAR_PS_FILT | MAC80211_TX_CTL_FIRST_FRAGMENT | \
+ MAC80211_TX_CTL_SEND_AFTER_DTIM | MAC80211_TX_CTL_AMPDU | \
+ MAC80211_TX_STAT_TX_FILTERED | MAC80211_TX_STAT_ACK | \
+ MAC80211_TX_STAT_AMPDU | MAC80211_TX_STAT_AMPDU_NO_BACK | \
+ MAC80211_TX_CTL_RATE_CTRL_PROBE | MAC80211_TX_CTL_PSPOLL_RESPONSE | \
+ MAC80211_TX_CTL_MORE_FRAMES | MAC80211_TX_CTL_LDPC | \
+ MAC80211_TX_CTL_STBC)

/**
* enum mac80211_rate_control_flags - per-rate flags set by the
* Rate Control algorithm.
*
* These flags are set by the Rate control algorithm for each rate during tx,
- * in the @flags member of struct ieee80211_tx_rate.
+ * in the @flags member of struct mac80211_tx_rate.
*
- * @IEEE80211_TX_RC_USE_RTS_CTS: Use RTS/CTS exchange for this rate.
- * @IEEE80211_TX_RC_USE_CTS_PROTECT: CTS-to-self protection is required.
+ * @MAC80211_TX_RC_USE_RTS_CTS: Use RTS/CTS exchange for this rate.
+ * @MAC80211_TX_RC_USE_CTS_PROTECT: CTS-to-self protection is required.
* This is set if the current BSS requires ERP protection.
- * @IEEE80211_TX_RC_USE_SHORT_PREAMBLE: Use short preamble.
- * @IEEE80211_TX_RC_MCS: HT rate.
- * @IEEE80211_TX_RC_GREEN_FIELD: Indicates whether this rate should be used in
+ * @MAC80211_TX_RC_USE_SHORT_PREAMBLE: Use short preamble.
+ * @MAC80211_TX_RC_MCS: HT rate.
+ * @MAC80211_TX_RC_GREEN_FIELD: Indicates whether this rate should be used in
* Greenfield mode.
- * @IEEE80211_TX_RC_40_MHZ_WIDTH: Indicates if the Channel Width should be 40 MHz.
- * @IEEE80211_TX_RC_DUP_DATA: The frame should be transmitted on both of the
+ * @MAC80211_TX_RC_40_MHZ_WIDTH: Indicates if the Channel Width should be 40 MHz.
+ * @MAC80211_TX_RC_DUP_DATA: The frame should be transmitted on both of the
* adjacent 20 MHz channels, if the current channel type is
* NL80211_CHAN_HT40MINUS or NL80211_CHAN_HT40PLUS.
- * @IEEE80211_TX_RC_SHORT_GI: Short Guard interval should be used for this rate.
+ * @MAC80211_TX_RC_SHORT_GI: Short Guard interval should be used for this rate.
*/
enum mac80211_rate_control_flags {
- IEEE80211_TX_RC_USE_RTS_CTS = BIT(0),
- IEEE80211_TX_RC_USE_CTS_PROTECT = BIT(1),
- IEEE80211_TX_RC_USE_SHORT_PREAMBLE = BIT(2),
+ MAC80211_TX_RC_USE_RTS_CTS = BIT(0),
+ MAC80211_TX_RC_USE_CTS_PROTECT = BIT(1),
+ MAC80211_TX_RC_USE_SHORT_PREAMBLE = BIT(2),

/* rate index is an MCS rate number instead of an index */
- IEEE80211_TX_RC_MCS = BIT(3),
- IEEE80211_TX_RC_GREEN_FIELD = BIT(4),
- IEEE80211_TX_RC_40_MHZ_WIDTH = BIT(5),
- IEEE80211_TX_RC_DUP_DATA = BIT(6),
- IEEE80211_TX_RC_SHORT_GI = BIT(7),
+ MAC80211_TX_RC_MCS = BIT(3),
+ MAC80211_TX_RC_GREEN_FIELD = BIT(4),
+ MAC80211_TX_RC_40_MHZ_WIDTH = BIT(5),
+ MAC80211_TX_RC_DUP_DATA = BIT(6),
+ MAC80211_TX_RC_SHORT_GI = BIT(7),
};


/* there are 40 bytes if you don't need the rateset to be kept */
-#define IEEE80211_TX_INFO_DRIVER_DATA_SIZE 40
+#define MAC80211_TX_INFO_DRIVER_DATA_SIZE 40

/* if you do need the rateset, then you have less space */
-#define IEEE80211_TX_INFO_RATE_DRIVER_DATA_SIZE 24
+#define MAC80211_TX_INFO_RATE_DRIVER_DATA_SIZE 24

/* maximum number of rate stages */
-#define IEEE80211_TX_MAX_RATES 5
+#define MAC80211_TX_MAX_RATES 5

/**
- * struct ieee80211_tx_rate - rate selection/status
+ * struct mac80211_tx_rate - rate selection/status
*
* @idx: rate index to attempt to send with
* @flags: rate control flags (&enum mac80211_rate_control_flags)
@@ -447,7 +449,7 @@ enum mac80211_rate_control_flags {
* When used for transmit status reporting, the driver should
* always report the rate along with the flags it used.
*
- * &struct ieee80211_tx_info contains an array of these structs
+ * &struct mac80211_tx_info contains an array of these structs
* in the control information, and it will be filled by the rate
* control algorithm according to what should be sent. For example,
* if this array contains, in the format { <idx>, <count> } the
@@ -462,14 +464,14 @@ enum mac80211_rate_control_flags {
* since it was transmitted twice at rate 3, twice at rate 2
* and once at rate 1 after which we received an acknowledgement.
*/
-struct ieee80211_tx_rate {
+struct mac80211_tx_rate {
s8 idx;
u8 count;
u8 flags;
} __packed;

/**
- * struct ieee80211_tx_info - skb transmit information
+ * struct mac80211_tx_info - skb transmit information
*
* This structure is placed in skb->cb for three uses:
* (1) mac80211 TX control - mac80211 tells the driver what to do
@@ -487,12 +489,12 @@ struct ieee80211_tx_rate {
* @status: union for status data
* @driver_data: array of driver_data pointers
* @ampdu_ack_len: number of acked aggregated frames.
- * relevant only if IEEE80211_TX_STAT_AMPDU was set.
+ * relevant only if MAC80211_TX_STAT_AMPDU was set.
* @ampdu_len: number of aggregated frames.
- * relevant only if IEEE80211_TX_STAT_AMPDU was set.
+ * relevant only if MAC80211_TX_STAT_AMPDU was set.
* @ack_signal: signal strength of the ACK frame
*/
-struct ieee80211_tx_info {
+struct mac80211_tx_info {
/* common information */
u32 flags;
u8 band;
@@ -507,38 +509,38 @@ struct ieee80211_tx_info {
union {
/* rate control */
struct {
- struct ieee80211_tx_rate rates[
- IEEE80211_TX_MAX_RATES];
+ struct mac80211_tx_rate rates[
+ MAC80211_TX_MAX_RATES];
s8 rts_cts_rate_idx;
};
/* only needed before rate control */
unsigned long jiffies;
};
/* NB: vif can be NULL for injected frames */
- struct ieee80211_vif *vif;
- struct ieee80211_key_conf *hw_key;
- struct ieee80211_sta *sta;
+ struct mac80211_vif *vif;
+ struct mac80211_key_conf *hw_key;
+ struct mac80211_sta *sta;
} control;
struct {
- struct ieee80211_tx_rate rates[IEEE80211_TX_MAX_RATES];
+ struct mac80211_tx_rate rates[MAC80211_TX_MAX_RATES];
u8 ampdu_ack_len;
int ack_signal;
u8 ampdu_len;
/* 15 bytes free */
} status;
struct {
- struct ieee80211_tx_rate driver_rates[
- IEEE80211_TX_MAX_RATES];
+ struct mac80211_tx_rate driver_rates[
+ MAC80211_TX_MAX_RATES];
void *rate_driver_data[
- IEEE80211_TX_INFO_RATE_DRIVER_DATA_SIZE / sizeof(void *)];
+ MAC80211_TX_INFO_RATE_DRIVER_DATA_SIZE / sizeof(void *)];
};
void *driver_data[
- IEEE80211_TX_INFO_DRIVER_DATA_SIZE / sizeof(void *)];
+ MAC80211_TX_INFO_DRIVER_DATA_SIZE / sizeof(void *)];
};
};

/**
- * struct ieee80211_sched_scan_ies - scheduled scan IEs
+ * struct mac80211_sched_scan_ies - scheduled scan IEs
*
* This structure is used to pass the appropriate IEs to be used in scheduled
* scans for all bands. It contains both the IEs passed from the userspace
@@ -547,25 +549,25 @@ struct ieee80211_tx_info {
* @ie: array with the IEs for each supported band
* @len: array with the total length of the IEs for each band
*/
-struct ieee80211_sched_scan_ies {
+struct mac80211_sched_scan_ies {
u8 *ie[IEEE80211_NUM_BANDS];
size_t len[IEEE80211_NUM_BANDS];
};

-static inline struct ieee80211_tx_info *IEEE80211_SKB_CB(struct sk_buff *skb)
+static inline struct mac80211_tx_info *MAC80211_SKB_CB(struct sk_buff *skb)
{
- return (struct ieee80211_tx_info *)skb->cb;
+ return (struct mac80211_tx_info *)skb->cb;
}

-static inline struct ieee80211_rx_status *IEEE80211_SKB_RXCB(struct sk_buff *skb)
+static inline struct mac80211_rx_status *MAC80211_SKB_RXCB(struct sk_buff *skb)
{
- return (struct ieee80211_rx_status *)skb->cb;
+ return (struct mac80211_rx_status *)skb->cb;
}

/**
- * ieee80211_tx_info_clear_status - clear TX status
+ * mac80211_tx_info_clear_status - clear TX status
*
- * @info: The &struct ieee80211_tx_info to be cleared.
+ * @info: The &struct mac80211_tx_info to be cleared.
*
* When the driver passes an skb back to mac80211, it must report
* a number of things in TX status. This function clears everything
@@ -577,31 +579,31 @@ static inline struct ieee80211_rx_status *IEEE80211_SKB_RXCB(struct sk_buff *skb
* instead if you need only the less space that allows.
*/
static inline void
-ieee80211_tx_info_clear_status(struct ieee80211_tx_info *info)
+mac80211_tx_info_clear_status(struct mac80211_tx_info *info)
{
int i;

- BUILD_BUG_ON(offsetof(struct ieee80211_tx_info, status.rates) !=
- offsetof(struct ieee80211_tx_info, control.rates));
- BUILD_BUG_ON(offsetof(struct ieee80211_tx_info, status.rates) !=
- offsetof(struct ieee80211_tx_info, driver_rates));
- BUILD_BUG_ON(offsetof(struct ieee80211_tx_info, status.rates) != 8);
+ BUILD_BUG_ON(offsetof(struct mac80211_tx_info, status.rates) !=
+ offsetof(struct mac80211_tx_info, control.rates));
+ BUILD_BUG_ON(offsetof(struct mac80211_tx_info, status.rates) !=
+ offsetof(struct mac80211_tx_info, driver_rates));
+ BUILD_BUG_ON(offsetof(struct mac80211_tx_info, status.rates) != 8);
/* clear the rate counts */
- for (i = 0; i < IEEE80211_TX_MAX_RATES; i++)
+ for (i = 0; i < MAC80211_TX_MAX_RATES; i++)
info->status.rates[i].count = 0;

BUILD_BUG_ON(
- offsetof(struct ieee80211_tx_info, status.ampdu_ack_len) != 23);
+ offsetof(struct mac80211_tx_info, status.ampdu_ack_len) != 23);
memset(&info->status.ampdu_ack_len, 0,
- sizeof(struct ieee80211_tx_info) -
- offsetof(struct ieee80211_tx_info, status.ampdu_ack_len));
+ sizeof(struct mac80211_tx_info) -
+ offsetof(struct mac80211_tx_info, status.ampdu_ack_len));
}


/**
* enum mac80211_rx_flags - receive flags
*
- * These flags are used with the @flag member of &struct ieee80211_rx_status.
+ * These flags are used with the @flag member of &struct mac80211_rx_status.
* @RX_FLAG_MMIC_ERROR: Michael MIC error was reported on this frame.
* Use together with %RX_FLAG_MMIC_STRIPPED.
* @RX_FLAG_DECRYPTED: This frame was decrypted in hardware.
@@ -638,7 +640,7 @@ enum mac80211_rx_flags {
};

/**
- * struct ieee80211_rx_status - receive status
+ * struct mac80211_rx_status - receive status
*
* The low-level driver should provide this information (the subset
* supported by hardware) to the 802.11 code with each received
@@ -650,14 +652,14 @@ enum mac80211_rx_flags {
* @freq: frequency the radio was tuned to when receiving this frame, in MHz
* @signal: signal strength when receiving this frame, either in dBm, in dB or
* unspecified depending on the hardware capabilities flags
- * @IEEE80211_HW_SIGNAL_*
+ * @MAC80211_HW_SIGNAL_*
* @antenna: antenna used
* @rate_idx: index of data rate into band's supported rates or MCS index if
* HT rates are use (RX_FLAG_HT)
* @flag: %RX_FLAG_*
* @rx_flags: internal RX flags for mac80211
*/
-struct ieee80211_rx_status {
+struct mac80211_rx_status {
u64 mactime;
enum ieee80211_band band;
int freq;
@@ -669,80 +671,80 @@ struct ieee80211_rx_status {
};

/**
- * enum ieee80211_conf_flags - configuration flags
+ * enum mac80211_conf_flags - configuration flags
*
* Flags to define PHY configuration options
*
- * @IEEE80211_CONF_MONITOR: there's a monitor interface present -- use this
+ * @MAC80211_CONF_MONITOR: there's a monitor interface present -- use this
* to determine for example whether to calculate timestamps for packets
* or not, do not use instead of filter flags!
- * @IEEE80211_CONF_PS: Enable 802.11 power save mode (managed mode only).
+ * @MAC80211_CONF_PS: Enable 802.11 power save mode (managed mode only).
* This is the power save mode defined by IEEE 802.11-2007 section 11.2,
* meaning that the hardware still wakes up for beacons, is able to
* transmit frames and receive the possible acknowledgment frames.
* Not to be confused with hardware specific wakeup/sleep states,
* driver is responsible for that. See the section "Powersave support"
* for more.
- * @IEEE80211_CONF_IDLE: The device is running, but idle; if the flag is set
+ * @MAC80211_CONF_IDLE: The device is running, but idle; if the flag is set
* the driver should be prepared to handle configuration requests but
* may turn the device off as much as possible. Typically, this flag will
* be set when an interface is set UP but not associated or scanning, but
* it can also be unset in that case when monitor interfaces are active.
- * @IEEE80211_CONF_OFFCHANNEL: The device is currently not on its main
+ * @MAC80211_CONF_OFFCHANNEL: The device is currently not on its main
* operating channel.
*/
-enum ieee80211_conf_flags {
- IEEE80211_CONF_MONITOR = (1<<0),
- IEEE80211_CONF_PS = (1<<1),
- IEEE80211_CONF_IDLE = (1<<2),
- IEEE80211_CONF_OFFCHANNEL = (1<<3),
+enum mac80211_conf_flags {
+ MAC80211_CONF_MONITOR = (1<<0),
+ MAC80211_CONF_PS = (1<<1),
+ MAC80211_CONF_IDLE = (1<<2),
+ MAC80211_CONF_OFFCHANNEL = (1<<3),
};


/**
- * enum ieee80211_conf_changed - denotes which configuration changed
+ * enum mac80211_conf_changed - denotes which configuration changed
*
- * @IEEE80211_CONF_CHANGE_LISTEN_INTERVAL: the listen interval changed
- * @IEEE80211_CONF_CHANGE_MONITOR: the monitor flag changed
- * @IEEE80211_CONF_CHANGE_PS: the PS flag or dynamic PS timeout changed
- * @IEEE80211_CONF_CHANGE_POWER: the TX power changed
- * @IEEE80211_CONF_CHANGE_CHANNEL: the channel/channel_type changed
- * @IEEE80211_CONF_CHANGE_RETRY_LIMITS: retry limits changed
- * @IEEE80211_CONF_CHANGE_IDLE: Idle flag changed
- * @IEEE80211_CONF_CHANGE_SMPS: Spatial multiplexing powersave mode changed
+ * @MAC80211_CONF_CHANGE_LISTEN_INTERVAL: the listen interval changed
+ * @MAC80211_CONF_CHANGE_MONITOR: the monitor flag changed
+ * @MAC80211_CONF_CHANGE_PS: the PS flag or dynamic PS timeout changed
+ * @MAC80211_CONF_CHANGE_POWER: the TX power changed
+ * @MAC80211_CONF_CHANGE_CHANNEL: the channel/channel_type changed
+ * @MAC80211_CONF_CHANGE_RETRY_LIMITS: retry limits changed
+ * @MAC80211_CONF_CHANGE_IDLE: Idle flag changed
+ * @MAC80211_CONF_CHANGE_SMPS: Spatial multiplexing powersave mode changed
*/
-enum ieee80211_conf_changed {
- IEEE80211_CONF_CHANGE_SMPS = BIT(1),
- IEEE80211_CONF_CHANGE_LISTEN_INTERVAL = BIT(2),
- IEEE80211_CONF_CHANGE_MONITOR = BIT(3),
- IEEE80211_CONF_CHANGE_PS = BIT(4),
- IEEE80211_CONF_CHANGE_POWER = BIT(5),
- IEEE80211_CONF_CHANGE_CHANNEL = BIT(6),
- IEEE80211_CONF_CHANGE_RETRY_LIMITS = BIT(7),
- IEEE80211_CONF_CHANGE_IDLE = BIT(8),
+enum mac80211_conf_changed {
+ MAC80211_CONF_CHANGE_SMPS = BIT(1),
+ MAC80211_CONF_CHANGE_LISTEN_INTERVAL = BIT(2),
+ MAC80211_CONF_CHANGE_MONITOR = BIT(3),
+ MAC80211_CONF_CHANGE_PS = BIT(4),
+ MAC80211_CONF_CHANGE_POWER = BIT(5),
+ MAC80211_CONF_CHANGE_CHANNEL = BIT(6),
+ MAC80211_CONF_CHANGE_RETRY_LIMITS = BIT(7),
+ MAC80211_CONF_CHANGE_IDLE = BIT(8),
};

/**
- * enum ieee80211_smps_mode - spatial multiplexing power save mode
+ * enum mac80211_smps_mode - spatial multiplexing power save mode
*
- * @IEEE80211_SMPS_AUTOMATIC: automatic
- * @IEEE80211_SMPS_OFF: off
- * @IEEE80211_SMPS_STATIC: static
- * @IEEE80211_SMPS_DYNAMIC: dynamic
- * @IEEE80211_SMPS_NUM_MODES: internal, don't use
+ * @MAC80211_SMPS_AUTOMATIC: automatic
+ * @MAC80211_SMPS_OFF: off
+ * @MAC80211_SMPS_STATIC: static
+ * @MAC80211_SMPS_DYNAMIC: dynamic
+ * @MAC80211_SMPS_NUM_MODES: internal, don't use
*/
-enum ieee80211_smps_mode {
- IEEE80211_SMPS_AUTOMATIC,
- IEEE80211_SMPS_OFF,
- IEEE80211_SMPS_STATIC,
- IEEE80211_SMPS_DYNAMIC,
+enum mac80211_smps_mode {
+ MAC80211_SMPS_AUTOMATIC,
+ MAC80211_SMPS_OFF,
+ MAC80211_SMPS_STATIC,
+ MAC80211_SMPS_DYNAMIC,

/* keep last */
- IEEE80211_SMPS_NUM_MODES,
+ MAC80211_SMPS_NUM_MODES,
};

/**
- * struct ieee80211_conf - configuration of the device
+ * struct mac80211_conf - configuration of the device
*
* This struct indicates how the driver shall configure the hardware.
*
@@ -774,10 +776,10 @@ enum ieee80211_smps_mode {
* number of transmissions not the number of retries
*
* @smps_mode: spatial multiplexing powersave mode; note that
- * %IEEE80211_SMPS_STATIC is used when the device is not
+ * %MAC80211_SMPS_STATIC is used when the device is not
* configured for an HT channel
*/
-struct ieee80211_conf {
+struct mac80211_conf {
u32 flags;
int power_level, dynamic_ps_timeout;
int max_sleep_period;
@@ -789,11 +791,11 @@ struct ieee80211_conf {

struct ieee80211_channel *channel;
enum nl80211_channel_type channel_type;
- enum ieee80211_smps_mode smps_mode;
+ enum mac80211_smps_mode smps_mode;
};

/**
- * struct ieee80211_channel_switch - holds the channel switch data
+ * struct mac80211_channel_switch - holds the channel switch data
*
* The information provided in this structure is required for channel switch
* operation.
@@ -807,7 +809,7 @@ struct ieee80211_conf {
* @channel: the new channel to switch to
* @count: the number of TBTT's until the channel switch event
*/
-struct ieee80211_channel_switch {
+struct mac80211_channel_switch {
u64 timestamp;
bool block_tx;
struct ieee80211_channel *channel;
@@ -815,7 +817,7 @@ struct ieee80211_channel_switch {
};

/**
- * struct ieee80211_vif - per-interface data
+ * struct mac80211_vif - per-interface data
*
* Data in this structure is continually present for driver
* use during the life of a virtual interface.
@@ -829,16 +831,16 @@ struct ieee80211_channel_switch {
* @drv_priv: data area for driver use, will always be aligned to
* sizeof(void *).
*/
-struct ieee80211_vif {
+struct mac80211_vif {
enum nl80211_iftype type;
- struct ieee80211_bss_conf bss_conf;
+ struct mac80211_bss_conf bss_conf;
u8 addr[ETH_ALEN];
bool p2p;
/* must be last */
u8 drv_priv[0] __attribute__((__aligned__(sizeof(void *))));
};

-static inline bool ieee80211_vif_is_mesh(struct ieee80211_vif *vif)
+static inline bool mac80211_vif_is_mesh(struct mac80211_vif *vif)
{
#ifdef CONFIG_MAC80211_MESH
return vif->type == NL80211_IFTYPE_MESH_POINT;
@@ -847,44 +849,44 @@ static inline bool ieee80211_vif_is_mesh(struct ieee80211_vif *vif)
}

/**
- * enum ieee80211_key_flags - key flags
+ * enum mac80211_key_flags - key flags
*
* These flags are used for communication about keys between the driver
- * and mac80211, with the @flags parameter of &struct ieee80211_key_conf.
+ * and mac80211, with the @flags parameter of &struct mac80211_key_conf.
*
- * @IEEE80211_KEY_FLAG_WMM_STA: Set by mac80211, this flag indicates
+ * @MAC80211_KEY_FLAG_WMM_STA: Set by mac80211, this flag indicates
* that the STA this key will be used with could be using QoS.
- * @IEEE80211_KEY_FLAG_GENERATE_IV: This flag should be set by the
+ * @MAC80211_KEY_FLAG_GENERATE_IV: This flag should be set by the
* driver to indicate that it requires IV generation for this
* particular key.
- * @IEEE80211_KEY_FLAG_GENERATE_MMIC: This flag should be set by
+ * @MAC80211_KEY_FLAG_GENERATE_MMIC: This flag should be set by
* the driver for a TKIP key if it requires Michael MIC
* generation in software.
- * @IEEE80211_KEY_FLAG_PAIRWISE: Set by mac80211, this flag indicates
+ * @MAC80211_KEY_FLAG_PAIRWISE: Set by mac80211, this flag indicates
* that the key is pairwise rather then a shared key.
- * @IEEE80211_KEY_FLAG_SW_MGMT: This flag should be set by the driver for a
+ * @MAC80211_KEY_FLAG_SW_MGMT: This flag should be set by the driver for a
* CCMP key if it requires CCMP encryption of management frames (MFP) to
* be done in software.
*/
-enum ieee80211_key_flags {
- IEEE80211_KEY_FLAG_WMM_STA = 1<<0,
- IEEE80211_KEY_FLAG_GENERATE_IV = 1<<1,
- IEEE80211_KEY_FLAG_GENERATE_MMIC= 1<<2,
- IEEE80211_KEY_FLAG_PAIRWISE = 1<<3,
- IEEE80211_KEY_FLAG_SW_MGMT = 1<<4,
+enum mac80211_key_flags {
+ MAC80211_KEY_FLAG_WMM_STA = 1<<0,
+ MAC80211_KEY_FLAG_GENERATE_IV = 1<<1,
+ MAC80211_KEY_FLAG_GENERATE_MMIC= 1<<2,
+ MAC80211_KEY_FLAG_PAIRWISE = 1<<3,
+ MAC80211_KEY_FLAG_SW_MGMT = 1<<4,
};

/**
- * struct ieee80211_key_conf - key information
+ * struct mac80211_key_conf - key information
*
* This key information is given by mac80211 to the driver by
- * the set_key() callback in &struct ieee80211_ops.
+ * the set_key() callback in &struct mac80211_ops.
*
* @hw_key_idx: To be set by the driver, this is the key index the driver
* wants to be given when a frame is transmitted and needs to be
* encrypted in hardware.
* @cipher: The key's cipher suite selector.
- * @flags: key flags, see &enum ieee80211_key_flags.
+ * @flags: key flags, see &enum mac80211_key_flags.
* @keyidx: the key index (0-3)
* @keylen: key material length
* @key: key material. For ALG_TKIP the key is encoded as a 256-bit (32 byte)
@@ -895,7 +897,7 @@ enum ieee80211_key_flags {
* @icv_len: The ICV length for this key type
* @iv_len: The IV length for this key type
*/
-struct ieee80211_key_conf {
+struct mac80211_key_conf {
u32 cipher;
u8 icv_len;
u8 iv_len;
@@ -909,7 +911,7 @@ struct ieee80211_key_conf {
/**
* enum set_key_cmd - key command
*
- * Used with the set_key() callback in &struct ieee80211_ops, this
+ * Used with the set_key() callback in &struct mac80211_ops, this
* indicates whether a key is being removed or added.
*
* @SET_KEY: a key is set
@@ -920,11 +922,11 @@ enum set_key_cmd {
};

/**
- * struct ieee80211_sta - station table entry
+ * struct mac80211_sta - station table entry
*
* A station table entry represents a station we are possibly
* communicating with. Since stations are RCU-managed in
- * mac80211, any ieee80211_sta pointer you get access to must
+ * mac80211, any mac80211_sta pointer you get access to must
* either be protected by rcu_read_lock() explicitly or implicitly,
* or you must take good care to not use such a pointer after a
* call to your sta_remove callback that removed it.
@@ -936,7 +938,7 @@ enum set_key_cmd {
* @drv_priv: data area for driver use, will always be aligned to
* sizeof(void *), size is determined in hw information.
*/
-struct ieee80211_sta {
+struct mac80211_sta {
u32 supp_rates[IEEE80211_NUM_BANDS];
u8 addr[ETH_ALEN];
u16 aid;
@@ -949,7 +951,7 @@ struct ieee80211_sta {
/**
* enum sta_notify_cmd - sta notify command
*
- * Used with the sta_notify() callback in &struct ieee80211_ops, this
+ * Used with the sta_notify() callback in &struct mac80211_ops, this
* indicates if an associated station made a power state transition.
*
* @STA_NOTIFY_SLEEP: a station is now sleeping
@@ -960,22 +962,22 @@ enum sta_notify_cmd {
};

/**
- * enum ieee80211_tkip_key_type - get tkip key
+ * enum mac80211_tkip_key_type - get tkip key
*
* Used by drivers which need to get a tkip key for skb. Some drivers need a
* phase 1 key, others need a phase 2 key. A single function allows the driver
* to get the key, this enum indicates what type of key is required.
*
- * @IEEE80211_TKIP_P1_KEY: the driver needs a phase 1 key
- * @IEEE80211_TKIP_P2_KEY: the driver needs a phase 2 key
+ * @MAC80211_TKIP_P1_KEY: the driver needs a phase 1 key
+ * @MAC80211_TKIP_P2_KEY: the driver needs a phase 2 key
*/
-enum ieee80211_tkip_key_type {
- IEEE80211_TKIP_P1_KEY,
- IEEE80211_TKIP_P2_KEY,
+enum mac80211_tkip_key_type {
+ MAC80211_TKIP_P1_KEY,
+ MAC80211_TKIP_P2_KEY,
};

/**
- * enum ieee80211_hw_flags - hardware flags
+ * enum mac80211_hw_flags - hardware flags
*
* These flags are used to indicate hardware capabilities to
* the stack. Generally, flags here should have their meaning
@@ -983,7 +985,7 @@ enum ieee80211_tkip_key_type {
* any particular flags. There are some exceptions to this rule,
* however, so you are advised to review these flags carefully.
*
- * @IEEE80211_HW_HAS_RATE_CONTROL:
+ * @MAC80211_HW_HAS_RATE_CONTROL:
* The hardware or firmware includes rate control, and cannot be
* controlled by the stack. As such, no rate control algorithm
* should be instantiated, and the TX rate reported to userspace
@@ -996,151 +998,151 @@ enum ieee80211_tkip_key_type {
* timing in 2.4 GHz and @use_short_preamble for preambles for
* CCK frames.
*
- * @IEEE80211_HW_RX_INCLUDES_FCS:
+ * @MAC80211_HW_RX_INCLUDES_FCS:
* Indicates that received frames passed to the stack include
* the FCS at the end.
*
- * @IEEE80211_HW_HOST_BROADCAST_PS_BUFFERING:
+ * @MAC80211_HW_HOST_BROADCAST_PS_BUFFERING:
* Some wireless LAN chipsets buffer broadcast/multicast frames
* for power saving stations in the hardware/firmware and others
* rely on the host system for such buffering. This option is used
* to configure the IEEE 802.11 upper layer to buffer broadcast and
* multicast frames when there are power saving stations so that
- * the driver can fetch them with ieee80211_get_buffered_bc().
+ * the driver can fetch them with mac80211_get_buffered_bc().
*
- * @IEEE80211_HW_2GHZ_SHORT_SLOT_INCAPABLE:
+ * @MAC80211_HW_2GHZ_SHORT_SLOT_INCAPABLE:
* Hardware is not capable of short slot operation on the 2.4 GHz band.
*
- * @IEEE80211_HW_2GHZ_SHORT_PREAMBLE_INCAPABLE:
+ * @MAC80211_HW_2GHZ_SHORT_PREAMBLE_INCAPABLE:
* Hardware is not capable of receiving frames with short preamble on
* the 2.4 GHz band.
*
- * @IEEE80211_HW_SIGNAL_UNSPEC:
+ * @MAC80211_HW_SIGNAL_UNSPEC:
* Hardware can provide signal values but we don't know its units. We
* expect values between 0 and @max_signal.
* If possible please provide dB or dBm instead.
*
- * @IEEE80211_HW_SIGNAL_DBM:
+ * @MAC80211_HW_SIGNAL_DBM:
* Hardware gives signal values in dBm, decibel difference from
* one milliwatt. This is the preferred method since it is standardized
* between different devices. @max_signal does not need to be set.
*
- * @IEEE80211_HW_SPECTRUM_MGMT:
+ * @MAC80211_HW_SPECTRUM_MGMT:
* Hardware supports spectrum management defined in 802.11h
* Measurement, Channel Switch, Quieting, TPC
*
- * @IEEE80211_HW_AMPDU_AGGREGATION:
+ * @MAC80211_HW_AMPDU_AGGREGATION:
* Hardware supports 11n A-MPDU aggregation.
*
- * @IEEE80211_HW_SUPPORTS_PS:
+ * @MAC80211_HW_SUPPORTS_PS:
* Hardware has power save support (i.e. can go to sleep).
*
- * @IEEE80211_HW_PS_NULLFUNC_STACK:
+ * @MAC80211_HW_PS_NULLFUNC_STACK:
* Hardware requires nullfunc frame handling in stack, implies
* stack support for dynamic PS.
*
- * @IEEE80211_HW_SUPPORTS_DYNAMIC_PS:
+ * @MAC80211_HW_SUPPORTS_DYNAMIC_PS:
* Hardware has support for dynamic PS.
*
- * @IEEE80211_HW_MFP_CAPABLE:
+ * @MAC80211_HW_MFP_CAPABLE:
* Hardware supports management frame protection (MFP, IEEE 802.11w).
*
- * @IEEE80211_HW_BEACON_FILTER:
+ * @MAC80211_HW_BEACON_FILTER:
* Hardware supports dropping of irrelevant beacon frames to
* avoid waking up cpu.
*
- * @IEEE80211_HW_SUPPORTS_STATIC_SMPS:
+ * @MAC80211_HW_SUPPORTS_STATIC_SMPS:
* Hardware supports static spatial multiplexing powersave,
* ie. can turn off all but one chain even on HT connections
* that should be using more chains.
*
- * @IEEE80211_HW_SUPPORTS_DYNAMIC_SMPS:
+ * @MAC80211_HW_SUPPORTS_DYNAMIC_SMPS:
* Hardware supports dynamic spatial multiplexing powersave,
* ie. can turn off all but one chain and then wake the rest
* up as required after, for example, rts/cts handshake.
*
- * @IEEE80211_HW_SUPPORTS_UAPSD:
+ * @MAC80211_HW_SUPPORTS_UAPSD:
* Hardware supports Unscheduled Automatic Power Save Delivery
* (U-APSD) in managed mode. The mode is configured with
* conf_tx() operation.
*
- * @IEEE80211_HW_REPORTS_TX_ACK_STATUS:
+ * @MAC80211_HW_REPORTS_TX_ACK_STATUS:
* Hardware can provide ack status reports of Tx frames to
* the stack.
*
- * @IEEE80211_HW_CONNECTION_MONITOR:
+ * @MAC80211_HW_CONNECTION_MONITOR:
* The hardware performs its own connection monitoring, including
* periodic keep-alives to the AP and probing the AP on beacon loss.
* When this flag is set, signaling beacon-loss will cause an immediate
* change to disassociated state.
*
- * @IEEE80211_HW_SUPPORTS_CQM_RSSI:
+ * @MAC80211_HW_SUPPORTS_CQM_RSSI:
* Hardware can do connection quality monitoring - i.e. it can monitor
* connection quality related parameters, such as the RSSI level and
* provide notifications if configured trigger levels are reached.
*
- * @IEEE80211_HW_NEED_DTIM_PERIOD:
+ * @MAC80211_HW_NEED_DTIM_PERIOD:
* This device needs to know the DTIM period for the BSS before
* associating.
*
- * @IEEE80211_HW_SUPPORTS_PER_STA_GTK: The device's crypto engine supports
+ * @MAC80211_HW_SUPPORTS_PER_STA_GTK: The device's crypto engine supports
* per-station GTKs as used by IBSS RSN or during fast transition. If
* the device doesn't support per-station GTKs, but can be asked not
* to decrypt group addressed frames, then IBSS RSN support is still
* possible but software crypto will be used. Advertise the wiphy flag
* only in that case.
*
- * @IEEE80211_HW_AP_LINK_PS: When operating in AP mode the device
+ * @MAC80211_HW_AP_LINK_PS: When operating in AP mode the device
* autonomously manages the PS status of connected stations. When
* this flag is set mac80211 will not trigger PS mode for connected
* stations based on the PM bit of incoming frames.
- * Use ieee80211_start_ps()/ieee8021_end_ps() to manually configure
+ * Use mac80211_start_ps()/ieee8021_end_ps() to manually configure
* the PS mode of connected stations.
*/
-enum ieee80211_hw_flags {
- IEEE80211_HW_HAS_RATE_CONTROL = 1<<0,
- IEEE80211_HW_RX_INCLUDES_FCS = 1<<1,
- IEEE80211_HW_HOST_BROADCAST_PS_BUFFERING = 1<<2,
- IEEE80211_HW_2GHZ_SHORT_SLOT_INCAPABLE = 1<<3,
- IEEE80211_HW_2GHZ_SHORT_PREAMBLE_INCAPABLE = 1<<4,
- IEEE80211_HW_SIGNAL_UNSPEC = 1<<5,
- IEEE80211_HW_SIGNAL_DBM = 1<<6,
- IEEE80211_HW_NEED_DTIM_PERIOD = 1<<7,
- IEEE80211_HW_SPECTRUM_MGMT = 1<<8,
- IEEE80211_HW_AMPDU_AGGREGATION = 1<<9,
- IEEE80211_HW_SUPPORTS_PS = 1<<10,
- IEEE80211_HW_PS_NULLFUNC_STACK = 1<<11,
- IEEE80211_HW_SUPPORTS_DYNAMIC_PS = 1<<12,
- IEEE80211_HW_MFP_CAPABLE = 1<<13,
- IEEE80211_HW_BEACON_FILTER = 1<<14,
- IEEE80211_HW_SUPPORTS_STATIC_SMPS = 1<<15,
- IEEE80211_HW_SUPPORTS_DYNAMIC_SMPS = 1<<16,
- IEEE80211_HW_SUPPORTS_UAPSD = 1<<17,
- IEEE80211_HW_REPORTS_TX_ACK_STATUS = 1<<18,
- IEEE80211_HW_CONNECTION_MONITOR = 1<<19,
- IEEE80211_HW_SUPPORTS_CQM_RSSI = 1<<20,
- IEEE80211_HW_SUPPORTS_PER_STA_GTK = 1<<21,
- IEEE80211_HW_AP_LINK_PS = 1<<22,
+enum mac80211_hw_flags {
+ MAC80211_HW_HAS_RATE_CONTROL = 1<<0,
+ MAC80211_HW_RX_INCLUDES_FCS = 1<<1,
+ MAC80211_HW_HOST_BROADCAST_PS_BUFFERING = 1<<2,
+ MAC80211_HW_2GHZ_SHORT_SLOT_INCAPABLE = 1<<3,
+ MAC80211_HW_2GHZ_SHORT_PREAMBLE_INCAPABLE = 1<<4,
+ MAC80211_HW_SIGNAL_UNSPEC = 1<<5,
+ MAC80211_HW_SIGNAL_DBM = 1<<6,
+ MAC80211_HW_NEED_DTIM_PERIOD = 1<<7,
+ MAC80211_HW_SPECTRUM_MGMT = 1<<8,
+ MAC80211_HW_AMPDU_AGGREGATION = 1<<9,
+ MAC80211_HW_SUPPORTS_PS = 1<<10,
+ MAC80211_HW_PS_NULLFUNC_STACK = 1<<11,
+ MAC80211_HW_SUPPORTS_DYNAMIC_PS = 1<<12,
+ MAC80211_HW_MFP_CAPABLE = 1<<13,
+ MAC80211_HW_BEACON_FILTER = 1<<14,
+ MAC80211_HW_SUPPORTS_STATIC_SMPS = 1<<15,
+ MAC80211_HW_SUPPORTS_DYNAMIC_SMPS = 1<<16,
+ MAC80211_HW_SUPPORTS_UAPSD = 1<<17,
+ MAC80211_HW_REPORTS_TX_ACK_STATUS = 1<<18,
+ MAC80211_HW_CONNECTION_MONITOR = 1<<19,
+ MAC80211_HW_SUPPORTS_CQM_RSSI = 1<<20,
+ MAC80211_HW_SUPPORTS_PER_STA_GTK = 1<<21,
+ MAC80211_HW_AP_LINK_PS = 1<<22,
};

/**
- * struct ieee80211_hw - hardware information and state
+ * struct mac80211_hw - hardware information and state
*
* This structure contains the configuration and hardware
* information for an 802.11 PHY.
*
* @wiphy: This points to the &struct wiphy allocated for this
* 802.11 PHY. You must fill in the @perm_addr and @dev
- * members of this structure using SET_IEEE80211_DEV()
- * and SET_IEEE80211_PERM_ADDR(). Additionally, all supported
+ * members of this structure using SET_MAC80211_DEV()
+ * and SET_MAC80211_PERM_ADDR(). Additionally, all supported
* bands (with channels, bitrates) are registered here.
*
- * @conf: &struct ieee80211_conf, device configuration, don't use.
+ * @conf: &struct mac80211_conf, device configuration, don't use.
*
* @priv: pointer to private area that was allocated for driver use
* along with this structure.
*
- * @flags: hardware flags, see &enum ieee80211_hw_flags.
+ * @flags: hardware flags, see &enum mac80211_hw_flags.
*
* @extra_tx_headroom: headroom to reserve in each transmit skb
* for use by the driver (e.g. for transmit headers.)
@@ -1148,7 +1150,7 @@ enum ieee80211_hw_flags {
* @channel_change_time: time (in microseconds) it takes to change channels.
*
* @max_signal: Maximum value for signal (rssi) in RX information, used
- * only when @IEEE80211_HW_SIGNAL_UNSPEC or @IEEE80211_HW_SIGNAL_DB
+ * only when @MAC80211_HW_SIGNAL_UNSPEC or @MAC80211_HW_SIGNAL_DB
*
* @max_listen_interval: max listen interval in units of beacon interval
* that HW supports
@@ -1159,12 +1161,12 @@ enum ieee80211_hw_flags {
*
* @rate_control_algorithm: rate control algorithm for this hardware.
* If unset (NULL), the default algorithm will be used. Must be
- * set before calling ieee80211_register_hw().
+ * set before calling mac80211_register_hw().
*
* @vif_data_size: size (in bytes) of the drv_priv data area
- * within &struct ieee80211_vif.
+ * within &struct mac80211_vif.
* @sta_data_size: size (in bytes) of the drv_priv data area
- * within &struct ieee80211_sta.
+ * within &struct mac80211_sta.
*
* @max_rates: maximum number of alternate rate retry stages the hw
* can handle.
@@ -1187,8 +1189,8 @@ enum ieee80211_hw_flags {
* aggregate an HT driver will transmit, used by the peer as a
* hint to size its reorder buffer.
*/
-struct ieee80211_hw {
- struct ieee80211_conf conf;
+struct mac80211_hw {
+ struct mac80211_conf conf;
struct wiphy *wiphy;
const char *rate_control_algorithm;
void *priv;
@@ -1209,43 +1211,43 @@ struct ieee80211_hw {
};

/**
- * wiphy_to_ieee80211_hw - return a mac80211 driver hw struct from a wiphy
+ * wiphy_to_mac80211_hw - return a mac80211 driver hw struct from a wiphy
*
* @wiphy: the &struct wiphy which we want to query
*
* mac80211 drivers can use this to get to their respective
- * &struct ieee80211_hw. Drivers wishing to get to their own private
+ * &struct mac80211_hw. Drivers wishing to get to their own private
* structure can then access it via hw->priv. Note that mac802111 drivers should
* not use wiphy_priv() to try to get their private driver structure as this
* is already used internally by mac80211.
*/
-struct ieee80211_hw *wiphy_to_ieee80211_hw(struct wiphy *wiphy);
+struct mac80211_hw *wiphy_to_mac80211_hw(struct wiphy *wiphy);

/**
- * SET_IEEE80211_DEV - set device for 802.11 hardware
+ * SET_MAC80211_DEV - set device for 802.11 hardware
*
- * @hw: the &struct ieee80211_hw to set the device for
+ * @hw: the &struct mac80211_hw to set the device for
* @dev: the &struct device of this 802.11 device
*/
-static inline void SET_IEEE80211_DEV(struct ieee80211_hw *hw, struct device *dev)
+static inline void SET_MAC80211_DEV(struct mac80211_hw *hw, struct device *dev)
{
set_wiphy_dev(hw->wiphy, dev);
}

/**
- * SET_IEEE80211_PERM_ADDR - set the permanent MAC address for 802.11 hardware
+ * SET_MAC80211_PERM_ADDR - set the permanent MAC address for 802.11 hardware
*
- * @hw: the &struct ieee80211_hw to set the MAC address for
+ * @hw: the &struct mac80211_hw to set the MAC address for
* @addr: the address to set
*/
-static inline void SET_IEEE80211_PERM_ADDR(struct ieee80211_hw *hw, u8 *addr)
+static inline void SET_MAC80211_PERM_ADDR(struct mac80211_hw *hw, u8 *addr)
{
memcpy(hw->wiphy->perm_addr, addr, ETH_ALEN);
}

static inline struct ieee80211_rate *
-ieee80211_get_tx_rate(const struct ieee80211_hw *hw,
- const struct ieee80211_tx_info *c)
+mac80211_get_tx_rate(const struct mac80211_hw *hw,
+ const struct mac80211_tx_info *c)
{
if (WARN_ON(c->control.rates[0].idx < 0))
return NULL;
@@ -1253,8 +1255,8 @@ ieee80211_get_tx_rate(const struct ieee80211_hw *hw,
}

static inline struct ieee80211_rate *
-ieee80211_get_rts_cts_rate(const struct ieee80211_hw *hw,
- const struct ieee80211_tx_info *c)
+mac80211_get_rts_cts_rate(const struct mac80211_hw *hw,
+ const struct mac80211_tx_info *c)
{
if (c->control.rts_cts_rate_idx < 0)
return NULL;
@@ -1262,8 +1264,8 @@ ieee80211_get_rts_cts_rate(const struct ieee80211_hw *hw,
}

static inline struct ieee80211_rate *
-ieee80211_get_alt_retry_rate(const struct ieee80211_hw *hw,
- const struct ieee80211_tx_info *c, int idx)
+mac80211_get_alt_retry_rate(const struct mac80211_hw *hw,
+ const struct mac80211_tx_info *c, int idx)
{
if (c->control.rates[idx + 1].idx < 0)
return NULL;
@@ -1276,7 +1278,7 @@ ieee80211_get_alt_retry_rate(const struct ieee80211_hw *hw,
* mac80211 is capable of taking advantage of many hardware
* acceleration designs for encryption and decryption operations.
*
- * The set_key() callback in the &struct ieee80211_ops for a given
+ * The set_key() callback in the &struct mac80211_ops for a given
* device is called to enable hardware acceleration of encryption and
* decryption. The callback takes a @sta parameter that will be NULL
* for default keys or keys used for transmission only, or point to
@@ -1285,7 +1287,7 @@ ieee80211_get_alt_retry_rate(const struct ieee80211_hw *hw,
* VLANs are configured for an access point.
*
* When transmitting, the TX control data will use the @hw_key_idx
- * selected by the driver by modifying the &struct ieee80211_key_conf
+ * selected by the driver by modifying the &struct mac80211_key_conf
* pointed to by the @key parameter to the set_key() function.
*
* The set_key() call for the %SET_KEY command should return 0 if
@@ -1300,7 +1302,7 @@ ieee80211_get_alt_retry_rate(const struct ieee80211_hw *hw,
* decision based on whether a key has been uploaded or not but rather
* based on the receive flags.
*
- * The &struct ieee80211_key_conf structure pointed to by the @key
+ * The &struct mac80211_key_conf structure pointed to by the @key
* parameter is guaranteed to be valid until another call to set_key()
* removes it, but it can only be used as a cookie to differentiate
* keys.
@@ -1322,15 +1324,15 @@ ieee80211_get_alt_retry_rate(const struct ieee80211_hw *hw,
* mac80211 has support for various powersave implementations.
*
* First, it can support hardware that handles all powersaving by itself,
- * such hardware should simply set the %IEEE80211_HW_SUPPORTS_PS hardware
+ * such hardware should simply set the %MAC80211_HW_SUPPORTS_PS hardware
* flag. In that case, it will be told about the desired powersave mode
- * with the %IEEE80211_CONF_PS flag depending on the association status.
+ * with the %MAC80211_CONF_PS flag depending on the association status.
* The hardware must take care of sending nullfunc frames when necessary,
* i.e. when entering and leaving powersave mode. The hardware is required
* to look at the AID in beacons and signal to the AP that it woke up when
* it finds traffic directed to it.
*
- * %IEEE80211_CONF_PS flag enabled means that the powersave mode defined in
+ * %MAC80211_CONF_PS flag enabled means that the powersave mode defined in
* IEEE 802.11-2007 section 11.2 is enabled. This is not to be confused
* with hardware wakeup and sleep states. Driver is responsible for waking
* up the hardware before issuing commands to the hardware and putting it
@@ -1342,8 +1344,8 @@ ieee80211_get_alt_retry_rate(const struct ieee80211_hw *hw,
*
* Other hardware designs cannot send nullfunc frames by themselves and also
* need software support for parsing the TIM bitmap. This is also supported
- * by mac80211 by combining the %IEEE80211_HW_SUPPORTS_PS and
- * %IEEE80211_HW_PS_NULLFUNC_STACK flags. The hardware is of course still
+ * by mac80211 by combining the %MAC80211_HW_SUPPORTS_PS and
+ * %MAC80211_HW_PS_NULLFUNC_STACK flags. The hardware is of course still
* required to pass up beacons. The hardware is still required to handle
* waking up for multicast traffic; if it cannot the driver must handle that
* as best as it can, mac80211 is too slow to do that.
@@ -1356,14 +1358,14 @@ ieee80211_get_alt_retry_rate(const struct ieee80211_hw *hw,
* periods.
*
* Dynamic powersave is simply supported by mac80211 enabling and disabling
- * PS based on traffic. Driver needs to only set %IEEE80211_HW_SUPPORTS_PS
+ * PS based on traffic. Driver needs to only set %MAC80211_HW_SUPPORTS_PS
* flag and mac80211 will handle everything automatically. Additionally,
* hardware having support for the dynamic PS feature may set the
- * %IEEE80211_HW_SUPPORTS_DYNAMIC_PS flag to indicate that it can support
+ * %MAC80211_HW_SUPPORTS_DYNAMIC_PS flag to indicate that it can support
* dynamic PS mode itself. The driver needs to look at the
* @dynamic_ps_timeout hardware configuration value and use it that value
- * whenever %IEEE80211_CONF_PS is set. In this case mac80211 will disable
- * dynamic PS feature in stack and will just keep %IEEE80211_CONF_PS
+ * whenever %MAC80211_CONF_PS is set. In this case mac80211 will disable
+ * dynamic PS feature in stack and will just keep %MAC80211_CONF_PS
* enabled whenever user has enabled powersave.
*
* Some hardware need to toggle a single shared antenna between WLAN and
@@ -1376,14 +1378,14 @@ ieee80211_get_alt_retry_rate(const struct ieee80211_hw *hw,
* temporarily set to zero until the driver re-enables dynamic powersave.
*
* Driver informs U-APSD client support by enabling
- * %IEEE80211_HW_SUPPORTS_UAPSD flag. The mode is configured through the
+ * %MAC80211_HW_SUPPORTS_UAPSD flag. The mode is configured through the
* uapsd paramater in conf_tx() operation. Hardware needs to send the QoS
* Nullfunc frames and stay awake until the service period has ended. To
* utilize U-APSD, dynamic powersave is disabled for voip AC and all frames
* from that AC are transmitted with powersave enabled.
*
* Note: U-APSD client mode is not yet supported with
- * %IEEE80211_HW_PS_NULLFUNC_STACK.
+ * %MAC80211_HW_PS_NULLFUNC_STACK.
*/

/**
@@ -1397,15 +1399,15 @@ ieee80211_get_alt_retry_rate(const struct ieee80211_hw *hw,
* way the host will only receive beacons where some relevant information
* (for example ERP protection or WMM settings) have changed.
*
- * Beacon filter support is advertised with the %IEEE80211_HW_BEACON_FILTER
+ * Beacon filter support is advertised with the %MAC80211_HW_BEACON_FILTER
* hardware capability. The driver needs to enable beacon filter support
- * whenever power save is enabled, that is %IEEE80211_CONF_PS is set. When
+ * whenever power save is enabled, that is %MAC80211_CONF_PS is set. When
* power save is enabled, the stack will not check for beacon loss and the
- * driver needs to notify about loss of beacons with ieee80211_beacon_loss().
+ * driver needs to notify about loss of beacons with mac80211_beacon_loss().
*
* The time (or number of beacons missed) until the firmware notifies the
* driver of a beacon loss event (which in turn causes the driver to call
- * ieee80211_beacon_loss()) should be configurable and will be controlled
+ * mac80211_beacon_loss()) should be configurable and will be controlled
* by mac80211 and the roaming algorithm in the future.
*
* Since there may be constantly changing information elements that nothing
@@ -1512,7 +1514,7 @@ ieee80211_get_alt_retry_rate(const struct ieee80211_hw *hw,
*/

/**
- * enum ieee80211_filter_flags - hardware filter flags
+ * enum mac80211_filter_flags - hardware filter flags
*
* These flags determine what the filter in hardware should be
* programmed to let through and what should not be passed to the
@@ -1549,7 +1551,7 @@ ieee80211_get_alt_retry_rate(const struct ieee80211_hw *hw,
*
* @FIF_PROBE_REQ: pass probe request frames
*/
-enum ieee80211_filter_flags {
+enum mac80211_filter_flags {
FIF_PROMISC_IN_BSS = 1<<0,
FIF_ALLMULTI = 1<<1,
FIF_FCSFAIL = 1<<2,
@@ -1562,32 +1564,32 @@ enum ieee80211_filter_flags {
};

/**
- * enum ieee80211_ampdu_mlme_action - A-MPDU actions
+ * enum mac80211_ampdu_mlme_action - A-MPDU actions
*
* These flags are used with the ampdu_action() callback in
- * &struct ieee80211_ops to indicate which action is needed.
+ * &struct mac80211_ops to indicate which action is needed.
*
* Note that drivers MUST be able to deal with a TX aggregation
* session being stopped even before they OK'ed starting it by
- * calling ieee80211_start_tx_ba_cb_irqsafe, because the peer
+ * calling mac80211_start_tx_ba_cb_irqsafe, because the peer
* might receive the addBA frame and send a delBA right away!
*
- * @IEEE80211_AMPDU_RX_START: start Rx aggregation
- * @IEEE80211_AMPDU_RX_STOP: stop Rx aggregation
- * @IEEE80211_AMPDU_TX_START: start Tx aggregation
- * @IEEE80211_AMPDU_TX_STOP: stop Tx aggregation
- * @IEEE80211_AMPDU_TX_OPERATIONAL: TX aggregation has become operational
- */
-enum ieee80211_ampdu_mlme_action {
- IEEE80211_AMPDU_RX_START,
- IEEE80211_AMPDU_RX_STOP,
- IEEE80211_AMPDU_TX_START,
- IEEE80211_AMPDU_TX_STOP,
- IEEE80211_AMPDU_TX_OPERATIONAL,
+ * @MAC80211_AMPDU_RX_START: start Rx aggregation
+ * @MAC80211_AMPDU_RX_STOP: stop Rx aggregation
+ * @MAC80211_AMPDU_TX_START: start Tx aggregation
+ * @MAC80211_AMPDU_TX_STOP: stop Tx aggregation
+ * @MAC80211_AMPDU_TX_OPERATIONAL: TX aggregation has become operational
+ */
+enum mac80211_ampdu_mlme_action {
+ MAC80211_AMPDU_RX_START,
+ MAC80211_AMPDU_RX_STOP,
+ MAC80211_AMPDU_TX_START,
+ MAC80211_AMPDU_TX_STOP,
+ MAC80211_AMPDU_TX_OPERATIONAL,
};

/**
- * struct ieee80211_ops - callbacks from mac80211 to the driver
+ * struct mac80211_ops - callbacks from mac80211 to the driver
*
* This structure contains various callbacks that the driver may
* handle or, in some cases, must handle, for example to configure
@@ -1691,7 +1693,7 @@ enum ieee80211_ampdu_mlme_action {
*
* @update_tkip_key: See the section "Hardware crypto acceleration"
* This callback will be called in the context of Rx. Called for drivers
- * which set IEEE80211_KEY_FLAG_TKIP_REQ_RX_P1_KEY.
+ * which set MAC80211_KEY_FLAG_TKIP_REQ_RX_P1_KEY.
* The callback must be atomic.
*
* @hw_scan: Ask the hardware to service the scan request, no need to start
@@ -1703,14 +1705,14 @@ enum ieee80211_ampdu_mlme_action {
* entire IEs after the SSID, so that drivers need not look at these
* at all but just send them after the SSID -- mac80211 includes the
* (extended) supported rates and HT information (where applicable).
- * When the scan finishes, ieee80211_scan_completed() must be called;
+ * When the scan finishes, mac80211_scan_completed() must be called;
* note that it also must be called when the scan cannot finish due to
* any error unless this callback returned a negative error code.
* The callback can sleep.
*
* @sched_scan_start: Ask the hardware to start scanning repeatedly at
* specific intervals. The driver must call the
- * ieee80211_sched_scan_results() function whenever it finds results.
+ * mac80211_sched_scan_results() function whenever it finds results.
* This process will continue until sched_scan_stop is called.
*
* @sched_scan_stop: Tell the hardware to stop an ongoing scheduled scan.
@@ -1750,7 +1752,7 @@ enum ieee80211_ampdu_mlme_action {
* @sta_notify: Notifies low level driver about power state transition of an
* associated station, AP, IBSS/WDS/mesh peer etc. For a VIF operating
* in AP mode, this callback will not be called when the flag
- * %IEEE80211_HW_AP_LINK_PS is set. Must be atomic.
+ * %MAC80211_HW_AP_LINK_PS is set. Must be atomic.
*
* @conf_tx: Configure TX queue parameters (EDCF (aifs, cw_min, cw_max),
* bursting) for a hardware TX queue.
@@ -1782,11 +1784,11 @@ enum ieee80211_ampdu_mlme_action {
* @ampdu_action: Perform a certain A-MPDU action
* The RA/TID combination determines the destination and TID we want
* the ampdu action to be performed for. The action is defined through
- * ieee80211_ampdu_mlme_action. Starting sequence number (@ssn)
+ * mac80211_ampdu_mlme_action. Starting sequence number (@ssn)
* is the first frame we expect to perform the action on. Notice
* that TX/RX_STOP can pass NULL for this parameter.
* The @buf_size parameter is only valid when the action is set to
- * %IEEE80211_AMPDU_TX_OPERATIONAL and indicates the peer's reorder
+ * %MAC80211_AMPDU_TX_OPERATIONAL and indicates the peer's reorder
* buffer size (number of subframes) for this session -- the driver
* may neither send aggregates containing more subframes than this
* nor send aggregates in a way that lost frames would exceed the
@@ -1823,7 +1825,7 @@ enum ieee80211_ampdu_mlme_action {
*
* @channel_switch: Drivers that need (or want) to offload the channel
* switch operation for CSAs received from the AP may implement this
- * callback. They must then call ieee80211_chswitch_done() to indicate
+ * callback. They must then call mac80211_chswitch_done() to indicate
* completion of the channel switch.
*
* @napi_poll: Poll Rx queue for incoming data frames.
@@ -1836,12 +1838,12 @@ enum ieee80211_ampdu_mlme_action {
* @get_antenna: Get current antenna configuration from device (tx_ant, rx_ant).
*
* @remain_on_channel: Starts an off-channel period on the given channel, must
- * call back to ieee80211_ready_on_channel() when on that channel. Note
+ * call back to mac80211_ready_on_channel() when on that channel. Note
* that normal channel traffic is not stopped as this is intended for hw
* offload. Frames to transmit on the off-channel channel are transmitted
- * normally except for the %IEEE80211_TX_CTL_TX_OFFCHAN flag. When the
+ * normally except for the %MAC80211_TX_CTL_TX_OFFCHAN flag. When the
* duration (which will always be non-zero) expires, the driver must call
- * ieee80211_remain_on_channel_expired(). This callback may sleep.
+ * mac80211_remain_on_channel_expired(). This callback may sleep.
* @cancel_remain_on_channel: Requests that an ongoing off-channel period is
* aborted before it expires. This callback may sleep.
* @offchannel_tx: Transmit frame on another channel, wait for a response
@@ -1861,169 +1863,169 @@ enum ieee80211_ampdu_mlme_action {
* when transmitting a frame. Currently only legacy rates are handled.
* The callback can sleep.
*/
-struct ieee80211_ops {
- void (*tx)(struct ieee80211_hw *hw, struct sk_buff *skb);
- int (*start)(struct ieee80211_hw *hw);
- void (*stop)(struct ieee80211_hw *hw);
+struct mac80211_ops {
+ void (*tx)(struct mac80211_hw *hw, struct sk_buff *skb);
+ int (*start)(struct mac80211_hw *hw);
+ void (*stop)(struct mac80211_hw *hw);
#ifdef CONFIG_PM
- int (*suspend)(struct ieee80211_hw *hw, struct cfg80211_wowlan *wowlan);
- int (*resume)(struct ieee80211_hw *hw);
+ int (*suspend)(struct mac80211_hw *hw, struct cfg80211_wowlan *wowlan);
+ int (*resume)(struct mac80211_hw *hw);
#endif
- int (*add_interface)(struct ieee80211_hw *hw,
- struct ieee80211_vif *vif);
- int (*change_interface)(struct ieee80211_hw *hw,
- struct ieee80211_vif *vif,
+ int (*add_interface)(struct mac80211_hw *hw,
+ struct mac80211_vif *vif);
+ int (*change_interface)(struct mac80211_hw *hw,
+ struct mac80211_vif *vif,
enum nl80211_iftype new_type, bool p2p);
- void (*remove_interface)(struct ieee80211_hw *hw,
- struct ieee80211_vif *vif);
- int (*config)(struct ieee80211_hw *hw, u32 changed);
- void (*bss_info_changed)(struct ieee80211_hw *hw,
- struct ieee80211_vif *vif,
- struct ieee80211_bss_conf *info,
+ void (*remove_interface)(struct mac80211_hw *hw,
+ struct mac80211_vif *vif);
+ int (*config)(struct mac80211_hw *hw, u32 changed);
+ void (*bss_info_changed)(struct mac80211_hw *hw,
+ struct mac80211_vif *vif,
+ struct mac80211_bss_conf *info,
u32 changed);
- u64 (*prepare_multicast)(struct ieee80211_hw *hw,
+ u64 (*prepare_multicast)(struct mac80211_hw *hw,
struct netdev_hw_addr_list *mc_list);
- void (*configure_filter)(struct ieee80211_hw *hw,
+ void (*configure_filter)(struct mac80211_hw *hw,
unsigned int changed_flags,
unsigned int *total_flags,
u64 multicast);
- int (*set_tim)(struct ieee80211_hw *hw, struct ieee80211_sta *sta,
+ int (*set_tim)(struct mac80211_hw *hw, struct mac80211_sta *sta,
bool set);
- int (*set_key)(struct ieee80211_hw *hw, enum set_key_cmd cmd,
- struct ieee80211_vif *vif, struct ieee80211_sta *sta,
- struct ieee80211_key_conf *key);
- void (*update_tkip_key)(struct ieee80211_hw *hw,
- struct ieee80211_vif *vif,
- struct ieee80211_key_conf *conf,
- struct ieee80211_sta *sta,
+ int (*set_key)(struct mac80211_hw *hw, enum set_key_cmd cmd,
+ struct mac80211_vif *vif, struct mac80211_sta *sta,
+ struct mac80211_key_conf *key);
+ void (*update_tkip_key)(struct mac80211_hw *hw,
+ struct mac80211_vif *vif,
+ struct mac80211_key_conf *conf,
+ struct mac80211_sta *sta,
u32 iv32, u16 *phase1key);
- int (*hw_scan)(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
+ int (*hw_scan)(struct mac80211_hw *hw, struct mac80211_vif *vif,
struct cfg80211_scan_request *req);
- int (*sched_scan_start)(struct ieee80211_hw *hw,
- struct ieee80211_vif *vif,
+ int (*sched_scan_start)(struct mac80211_hw *hw,
+ struct mac80211_vif *vif,
struct cfg80211_sched_scan_request *req,
- struct ieee80211_sched_scan_ies *ies);
- void (*sched_scan_stop)(struct ieee80211_hw *hw,
- struct ieee80211_vif *vif);
- void (*sw_scan_start)(struct ieee80211_hw *hw);
- void (*sw_scan_complete)(struct ieee80211_hw *hw);
- int (*get_stats)(struct ieee80211_hw *hw,
- struct ieee80211_low_level_stats *stats);
- void (*get_tkip_seq)(struct ieee80211_hw *hw, u8 hw_key_idx,
+ struct mac80211_sched_scan_ies *ies);
+ void (*sched_scan_stop)(struct mac80211_hw *hw,
+ struct mac80211_vif *vif);
+ void (*sw_scan_start)(struct mac80211_hw *hw);
+ void (*sw_scan_complete)(struct mac80211_hw *hw);
+ int (*get_stats)(struct mac80211_hw *hw,
+ struct mac80211_low_level_stats *stats);
+ void (*get_tkip_seq)(struct mac80211_hw *hw, u8 hw_key_idx,
u32 *iv32, u16 *iv16);
- int (*set_frag_threshold)(struct ieee80211_hw *hw, u32 value);
- int (*set_rts_threshold)(struct ieee80211_hw *hw, u32 value);
- int (*sta_add)(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
- struct ieee80211_sta *sta);
- int (*sta_remove)(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
- struct ieee80211_sta *sta);
- void (*sta_notify)(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
- enum sta_notify_cmd, struct ieee80211_sta *sta);
- int (*conf_tx)(struct ieee80211_hw *hw, u16 queue,
- const struct ieee80211_tx_queue_params *params);
- u64 (*get_tsf)(struct ieee80211_hw *hw);
- void (*set_tsf)(struct ieee80211_hw *hw, u64 tsf);
- void (*reset_tsf)(struct ieee80211_hw *hw);
- int (*tx_last_beacon)(struct ieee80211_hw *hw);
- int (*ampdu_action)(struct ieee80211_hw *hw,
- struct ieee80211_vif *vif,
- enum ieee80211_ampdu_mlme_action action,
- struct ieee80211_sta *sta, u16 tid, u16 *ssn,
+ int (*set_frag_threshold)(struct mac80211_hw *hw, u32 value);
+ int (*set_rts_threshold)(struct mac80211_hw *hw, u32 value);
+ int (*sta_add)(struct mac80211_hw *hw, struct mac80211_vif *vif,
+ struct mac80211_sta *sta);
+ int (*sta_remove)(struct mac80211_hw *hw, struct mac80211_vif *vif,
+ struct mac80211_sta *sta);
+ void (*sta_notify)(struct mac80211_hw *hw, struct mac80211_vif *vif,
+ enum sta_notify_cmd, struct mac80211_sta *sta);
+ int (*conf_tx)(struct mac80211_hw *hw, u16 queue,
+ const struct mac80211_tx_queue_params *params);
+ u64 (*get_tsf)(struct mac80211_hw *hw);
+ void (*set_tsf)(struct mac80211_hw *hw, u64 tsf);
+ void (*reset_tsf)(struct mac80211_hw *hw);
+ int (*tx_last_beacon)(struct mac80211_hw *hw);
+ int (*ampdu_action)(struct mac80211_hw *hw,
+ struct mac80211_vif *vif,
+ enum mac80211_ampdu_mlme_action action,
+ struct mac80211_sta *sta, u16 tid, u16 *ssn,
u8 buf_size);
- int (*get_survey)(struct ieee80211_hw *hw, int idx,
+ int (*get_survey)(struct mac80211_hw *hw, int idx,
struct survey_info *survey);
- void (*rfkill_poll)(struct ieee80211_hw *hw);
- void (*set_coverage_class)(struct ieee80211_hw *hw, u8 coverage_class);
+ void (*rfkill_poll)(struct mac80211_hw *hw);
+ void (*set_coverage_class)(struct mac80211_hw *hw, u8 coverage_class);
#ifdef CONFIG_NL80211_TESTMODE
- int (*testmode_cmd)(struct ieee80211_hw *hw, void *data, int len);
+ int (*testmode_cmd)(struct mac80211_hw *hw, void *data, int len);
#endif
- void (*flush)(struct ieee80211_hw *hw, bool drop);
- void (*channel_switch)(struct ieee80211_hw *hw,
- struct ieee80211_channel_switch *ch_switch);
- int (*napi_poll)(struct ieee80211_hw *hw, int budget);
- int (*set_antenna)(struct ieee80211_hw *hw, u32 tx_ant, u32 rx_ant);
- int (*get_antenna)(struct ieee80211_hw *hw, u32 *tx_ant, u32 *rx_ant);
-
- int (*remain_on_channel)(struct ieee80211_hw *hw,
+ void (*flush)(struct mac80211_hw *hw, bool drop);
+ void (*channel_switch)(struct mac80211_hw *hw,
+ struct mac80211_channel_switch *ch_switch);
+ int (*napi_poll)(struct mac80211_hw *hw, int budget);
+ int (*set_antenna)(struct mac80211_hw *hw, u32 tx_ant, u32 rx_ant);
+ int (*get_antenna)(struct mac80211_hw *hw, u32 *tx_ant, u32 *rx_ant);
+
+ int (*remain_on_channel)(struct mac80211_hw *hw,
struct ieee80211_channel *chan,
enum nl80211_channel_type channel_type,
int duration);
- int (*cancel_remain_on_channel)(struct ieee80211_hw *hw);
- int (*offchannel_tx)(struct ieee80211_hw *hw, struct sk_buff *skb,
+ int (*cancel_remain_on_channel)(struct mac80211_hw *hw);
+ int (*offchannel_tx)(struct mac80211_hw *hw, struct sk_buff *skb,
struct ieee80211_channel *chan,
enum nl80211_channel_type channel_type,
unsigned int wait);
- int (*offchannel_tx_cancel_wait)(struct ieee80211_hw *hw);
- int (*set_ringparam)(struct ieee80211_hw *hw, u32 tx, u32 rx);
- void (*get_ringparam)(struct ieee80211_hw *hw,
+ int (*offchannel_tx_cancel_wait)(struct mac80211_hw *hw);
+ int (*set_ringparam)(struct mac80211_hw *hw, u32 tx, u32 rx);
+ void (*get_ringparam)(struct mac80211_hw *hw,
u32 *tx, u32 *tx_max, u32 *rx, u32 *rx_max);
- bool (*tx_frames_pending)(struct ieee80211_hw *hw);
- int (*set_bitrate_mask)(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
+ bool (*tx_frames_pending)(struct mac80211_hw *hw);
+ int (*set_bitrate_mask)(struct mac80211_hw *hw, struct mac80211_vif *vif,
const struct cfg80211_bitrate_mask *mask);
};

/**
- * ieee80211_alloc_hw - Allocate a new hardware device
+ * mac80211_alloc_hw - Allocate a new hardware device
*
* This must be called once for each hardware device. The returned pointer
* must be used to refer to this device when calling other functions.
* mac80211 allocates a private data area for the driver pointed to by
- * @priv in &struct ieee80211_hw, the size of this area is given as
+ * @priv in &struct mac80211_hw, the size of this area is given as
* @priv_data_len.
*
* @priv_data_len: length of private data
* @ops: callbacks for this device
*/
-struct ieee80211_hw *ieee80211_alloc_hw(size_t priv_data_len,
- const struct ieee80211_ops *ops);
+struct mac80211_hw *mac80211_alloc_hw(size_t priv_data_len,
+ const struct mac80211_ops *ops);

/**
- * ieee80211_register_hw - Register hardware device
+ * mac80211_register_hw - Register hardware device
*
* You must call this function before any other functions in
* mac80211. Note that before a hardware can be registered, you
* need to fill the contained wiphy's information.
*
- * @hw: the device to register as returned by ieee80211_alloc_hw()
+ * @hw: the device to register as returned by mac80211_alloc_hw()
*/
-int ieee80211_register_hw(struct ieee80211_hw *hw);
+int mac80211_register_hw(struct mac80211_hw *hw);

/**
- * struct ieee80211_tpt_blink - throughput blink description
+ * struct mac80211_tpt_blink - throughput blink description
* @throughput: throughput in Kbit/sec
* @blink_time: blink time in milliseconds
* (full cycle, ie. one off + one on period)
*/
-struct ieee80211_tpt_blink {
+struct mac80211_tpt_blink {
int throughput;
int blink_time;
};

/**
- * enum ieee80211_tpt_led_trigger_flags - throughput trigger flags
- * @IEEE80211_TPT_LEDTRIG_FL_RADIO: enable blinking with radio
- * @IEEE80211_TPT_LEDTRIG_FL_WORK: enable blinking when working
- * @IEEE80211_TPT_LEDTRIG_FL_CONNECTED: enable blinking when at least one
+ * enum mac80211_tpt_led_trigger_flags - throughput trigger flags
+ * @MAC80211_TPT_LEDTRIG_FL_RADIO: enable blinking with radio
+ * @MAC80211_TPT_LEDTRIG_FL_WORK: enable blinking when working
+ * @MAC80211_TPT_LEDTRIG_FL_CONNECTED: enable blinking when at least one
* interface is connected in some way, including being an AP
*/
-enum ieee80211_tpt_led_trigger_flags {
- IEEE80211_TPT_LEDTRIG_FL_RADIO = BIT(0),
- IEEE80211_TPT_LEDTRIG_FL_WORK = BIT(1),
- IEEE80211_TPT_LEDTRIG_FL_CONNECTED = BIT(2),
+enum mac80211_tpt_led_trigger_flags {
+ MAC80211_TPT_LEDTRIG_FL_RADIO = BIT(0),
+ MAC80211_TPT_LEDTRIG_FL_WORK = BIT(1),
+ MAC80211_TPT_LEDTRIG_FL_CONNECTED = BIT(2),
};

#ifdef CONFIG_MAC80211_LEDS
-extern char *__ieee80211_get_tx_led_name(struct ieee80211_hw *hw);
-extern char *__ieee80211_get_rx_led_name(struct ieee80211_hw *hw);
-extern char *__ieee80211_get_assoc_led_name(struct ieee80211_hw *hw);
-extern char *__ieee80211_get_radio_led_name(struct ieee80211_hw *hw);
-extern char *__ieee80211_create_tpt_led_trigger(
- struct ieee80211_hw *hw, unsigned int flags,
- const struct ieee80211_tpt_blink *blink_table,
+extern char *__mac80211_get_tx_led_name(struct mac80211_hw *hw);
+extern char *__mac80211_get_rx_led_name(struct mac80211_hw *hw);
+extern char *__mac80211_get_assoc_led_name(struct mac80211_hw *hw);
+extern char *__mac80211_get_radio_led_name(struct mac80211_hw *hw);
+extern char *__mac80211_create_tpt_led_trigger(
+ struct mac80211_hw *hw, unsigned int flags,
+ const struct mac80211_tpt_blink *blink_table,
unsigned int blink_table_len);
#endif
/**
- * ieee80211_get_tx_led_name - get name of TX LED
+ * mac80211_get_tx_led_name - get name of TX LED
*
* mac80211 creates a transmit LED trigger for each wireless hardware
* that can be used to drive LEDs if your driver registers a LED device.
@@ -2032,17 +2034,17 @@ extern char *__ieee80211_create_tpt_led_trigger(
*
* @hw: the hardware to get the LED trigger name for
*/
-static inline char *ieee80211_get_tx_led_name(struct ieee80211_hw *hw)
+static inline char *mac80211_get_tx_led_name(struct mac80211_hw *hw)
{
#ifdef CONFIG_MAC80211_LEDS
- return __ieee80211_get_tx_led_name(hw);
+ return __mac80211_get_tx_led_name(hw);
#else
return NULL;
#endif
}

/**
- * ieee80211_get_rx_led_name - get name of RX LED
+ * mac80211_get_rx_led_name - get name of RX LED
*
* mac80211 creates a receive LED trigger for each wireless hardware
* that can be used to drive LEDs if your driver registers a LED device.
@@ -2051,17 +2053,17 @@ static inline char *ieee80211_get_tx_led_name(struct ieee80211_hw *hw)
*
* @hw: the hardware to get the LED trigger name for
*/
-static inline char *ieee80211_get_rx_led_name(struct ieee80211_hw *hw)
+static inline char *mac80211_get_rx_led_name(struct mac80211_hw *hw)
{
#ifdef CONFIG_MAC80211_LEDS
- return __ieee80211_get_rx_led_name(hw);
+ return __mac80211_get_rx_led_name(hw);
#else
return NULL;
#endif
}

/**
- * ieee80211_get_assoc_led_name - get name of association LED
+ * mac80211_get_assoc_led_name - get name of association LED
*
* mac80211 creates a association LED trigger for each wireless hardware
* that can be used to drive LEDs if your driver registers a LED device.
@@ -2070,17 +2072,17 @@ static inline char *ieee80211_get_rx_led_name(struct ieee80211_hw *hw)
*
* @hw: the hardware to get the LED trigger name for
*/
-static inline char *ieee80211_get_assoc_led_name(struct ieee80211_hw *hw)
+static inline char *mac80211_get_assoc_led_name(struct mac80211_hw *hw)
{
#ifdef CONFIG_MAC80211_LEDS
- return __ieee80211_get_assoc_led_name(hw);
+ return __mac80211_get_assoc_led_name(hw);
#else
return NULL;
#endif
}

/**
- * ieee80211_get_radio_led_name - get name of radio LED
+ * mac80211_get_radio_led_name - get name of radio LED
*
* mac80211 creates a radio change LED trigger for each wireless hardware
* that can be used to drive LEDs if your driver registers a LED device.
@@ -2089,33 +2091,33 @@ static inline char *ieee80211_get_assoc_led_name(struct ieee80211_hw *hw)
*
* @hw: the hardware to get the LED trigger name for
*/
-static inline char *ieee80211_get_radio_led_name(struct ieee80211_hw *hw)
+static inline char *mac80211_get_radio_led_name(struct mac80211_hw *hw)
{
#ifdef CONFIG_MAC80211_LEDS
- return __ieee80211_get_radio_led_name(hw);
+ return __mac80211_get_radio_led_name(hw);
#else
return NULL;
#endif
}

/**
- * ieee80211_create_tpt_led_trigger - create throughput LED trigger
+ * mac80211_create_tpt_led_trigger - create throughput LED trigger
* @hw: the hardware to create the trigger for
- * @flags: trigger flags, see &enum ieee80211_tpt_led_trigger_flags
+ * @flags: trigger flags, see &enum mac80211_tpt_led_trigger_flags
* @blink_table: the blink table -- needs to be ordered by throughput
* @blink_table_len: size of the blink table
*
* This function returns %NULL (in case of error, or if no LED
* triggers are configured) or the name of the new trigger.
- * This function must be called before ieee80211_register_hw().
+ * This function must be called before mac80211_register_hw().
*/
static inline char *
-ieee80211_create_tpt_led_trigger(struct ieee80211_hw *hw, unsigned int flags,
- const struct ieee80211_tpt_blink *blink_table,
+mac80211_create_tpt_led_trigger(struct mac80211_hw *hw, unsigned int flags,
+ const struct mac80211_tpt_blink *blink_table,
unsigned int blink_table_len)
{
#ifdef CONFIG_MAC80211_LEDS
- return __ieee80211_create_tpt_led_trigger(hw, flags, blink_table,
+ return __mac80211_create_tpt_led_trigger(hw, flags, blink_table,
blink_table_len);
#else
return NULL;
@@ -2123,28 +2125,28 @@ ieee80211_create_tpt_led_trigger(struct ieee80211_hw *hw, unsigned int flags,
}

/**
- * ieee80211_unregister_hw - Unregister a hardware device
+ * mac80211_unregister_hw - Unregister a hardware device
*
* This function instructs mac80211 to free allocated resources
* and unregister netdevices from the networking subsystem.
*
* @hw: the hardware to unregister
*/
-void ieee80211_unregister_hw(struct ieee80211_hw *hw);
+void mac80211_unregister_hw(struct mac80211_hw *hw);

/**
- * ieee80211_free_hw - free hardware descriptor
+ * mac80211_free_hw - free hardware descriptor
*
* This function frees everything that was allocated, including the
- * private data for the driver. You must call ieee80211_unregister_hw()
+ * private data for the driver. You must call mac80211_unregister_hw()
* before calling this function.
*
* @hw: the hardware to free
*/
-void ieee80211_free_hw(struct ieee80211_hw *hw);
+void mac80211_free_hw(struct mac80211_hw *hw);

/**
- * ieee80211_restart_hw - restart hardware completely
+ * mac80211_restart_hw - restart hardware completely
*
* Call this function when the hardware was restarted for some reason
* (hardware error, ...) and the driver is unable to restore its state
@@ -2155,83 +2157,83 @@ void ieee80211_free_hw(struct ieee80211_hw *hw);
*
* @hw: the hardware to restart
*/
-void ieee80211_restart_hw(struct ieee80211_hw *hw);
+void mac80211_restart_hw(struct mac80211_hw *hw);

-/** ieee80211_napi_schedule - schedule NAPI poll
+/** mac80211_napi_schedule - schedule NAPI poll
*
* Use this function to schedule NAPI polling on a device.
*
* @hw: the hardware to start polling
*/
-void ieee80211_napi_schedule(struct ieee80211_hw *hw);
+void mac80211_napi_schedule(struct mac80211_hw *hw);

-/** ieee80211_napi_complete - complete NAPI polling
+/** mac80211_napi_complete - complete NAPI polling
*
* Use this function to finish NAPI polling on a device.
*
* @hw: the hardware to stop polling
*/
-void ieee80211_napi_complete(struct ieee80211_hw *hw);
+void mac80211_napi_complete(struct mac80211_hw *hw);

/**
- * ieee80211_rx - receive frame
+ * mac80211_rx - receive frame
*
* Use this function to hand received frames to mac80211. The receive
* buffer in @skb must start with an IEEE 802.11 header. In case of a
- * paged @skb is used, the driver is recommended to put the ieee80211
+ * paged @skb is used, the driver is recommended to put the mac80211
* header of the frame on the linear part of the @skb to avoid memory
* allocation and/or memcpy by the stack.
*
* This function may not be called in IRQ context. Calls to this function
* for a single hardware must be synchronized against each other. Calls to
- * this function, ieee80211_rx_ni() and ieee80211_rx_irqsafe() may not be
+ * this function, mac80211_rx_ni() and mac80211_rx_irqsafe() may not be
* mixed for a single hardware.
*
- * In process context use instead ieee80211_rx_ni().
+ * In process context use instead mac80211_rx_ni().
*
* @hw: the hardware this frame came in on
* @skb: the buffer to receive, owned by mac80211 after this call
*/
-void ieee80211_rx(struct ieee80211_hw *hw, struct sk_buff *skb);
+void mac80211_rx(struct mac80211_hw *hw, struct sk_buff *skb);

/**
- * ieee80211_rx_irqsafe - receive frame
+ * mac80211_rx_irqsafe - receive frame
*
- * Like ieee80211_rx() but can be called in IRQ context
+ * Like mac80211_rx() but can be called in IRQ context
* (internally defers to a tasklet.)
*
- * Calls to this function, ieee80211_rx() or ieee80211_rx_ni() may not
+ * Calls to this function, mac80211_rx() or mac80211_rx_ni() may not
* be mixed for a single hardware.
*
* @hw: the hardware this frame came in on
* @skb: the buffer to receive, owned by mac80211 after this call
*/
-void ieee80211_rx_irqsafe(struct ieee80211_hw *hw, struct sk_buff *skb);
+void mac80211_rx_irqsafe(struct mac80211_hw *hw, struct sk_buff *skb);

/**
- * ieee80211_rx_ni - receive frame (in process context)
+ * mac80211_rx_ni - receive frame (in process context)
*
- * Like ieee80211_rx() but can be called in process context
+ * Like mac80211_rx() but can be called in process context
* (internally disables bottom halves).
*
- * Calls to this function, ieee80211_rx() and ieee80211_rx_irqsafe() may
+ * Calls to this function, mac80211_rx() and mac80211_rx_irqsafe() may
* not be mixed for a single hardware.
*
* @hw: the hardware this frame came in on
* @skb: the buffer to receive, owned by mac80211 after this call
*/
-static inline void ieee80211_rx_ni(struct ieee80211_hw *hw,
+static inline void mac80211_rx_ni(struct mac80211_hw *hw,
struct sk_buff *skb)
{
local_bh_disable();
- ieee80211_rx(hw, skb);
+ mac80211_rx(hw, skb);
local_bh_enable();
}

/**
- * ieee80211_sta_ps_transition - PS transition for connected sta
+ * mac80211_sta_ps_transition - PS transition for connected sta
*
- * When operating in AP mode with the %IEEE80211_HW_AP_LINK_PS
+ * When operating in AP mode with the %MAC80211_HW_AP_LINK_PS
* flag set, use this function to inform mac80211 about a connected station
* entering/leaving PS mode.
*
@@ -2245,26 +2247,26 @@ static inline void ieee80211_rx_ni(struct ieee80211_hw *hw,
* @sta: currently connected sta
* @start: start or stop PS
*/
-int ieee80211_sta_ps_transition(struct ieee80211_sta *sta, bool start);
+int mac80211_sta_ps_transition(struct mac80211_sta *sta, bool start);

/**
- * ieee80211_sta_ps_transition_ni - PS transition for connected sta
+ * mac80211_sta_ps_transition_ni - PS transition for connected sta
* (in process context)
*
- * Like ieee80211_sta_ps_transition() but can be called in process context
+ * Like mac80211_sta_ps_transition() but can be called in process context
* (internally disables bottom halves). Concurrent call restriction still
* applies.
*
* @sta: currently connected sta
* @start: start or stop PS
*/
-static inline int ieee80211_sta_ps_transition_ni(struct ieee80211_sta *sta,
+static inline int mac80211_sta_ps_transition_ni(struct mac80211_sta *sta,
bool start)
{
int ret;

local_bh_disable();
- ret = ieee80211_sta_ps_transition(sta, start);
+ ret = mac80211_sta_ps_transition(sta, start);
local_bh_enable();

return ret;
@@ -2274,11 +2276,11 @@ static inline int ieee80211_sta_ps_transition_ni(struct ieee80211_sta *sta,
* The TX headroom reserved by mac80211 for its own tx_status functions.
* This is enough for the radiotap header.
*/
-#define IEEE80211_TX_STATUS_HEADROOM 13
+#define MAC80211_TX_STATUS_HEADROOM 13

/**
- * ieee80211_sta_set_tim - set the TIM bit for a sleeping station
- * @sta: &struct ieee80211_sta pointer for the sleeping station
+ * mac80211_sta_set_tim - set the TIM bit for a sleeping station
+ * @sta: &struct mac80211_sta pointer for the sleeping station
*
* If a driver buffers frames for a powersave station instead of passing
* them back to mac80211 for retransmission, the station needs to be told
@@ -2287,10 +2289,10 @@ static inline int ieee80211_sta_ps_transition_ni(struct ieee80211_sta *sta,
* This function sets the station's TIM bit - it will be cleared when the
* station wakes up.
*/
-void ieee80211_sta_set_tim(struct ieee80211_sta *sta);
+void mac80211_sta_set_tim(struct mac80211_sta *sta);

/**
- * ieee80211_tx_status - transmit status callback
+ * mac80211_tx_status - transmit status callback
*
* Call this function for all transmitted frames after they have been
* transmitted. It is permissible to not call this function for
@@ -2298,52 +2300,52 @@ void ieee80211_sta_set_tim(struct ieee80211_sta *sta);
*
* This function may not be called in IRQ context. Calls to this function
* for a single hardware must be synchronized against each other. Calls
- * to this function, ieee80211_tx_status_ni() and ieee80211_tx_status_irqsafe()
+ * to this function, mac80211_tx_status_ni() and mac80211_tx_status_irqsafe()
* may not be mixed for a single hardware.
*
* @hw: the hardware the frame was transmitted by
* @skb: the frame that was transmitted, owned by mac80211 after this call
*/
-void ieee80211_tx_status(struct ieee80211_hw *hw,
+void mac80211_tx_status(struct mac80211_hw *hw,
struct sk_buff *skb);

/**
- * ieee80211_tx_status_ni - transmit status callback (in process context)
+ * mac80211_tx_status_ni - transmit status callback (in process context)
*
- * Like ieee80211_tx_status() but can be called in process context.
+ * Like mac80211_tx_status() but can be called in process context.
*
- * Calls to this function, ieee80211_tx_status() and
- * ieee80211_tx_status_irqsafe() may not be mixed
+ * Calls to this function, mac80211_tx_status() and
+ * mac80211_tx_status_irqsafe() may not be mixed
* for a single hardware.
*
* @hw: the hardware the frame was transmitted by
* @skb: the frame that was transmitted, owned by mac80211 after this call
*/
-static inline void ieee80211_tx_status_ni(struct ieee80211_hw *hw,
+static inline void mac80211_tx_status_ni(struct mac80211_hw *hw,
struct sk_buff *skb)
{
local_bh_disable();
- ieee80211_tx_status(hw, skb);
+ mac80211_tx_status(hw, skb);
local_bh_enable();
}

/**
- * ieee80211_tx_status_irqsafe - IRQ-safe transmit status callback
+ * mac80211_tx_status_irqsafe - IRQ-safe transmit status callback
*
- * Like ieee80211_tx_status() but can be called in IRQ context
+ * Like mac80211_tx_status() but can be called in IRQ context
* (internally defers to a tasklet.)
*
- * Calls to this function, ieee80211_tx_status() and
- * ieee80211_tx_status_ni() may not be mixed for a single hardware.
+ * Calls to this function, mac80211_tx_status() and
+ * mac80211_tx_status_ni() may not be mixed for a single hardware.
*
* @hw: the hardware the frame was transmitted by
* @skb: the frame that was transmitted, owned by mac80211 after this call
*/
-void ieee80211_tx_status_irqsafe(struct ieee80211_hw *hw,
+void mac80211_tx_status_irqsafe(struct mac80211_hw *hw,
struct sk_buff *skb);

/**
- * ieee80211_report_low_ack - report non-responding station
+ * mac80211_report_low_ack - report non-responding station
*
* When operating in AP-mode, call this function to report a non-responding
* connected STA.
@@ -2351,12 +2353,12 @@ void ieee80211_tx_status_irqsafe(struct ieee80211_hw *hw,
* @sta: the non-responding connected sta
* @num_packets: number of packets sent to @sta without a response
*/
-void ieee80211_report_low_ack(struct ieee80211_sta *sta, u32 num_packets);
+void mac80211_report_low_ack(struct mac80211_sta *sta, u32 num_packets);

/**
- * ieee80211_beacon_get_tim - beacon generation function
- * @hw: pointer obtained from ieee80211_alloc_hw().
- * @vif: &struct ieee80211_vif pointer from the add_interface callback.
+ * mac80211_beacon_get_tim - beacon generation function
+ * @hw: pointer obtained from mac80211_alloc_hw().
+ * @vif: &struct mac80211_vif pointer from the add_interface callback.
* @tim_offset: pointer to variable that will receive the TIM IE offset.
* Set to 0 if invalid (in non-AP modes).
* @tim_length: pointer to variable that will receive the TIM IE length,
@@ -2377,57 +2379,57 @@ void ieee80211_report_low_ack(struct ieee80211_sta *sta, u32 num_packets);
*
* The driver is responsible for freeing the returned skb.
*/
-struct sk_buff *ieee80211_beacon_get_tim(struct ieee80211_hw *hw,
- struct ieee80211_vif *vif,
+struct sk_buff *mac80211_beacon_get_tim(struct mac80211_hw *hw,
+ struct mac80211_vif *vif,
u16 *tim_offset, u16 *tim_length);

/**
- * ieee80211_beacon_get - beacon generation function
- * @hw: pointer obtained from ieee80211_alloc_hw().
- * @vif: &struct ieee80211_vif pointer from the add_interface callback.
+ * mac80211_beacon_get - beacon generation function
+ * @hw: pointer obtained from mac80211_alloc_hw().
+ * @vif: &struct mac80211_vif pointer from the add_interface callback.
*
- * See ieee80211_beacon_get_tim().
+ * See mac80211_beacon_get_tim().
*/
-static inline struct sk_buff *ieee80211_beacon_get(struct ieee80211_hw *hw,
- struct ieee80211_vif *vif)
+static inline struct sk_buff *mac80211_beacon_get(struct mac80211_hw *hw,
+ struct mac80211_vif *vif)
{
- return ieee80211_beacon_get_tim(hw, vif, NULL, NULL);
+ return mac80211_beacon_get_tim(hw, vif, NULL, NULL);
}

/**
- * ieee80211_pspoll_get - retrieve a PS Poll template
- * @hw: pointer obtained from ieee80211_alloc_hw().
- * @vif: &struct ieee80211_vif pointer from the add_interface callback.
+ * mac80211_pspoll_get - retrieve a PS Poll template
+ * @hw: pointer obtained from mac80211_alloc_hw().
+ * @vif: &struct mac80211_vif pointer from the add_interface callback.
*
* Creates a PS Poll a template which can, for example, uploaded to
* hardware. The template must be updated after association so that correct
* AID, BSSID and MAC address is used.
*
* Note: Caller (or hardware) is responsible for setting the
- * &IEEE80211_FCTL_PM bit.
+ * &MAC80211_FCTL_PM bit.
*/
-struct sk_buff *ieee80211_pspoll_get(struct ieee80211_hw *hw,
- struct ieee80211_vif *vif);
+struct sk_buff *mac80211_pspoll_get(struct mac80211_hw *hw,
+ struct mac80211_vif *vif);

/**
- * ieee80211_nullfunc_get - retrieve a nullfunc template
- * @hw: pointer obtained from ieee80211_alloc_hw().
- * @vif: &struct ieee80211_vif pointer from the add_interface callback.
+ * mac80211_nullfunc_get - retrieve a nullfunc template
+ * @hw: pointer obtained from mac80211_alloc_hw().
+ * @vif: &struct mac80211_vif pointer from the add_interface callback.
*
* Creates a Nullfunc template which can, for example, uploaded to
* hardware. The template must be updated after association so that correct
* BSSID and address is used.
*
* Note: Caller (or hardware) is responsible for setting the
- * &IEEE80211_FCTL_PM bit as well as Duration and Sequence Control fields.
+ * &MAC80211_FCTL_PM bit as well as Duration and Sequence Control fields.
*/
-struct sk_buff *ieee80211_nullfunc_get(struct ieee80211_hw *hw,
- struct ieee80211_vif *vif);
+struct sk_buff *mac80211_nullfunc_get(struct mac80211_hw *hw,
+ struct mac80211_vif *vif);

/**
- * ieee80211_probereq_get - retrieve a Probe Request template
- * @hw: pointer obtained from ieee80211_alloc_hw().
- * @vif: &struct ieee80211_vif pointer from the add_interface callback.
+ * mac80211_probereq_get - retrieve a Probe Request template
+ * @hw: pointer obtained from mac80211_alloc_hw().
+ * @vif: &struct mac80211_vif pointer from the add_interface callback.
* @ssid: SSID buffer
* @ssid_len: length of SSID
* @ie: buffer containing all IEs except SSID for the template
@@ -2436,18 +2438,18 @@ struct sk_buff *ieee80211_nullfunc_get(struct ieee80211_hw *hw,
* Creates a Probe Request template which can, for example, be uploaded to
* hardware.
*/
-struct sk_buff *ieee80211_probereq_get(struct ieee80211_hw *hw,
- struct ieee80211_vif *vif,
+struct sk_buff *mac80211_probereq_get(struct mac80211_hw *hw,
+ struct mac80211_vif *vif,
const u8 *ssid, size_t ssid_len,
const u8 *ie, size_t ie_len);

/**
- * ieee80211_rts_get - RTS frame generation function
- * @hw: pointer obtained from ieee80211_alloc_hw().
- * @vif: &struct ieee80211_vif pointer from the add_interface callback.
+ * mac80211_rts_get - RTS frame generation function
+ * @hw: pointer obtained from mac80211_alloc_hw().
+ * @vif: &struct mac80211_vif pointer from the add_interface callback.
* @frame: pointer to the frame that is going to be protected by the RTS.
* @frame_len: the frame length (in octets).
- * @frame_txctl: &struct ieee80211_tx_info of the frame.
+ * @frame_txctl: &struct mac80211_tx_info of the frame.
* @rts: The buffer where to store the RTS frame.
*
* If the RTS frames are generated by the host system (i.e., not in
@@ -2455,33 +2457,33 @@ struct sk_buff *ieee80211_probereq_get(struct ieee80211_hw *hw,
* the next RTS frame from the 802.11 code. The low-level is responsible
* for calling this function before and RTS frame is needed.
*/
-void ieee80211_rts_get(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
+void mac80211_rts_get(struct mac80211_hw *hw, struct mac80211_vif *vif,
const void *frame, size_t frame_len,
- const struct ieee80211_tx_info *frame_txctl,
+ const struct mac80211_tx_info *frame_txctl,
struct ieee80211_rts *rts);

/**
- * ieee80211_rts_duration - Get the duration field for an RTS frame
- * @hw: pointer obtained from ieee80211_alloc_hw().
- * @vif: &struct ieee80211_vif pointer from the add_interface callback.
+ * mac80211_rts_duration - Get the duration field for an RTS frame
+ * @hw: pointer obtained from mac80211_alloc_hw().
+ * @vif: &struct mac80211_vif pointer from the add_interface callback.
* @frame_len: the length of the frame that is going to be protected by the RTS.
- * @frame_txctl: &struct ieee80211_tx_info of the frame.
+ * @frame_txctl: &struct mac80211_tx_info of the frame.
*
* If the RTS is generated in firmware, but the host system must provide
* the duration field, the low-level driver uses this function to receive
* the duration field value in little-endian byteorder.
*/
-__le16 ieee80211_rts_duration(struct ieee80211_hw *hw,
- struct ieee80211_vif *vif, size_t frame_len,
- const struct ieee80211_tx_info *frame_txctl);
+__le16 mac80211_rts_duration(struct mac80211_hw *hw,
+ struct mac80211_vif *vif, size_t frame_len,
+ const struct mac80211_tx_info *frame_txctl);

/**
- * ieee80211_ctstoself_get - CTS-to-self frame generation function
- * @hw: pointer obtained from ieee80211_alloc_hw().
- * @vif: &struct ieee80211_vif pointer from the add_interface callback.
+ * mac80211_ctstoself_get - CTS-to-self frame generation function
+ * @hw: pointer obtained from mac80211_alloc_hw().
+ * @vif: &struct mac80211_vif pointer from the add_interface callback.
* @frame: pointer to the frame that is going to be protected by the CTS-to-self.
* @frame_len: the frame length (in octets).
- * @frame_txctl: &struct ieee80211_tx_info of the frame.
+ * @frame_txctl: &struct mac80211_tx_info of the frame.
* @cts: The buffer where to store the CTS-to-self frame.
*
* If the CTS-to-self frames are generated by the host system (i.e., not in
@@ -2489,47 +2491,47 @@ __le16 ieee80211_rts_duration(struct ieee80211_hw *hw,
* the next CTS-to-self frame from the 802.11 code. The low-level is responsible
* for calling this function before and CTS-to-self frame is needed.
*/
-void ieee80211_ctstoself_get(struct ieee80211_hw *hw,
- struct ieee80211_vif *vif,
+void mac80211_ctstoself_get(struct mac80211_hw *hw,
+ struct mac80211_vif *vif,
const void *frame, size_t frame_len,
- const struct ieee80211_tx_info *frame_txctl,
+ const struct mac80211_tx_info *frame_txctl,
struct ieee80211_cts *cts);

/**
- * ieee80211_ctstoself_duration - Get the duration field for a CTS-to-self frame
- * @hw: pointer obtained from ieee80211_alloc_hw().
- * @vif: &struct ieee80211_vif pointer from the add_interface callback.
+ * mac80211_ctstoself_duration - Get the duration field for a CTS-to-self frame
+ * @hw: pointer obtained from mac80211_alloc_hw().
+ * @vif: &struct mac80211_vif pointer from the add_interface callback.
* @frame_len: the length of the frame that is going to be protected by the CTS-to-self.
- * @frame_txctl: &struct ieee80211_tx_info of the frame.
+ * @frame_txctl: &struct mac80211_tx_info of the frame.
*
* If the CTS-to-self is generated in firmware, but the host system must provide
* the duration field, the low-level driver uses this function to receive
* the duration field value in little-endian byteorder.
*/
-__le16 ieee80211_ctstoself_duration(struct ieee80211_hw *hw,
- struct ieee80211_vif *vif,
+__le16 mac80211_ctstoself_duration(struct mac80211_hw *hw,
+ struct mac80211_vif *vif,
size_t frame_len,
- const struct ieee80211_tx_info *frame_txctl);
+ const struct mac80211_tx_info *frame_txctl);

/**
- * ieee80211_generic_frame_duration - Calculate the duration field for a frame
- * @hw: pointer obtained from ieee80211_alloc_hw().
- * @vif: &struct ieee80211_vif pointer from the add_interface callback.
+ * mac80211_generic_frame_duration - Calculate the duration field for a frame
+ * @hw: pointer obtained from mac80211_alloc_hw().
+ * @vif: &struct mac80211_vif pointer from the add_interface callback.
* @frame_len: the length of the frame.
* @rate: the rate at which the frame is going to be transmitted.
*
* Calculate the duration field of some generic frame, given its
* length and transmission rate (in 100kbps).
*/
-__le16 ieee80211_generic_frame_duration(struct ieee80211_hw *hw,
- struct ieee80211_vif *vif,
+__le16 mac80211_generic_frame_duration(struct mac80211_hw *hw,
+ struct mac80211_vif *vif,
size_t frame_len,
struct ieee80211_rate *rate);

/**
- * ieee80211_get_buffered_bc - accessing buffered broadcast and multicast frames
- * @hw: pointer as obtained from ieee80211_alloc_hw().
- * @vif: &struct ieee80211_vif pointer from the add_interface callback.
+ * mac80211_get_buffered_bc - accessing buffered broadcast and multicast frames
+ * @hw: pointer as obtained from mac80211_alloc_hw().
+ * @vif: &struct mac80211_vif pointer from the add_interface callback.
*
* Function for accessing buffered broadcast and multicast frames. If
* hardware/firmware does not implement buffering of broadcast/multicast
@@ -2540,17 +2542,17 @@ __le16 ieee80211_generic_frame_duration(struct ieee80211_hw *hw,
* buffered frames are available.
*
* Note: buffered frames are returned only after DTIM beacon frame was
- * generated with ieee80211_beacon_get() and the low-level driver must thus
- * call ieee80211_beacon_get() first. ieee80211_get_buffered_bc() returns
+ * generated with mac80211_beacon_get() and the low-level driver must thus
+ * call mac80211_beacon_get() first. mac80211_get_buffered_bc() returns
* NULL if the previous generated beacon was not DTIM, so the low-level driver
* does not need to check for DTIM beacons separately and should be able to
* use common code for all beacons.
*/
struct sk_buff *
-ieee80211_get_buffered_bc(struct ieee80211_hw *hw, struct ieee80211_vif *vif);
+mac80211_get_buffered_bc(struct mac80211_hw *hw, struct mac80211_vif *vif);

/**
- * ieee80211_get_tkip_key - get a TKIP rc4 for skb
+ * mac80211_get_tkip_key - get a TKIP rc4 for skb
*
* This function computes a TKIP rc4 key for an skb. It computes
* a phase 1 key if needed (iv16 wraps around). This function is to
@@ -2562,55 +2564,55 @@ ieee80211_get_buffered_bc(struct ieee80211_hw *hw, struct ieee80211_vif *vif);
* @type: TBD
* @key: a buffer to which the key will be written
*/
-void ieee80211_get_tkip_key(struct ieee80211_key_conf *keyconf,
+void mac80211_get_tkip_key(struct mac80211_key_conf *keyconf,
struct sk_buff *skb,
- enum ieee80211_tkip_key_type type, u8 *key);
+ enum mac80211_tkip_key_type type, u8 *key);
/**
- * ieee80211_wake_queue - wake specific queue
- * @hw: pointer as obtained from ieee80211_alloc_hw().
+ * mac80211_wake_queue - wake specific queue
+ * @hw: pointer as obtained from mac80211_alloc_hw().
* @queue: queue number (counted from zero).
*
* Drivers should use this function instead of netif_wake_queue.
*/
-void ieee80211_wake_queue(struct ieee80211_hw *hw, int queue);
+void mac80211_wake_queue(struct mac80211_hw *hw, int queue);

/**
- * ieee80211_stop_queue - stop specific queue
- * @hw: pointer as obtained from ieee80211_alloc_hw().
+ * mac80211_stop_queue - stop specific queue
+ * @hw: pointer as obtained from mac80211_alloc_hw().
* @queue: queue number (counted from zero).
*
* Drivers should use this function instead of netif_stop_queue.
*/
-void ieee80211_stop_queue(struct ieee80211_hw *hw, int queue);
+void mac80211_stop_queue(struct mac80211_hw *hw, int queue);

/**
- * ieee80211_queue_stopped - test status of the queue
- * @hw: pointer as obtained from ieee80211_alloc_hw().
+ * mac80211_queue_stopped - test status of the queue
+ * @hw: pointer as obtained from mac80211_alloc_hw().
* @queue: queue number (counted from zero).
*
* Drivers should use this function instead of netif_stop_queue.
*/

-int ieee80211_queue_stopped(struct ieee80211_hw *hw, int queue);
+int mac80211_queue_stopped(struct mac80211_hw *hw, int queue);

/**
- * ieee80211_stop_queues - stop all queues
- * @hw: pointer as obtained from ieee80211_alloc_hw().
+ * mac80211_stop_queues - stop all queues
+ * @hw: pointer as obtained from mac80211_alloc_hw().
*
* Drivers should use this function instead of netif_stop_queue.
*/
-void ieee80211_stop_queues(struct ieee80211_hw *hw);
+void mac80211_stop_queues(struct mac80211_hw *hw);

/**
- * ieee80211_wake_queues - wake all queues
- * @hw: pointer as obtained from ieee80211_alloc_hw().
+ * mac80211_wake_queues - wake all queues
+ * @hw: pointer as obtained from mac80211_alloc_hw().
*
* Drivers should use this function instead of netif_wake_queue.
*/
-void ieee80211_wake_queues(struct ieee80211_hw *hw);
+void mac80211_wake_queues(struct mac80211_hw *hw);

/**
- * ieee80211_scan_completed - completed hardware scan
+ * mac80211_scan_completed - completed hardware scan
*
* When hardware scan offload is used (i.e. the hw_scan() callback is
* assigned) this function needs to be called by the driver to notify
@@ -2620,20 +2622,20 @@ void ieee80211_wake_queues(struct ieee80211_hw *hw);
* @hw: the hardware that finished the scan
* @aborted: set to true if scan was aborted
*/
-void ieee80211_scan_completed(struct ieee80211_hw *hw, bool aborted);
+void mac80211_scan_completed(struct mac80211_hw *hw, bool aborted);

/**
- * ieee80211_sched_scan_results - got results from scheduled scan
+ * mac80211_sched_scan_results - got results from scheduled scan
*
* When a scheduled scan is running, this function needs to be called by the
* driver whenever there are new scan results available.
*
* @hw: the hardware that is performing scheduled scans
*/
-void ieee80211_sched_scan_results(struct ieee80211_hw *hw);
+void mac80211_sched_scan_results(struct mac80211_hw *hw);

/**
- * ieee80211_sched_scan_stopped - inform that the scheduled scan has stopped
+ * mac80211_sched_scan_stopped - inform that the scheduled scan has stopped
*
* When a scheduled scan is running, this function can be called by
* the driver if it needs to stop the scan to perform another task.
@@ -2642,15 +2644,15 @@ void ieee80211_sched_scan_results(struct ieee80211_hw *hw);
*
* @hw: the hardware that is performing scheduled scans
*/
-void ieee80211_sched_scan_stopped(struct ieee80211_hw *hw);
+void mac80211_sched_scan_stopped(struct mac80211_hw *hw);

/**
- * ieee80211_iterate_active_interfaces - iterate active interfaces
+ * mac80211_iterate_active_interfaces - iterate active interfaces
*
* This function iterates over the interfaces associated with a given
* hardware that are currently active and calls the callback for them.
* This function allows the iterator function to sleep, when the iterator
- * function is atomic @ieee80211_iterate_active_interfaces_atomic can
+ * function is atomic @mac80211_iterate_active_interfaces_atomic can
* be used.
* Does not iterate over a new interface during add_interface()
*
@@ -2658,32 +2660,32 @@ void ieee80211_sched_scan_stopped(struct ieee80211_hw *hw);
* @iterator: the iterator function to call
* @data: first argument of the iterator function
*/
-void ieee80211_iterate_active_interfaces(struct ieee80211_hw *hw,
+void mac80211_iterate_active_interfaces(struct mac80211_hw *hw,
void (*iterator)(void *data, u8 *mac,
- struct ieee80211_vif *vif),
+ struct mac80211_vif *vif),
void *data);

/**
- * ieee80211_iterate_active_interfaces_atomic - iterate active interfaces
+ * mac80211_iterate_active_interfaces_atomic - iterate active interfaces
*
* This function iterates over the interfaces associated with a given
* hardware that are currently active and calls the callback for them.
* This function requires the iterator callback function to be atomic,
- * if that is not desired, use @ieee80211_iterate_active_interfaces instead.
+ * if that is not desired, use @mac80211_iterate_active_interfaces instead.
* Does not iterate over a new interface during add_interface()
*
* @hw: the hardware struct of which the interfaces should be iterated over
* @iterator: the iterator function to call, cannot sleep
* @data: first argument of the iterator function
*/
-void ieee80211_iterate_active_interfaces_atomic(struct ieee80211_hw *hw,
+void mac80211_iterate_active_interfaces_atomic(struct mac80211_hw *hw,
void (*iterator)(void *data,
u8 *mac,
- struct ieee80211_vif *vif),
+ struct mac80211_vif *vif),
void *data);

/**
- * ieee80211_queue_work - add work onto the mac80211 workqueue
+ * mac80211_queue_work - add work onto the mac80211 workqueue
*
* Drivers and mac80211 use this to add work onto the mac80211 workqueue.
* This helper ensures drivers are not queueing work when they should not be.
@@ -2691,10 +2693,10 @@ void ieee80211_iterate_active_interfaces_atomic(struct ieee80211_hw *hw,
* @hw: the hardware struct for the interface we are adding work for
* @work: the work we want to add onto the mac80211 workqueue
*/
-void ieee80211_queue_work(struct ieee80211_hw *hw, struct work_struct *work);
+void mac80211_queue_work(struct mac80211_hw *hw, struct work_struct *work);

/**
- * ieee80211_queue_delayed_work - add work onto the mac80211 workqueue
+ * mac80211_queue_delayed_work - add work onto the mac80211 workqueue
*
* Drivers and mac80211 use this to queue delayed work onto the mac80211
* workqueue.
@@ -2703,12 +2705,12 @@ void ieee80211_queue_work(struct ieee80211_hw *hw, struct work_struct *work);
* @dwork: delayable work to queue onto the mac80211 workqueue
* @delay: number of jiffies to wait before queueing
*/
-void ieee80211_queue_delayed_work(struct ieee80211_hw *hw,
+void mac80211_queue_delayed_work(struct mac80211_hw *hw,
struct delayed_work *dwork,
unsigned long delay);

/**
- * ieee80211_start_tx_ba_session - Start a tx Block Ack session.
+ * mac80211_start_tx_ba_session - Start a tx Block Ack session.
* @sta: the station for which to start a BA session
* @tid: the TID to BA on.
* @timeout: session timeout value (in TUs)
@@ -2719,12 +2721,12 @@ void ieee80211_queue_delayed_work(struct ieee80211_hw *hw,
* the need to start aggregation on a certain RA/TID, the session level
* will be managed by the mac80211.
*/
-int ieee80211_start_tx_ba_session(struct ieee80211_sta *sta, u16 tid,
+int mac80211_start_tx_ba_session(struct mac80211_sta *sta, u16 tid,
u16 timeout);

/**
- * ieee80211_start_tx_ba_cb_irqsafe - low level driver ready to aggregate.
- * @vif: &struct ieee80211_vif pointer from the add_interface callback
+ * mac80211_start_tx_ba_cb_irqsafe - low level driver ready to aggregate.
+ * @vif: &struct mac80211_vif pointer from the add_interface callback
* @ra: receiver address of the BA session recipient.
* @tid: the TID to BA on.
*
@@ -2732,11 +2734,11 @@ int ieee80211_start_tx_ba_session(struct ieee80211_sta *sta, u16 tid,
* finished with preparations for the BA session. It can be called
* from any context.
*/
-void ieee80211_start_tx_ba_cb_irqsafe(struct ieee80211_vif *vif, const u8 *ra,
+void mac80211_start_tx_ba_cb_irqsafe(struct mac80211_vif *vif, const u8 *ra,
u16 tid);

/**
- * ieee80211_stop_tx_ba_session - Stop a Block Ack session.
+ * mac80211_stop_tx_ba_session - Stop a Block Ack session.
* @sta: the station whose BA session to stop
* @tid: the TID to stop BA.
*
@@ -2746,11 +2748,11 @@ void ieee80211_start_tx_ba_cb_irqsafe(struct ieee80211_vif *vif, const u8 *ra,
* the need to stop aggregation on a certain RA/TID, the session level
* will be managed by the mac80211.
*/
-int ieee80211_stop_tx_ba_session(struct ieee80211_sta *sta, u16 tid);
+int mac80211_stop_tx_ba_session(struct mac80211_sta *sta, u16 tid);

/**
- * ieee80211_stop_tx_ba_cb_irqsafe - low level driver ready to stop aggregate.
- * @vif: &struct ieee80211_vif pointer from the add_interface callback
+ * mac80211_stop_tx_ba_cb_irqsafe - low level driver ready to stop aggregate.
+ * @vif: &struct mac80211_vif pointer from the add_interface callback
* @ra: receiver address of the BA session recipient.
* @tid: the desired TID to BA on.
*
@@ -2758,11 +2760,11 @@ int ieee80211_stop_tx_ba_session(struct ieee80211_sta *sta, u16 tid);
* finished with preparations for the BA session tear down. It
* can be called from any context.
*/
-void ieee80211_stop_tx_ba_cb_irqsafe(struct ieee80211_vif *vif, const u8 *ra,
+void mac80211_stop_tx_ba_cb_irqsafe(struct mac80211_vif *vif, const u8 *ra,
u16 tid);

/**
- * ieee80211_find_sta - find a station
+ * mac80211_find_sta - find a station
*
* @vif: virtual interface to look for station on
* @addr: station's address
@@ -2770,13 +2772,13 @@ void ieee80211_stop_tx_ba_cb_irqsafe(struct ieee80211_vif *vif, const u8 *ra,
* This function must be called under RCU lock and the
* resulting pointer is only valid under RCU lock as well.
*/
-struct ieee80211_sta *ieee80211_find_sta(struct ieee80211_vif *vif,
+struct mac80211_sta *mac80211_find_sta(struct mac80211_vif *vif,
const u8 *addr);

/**
- * ieee80211_find_sta_by_ifaddr - find a station on hardware
+ * mac80211_find_sta_by_ifaddr - find a station on hardware
*
- * @hw: pointer as obtained from ieee80211_alloc_hw()
+ * @hw: pointer as obtained from mac80211_alloc_hw()
* @addr: remote station's address
* @localaddr: local address (vif->sdata->vif.addr). Use NULL for 'any'.
*
@@ -2793,12 +2795,12 @@ struct ieee80211_sta *ieee80211_find_sta(struct ieee80211_vif *vif,
*
* DO NOT USE THIS FUNCTION with localaddr NULL if at all possible.
*/
-struct ieee80211_sta *ieee80211_find_sta_by_ifaddr(struct ieee80211_hw *hw,
+struct mac80211_sta *mac80211_find_sta_by_ifaddr(struct mac80211_hw *hw,
const u8 *addr,
const u8 *localaddr);

/**
- * ieee80211_sta_block_awake - block station from waking up
+ * mac80211_sta_block_awake - block station from waking up
* @hw: the hardware
* @pubsta: the station
* @block: whether to block or unblock
@@ -2826,13 +2828,13 @@ struct ieee80211_sta *ieee80211_find_sta_by_ifaddr(struct ieee80211_hw *hw,
* it is unblocked, regardless of whether the station actually
* woke up while blocked or not.
*/
-void ieee80211_sta_block_awake(struct ieee80211_hw *hw,
- struct ieee80211_sta *pubsta, bool block);
+void mac80211_sta_block_awake(struct mac80211_hw *hw,
+ struct mac80211_sta *pubsta, bool block);

/**
- * ieee80211_ap_probereq_get - retrieve a Probe Request template
- * @hw: pointer obtained from ieee80211_alloc_hw().
- * @vif: &struct ieee80211_vif pointer from the add_interface callback.
+ * mac80211_ap_probereq_get - retrieve a Probe Request template
+ * @hw: pointer obtained from mac80211_alloc_hw().
+ * @vif: &struct mac80211_vif pointer from the add_interface callback.
*
* Creates a Probe Request template which can, for example, be uploaded to
* hardware. The template is filled with bssid, ssid and supported rate
@@ -2841,38 +2843,38 @@ void ieee80211_sta_block_awake(struct ieee80211_hw *hw,
* is only useful when the interface is associated, otherwise it will return
* NULL.
*/
-struct sk_buff *ieee80211_ap_probereq_get(struct ieee80211_hw *hw,
- struct ieee80211_vif *vif);
+struct sk_buff *mac80211_ap_probereq_get(struct mac80211_hw *hw,
+ struct mac80211_vif *vif);

/**
- * ieee80211_beacon_loss - inform hardware does not receive beacons
+ * mac80211_beacon_loss - inform hardware does not receive beacons
*
- * @vif: &struct ieee80211_vif pointer from the add_interface callback.
+ * @vif: &struct mac80211_vif pointer from the add_interface callback.
*
- * When beacon filtering is enabled with %IEEE80211_HW_BEACON_FILTER and
- * %IEEE80211_CONF_PS is set, the driver needs to inform whenever the
+ * When beacon filtering is enabled with %MAC80211_HW_BEACON_FILTER and
+ * %MAC80211_CONF_PS is set, the driver needs to inform whenever the
* hardware is not receiving beacons with this function.
*/
-void ieee80211_beacon_loss(struct ieee80211_vif *vif);
+void mac80211_beacon_loss(struct mac80211_vif *vif);

/**
- * ieee80211_connection_loss - inform hardware has lost connection to the AP
+ * mac80211_connection_loss - inform hardware has lost connection to the AP
*
- * @vif: &struct ieee80211_vif pointer from the add_interface callback.
+ * @vif: &struct mac80211_vif pointer from the add_interface callback.
*
- * When beacon filtering is enabled with %IEEE80211_HW_BEACON_FILTER, and
- * %IEEE80211_CONF_PS and %IEEE80211_HW_CONNECTION_MONITOR are set, the driver
+ * When beacon filtering is enabled with %MAC80211_HW_BEACON_FILTER, and
+ * %MAC80211_CONF_PS and %MAC80211_HW_CONNECTION_MONITOR are set, the driver
* needs to inform if the connection to the AP has been lost.
*
* This function will cause immediate change to disassociated state,
* without connection recovery attempts.
*/
-void ieee80211_connection_loss(struct ieee80211_vif *vif);
+void mac80211_connection_loss(struct mac80211_vif *vif);

/**
- * ieee80211_disable_dyn_ps - force mac80211 to temporarily disable dynamic psm
+ * mac80211_disable_dyn_ps - force mac80211 to temporarily disable dynamic psm
*
- * @vif: &struct ieee80211_vif pointer from the add_interface callback.
+ * @vif: &struct mac80211_vif pointer from the add_interface callback.
*
* Some hardware require full power save to manage simultaneous BT traffic
* on the WLAN frequency. Full PSM is required periodically, whenever there are
@@ -2882,63 +2884,63 @@ void ieee80211_connection_loss(struct ieee80211_vif *vif);
* This function will only temporarily disable dynamic PS, not enable PSM if
* it was not already enabled.
* The driver must make sure to re-enable dynamic PS using
- * ieee80211_enable_dyn_ps() if the driver has disabled it.
+ * mac80211_enable_dyn_ps() if the driver has disabled it.
*
*/
-void ieee80211_disable_dyn_ps(struct ieee80211_vif *vif);
+void mac80211_disable_dyn_ps(struct mac80211_vif *vif);

/**
- * ieee80211_enable_dyn_ps - restore dynamic psm after being disabled
+ * mac80211_enable_dyn_ps - restore dynamic psm after being disabled
*
- * @vif: &struct ieee80211_vif pointer from the add_interface callback.
+ * @vif: &struct mac80211_vif pointer from the add_interface callback.
*
* This function restores dynamic PS after being temporarily disabled via
- * ieee80211_disable_dyn_ps(). Each ieee80211_disable_dyn_ps() call must
+ * mac80211_disable_dyn_ps(). Each mac80211_disable_dyn_ps() call must
* be coupled with an eventual call to this function.
*
*/
-void ieee80211_enable_dyn_ps(struct ieee80211_vif *vif);
+void mac80211_enable_dyn_ps(struct mac80211_vif *vif);

/**
- * ieee80211_cqm_rssi_notify - inform a configured connection quality monitoring
+ * mac80211_cqm_rssi_notify - inform a configured connection quality monitoring
* rssi threshold triggered
*
- * @vif: &struct ieee80211_vif pointer from the add_interface callback.
+ * @vif: &struct mac80211_vif pointer from the add_interface callback.
* @rssi_event: the RSSI trigger event type
* @gfp: context flags
*
- * When the %IEEE80211_HW_SUPPORTS_CQM_RSSI is set, and a connection quality
+ * When the %MAC80211_HW_SUPPORTS_CQM_RSSI is set, and a connection quality
* monitoring is configured with an rssi threshold, the driver will inform
* whenever the rssi level reaches the threshold.
*/
-void ieee80211_cqm_rssi_notify(struct ieee80211_vif *vif,
+void mac80211_cqm_rssi_notify(struct mac80211_vif *vif,
enum nl80211_cqm_rssi_threshold_event rssi_event,
gfp_t gfp);

/**
- * ieee80211_chswitch_done - Complete channel switch process
- * @vif: &struct ieee80211_vif pointer from the add_interface callback.
+ * mac80211_chswitch_done - Complete channel switch process
+ * @vif: &struct mac80211_vif pointer from the add_interface callback.
* @success: make the channel switch successful or not
*
* Complete the channel switch post-process: set the new operational channel
* and wake up the suspended queues.
*/
-void ieee80211_chswitch_done(struct ieee80211_vif *vif, bool success);
+void mac80211_chswitch_done(struct mac80211_vif *vif, bool success);

/**
- * ieee80211_request_smps - request SM PS transition
- * @vif: &struct ieee80211_vif pointer from the add_interface callback.
+ * mac80211_request_smps - request SM PS transition
+ * @vif: &struct mac80211_vif pointer from the add_interface callback.
* @smps_mode: new SM PS mode
*
* This allows the driver to request an SM PS transition in managed
* mode. This is useful when the driver has more information than
* the stack about possible interference, for example by bluetooth.
*/
-void ieee80211_request_smps(struct ieee80211_vif *vif,
- enum ieee80211_smps_mode smps_mode);
+void mac80211_request_smps(struct mac80211_vif *vif,
+ enum mac80211_smps_mode smps_mode);

/**
- * ieee80211_key_removed - disable hw acceleration for key
+ * mac80211_key_removed - disable hw acceleration for key
* @key_conf: The key hw acceleration should be disabled for
*
* This allows drivers to indicate that the given key has been
@@ -2951,34 +2953,34 @@ void ieee80211_request_smps(struct ieee80211_vif *vif,
* @set_key. This function must be allowed to sleep, and the
* key it tries to disable may still be used until it returns.
*/
-void ieee80211_key_removed(struct ieee80211_key_conf *key_conf);
+void mac80211_key_removed(struct mac80211_key_conf *key_conf);

/**
- * ieee80211_ready_on_channel - notification of remain-on-channel start
- * @hw: pointer as obtained from ieee80211_alloc_hw()
+ * mac80211_ready_on_channel - notification of remain-on-channel start
+ * @hw: pointer as obtained from mac80211_alloc_hw()
*/
-void ieee80211_ready_on_channel(struct ieee80211_hw *hw);
+void mac80211_ready_on_channel(struct mac80211_hw *hw);

/**
- * ieee80211_remain_on_channel_expired - remain_on_channel duration expired
- * @hw: pointer as obtained from ieee80211_alloc_hw()
+ * mac80211_remain_on_channel_expired - remain_on_channel duration expired
+ * @hw: pointer as obtained from mac80211_alloc_hw()
*/
-void ieee80211_remain_on_channel_expired(struct ieee80211_hw *hw);
+void mac80211_remain_on_channel_expired(struct mac80211_hw *hw);

/* Rate control API */

/**
* enum rate_control_changed - flags to indicate which parameter changed
*
- * @IEEE80211_RC_HT_CHANGED: The HT parameters of the operating channel have
+ * @MAC80211_RC_HT_CHANGED: The HT parameters of the operating channel have
* changed, rate control algorithm can update its internal state if needed.
*/
enum rate_control_changed {
- IEEE80211_RC_HT_CHANGED = BIT(0)
+ MAC80211_RC_HT_CHANGED = BIT(0)
};

/**
- * struct ieee80211_tx_rate_control - rate control information for/from RC algo
+ * struct mac80211_tx_rate_control - rate control information for/from RC algo
*
* @hw: The hardware the algorithm is invoked for.
* @sband: The band this frame is being transmitted on.
@@ -2998,12 +3000,12 @@ enum rate_control_changed {
* to be filled in
* @bss: whether this frame is sent out in AP or IBSS mode
*/
-struct ieee80211_tx_rate_control {
- struct ieee80211_hw *hw;
+struct mac80211_tx_rate_control {
+ struct mac80211_hw *hw;
struct ieee80211_supported_band *sband;
- struct ieee80211_bss_conf *bss_conf;
+ struct mac80211_bss_conf *bss_conf;
struct sk_buff *skb;
- struct ieee80211_tx_rate reported_rate;
+ struct mac80211_tx_rate reported_rate;
bool rts, short_preamble;
u8 max_rate_idx;
u32 rate_idx_mask;
@@ -3013,31 +3015,31 @@ struct ieee80211_tx_rate_control {
struct rate_control_ops {
struct module *module;
const char *name;
- void *(*alloc)(struct ieee80211_hw *hw, struct dentry *debugfsdir);
+ void *(*alloc)(struct mac80211_hw *hw, struct dentry *debugfsdir);
void (*free)(void *priv);

- void *(*alloc_sta)(void *priv, struct ieee80211_sta *sta, gfp_t gfp);
+ void *(*alloc_sta)(void *priv, struct mac80211_sta *sta, gfp_t gfp);
void (*rate_init)(void *priv, struct ieee80211_supported_band *sband,
- struct ieee80211_sta *sta, void *priv_sta);
+ struct mac80211_sta *sta, void *priv_sta);
void (*rate_update)(void *priv, struct ieee80211_supported_band *sband,
- struct ieee80211_sta *sta,
+ struct mac80211_sta *sta,
void *priv_sta, u32 changed,
enum nl80211_channel_type oper_chan_type);
- void (*free_sta)(void *priv, struct ieee80211_sta *sta,
+ void (*free_sta)(void *priv, struct mac80211_sta *sta,
void *priv_sta);

void (*tx_status)(void *priv, struct ieee80211_supported_band *sband,
- struct ieee80211_sta *sta, void *priv_sta,
+ struct mac80211_sta *sta, void *priv_sta,
struct sk_buff *skb);
- void (*get_rate)(void *priv, struct ieee80211_sta *sta, void *priv_sta,
- struct ieee80211_tx_rate_control *txrc);
+ void (*get_rate)(void *priv, struct mac80211_sta *sta, void *priv_sta,
+ struct mac80211_tx_rate_control *txrc);

void (*add_sta_debugfs)(void *priv, void *priv_sta,
struct dentry *dir);
void (*remove_sta_debugfs)(void *priv, void *priv_sta);
};

-static inline int rate_supported(struct ieee80211_sta *sta,
+static inline int rate_supported(struct mac80211_sta *sta,
enum ieee80211_band band,
int index)
{
@@ -3057,19 +3059,19 @@ static inline int rate_supported(struct ieee80211_sta *sta,
* Rate control algorithms wishing to do more intelligent selection of
* rate for multicast/broadcast frames may choose to not use this.
*
- * @sta: &struct ieee80211_sta pointer to the target destination. Note
+ * @sta: &struct mac80211_sta pointer to the target destination. Note
* that this may be null.
* @priv_sta: private rate control structure. This may be null.
* @txrc: rate control information we sholud populate for mac80211.
*/
-bool rate_control_send_low(struct ieee80211_sta *sta,
+bool rate_control_send_low(struct mac80211_sta *sta,
void *priv_sta,
- struct ieee80211_tx_rate_control *txrc);
+ struct mac80211_tx_rate_control *txrc);


static inline s8
rate_lowest_index(struct ieee80211_supported_band *sband,
- struct ieee80211_sta *sta)
+ struct mac80211_sta *sta)
{
int i;

@@ -3085,7 +3087,7 @@ rate_lowest_index(struct ieee80211_supported_band *sband,

static inline
bool rate_usable_index_exists(struct ieee80211_supported_band *sband,
- struct ieee80211_sta *sta)
+ struct mac80211_sta *sta)
{
unsigned int i;

@@ -3095,41 +3097,41 @@ bool rate_usable_index_exists(struct ieee80211_supported_band *sband,
return false;
}

-int ieee80211_rate_control_register(struct rate_control_ops *ops);
-void ieee80211_rate_control_unregister(struct rate_control_ops *ops);
+int mac80211_rate_control_register(struct rate_control_ops *ops);
+void mac80211_rate_control_unregister(struct rate_control_ops *ops);

static inline bool
-conf_is_ht20(struct ieee80211_conf *conf)
+conf_is_ht20(struct mac80211_conf *conf)
{
return conf->channel_type == NL80211_CHAN_HT20;
}

static inline bool
-conf_is_ht40_minus(struct ieee80211_conf *conf)
+conf_is_ht40_minus(struct mac80211_conf *conf)
{
return conf->channel_type == NL80211_CHAN_HT40MINUS;
}

static inline bool
-conf_is_ht40_plus(struct ieee80211_conf *conf)
+conf_is_ht40_plus(struct mac80211_conf *conf)
{
return conf->channel_type == NL80211_CHAN_HT40PLUS;
}

static inline bool
-conf_is_ht40(struct ieee80211_conf *conf)
+conf_is_ht40(struct mac80211_conf *conf)
{
return conf_is_ht40_minus(conf) || conf_is_ht40_plus(conf);
}

static inline bool
-conf_is_ht(struct ieee80211_conf *conf)
+conf_is_ht(struct mac80211_conf *conf)
{
return conf->channel_type != NL80211_CHAN_NO_HT;
}

static inline enum nl80211_iftype
-ieee80211_iftype_p2p(enum nl80211_iftype type, bool p2p)
+mac80211_iftype_p2p(enum nl80211_iftype type, bool p2p)
{
if (p2p) {
switch (type) {
@@ -3145,9 +3147,9 @@ ieee80211_iftype_p2p(enum nl80211_iftype type, bool p2p)
}

static inline enum nl80211_iftype
-ieee80211_vif_type_p2p(struct ieee80211_vif *vif)
+mac80211_vif_type_p2p(struct mac80211_vif *vif)
{
- return ieee80211_iftype_p2p(vif->type, vif->p2p);
+ return mac80211_iftype_p2p(vif->type, vif->p2p);
}

#endif /* MAC80211_H */


2011-05-29 20:07:06

by Kalle Valo

[permalink] [raw]
Subject: [RFC PATCH 25/27] mac80211: use mac80211 prefix with rx and tx msg flags

Signed-off-by: Kalle Valo <[email protected]>
---
net/mac80211/mac80211_i.h | 4 ++--
net/mac80211/main.c | 4 ++--
net/mac80211/rx.c | 2 +-
net/mac80211/status.c | 2 +-
4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/net/mac80211/mac80211_i.h b/net/mac80211/mac80211_i.h
index 73ebb14..bf97b7e 100644
--- a/net/mac80211/mac80211_i.h
+++ b/net/mac80211/mac80211_i.h
@@ -628,8 +628,8 @@ enum sdata_queue_type {
};

enum {
- IEEE80211_RX_MSG = 1,
- IEEE80211_TX_STATUS_MSG = 2,
+ MAC80211_RX_MSG = 1,
+ MAC80211_TX_STATUS_MSG = 2,
};

enum queue_stop_reason {
diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index fd1f83c..a59821e 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -330,13 +330,13 @@ static void ieee80211_tasklet_handler(unsigned long data)
while ((skb = skb_dequeue(&local->skb_queue)) ||
(skb = skb_dequeue(&local->skb_queue_unreliable))) {
switch (skb->pkt_type) {
- case IEEE80211_RX_MSG:
+ case MAC80211_RX_MSG:
/* Clear skb->pkt_type in order to not confuse kernel
* netstack. */
skb->pkt_type = 0;
ieee80211_rx(local_to_hw(local), skb);
break;
- case IEEE80211_TX_STATUS_MSG:
+ case MAC80211_TX_STATUS_MSG:
skb->pkt_type = 0;
ieee80211_tx_status(local_to_hw(local), skb);
break;
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index be041e5..3893271 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -2955,7 +2955,7 @@ void ieee80211_rx_irqsafe(struct ieee80211_hw *hw, struct sk_buff *skb)

BUILD_BUG_ON(sizeof(struct ieee80211_rx_status) > sizeof(skb->cb));

- skb->pkt_type = IEEE80211_RX_MSG;
+ skb->pkt_type = MAC80211_RX_MSG;
skb_queue_tail(&local->skb_queue, skb);
tasklet_schedule(&local->tasklet);
}
diff --git a/net/mac80211/status.c b/net/mac80211/status.c
index 41fe6ed..37c886d 100644
--- a/net/mac80211/status.c
+++ b/net/mac80211/status.c
@@ -23,7 +23,7 @@ void ieee80211_tx_status_irqsafe(struct ieee80211_hw *hw,
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
int tmp;

- skb->pkt_type = IEEE80211_TX_STATUS_MSG;
+ skb->pkt_type = MAC80211_TX_STATUS_MSG;
skb_queue_tail(info->flags & IEEE80211_TX_CTL_REQ_TX_STATUS ?
&local->skb_queue : &local->skb_queue_unreliable, skb);
tmp = skb_queue_len(&local->skb_queue) +


2011-05-30 04:30:54

by Larry Finger

[permalink] [raw]
Subject: Re: [RFC PATCH 04/27] rtlwifi: include mac80211.h from core.h

On 05/29/2011 03:04 PM, Kalle Valo wrote:
> core.h references ieee80211_ops but doesn't include mac80211.h, which issues
> a warning once mac80211-compat.h is taken into use.
>
> Signed-off-by: Kalle Valo<[email protected]>

ACKed-by: Larry Finger <[email protected]>

> ---
> drivers/net/wireless/rtlwifi/core.h | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/net/wireless/rtlwifi/core.h b/drivers/net/wireless/rtlwifi/core.h
> index 4b247db..f02824a 100644
> --- a/drivers/net/wireless/rtlwifi/core.h
> +++ b/drivers/net/wireless/rtlwifi/core.h
> @@ -30,6 +30,8 @@
> #ifndef __RTL_CORE_H__
> #define __RTL_CORE_H__
>
> +#include<net/mac80211.h>
> +
> #define RTL_SUPPORTED_FILTERS \
> (FIF_PROMISC_IN_BSS | \
> FIF_ALLMULTI | FIF_CONTROL | \
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>


2011-05-31 19:24:54

by Jussi Kivilinna

[permalink] [raw]
Subject: Re: [RFC PATCH 03/27] zd1211rw: include mac80211.h from zd_chip.h

Quoting Walter Goldens <[email protected]>:

>
>> >> Date: Sunday, May 29, 2011, 11:04 PM
>> >> zd_chip.h contains one function with
>> >> a pointer to ieee80211_hw but doesn't
>> >> include mac80211.h. As a temporary solution
>> include
>> >> mac80211.h to avoid
>> >> a warning.
>> >
>> > I'm still getting a warning with this patch. I think
>> this happened when Jussi fixed some stuff awhile back.
>> >
>> > In function ‘zd_mac_alloc_hw’:
>> > drivers/net/wireless/zd1211rw/zd_mac.c:1340:7:
>> warning: statement with no effect
>>
>> Hm.. I'm not getting this with wireless-testing.
>>
>
> Ubuntu's default kernels 2.6.35 and .38 exhibit this warning when
> compiling compat-wireless. If my memory serves me right, the warning
> began to occur right after you've submitted a patch to rename CR*
> marcos to ZD_CR*.

Compiled compat-wireless-2011-05-30 on Ubuntu 11.04, 64bit:
2.6.38-8-generic & 2.6.38-8-server and 32bit: 2.6.38-8-generic &
2.6.38-8-generic-pae. No warnings at zd1211rw at all. (?)

>
> Walter
>
>



2011-05-29 20:06:30

by Kalle Valo

[permalink] [raw]
Subject: [RFC PATCH 20/27] mac80211: rename ieee80211_if_ibss to mac80211_if_ibss

Signed-off-by: Kalle Valo <[email protected]>
---
net/mac80211/ibss.c | 24 ++++++++++++------------
net/mac80211/mac80211_i.h | 4 ++--
net/mac80211/tx.c | 2 +-
3 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c
index 40f14f2..5ae5e73 100644
--- a/net/mac80211/ibss.c
+++ b/net/mac80211/ibss.c
@@ -67,7 +67,7 @@ static void __ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata,
const u32 basic_rates,
const u16 capability, u64 tsf)
{
- struct ieee80211_if_ibss *ifibss = &sdata->u.ibss;
+ struct mac80211_if_ibss *ifibss = &sdata->u.ibss;
struct mac80211_local *local = sdata->local;
int rates, i;
struct sk_buff *skb;
@@ -420,7 +420,7 @@ struct sta_info *ieee80211_ibss_add_sta(struct ieee80211_sub_if_data *sdata,
u8 *bssid,u8 *addr, u32 supp_rates,
gfp_t gfp)
{
- struct ieee80211_if_ibss *ifibss = &sdata->u.ibss;
+ struct mac80211_if_ibss *ifibss = &sdata->u.ibss;
struct mac80211_local *local = sdata->local;
struct sta_info *sta;
int band = local->hw.conf.channel->band;
@@ -496,7 +496,7 @@ static int ieee80211_sta_active_ibss(struct ieee80211_sub_if_data *sdata)

static void ieee80211_sta_merge_ibss(struct ieee80211_sub_if_data *sdata)
{
- struct ieee80211_if_ibss *ifibss = &sdata->u.ibss;
+ struct mac80211_if_ibss *ifibss = &sdata->u.ibss;

lockdep_assert_held(&ifibss->mtx);

@@ -525,7 +525,7 @@ static void ieee80211_sta_merge_ibss(struct ieee80211_sub_if_data *sdata)

static void ieee80211_sta_create_ibss(struct ieee80211_sub_if_data *sdata)
{
- struct ieee80211_if_ibss *ifibss = &sdata->u.ibss;
+ struct mac80211_if_ibss *ifibss = &sdata->u.ibss;
u8 bssid[ETH_ALEN];
u16 capability;
int i;
@@ -566,7 +566,7 @@ static void ieee80211_sta_create_ibss(struct ieee80211_sub_if_data *sdata)

static void ieee80211_sta_find_ibss(struct ieee80211_sub_if_data *sdata)
{
- struct ieee80211_if_ibss *ifibss = &sdata->u.ibss;
+ struct mac80211_if_ibss *ifibss = &sdata->u.ibss;
struct mac80211_local *local = sdata->local;
struct cfg80211_bss *cbss;
struct ieee80211_channel *chan = NULL;
@@ -657,7 +657,7 @@ static void ieee80211_rx_mgmt_probe_req(struct ieee80211_sub_if_data *sdata,
struct sk_buff *req)
{
struct ieee80211_mgmt *mgmt = (void *)req->data;
- struct ieee80211_if_ibss *ifibss = &sdata->u.ibss;
+ struct mac80211_if_ibss *ifibss = &sdata->u.ibss;
struct mac80211_local *local = sdata->local;
int tx_last_beacon, len = req->len;
struct sk_buff *skb;
@@ -801,7 +801,7 @@ void ieee80211_ibss_rx_queued_mgmt(struct ieee80211_sub_if_data *sdata,

void ieee80211_ibss_work(struct ieee80211_sub_if_data *sdata)
{
- struct ieee80211_if_ibss *ifibss = &sdata->u.ibss;
+ struct mac80211_if_ibss *ifibss = &sdata->u.ibss;

mutex_lock(&ifibss->mtx);

@@ -833,7 +833,7 @@ static void ieee80211_ibss_timer(unsigned long data)
{
struct ieee80211_sub_if_data *sdata =
(struct ieee80211_sub_if_data *) data;
- struct ieee80211_if_ibss *ifibss = &sdata->u.ibss;
+ struct mac80211_if_ibss *ifibss = &sdata->u.ibss;
struct mac80211_local *local = sdata->local;

if (local->quiescing) {
@@ -847,7 +847,7 @@ static void ieee80211_ibss_timer(unsigned long data)
#ifdef CONFIG_PM
void ieee80211_ibss_quiesce(struct ieee80211_sub_if_data *sdata)
{
- struct ieee80211_if_ibss *ifibss = &sdata->u.ibss;
+ struct mac80211_if_ibss *ifibss = &sdata->u.ibss;

if (del_timer_sync(&ifibss->timer))
ifibss->timer_running = true;
@@ -855,7 +855,7 @@ void ieee80211_ibss_quiesce(struct ieee80211_sub_if_data *sdata)

void ieee80211_ibss_restart(struct ieee80211_sub_if_data *sdata)
{
- struct ieee80211_if_ibss *ifibss = &sdata->u.ibss;
+ struct mac80211_if_ibss *ifibss = &sdata->u.ibss;

if (ifibss->timer_running) {
add_timer(&ifibss->timer);
@@ -866,7 +866,7 @@ void ieee80211_ibss_restart(struct ieee80211_sub_if_data *sdata)

void ieee80211_ibss_setup_sdata(struct ieee80211_sub_if_data *sdata)
{
- struct ieee80211_if_ibss *ifibss = &sdata->u.ibss;
+ struct mac80211_if_ibss *ifibss = &sdata->u.ibss;

setup_timer(&ifibss->timer, ieee80211_ibss_timer,
(unsigned long) sdata);
@@ -957,7 +957,7 @@ int ieee80211_ibss_join(struct ieee80211_sub_if_data *sdata,
int ieee80211_ibss_leave(struct ieee80211_sub_if_data *sdata)
{
struct sk_buff *skb;
- struct ieee80211_if_ibss *ifibss = &sdata->u.ibss;
+ struct mac80211_if_ibss *ifibss = &sdata->u.ibss;
struct mac80211_local *local = sdata->local;
struct cfg80211_bss *cbss;
u16 capability;
diff --git a/net/mac80211/mac80211_i.h b/net/mac80211/mac80211_i.h
index aa927ba..b609d9a 100644
--- a/net/mac80211/mac80211_i.h
+++ b/net/mac80211/mac80211_i.h
@@ -419,7 +419,7 @@ struct mac80211_if_managed {
int last_cqm_event_signal;
};

-struct ieee80211_if_ibss {
+struct mac80211_if_ibss {
struct timer_list timer;

struct mutex mtx;
@@ -597,7 +597,7 @@ struct ieee80211_sub_if_data {
struct mac80211_if_wds wds;
struct mac80211_if_vlan vlan;
struct mac80211_if_managed mgd;
- struct ieee80211_if_ibss ibss;
+ struct mac80211_if_ibss ibss;
struct ieee80211_if_mesh mesh;
u32 mntr_flags;
} u;
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index f5c9bc0..2a8c1c0 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -2231,7 +2231,7 @@ struct sk_buff *ieee80211_beacon_get_tim(struct ieee80211_hw *hw,
} else
goto out;
} else if (sdata->vif.type == NL80211_IFTYPE_ADHOC) {
- struct ieee80211_if_ibss *ifibss = &sdata->u.ibss;
+ struct mac80211_if_ibss *ifibss = &sdata->u.ibss;
struct ieee80211_hdr *hdr;
struct sk_buff *presp = rcu_dereference(ifibss->presp);



2011-05-29 20:05:23

by Kalle Valo

[permalink] [raw]
Subject: [RFC PATCH 10/27] mac80211: rename ieee80211_tx_data to mac80211_tx_data

Signed-off-by: Kalle Valo <[email protected]>
---
net/mac80211/mac80211_i.h | 4 ++--
net/mac80211/tx.c | 40 ++++++++++++++++++++--------------------
net/mac80211/util.c | 2 +-
net/mac80211/wep.c | 4 ++--
net/mac80211/wep.h | 2 +-
net/mac80211/wpa.c | 12 ++++++------
net/mac80211/wpa.h | 8 ++++----
7 files changed, 36 insertions(+), 36 deletions(-)

diff --git a/net/mac80211/mac80211_i.h b/net/mac80211/mac80211_i.h
index fffafa8..b5c8374 100644
--- a/net/mac80211/mac80211_i.h
+++ b/net/mac80211/mac80211_i.h
@@ -140,7 +140,7 @@ typedef unsigned __bitwise__ ieee80211_tx_result;
#define IEEE80211_TX_UNICAST BIT(1)
#define IEEE80211_TX_PS_BUFFERED BIT(2)

-struct ieee80211_tx_data {
+struct mac80211_tx_data {
struct sk_buff *skb;
struct mac80211_local *local;
struct ieee80211_sub_if_data *sdata;
@@ -1078,7 +1078,7 @@ static inline int ieee80211_bssid_match(const u8 *raddr, const u8 *addr)


int ieee80211_hw_config(struct mac80211_local *local, u32 changed);
-void ieee80211_tx_set_protected(struct ieee80211_tx_data *tx);
+void ieee80211_tx_set_protected(struct mac80211_tx_data *tx);
void ieee80211_bss_info_change_notify(struct ieee80211_sub_if_data *sdata,
u32 changed);
void ieee80211_configure_filter(struct mac80211_local *local);
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 17b2924..02f6968 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -35,7 +35,7 @@

/* misc utils */

-static __le16 ieee80211_duration(struct ieee80211_tx_data *tx, int group_addr,
+static __le16 ieee80211_duration(struct mac80211_tx_data *tx, int group_addr,
int next_frag_len)
{
int rate, mrate, erp, dur, i;
@@ -177,7 +177,7 @@ static inline int is_ieee80211_device(struct mac80211_local *local,

/* tx handlers */
static ieee80211_tx_result debug_noinline
-ieee80211_tx_h_dynamic_ps(struct ieee80211_tx_data *tx)
+ieee80211_tx_h_dynamic_ps(struct mac80211_tx_data *tx)
{
struct mac80211_local *local = tx->local;
struct ieee80211_if_managed *ifmgd;
@@ -248,7 +248,7 @@ ieee80211_tx_h_dynamic_ps(struct ieee80211_tx_data *tx)
}

static ieee80211_tx_result debug_noinline
-ieee80211_tx_h_check_assoc(struct ieee80211_tx_data *tx)
+ieee80211_tx_h_check_assoc(struct mac80211_tx_data *tx)
{

struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)tx->skb->data;
@@ -362,7 +362,7 @@ static void purge_old_ps_buffers(struct mac80211_local *local)
}

static ieee80211_tx_result
-ieee80211_tx_h_multicast_ps_buf(struct ieee80211_tx_data *tx)
+ieee80211_tx_h_multicast_ps_buf(struct mac80211_tx_data *tx)
{
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(tx->skb);
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)tx->skb->data;
@@ -429,7 +429,7 @@ static int ieee80211_use_mfp(__le16 fc, struct sta_info *sta,
}

static ieee80211_tx_result
-ieee80211_tx_h_unicast_ps_buf(struct ieee80211_tx_data *tx)
+ieee80211_tx_h_unicast_ps_buf(struct mac80211_tx_data *tx)
{
struct sta_info *sta = tx->sta;
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(tx->skb);
@@ -502,7 +502,7 @@ ieee80211_tx_h_unicast_ps_buf(struct ieee80211_tx_data *tx)
}

static ieee80211_tx_result debug_noinline
-ieee80211_tx_h_ps_buf(struct ieee80211_tx_data *tx)
+ieee80211_tx_h_ps_buf(struct mac80211_tx_data *tx)
{
if (unlikely(tx->flags & IEEE80211_TX_PS_BUFFERED))
return TX_CONTINUE;
@@ -514,7 +514,7 @@ ieee80211_tx_h_ps_buf(struct ieee80211_tx_data *tx)
}

static ieee80211_tx_result debug_noinline
-ieee80211_tx_h_check_control_port_protocol(struct ieee80211_tx_data *tx)
+ieee80211_tx_h_check_control_port_protocol(struct mac80211_tx_data *tx)
{
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(tx->skb);

@@ -526,7 +526,7 @@ ieee80211_tx_h_check_control_port_protocol(struct ieee80211_tx_data *tx)
}

static ieee80211_tx_result debug_noinline
-ieee80211_tx_h_select_key(struct ieee80211_tx_data *tx)
+ieee80211_tx_h_select_key(struct mac80211_tx_data *tx)
{
struct ieee80211_key *key = NULL;
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(tx->skb);
@@ -598,7 +598,7 @@ ieee80211_tx_h_select_key(struct ieee80211_tx_data *tx)
}

static ieee80211_tx_result debug_noinline
-ieee80211_tx_h_rate_ctrl(struct ieee80211_tx_data *tx)
+ieee80211_tx_h_rate_ctrl(struct mac80211_tx_data *tx)
{
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(tx->skb);
struct ieee80211_hdr *hdr = (void *)tx->skb->data;
@@ -775,7 +775,7 @@ ieee80211_tx_h_rate_ctrl(struct ieee80211_tx_data *tx)
}

static ieee80211_tx_result debug_noinline
-ieee80211_tx_h_sequence(struct ieee80211_tx_data *tx)
+ieee80211_tx_h_sequence(struct mac80211_tx_data *tx)
{
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(tx->skb);
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)tx->skb->data;
@@ -879,7 +879,7 @@ static int ieee80211_fragment(struct mac80211_local *local,
}

static ieee80211_tx_result debug_noinline
-ieee80211_tx_h_fragment(struct ieee80211_tx_data *tx)
+ieee80211_tx_h_fragment(struct mac80211_tx_data *tx)
{
struct sk_buff *skb = tx->skb;
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
@@ -951,7 +951,7 @@ ieee80211_tx_h_fragment(struct ieee80211_tx_data *tx)
}

static ieee80211_tx_result debug_noinline
-ieee80211_tx_h_stats(struct ieee80211_tx_data *tx)
+ieee80211_tx_h_stats(struct mac80211_tx_data *tx)
{
struct sk_buff *skb = tx->skb;

@@ -968,7 +968,7 @@ ieee80211_tx_h_stats(struct ieee80211_tx_data *tx)
}

static ieee80211_tx_result debug_noinline
-ieee80211_tx_h_encrypt(struct ieee80211_tx_data *tx)
+ieee80211_tx_h_encrypt(struct mac80211_tx_data *tx)
{
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(tx->skb);

@@ -999,7 +999,7 @@ ieee80211_tx_h_encrypt(struct ieee80211_tx_data *tx)
}

static ieee80211_tx_result debug_noinline
-ieee80211_tx_h_calculate_duration(struct ieee80211_tx_data *tx)
+ieee80211_tx_h_calculate_duration(struct mac80211_tx_data *tx)
{
struct sk_buff *skb = tx->skb;
struct ieee80211_hdr *hdr;
@@ -1026,7 +1026,7 @@ ieee80211_tx_h_calculate_duration(struct ieee80211_tx_data *tx)
* deal with packet injection down monitor interface
* with Radiotap Header -- only called for monitor mode interface
*/
-static bool __ieee80211_parse_tx_radiotap(struct ieee80211_tx_data *tx,
+static bool __ieee80211_parse_tx_radiotap(struct mac80211_tx_data *tx,
struct sk_buff *skb)
{
/*
@@ -1116,7 +1116,7 @@ static bool __ieee80211_parse_tx_radiotap(struct ieee80211_tx_data *tx,
return true;
}

-static bool ieee80211_tx_prep_agg(struct ieee80211_tx_data *tx,
+static bool ieee80211_tx_prep_agg(struct mac80211_tx_data *tx,
struct sk_buff *skb,
struct ieee80211_tx_info *info,
struct tid_ampdu_tx *tid_tx,
@@ -1174,7 +1174,7 @@ static bool ieee80211_tx_prep_agg(struct ieee80211_tx_data *tx,
*/
static ieee80211_tx_result
ieee80211_tx_prepare(struct ieee80211_sub_if_data *sdata,
- struct ieee80211_tx_data *tx,
+ struct mac80211_tx_data *tx,
struct sk_buff *skb)
{
struct mac80211_local *local = sdata->local;
@@ -1380,7 +1380,7 @@ static bool __ieee80211_tx(struct mac80211_local *local, struct sk_buff **skbp,
* Invoke TX handlers, return 0 on success and non-zero if the
* frame was dropped or queued.
*/
-static int invoke_tx_handlers(struct ieee80211_tx_data *tx)
+static int invoke_tx_handlers(struct mac80211_tx_data *tx)
{
struct sk_buff *skb = tx->skb;
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
@@ -1440,7 +1440,7 @@ static bool ieee80211_tx(struct ieee80211_sub_if_data *sdata,
struct sk_buff *skb, bool txpending)
{
struct mac80211_local *local = sdata->local;
- struct ieee80211_tx_data tx;
+ struct mac80211_tx_data tx;
ieee80211_tx_result res_prepare;
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
bool result = true;
@@ -2479,7 +2479,7 @@ ieee80211_get_buffered_bc(struct ieee80211_hw *hw,
{
struct mac80211_local *local = hw_to_local(hw);
struct sk_buff *skb = NULL;
- struct ieee80211_tx_data tx;
+ struct mac80211_tx_data tx;
struct ieee80211_sub_if_data *sdata;
struct ieee80211_if_ap *bss = NULL;
struct beacon_data *beacon;
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index ae6daaa..5eef7cd 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -94,7 +94,7 @@ u8 *ieee80211_get_bssid(struct ieee80211_hdr *hdr, size_t len,
return NULL;
}

-void ieee80211_tx_set_protected(struct ieee80211_tx_data *tx)
+void ieee80211_tx_set_protected(struct mac80211_tx_data *tx)
{
struct sk_buff *skb = tx->skb;
struct ieee80211_hdr *hdr;
diff --git a/net/mac80211/wep.c b/net/mac80211/wep.c
index 0f599fb..a0a3f92 100644
--- a/net/mac80211/wep.c
+++ b/net/mac80211/wep.c
@@ -303,7 +303,7 @@ ieee80211_crypto_wep_decrypt(struct ieee80211_rx_data *rx)
return RX_CONTINUE;
}

-static int wep_encrypt_skb(struct ieee80211_tx_data *tx, struct sk_buff *skb)
+static int wep_encrypt_skb(struct mac80211_tx_data *tx, struct sk_buff *skb)
{
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);

@@ -324,7 +324,7 @@ static int wep_encrypt_skb(struct ieee80211_tx_data *tx, struct sk_buff *skb)
}

ieee80211_tx_result
-ieee80211_crypto_wep_encrypt(struct ieee80211_tx_data *tx)
+ieee80211_crypto_wep_encrypt(struct mac80211_tx_data *tx)
{
struct sk_buff *skb;

diff --git a/net/mac80211/wep.h b/net/mac80211/wep.h
index 1ef436c..24a01af 100644
--- a/net/mac80211/wep.h
+++ b/net/mac80211/wep.h
@@ -30,6 +30,6 @@ bool ieee80211_wep_is_weak_iv(struct sk_buff *skb, struct ieee80211_key *key);
ieee80211_rx_result
ieee80211_crypto_wep_decrypt(struct ieee80211_rx_data *rx);
ieee80211_tx_result
-ieee80211_crypto_wep_encrypt(struct ieee80211_tx_data *tx);
+ieee80211_crypto_wep_encrypt(struct mac80211_tx_data *tx);

#endif /* WEP_H */
diff --git a/net/mac80211/wpa.c b/net/mac80211/wpa.c
index 6bc548f..cf45582 100644
--- a/net/mac80211/wpa.c
+++ b/net/mac80211/wpa.c
@@ -24,7 +24,7 @@
#include "wpa.h"

ieee80211_tx_result
-ieee80211_tx_h_michael_mic_add(struct ieee80211_tx_data *tx)
+ieee80211_tx_h_michael_mic_add(struct mac80211_tx_data *tx)
{
u8 *data, *key, *mic;
size_t data_len;
@@ -160,7 +160,7 @@ mic_fail:
}


-static int tkip_encrypt_skb(struct ieee80211_tx_data *tx, struct sk_buff *skb)
+static int tkip_encrypt_skb(struct mac80211_tx_data *tx, struct sk_buff *skb)
{
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data;
struct ieee80211_key *key = tx->key;
@@ -212,7 +212,7 @@ static int tkip_encrypt_skb(struct ieee80211_tx_data *tx, struct sk_buff *skb)


ieee80211_tx_result
-ieee80211_crypto_tkip_encrypt(struct ieee80211_tx_data *tx)
+ieee80211_crypto_tkip_encrypt(struct mac80211_tx_data *tx)
{
struct sk_buff *skb = tx->skb;

@@ -367,7 +367,7 @@ static inline void ccmp_hdr2pn(u8 *pn, u8 *hdr)
}


-static int ccmp_encrypt_skb(struct ieee80211_tx_data *tx, struct sk_buff *skb)
+static int ccmp_encrypt_skb(struct mac80211_tx_data *tx, struct sk_buff *skb)
{
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data;
struct ieee80211_key *key = tx->key;
@@ -427,7 +427,7 @@ static int ccmp_encrypt_skb(struct ieee80211_tx_data *tx, struct sk_buff *skb)


ieee80211_tx_result
-ieee80211_crypto_ccmp_encrypt(struct ieee80211_tx_data *tx)
+ieee80211_crypto_ccmp_encrypt(struct mac80211_tx_data *tx)
{
struct sk_buff *skb = tx->skb;

@@ -522,7 +522,7 @@ static inline void bip_ipn_swap(u8 *d, const u8 *s)


ieee80211_tx_result
-ieee80211_crypto_aes_cmac_encrypt(struct ieee80211_tx_data *tx)
+ieee80211_crypto_aes_cmac_encrypt(struct mac80211_tx_data *tx)
{
struct sk_buff *skb = tx->skb;
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
diff --git a/net/mac80211/wpa.h b/net/mac80211/wpa.h
index 2f4aa1b..474dec4 100644
--- a/net/mac80211/wpa.h
+++ b/net/mac80211/wpa.h
@@ -14,22 +14,22 @@
#include "mac80211_i.h"

ieee80211_tx_result
-ieee80211_tx_h_michael_mic_add(struct ieee80211_tx_data *tx);
+ieee80211_tx_h_michael_mic_add(struct mac80211_tx_data *tx);
ieee80211_rx_result
ieee80211_rx_h_michael_mic_verify(struct ieee80211_rx_data *rx);

ieee80211_tx_result
-ieee80211_crypto_tkip_encrypt(struct ieee80211_tx_data *tx);
+ieee80211_crypto_tkip_encrypt(struct mac80211_tx_data *tx);
ieee80211_rx_result
ieee80211_crypto_tkip_decrypt(struct ieee80211_rx_data *rx);

ieee80211_tx_result
-ieee80211_crypto_ccmp_encrypt(struct ieee80211_tx_data *tx);
+ieee80211_crypto_ccmp_encrypt(struct mac80211_tx_data *tx);
ieee80211_rx_result
ieee80211_crypto_ccmp_decrypt(struct ieee80211_rx_data *rx);

ieee80211_tx_result
-ieee80211_crypto_aes_cmac_encrypt(struct ieee80211_tx_data *tx);
+ieee80211_crypto_aes_cmac_encrypt(struct mac80211_tx_data *tx);
ieee80211_rx_result
ieee80211_crypto_aes_cmac_decrypt(struct ieee80211_rx_data *rx);



2011-05-31 13:03:07

by Jussi Kivilinna

[permalink] [raw]
Subject: Re: [RFC PATCH 03/27] zd1211rw: include mac80211.h from zd_chip.h

Quoting Walter Goldens <[email protected]>:

>
>> Date: Sunday, May 29, 2011, 11:04 PM
>> zd_chip.h contains one function with
>> a pointer to ieee80211_hw but doesn't
>> include mac80211.h. As a temporary solution include
>> mac80211.h to avoid
>> a warning.
>
> I'm still getting a warning with this patch. I think this happened
> when Jussi fixed some stuff awhile back.
>
> In function ‘zd_mac_alloc_hw’:
> drivers/net/wireless/zd1211rw/zd_mac.c:1340:7: warning: statement
> with no effect

Hm.. I'm not getting this with wireless-testing.

>
> Walter
>
>



2011-05-29 20:06:05

by Kalle Valo

[permalink] [raw]
Subject: [RFC PATCH 16/27] mac80211: rename ieee80211_work_type to mac80211_work_type

Signed-off-by: Kalle Valo <[email protected]>
---
net/mac80211/cfg.c | 4 ++--
net/mac80211/mac80211_i.h | 18 +++++++++---------
net/mac80211/mlme.c | 30 +++++++++++++++---------------
net/mac80211/status.c | 2 +-
net/mac80211/work.c | 34 +++++++++++++++++-----------------
5 files changed, 44 insertions(+), 44 deletions(-)

diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 593c07d..4d1dc36 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -1963,7 +1963,7 @@ static int ieee80211_mgmt_tx(struct wiphy *wiphy, struct net_device *dev,
return -ENOMEM;
}

- wk->type = IEEE80211_WORK_OFFCHANNEL_TX;
+ wk->type = MAC80211_WORK_OFFCHANNEL_TX;
wk->chan = chan;
wk->chan_type = channel_type;
wk->sdata = sdata;
@@ -2019,7 +2019,7 @@ static int ieee80211_mgmt_tx_cancel_wait(struct wiphy *wiphy,
if (wk->sdata != sdata)
continue;

- if (wk->type != IEEE80211_WORK_OFFCHANNEL_TX)
+ if (wk->type != MAC80211_WORK_OFFCHANNEL_TX)
continue;

if (cookie != (unsigned long) wk->offchan_tx.frame)
diff --git a/net/mac80211/mac80211_i.h b/net/mac80211/mac80211_i.h
index dc30f13..ad654de 100644
--- a/net/mac80211/mac80211_i.h
+++ b/net/mac80211/mac80211_i.h
@@ -257,14 +257,14 @@ struct mesh_preq_queue {
u8 flags;
};

-enum ieee80211_work_type {
- IEEE80211_WORK_ABORT,
- IEEE80211_WORK_DIRECT_PROBE,
- IEEE80211_WORK_AUTH,
- IEEE80211_WORK_ASSOC_BEACON_WAIT,
- IEEE80211_WORK_ASSOC,
- IEEE80211_WORK_REMAIN_ON_CHANNEL,
- IEEE80211_WORK_OFFCHANNEL_TX,
+enum mac80211_work_type {
+ MAC80211_WORK_ABORT,
+ MAC80211_WORK_DIRECT_PROBE,
+ MAC80211_WORK_AUTH,
+ MAC80211_WORK_ASSOC_BEACON_WAIT,
+ MAC80211_WORK_ASSOC,
+ MAC80211_WORK_REMAIN_ON_CHANNEL,
+ MAC80211_WORK_OFFCHANNEL_TX,
};

/**
@@ -293,7 +293,7 @@ struct ieee80211_work {
enum nl80211_channel_type chan_type;

unsigned long timeout;
- enum ieee80211_work_type type;
+ enum mac80211_work_type type;

u8 filter_ta[ETH_ALEN];

diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 4e24610..fb72946 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -1971,8 +1971,8 @@ void ieee80211_sta_rx_queued_mgmt(struct ieee80211_sub_if_data *sdata,
if (wk->sdata != sdata)
continue;

- if (wk->type != IEEE80211_WORK_ASSOC &&
- wk->type != IEEE80211_WORK_ASSOC_BEACON_WAIT)
+ if (wk->type != MAC80211_WORK_ASSOC &&
+ wk->type != MAC80211_WORK_ASSOC_BEACON_WAIT)
continue;

if (memcmp(mgmt->bssid, wk->filter_ta, ETH_ALEN))
@@ -2282,7 +2282,7 @@ ieee80211_probe_auth_done(struct ieee80211_work *wk,
return WORK_DONE_DESTROY;
}

- if (wk->type == IEEE80211_WORK_AUTH) {
+ if (wk->type == MAC80211_WORK_AUTH) {
cfg80211_send_rx_auth(wk->sdata->dev, skb->data, skb->len);
return WORK_DONE_DESTROY;
}
@@ -2291,7 +2291,7 @@ ieee80211_probe_auth_done(struct ieee80211_work *wk,
ieee80211_rx_mgmt_probe_resp(wk->sdata, skb);
mutex_unlock(&wk->sdata->u.mgd.mtx);

- wk->type = IEEE80211_WORK_AUTH;
+ wk->type = MAC80211_WORK_AUTH;
wk->probe_auth.tries = 0;
return WORK_DONE_REQUEUE;
}
@@ -2351,9 +2351,9 @@ int ieee80211_mgd_auth(struct ieee80211_sub_if_data *sdata,

/* if we already have a probe, don't probe again */
if (req->bss->proberesp_ies)
- wk->type = IEEE80211_WORK_AUTH;
+ wk->type = MAC80211_WORK_AUTH;
else
- wk->type = IEEE80211_WORK_DIRECT_PROBE;
+ wk->type = MAC80211_WORK_DIRECT_PROBE;
wk->chan = req->bss->channel;
wk->chan_type = NL80211_CHAN_NO_HT;
wk->sdata = sdata;
@@ -2376,7 +2376,7 @@ static enum work_done_result ieee80211_assoc_done(struct ieee80211_work *wk,
return WORK_DONE_DESTROY;
}

- if (wk->type == IEEE80211_WORK_ASSOC_BEACON_WAIT) {
+ if (wk->type == MAC80211_WORK_ASSOC_BEACON_WAIT) {
mutex_lock(&wk->sdata->u.mgd.mtx);
rx_status = (void *) skb->cb;
ieee802_11_parse_elems(skb->data + 24 + 12, skb->len - 24 - 12, &elems);
@@ -2384,7 +2384,7 @@ static enum work_done_result ieee80211_assoc_done(struct ieee80211_work *wk,
&elems, true);
mutex_unlock(&wk->sdata->u.mgd.mtx);

- wk->type = IEEE80211_WORK_ASSOC;
+ wk->type = MAC80211_WORK_ASSOC;
/* not really done yet */
return WORK_DONE_REQUEUE;
}
@@ -2510,9 +2510,9 @@ int ieee80211_mgd_assoc(struct ieee80211_sub_if_data *sdata,
wk->done = ieee80211_assoc_done;
if (!bss->dtim_period &&
sdata->local->hw.flags & IEEE80211_HW_NEED_DTIM_PERIOD)
- wk->type = IEEE80211_WORK_ASSOC_BEACON_WAIT;
+ wk->type = MAC80211_WORK_ASSOC_BEACON_WAIT;
else
- wk->type = IEEE80211_WORK_ASSOC;
+ wk->type = MAC80211_WORK_ASSOC;

if (req->use_mfp) {
ifmgd->mfp = IEEE80211_MFP_REQUIRED;
@@ -2561,16 +2561,16 @@ int ieee80211_mgd_deauth(struct ieee80211_sub_if_data *sdata,
if (wk->sdata != sdata)
continue;

- if (wk->type != IEEE80211_WORK_DIRECT_PROBE &&
- wk->type != IEEE80211_WORK_AUTH &&
- wk->type != IEEE80211_WORK_ASSOC &&
- wk->type != IEEE80211_WORK_ASSOC_BEACON_WAIT)
+ if (wk->type != MAC80211_WORK_DIRECT_PROBE &&
+ wk->type != MAC80211_WORK_AUTH &&
+ wk->type != MAC80211_WORK_ASSOC &&
+ wk->type != MAC80211_WORK_ASSOC_BEACON_WAIT)
continue;

if (memcmp(req->bss->bssid, wk->filter_ta, ETH_ALEN))
continue;

- not_auth_yet = wk->type == IEEE80211_WORK_DIRECT_PROBE;
+ not_auth_yet = wk->type == MAC80211_WORK_DIRECT_PROBE;
list_del_rcu(&wk->list);
free_work(wk);
break;
diff --git a/net/mac80211/status.c b/net/mac80211/status.c
index 26d2c40..108e6b1 100644
--- a/net/mac80211/status.c
+++ b/net/mac80211/status.c
@@ -332,7 +332,7 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb)

rcu_read_lock();
list_for_each_entry_rcu(wk, &local->work_list, list) {
- if (wk->type != IEEE80211_WORK_OFFCHANNEL_TX)
+ if (wk->type != MAC80211_WORK_OFFCHANNEL_TX)
continue;
if (wk->offchan_tx.frame != skb)
continue;
diff --git a/net/mac80211/work.c b/net/mac80211/work.c
index 8856c5e..3a14bb8 100644
--- a/net/mac80211/work.c
+++ b/net/mac80211/work.c
@@ -612,7 +612,7 @@ ieee80211_rx_mgmt_auth(struct ieee80211_work *wk,
{
u16 auth_alg, auth_transaction, status_code;

- if (wk->type != IEEE80211_WORK_AUTH)
+ if (wk->type != MAC80211_WORK_AUTH)
return WORK_ACT_MISMATCH;

if (len < 24 + 6)
@@ -664,7 +664,7 @@ ieee80211_rx_mgmt_assoc_resp(struct ieee80211_work *wk,
struct ieee802_11_elems elems;
u8 *pos;

- if (wk->type != IEEE80211_WORK_ASSOC)
+ if (wk->type != MAC80211_WORK_ASSOC)
return WORK_ACT_MISMATCH;

/*
@@ -722,7 +722,7 @@ ieee80211_rx_mgmt_probe_resp(struct ieee80211_work *wk,

ASSERT_WORK_MTX(local);

- if (wk->type != IEEE80211_WORK_DIRECT_PROBE)
+ if (wk->type != MAC80211_WORK_DIRECT_PROBE)
return WORK_ACT_MISMATCH;

if (len < 24 + 12)
@@ -745,7 +745,7 @@ ieee80211_rx_mgmt_beacon(struct ieee80211_work *wk,

ASSERT_WORK_MTX(local);

- if (wk->type != IEEE80211_WORK_ASSOC_BEACON_WAIT)
+ if (wk->type != MAC80211_WORK_ASSOC_BEACON_WAIT)
return WORK_ACT_MISMATCH;

if (len < 24 + 12)
@@ -774,10 +774,10 @@ static void ieee80211_work_rx_queued_mgmt(struct mac80211_local *local,
const u8 *bssid = NULL;

switch (wk->type) {
- case IEEE80211_WORK_DIRECT_PROBE:
- case IEEE80211_WORK_AUTH:
- case IEEE80211_WORK_ASSOC:
- case IEEE80211_WORK_ASSOC_BEACON_WAIT:
+ case MAC80211_WORK_DIRECT_PROBE:
+ case MAC80211_WORK_AUTH:
+ case MAC80211_WORK_ASSOC:
+ case MAC80211_WORK_ASSOC_BEACON_WAIT:
bssid = wk->filter_ta;
break;
default:
@@ -1023,25 +1023,25 @@ static void ieee80211_work_work(struct work_struct *work)
/* nothing */
rma = WORK_ACT_NONE;
break;
- case IEEE80211_WORK_ABORT:
+ case MAC80211_WORK_ABORT:
rma = WORK_ACT_TIMEOUT;
break;
- case IEEE80211_WORK_DIRECT_PROBE:
+ case MAC80211_WORK_DIRECT_PROBE:
rma = ieee80211_direct_probe(wk);
break;
- case IEEE80211_WORK_AUTH:
+ case MAC80211_WORK_AUTH:
rma = ieee80211_authenticate(wk);
break;
- case IEEE80211_WORK_ASSOC:
+ case MAC80211_WORK_ASSOC:
rma = ieee80211_associate(wk);
break;
- case IEEE80211_WORK_REMAIN_ON_CHANNEL:
+ case MAC80211_WORK_REMAIN_ON_CHANNEL:
rma = ieee80211_remain_on_channel_timeout(wk);
break;
- case IEEE80211_WORK_OFFCHANNEL_TX:
+ case MAC80211_WORK_OFFCHANNEL_TX:
rma = ieee80211_offchannel_tx(wk);
break;
- case IEEE80211_WORK_ASSOC_BEACON_WAIT:
+ case MAC80211_WORK_ASSOC_BEACON_WAIT:
rma = ieee80211_assoc_beacon_wait(wk);
break;
}
@@ -1163,7 +1163,7 @@ void ieee80211_work_purge(struct ieee80211_sub_if_data *sdata)
if (wk->sdata != sdata)
continue;
cleanup = true;
- wk->type = IEEE80211_WORK_ABORT;
+ wk->type = MAC80211_WORK_ABORT;
wk->started = true;
wk->timeout = jiffies;
}
@@ -1244,7 +1244,7 @@ int ieee80211_wk_remain_on_channel(struct ieee80211_sub_if_data *sdata,
if (!wk)
return -ENOMEM;

- wk->type = IEEE80211_WORK_REMAIN_ON_CHANNEL;
+ wk->type = MAC80211_WORK_REMAIN_ON_CHANNEL;
wk->chan = chan;
wk->chan_type = channel_type;
wk->sdata = sdata;


2011-05-29 20:07:00

by Kalle Valo

[permalink] [raw]
Subject: [RFC PATCH 24/27] mac80211: ieee80211_sub_if_data to mac80211_sub_if_data

Signed-off-by: Kalle Valo <[email protected]>
---
net/mac80211/agg-rx.c | 2 -
net/mac80211/agg-tx.c | 18 +++---
net/mac80211/cfg.c | 90 ++++++++++++++--------------
net/mac80211/chan.c | 10 ++-
net/mac80211/debugfs_key.c | 6 +-
net/mac80211/debugfs_key.h | 12 ++--
net/mac80211/debugfs_netdev.c | 50 ++++++++--------
net/mac80211/debugfs_netdev.h | 12 ++--
net/mac80211/driver-ops.h | 24 ++++---
net/mac80211/driver-trace.h | 44 +++++++-------
net/mac80211/event.c | 2 -
net/mac80211/ht.c | 12 ++--
net/mac80211/ibss.c | 44 +++++++-------
net/mac80211/iface.c | 48 +++++++--------
net/mac80211/key.c | 26 ++++----
net/mac80211/key.h | 16 ++---
net/mac80211/mac80211_i.h | 132 +++++++++++++++++++++--------------------
net/mac80211/main.c | 6 +-
net/mac80211/mesh.c | 48 +++++++--------
net/mac80211/mesh.h | 74 +++++++++++------------
net/mac80211/mesh_hwmp.c | 26 ++++----
net/mac80211/mesh_pathtbl.c | 24 ++++---
net/mac80211/mesh_plink.c | 22 +++----
net/mac80211/mlme.c | 124 +++++++++++++++++++--------------------
net/mac80211/offchannel.c | 12 ++--
net/mac80211/pm.c | 4 +
net/mac80211/rate.c | 2 -
net/mac80211/rate.h | 2 -
net/mac80211/rx.c | 42 +++++++------
net/mac80211/scan.c | 18 +++---
net/mac80211/spectmgmt.c | 4 +
net/mac80211/sta_info.c | 30 +++++----
net/mac80211/sta_info.h | 18 +++---
net/mac80211/status.c | 4 +
net/mac80211/tkip.c | 4 +
net/mac80211/tx.c | 32 +++++-----
net/mac80211/util.c | 30 +++++----
net/mac80211/wme.c | 2 -
net/mac80211/wme.h | 2 -
net/mac80211/work.c | 24 ++++---
40 files changed, 551 insertions(+), 551 deletions(-)

diff --git a/net/mac80211/agg-rx.c b/net/mac80211/agg-rx.c
index c65a526..951c5bb 100644
--- a/net/mac80211/agg-rx.c
+++ b/net/mac80211/agg-rx.c
@@ -134,7 +134,7 @@ static void sta_rx_agg_reorder_timer_expired(unsigned long data)
rcu_read_unlock();
}

-static void ieee80211_send_addba_resp(struct ieee80211_sub_if_data *sdata, u8 *da, u16 tid,
+static void ieee80211_send_addba_resp(struct mac80211_sub_if_data *sdata, u8 *da, u16 tid,
u8 dialog_token, u16 status, u16 policy,
u16 buf_size, u16 timeout)
{
diff --git a/net/mac80211/agg-tx.c b/net/mac80211/agg-tx.c
index 8bb1f92..faa5e50 100644
--- a/net/mac80211/agg-tx.c
+++ b/net/mac80211/agg-tx.c
@@ -56,7 +56,7 @@
* and the driver must later call ieee80211_stop_tx_ba_cb_irqsafe().
*/

-static void ieee80211_send_addba_request(struct ieee80211_sub_if_data *sdata,
+static void ieee80211_send_addba_request(struct mac80211_sub_if_data *sdata,
const u8 *da, u16 tid,
u8 dialog_token, u16 start_seq_num,
u16 agg_size, u16 timeout)
@@ -106,7 +106,7 @@ static void ieee80211_send_addba_request(struct ieee80211_sub_if_data *sdata,
ieee80211_tx_skb(sdata, skb);
}

-void ieee80211_send_bar(struct ieee80211_sub_if_data *sdata, u8 *ra, u16 tid, u16 ssn)
+void ieee80211_send_bar(struct mac80211_sub_if_data *sdata, u8 *ra, u16 tid, u16 ssn)
{
struct mac80211_local *local = sdata->local;
struct sk_buff *skb;
@@ -296,7 +296,7 @@ void ieee80211_tx_ba_session_handle_start(struct sta_info *sta, int tid)
{
struct tid_ampdu_tx *tid_tx;
struct mac80211_local *local = sta->local;
- struct ieee80211_sub_if_data *sdata = sta->sdata;
+ struct mac80211_sub_if_data *sdata = sta->sdata;
u16 start_seq_num;
int ret;

@@ -361,7 +361,7 @@ int ieee80211_start_tx_ba_session(struct ieee80211_sta *pubsta, u16 tid,
u16 timeout)
{
struct sta_info *sta = container_of(pubsta, struct sta_info, sta);
- struct ieee80211_sub_if_data *sdata = sta->sdata;
+ struct mac80211_sub_if_data *sdata = sta->sdata;
struct mac80211_local *local = sdata->local;
struct tid_ampdu_tx *tid_tx;
int ret = 0;
@@ -528,7 +528,7 @@ static void ieee80211_agg_tx_operational(struct mac80211_local *local,

void ieee80211_start_tx_ba_cb(struct ieee80211_vif *vif, u8 *ra, u16 tid)
{
- struct ieee80211_sub_if_data *sdata = vif_to_sdata(vif);
+ struct mac80211_sub_if_data *sdata = vif_to_sdata(vif);
struct mac80211_local *local = sdata->local;
struct sta_info *sta;
struct tid_ampdu_tx *tid_tx;
@@ -577,7 +577,7 @@ void ieee80211_start_tx_ba_cb(struct ieee80211_vif *vif, u8 *ra, u16 tid)
void ieee80211_start_tx_ba_cb_irqsafe(struct ieee80211_vif *vif,
const u8 *ra, u16 tid)
{
- struct ieee80211_sub_if_data *sdata = vif_to_sdata(vif);
+ struct mac80211_sub_if_data *sdata = vif_to_sdata(vif);
struct mac80211_local *local = sdata->local;
struct ieee80211_ra_tid *ra_tid;
struct sk_buff *skb = dev_alloc_skb(0);
@@ -618,7 +618,7 @@ int __ieee80211_stop_tx_ba_session(struct sta_info *sta, u16 tid,
int ieee80211_stop_tx_ba_session(struct ieee80211_sta *pubsta, u16 tid)
{
struct sta_info *sta = container_of(pubsta, struct sta_info, sta);
- struct ieee80211_sub_if_data *sdata = sta->sdata;
+ struct mac80211_sub_if_data *sdata = sta->sdata;
struct mac80211_local *local = sdata->local;
struct tid_ampdu_tx *tid_tx;
int ret = 0;
@@ -656,7 +656,7 @@ EXPORT_SYMBOL(ieee80211_stop_tx_ba_session);

void ieee80211_stop_tx_ba_cb(struct ieee80211_vif *vif, u8 *ra, u8 tid)
{
- struct ieee80211_sub_if_data *sdata = vif_to_sdata(vif);
+ struct mac80211_sub_if_data *sdata = vif_to_sdata(vif);
struct mac80211_local *local = sdata->local;
struct sta_info *sta;
struct tid_ampdu_tx *tid_tx;
@@ -730,7 +730,7 @@ void ieee80211_stop_tx_ba_cb(struct ieee80211_vif *vif, u8 *ra, u8 tid)
void ieee80211_stop_tx_ba_cb_irqsafe(struct ieee80211_vif *vif,
const u8 *ra, u16 tid)
{
- struct ieee80211_sub_if_data *sdata = vif_to_sdata(vif);
+ struct mac80211_sub_if_data *sdata = vif_to_sdata(vif);
struct mac80211_local *local = sdata->local;
struct ieee80211_ra_tid *ra_tid;
struct sk_buff *skb = dev_alloc_skb(0);
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 0b9b53c..9695576 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -26,7 +26,7 @@ static struct net_device *ieee80211_add_iface(struct wiphy *wiphy, char *name,
{
struct mac80211_local *local = wiphy_priv(wiphy);
struct net_device *dev;
- struct ieee80211_sub_if_data *sdata;
+ struct mac80211_sub_if_data *sdata;
int err;

err = ieee80211_if_add(local, name, &dev, type, params);
@@ -53,7 +53,7 @@ static int ieee80211_change_iface(struct wiphy *wiphy,
enum nl80211_iftype type, u32 *flags,
struct vif_params *params)
{
- struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
+ struct mac80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
int ret;

ret = ieee80211_if_change_type(sdata, type);
@@ -105,7 +105,7 @@ static int ieee80211_add_key(struct wiphy *wiphy, struct net_device *dev,
u8 key_idx, bool pairwise, const u8 *mac_addr,
struct key_params *params)
{
- struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
+ struct mac80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
struct sta_info *sta = NULL;
struct ieee80211_key *key;
int err;
@@ -160,7 +160,7 @@ static int ieee80211_add_key(struct wiphy *wiphy, struct net_device *dev,
static int ieee80211_del_key(struct wiphy *wiphy, struct net_device *dev,
u8 key_idx, bool pairwise, const u8 *mac_addr)
{
- struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
+ struct mac80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
struct mac80211_local *local = sdata->local;
struct sta_info *sta;
struct ieee80211_key *key = NULL;
@@ -204,7 +204,7 @@ static int ieee80211_get_key(struct wiphy *wiphy, struct net_device *dev,
void (*callback)(void *cookie,
struct key_params *params))
{
- struct ieee80211_sub_if_data *sdata;
+ struct mac80211_sub_if_data *sdata;
struct sta_info *sta = NULL;
u8 seq[6] = {0};
struct key_params params;
@@ -293,7 +293,7 @@ static int ieee80211_config_default_key(struct wiphy *wiphy,
u8 key_idx, bool uni,
bool multi)
{
- struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
+ struct mac80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);

ieee80211_set_default_key(sdata, key_idx, uni, multi);

@@ -304,7 +304,7 @@ static int ieee80211_config_default_mgmt_key(struct wiphy *wiphy,
struct net_device *dev,
u8 key_idx)
{
- struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
+ struct mac80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);

ieee80211_set_default_mgmt_key(sdata, key_idx);

@@ -324,7 +324,7 @@ static void rate_idx_to_bitrate(struct rate_info *rate, struct sta_info *sta, in

static void sta_set_sinfo(struct sta_info *sta, struct station_info *sinfo)
{
- struct ieee80211_sub_if_data *sdata = sta->sdata;
+ struct mac80211_sub_if_data *sdata = sta->sdata;
struct timespec uptime;

sinfo->generation = sdata->local->sta_generation;
@@ -406,7 +406,7 @@ static void sta_set_sinfo(struct sta_info *sta, struct station_info *sinfo)
static int ieee80211_dump_station(struct wiphy *wiphy, struct net_device *dev,
int idx, u8 *mac, struct station_info *sinfo)
{
- struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
+ struct mac80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
struct sta_info *sta;
int ret = -ENOENT;

@@ -435,7 +435,7 @@ static int ieee80211_dump_survey(struct wiphy *wiphy, struct net_device *dev,
static int ieee80211_get_station(struct wiphy *wiphy, struct net_device *dev,
u8 *mac, struct station_info *sinfo)
{
- struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
+ struct mac80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
struct sta_info *sta;
int ret = -ENOENT;

@@ -455,7 +455,7 @@ static int ieee80211_get_station(struct wiphy *wiphy, struct net_device *dev,
/*
* This handles both adding a beacon and setting new beacon info
*/
-static int ieee80211_config_beacon(struct ieee80211_sub_if_data *sdata,
+static int ieee80211_config_beacon(struct mac80211_sub_if_data *sdata,
struct beacon_parameters *params)
{
struct beacon_data *new, *old;
@@ -553,7 +553,7 @@ static int ieee80211_config_beacon(struct ieee80211_sub_if_data *sdata,
static int ieee80211_add_beacon(struct wiphy *wiphy, struct net_device *dev,
struct beacon_parameters *params)
{
- struct ieee80211_sub_if_data *sdata;
+ struct mac80211_sub_if_data *sdata;
struct beacon_data *old;

sdata = IEEE80211_DEV_TO_SUB_IF(dev);
@@ -568,7 +568,7 @@ static int ieee80211_add_beacon(struct wiphy *wiphy, struct net_device *dev,
static int ieee80211_set_beacon(struct wiphy *wiphy, struct net_device *dev,
struct beacon_parameters *params)
{
- struct ieee80211_sub_if_data *sdata;
+ struct mac80211_sub_if_data *sdata;
struct beacon_data *old;

sdata = IEEE80211_DEV_TO_SUB_IF(dev);
@@ -582,7 +582,7 @@ static int ieee80211_set_beacon(struct wiphy *wiphy, struct net_device *dev,

static int ieee80211_del_beacon(struct wiphy *wiphy, struct net_device *dev)
{
- struct ieee80211_sub_if_data *sdata;
+ struct mac80211_sub_if_data *sdata;
struct beacon_data *old;

sdata = IEEE80211_DEV_TO_SUB_IF(dev);
@@ -651,7 +651,7 @@ static void sta_apply_parameters(struct mac80211_local *local,
u32 rates;
int i, j;
struct ieee80211_supported_band *sband;
- struct ieee80211_sub_if_data *sdata = sta->sdata;
+ struct mac80211_sub_if_data *sdata = sta->sdata;
u32 mask, set;

sband = local->hw.wiphy->bands[local->oper_channel->band];
@@ -757,7 +757,7 @@ static int ieee80211_add_station(struct wiphy *wiphy, struct net_device *dev,
{
struct mac80211_local *local = wiphy_priv(wiphy);
struct sta_info *sta;
- struct ieee80211_sub_if_data *sdata;
+ struct mac80211_sub_if_data *sdata;
int err;
int layer2_update;

@@ -807,7 +807,7 @@ static int ieee80211_del_station(struct wiphy *wiphy, struct net_device *dev,
u8 *mac)
{
struct mac80211_local *local = wiphy_priv(wiphy);
- struct ieee80211_sub_if_data *sdata;
+ struct mac80211_sub_if_data *sdata;

sdata = IEEE80211_DEV_TO_SUB_IF(dev);

@@ -823,10 +823,10 @@ static int ieee80211_change_station(struct wiphy *wiphy,
u8 *mac,
struct station_parameters *params)
{
- struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
+ struct mac80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
struct mac80211_local *local = wiphy_priv(wiphy);
struct sta_info *sta;
- struct ieee80211_sub_if_data *vlansdata;
+ struct mac80211_sub_if_data *vlansdata;

rcu_read_lock();

@@ -873,7 +873,7 @@ static int ieee80211_change_station(struct wiphy *wiphy,
static int ieee80211_add_mpath(struct wiphy *wiphy, struct net_device *dev,
u8 *dst, u8 *next_hop)
{
- struct ieee80211_sub_if_data *sdata;
+ struct mac80211_sub_if_data *sdata;
struct mesh_path *mpath;
struct sta_info *sta;
int err;
@@ -907,7 +907,7 @@ static int ieee80211_add_mpath(struct wiphy *wiphy, struct net_device *dev,
static int ieee80211_del_mpath(struct wiphy *wiphy, struct net_device *dev,
u8 *dst)
{
- struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
+ struct mac80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);

if (dst)
return mesh_path_del(dst, sdata);
@@ -920,7 +920,7 @@ static int ieee80211_change_mpath(struct wiphy *wiphy,
struct net_device *dev,
u8 *dst, u8 *next_hop)
{
- struct ieee80211_sub_if_data *sdata;
+ struct mac80211_sub_if_data *sdata;
struct mesh_path *mpath;
struct sta_info *sta;

@@ -993,7 +993,7 @@ static int ieee80211_get_mpath(struct wiphy *wiphy, struct net_device *dev,
u8 *dst, u8 *next_hop, struct mpath_info *pinfo)

{
- struct ieee80211_sub_if_data *sdata;
+ struct mac80211_sub_if_data *sdata;
struct mesh_path *mpath;

sdata = IEEE80211_DEV_TO_SUB_IF(dev);
@@ -1014,7 +1014,7 @@ static int ieee80211_dump_mpath(struct wiphy *wiphy, struct net_device *dev,
int idx, u8 *dst, u8 *next_hop,
struct mpath_info *pinfo)
{
- struct ieee80211_sub_if_data *sdata;
+ struct mac80211_sub_if_data *sdata;
struct mesh_path *mpath;

sdata = IEEE80211_DEV_TO_SUB_IF(dev);
@@ -1035,7 +1035,7 @@ static int ieee80211_get_mesh_config(struct wiphy *wiphy,
struct net_device *dev,
struct mesh_config *conf)
{
- struct ieee80211_sub_if_data *sdata;
+ struct mac80211_sub_if_data *sdata;
sdata = IEEE80211_DEV_TO_SUB_IF(dev);

memcpy(conf, &(sdata->u.mesh.mshcfg), sizeof(struct mesh_config));
@@ -1086,7 +1086,7 @@ static int ieee80211_update_mesh_config(struct wiphy *wiphy,
const struct mesh_config *nconf)
{
struct mesh_config *conf;
- struct ieee80211_sub_if_data *sdata;
+ struct mac80211_sub_if_data *sdata;
struct mac80211_if_mesh *ifmsh;

sdata = IEEE80211_DEV_TO_SUB_IF(dev);
@@ -1138,7 +1138,7 @@ static int ieee80211_join_mesh(struct wiphy *wiphy, struct net_device *dev,
const struct mesh_config *conf,
const struct mesh_setup *setup)
{
- struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
+ struct mac80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
struct mac80211_if_mesh *ifmsh = &sdata->u.mesh;
int err;

@@ -1153,7 +1153,7 @@ static int ieee80211_join_mesh(struct wiphy *wiphy, struct net_device *dev,

static int ieee80211_leave_mesh(struct wiphy *wiphy, struct net_device *dev)
{
- struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
+ struct mac80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);

ieee80211_stop_mesh(sdata);

@@ -1165,7 +1165,7 @@ static int ieee80211_change_bss(struct wiphy *wiphy,
struct net_device *dev,
struct bss_parameters *params)
{
- struct ieee80211_sub_if_data *sdata;
+ struct mac80211_sub_if_data *sdata;
u32 changed = 0;

sdata = IEEE80211_DEV_TO_SUB_IF(dev);
@@ -1265,7 +1265,7 @@ static int ieee80211_set_channel(struct wiphy *wiphy,
enum nl80211_channel_type channel_type)
{
struct mac80211_local *local = wiphy_priv(wiphy);
- struct ieee80211_sub_if_data *sdata = NULL;
+ struct mac80211_sub_if_data *sdata = NULL;
struct ieee80211_channel *old_oper;
enum nl80211_channel_type old_oper_type;
enum nl80211_channel_type old_vif_oper_type= NL80211_CHAN_NO_HT;
@@ -1328,7 +1328,7 @@ static int ieee80211_scan(struct wiphy *wiphy,
struct net_device *dev,
struct cfg80211_scan_request *req)
{
- struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
+ struct mac80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);

switch (ieee80211_vif_type_p2p(&sdata->vif)) {
case NL80211_IFTYPE_STATION:
@@ -1360,7 +1360,7 @@ ieee80211_sched_scan_start(struct wiphy *wiphy,
struct net_device *dev,
struct cfg80211_sched_scan_request *req)
{
- struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
+ struct mac80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);

if (!sdata->local->ops->sched_scan_start)
return -EOPNOTSUPP;
@@ -1371,7 +1371,7 @@ ieee80211_sched_scan_start(struct wiphy *wiphy,
static int
ieee80211_sched_scan_stop(struct wiphy *wiphy, struct net_device *dev)
{
- struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
+ struct mac80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);

if (!sdata->local->ops->sched_scan_stop)
return -EOPNOTSUPP;
@@ -1389,7 +1389,7 @@ static int ieee80211_assoc(struct wiphy *wiphy, struct net_device *dev,
struct cfg80211_assoc_request *req)
{
struct mac80211_local *local = wiphy_priv(wiphy);
- struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
+ struct mac80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);

switch (ieee80211_get_channel_mode(local, sdata)) {
case CHAN_MODE_HOPPING:
@@ -1425,7 +1425,7 @@ static int ieee80211_join_ibss(struct wiphy *wiphy, struct net_device *dev,
struct cfg80211_ibss_params *params)
{
struct mac80211_local *local = wiphy_priv(wiphy);
- struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
+ struct mac80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);

switch (ieee80211_get_channel_mode(local, sdata)) {
case CHAN_MODE_HOPPING:
@@ -1445,7 +1445,7 @@ static int ieee80211_join_ibss(struct wiphy *wiphy, struct net_device *dev,

static int ieee80211_leave_ibss(struct wiphy *wiphy, struct net_device *dev)
{
- struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
+ struct mac80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);

return ieee80211_ibss_leave(sdata);
}
@@ -1530,7 +1530,7 @@ static int ieee80211_get_tx_power(struct wiphy *wiphy, int *dbm)
static int ieee80211_set_wds_peer(struct wiphy *wiphy, struct net_device *dev,
const u8 *addr)
{
- struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
+ struct mac80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);

memcpy(&sdata->u.wds.remote_addr, addr, ETH_ALEN);

@@ -1556,7 +1556,7 @@ static int ieee80211_testmode_cmd(struct wiphy *wiphy, void *data, int len)
}
#endif

-int __ieee80211_request_smps(struct ieee80211_sub_if_data *sdata,
+int __ieee80211_request_smps(struct mac80211_sub_if_data *sdata,
enum ieee80211_smps_mode smps_mode)
{
const u8 *ap;
@@ -1605,7 +1605,7 @@ int __ieee80211_request_smps(struct ieee80211_sub_if_data *sdata,
static int ieee80211_set_power_mgmt(struct wiphy *wiphy, struct net_device *dev,
bool enabled, int timeout)
{
- struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
+ struct mac80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
struct mac80211_local *local = wdev_priv(dev->ieee80211_ptr);

if (sdata->vif.type != NL80211_IFTYPE_STATION)
@@ -1638,7 +1638,7 @@ static int ieee80211_set_cqm_rssi_config(struct wiphy *wiphy,
struct net_device *dev,
s32 rssi_thold, u32 rssi_hyst)
{
- struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
+ struct mac80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
struct mac80211_local *local = wdev_priv(dev->ieee80211_ptr);
struct ieee80211_vif *vif = &sdata->vif;
struct ieee80211_bss_conf *bss_conf = &vif->bss_conf;
@@ -1668,7 +1668,7 @@ static int ieee80211_set_bitrate_mask(struct wiphy *wiphy,
const u8 *addr,
const struct cfg80211_bitrate_mask *mask)
{
- struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
+ struct mac80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
struct mac80211_local *local = wdev_priv(dev->ieee80211_ptr);
int i, ret;

@@ -1722,7 +1722,7 @@ static int ieee80211_remain_on_channel(struct wiphy *wiphy,
unsigned int duration,
u64 *cookie)
{
- struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
+ struct mac80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
struct mac80211_local *local = sdata->local;

if (local->ops->remain_on_channel) {
@@ -1768,7 +1768,7 @@ static int ieee80211_cancel_remain_on_channel(struct wiphy *wiphy,
struct net_device *dev,
u64 cookie)
{
- struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
+ struct mac80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
struct mac80211_local *local = sdata->local;

if (local->ops->cancel_remain_on_channel) {
@@ -1812,7 +1812,7 @@ static int ieee80211_mgmt_tx(struct wiphy *wiphy, struct net_device *dev,
bool channel_type_valid, unsigned int wait,
const u8 *buf, size_t len, u64 *cookie)
{
- struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
+ struct mac80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
struct mac80211_local *local = sdata->local;
struct sk_buff *skb;
struct sta_info *sta;
@@ -1981,7 +1981,7 @@ static int ieee80211_mgmt_tx_cancel_wait(struct wiphy *wiphy,
struct net_device *dev,
u64 cookie)
{
- struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
+ struct mac80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
struct mac80211_local *local = sdata->local;
struct mac80211_work *wk;
int ret = -ENOENT;
diff --git a/net/mac80211/chan.c b/net/mac80211/chan.c
index d2fe20d..74b2760 100644
--- a/net/mac80211/chan.c
+++ b/net/mac80211/chan.c
@@ -7,9 +7,9 @@

static enum ieee80211_chan_mode
__ieee80211_get_channel_mode(struct mac80211_local *local,
- struct ieee80211_sub_if_data *ignore)
+ struct mac80211_sub_if_data *ignore)
{
- struct ieee80211_sub_if_data *sdata;
+ struct mac80211_sub_if_data *sdata;

lockdep_assert_held(&local->iflist_mtx);

@@ -46,7 +46,7 @@ __ieee80211_get_channel_mode(struct mac80211_local *local,

enum ieee80211_chan_mode
ieee80211_get_channel_mode(struct mac80211_local *local,
- struct ieee80211_sub_if_data *ignore)
+ struct mac80211_sub_if_data *ignore)
{
enum ieee80211_chan_mode mode;

@@ -58,10 +58,10 @@ ieee80211_get_channel_mode(struct mac80211_local *local,
}

bool ieee80211_set_channel_type(struct mac80211_local *local,
- struct ieee80211_sub_if_data *sdata,
+ struct mac80211_sub_if_data *sdata,
enum nl80211_channel_type chantype)
{
- struct ieee80211_sub_if_data *tmp;
+ struct mac80211_sub_if_data *tmp;
enum nl80211_channel_type superchan = NL80211_CHAN_NO_HT;
bool result;

diff --git a/net/mac80211/debugfs_key.c b/net/mac80211/debugfs_key.c
index 958791f..acfe8f2 100644
--- a/net/mac80211/debugfs_key.c
+++ b/net/mac80211/debugfs_key.c
@@ -271,7 +271,7 @@ void ieee80211_debugfs_key_remove(struct ieee80211_key *key)
key->debugfs.dir = NULL;
}

-void ieee80211_debugfs_key_update_default(struct ieee80211_sub_if_data *sdata)
+void ieee80211_debugfs_key_update_default(struct mac80211_sub_if_data *sdata)
{
char buf[50];
struct ieee80211_key *key;
@@ -306,7 +306,7 @@ void ieee80211_debugfs_key_update_default(struct ieee80211_sub_if_data *sdata)
}
}

-void ieee80211_debugfs_key_add_mgmt_default(struct ieee80211_sub_if_data *sdata)
+void ieee80211_debugfs_key_add_mgmt_default(struct mac80211_sub_if_data *sdata)
{
char buf[50];
struct ieee80211_key *key;
@@ -325,7 +325,7 @@ void ieee80211_debugfs_key_add_mgmt_default(struct ieee80211_sub_if_data *sdata)
ieee80211_debugfs_key_remove_mgmt_default(sdata);
}

-void ieee80211_debugfs_key_remove_mgmt_default(struct ieee80211_sub_if_data *sdata)
+void ieee80211_debugfs_key_remove_mgmt_default(struct mac80211_sub_if_data *sdata)
{
if (!sdata)
return;
diff --git a/net/mac80211/debugfs_key.h b/net/mac80211/debugfs_key.h
index 32adc77..2c543cc 100644
--- a/net/mac80211/debugfs_key.h
+++ b/net/mac80211/debugfs_key.h
@@ -4,11 +4,11 @@
#ifdef CONFIG_MAC80211_DEBUGFS
void ieee80211_debugfs_key_add(struct ieee80211_key *key);
void ieee80211_debugfs_key_remove(struct ieee80211_key *key);
-void ieee80211_debugfs_key_update_default(struct ieee80211_sub_if_data *sdata);
+void ieee80211_debugfs_key_update_default(struct mac80211_sub_if_data *sdata);
void ieee80211_debugfs_key_add_mgmt_default(
- struct ieee80211_sub_if_data *sdata);
+ struct mac80211_sub_if_data *sdata);
void ieee80211_debugfs_key_remove_mgmt_default(
- struct ieee80211_sub_if_data *sdata);
+ struct mac80211_sub_if_data *sdata);
void ieee80211_debugfs_key_sta_del(struct ieee80211_key *key,
struct sta_info *sta);
#else
@@ -17,13 +17,13 @@ static inline void ieee80211_debugfs_key_add(struct ieee80211_key *key)
static inline void ieee80211_debugfs_key_remove(struct ieee80211_key *key)
{}
static inline void ieee80211_debugfs_key_update_default(
- struct ieee80211_sub_if_data *sdata)
+ struct mac80211_sub_if_data *sdata)
{}
static inline void ieee80211_debugfs_key_add_mgmt_default(
- struct ieee80211_sub_if_data *sdata)
+ struct mac80211_sub_if_data *sdata)
{}
static inline void ieee80211_debugfs_key_remove_mgmt_default(
- struct ieee80211_sub_if_data *sdata)
+ struct mac80211_sub_if_data *sdata)
{}
static inline void ieee80211_debugfs_key_sta_del(struct ieee80211_key *key,
struct sta_info *sta)
diff --git a/net/mac80211/debugfs_netdev.c b/net/mac80211/debugfs_netdev.c
index d2b6a87..bbd9e7c 100644
--- a/net/mac80211/debugfs_netdev.c
+++ b/net/mac80211/debugfs_netdev.c
@@ -23,10 +23,10 @@
#include "debugfs_netdev.h"

static ssize_t ieee80211_if_read(
- struct ieee80211_sub_if_data *sdata,
+ struct mac80211_sub_if_data *sdata,
char __user *userbuf,
size_t count, loff_t *ppos,
- ssize_t (*format)(const struct ieee80211_sub_if_data *, char *, int))
+ ssize_t (*format)(const struct mac80211_sub_if_data *, char *, int))
{
char buf[70];
ssize_t ret = -EINVAL;
@@ -43,10 +43,10 @@ static ssize_t ieee80211_if_read(
}

static ssize_t ieee80211_if_write(
- struct ieee80211_sub_if_data *sdata,
+ struct mac80211_sub_if_data *sdata,
const char __user *userbuf,
size_t count, loff_t *ppos,
- ssize_t (*write)(struct ieee80211_sub_if_data *, const char *, int))
+ ssize_t (*write)(struct mac80211_sub_if_data *, const char *, int))
{
u8 *buf;
ssize_t ret;
@@ -72,7 +72,7 @@ freebuf:

#define IEEE80211_IF_FMT(name, field, format_string) \
static ssize_t ieee80211_if_fmt_##name( \
- const struct ieee80211_sub_if_data *sdata, char *buf, \
+ const struct mac80211_sub_if_data *sdata, char *buf, \
int buflen) \
{ \
return scnprintf(buf, buflen, format_string, sdata->field); \
@@ -88,7 +88,7 @@ static ssize_t ieee80211_if_fmt_##name( \

#define IEEE80211_IF_FMT_ATOMIC(name, field) \
static ssize_t ieee80211_if_fmt_##name( \
- const struct ieee80211_sub_if_data *sdata, \
+ const struct mac80211_sub_if_data *sdata, \
char *buf, int buflen) \
{ \
return scnprintf(buf, buflen, "%d\n", atomic_read(&sdata->field));\
@@ -96,7 +96,7 @@ static ssize_t ieee80211_if_fmt_##name( \

#define IEEE80211_IF_FMT_MAC(name, field) \
static ssize_t ieee80211_if_fmt_##name( \
- const struct ieee80211_sub_if_data *sdata, char *buf, \
+ const struct mac80211_sub_if_data *sdata, char *buf, \
int buflen) \
{ \
return scnprintf(buf, buflen, "%pM\n", sdata->field); \
@@ -104,7 +104,7 @@ static ssize_t ieee80211_if_fmt_##name( \

#define IEEE80211_IF_FMT_DEC_DIV_16(name, field) \
static ssize_t ieee80211_if_fmt_##name( \
- const struct ieee80211_sub_if_data *sdata, \
+ const struct mac80211_sub_if_data *sdata, \
char *buf, int buflen) \
{ \
return scnprintf(buf, buflen, "%d\n", sdata->field / 16); \
@@ -157,7 +157,7 @@ IEEE80211_IF_FILE(aid, u.mgd.aid, DEC);
IEEE80211_IF_FILE(last_beacon, u.mgd.last_beacon_signal, DEC);
IEEE80211_IF_FILE(ave_beacon, u.mgd.ave_beacon_signal, DEC_DIV_16);

-static int ieee80211_set_smps(struct ieee80211_sub_if_data *sdata,
+static int ieee80211_set_smps(struct mac80211_sub_if_data *sdata,
enum ieee80211_smps_mode smps_mode)
{
struct mac80211_local *local = sdata->local;
@@ -191,7 +191,7 @@ static const char *smps_modes[IEEE80211_SMPS_NUM_MODES] = {
[IEEE80211_SMPS_DYNAMIC] = "dynamic",
};

-static ssize_t ieee80211_if_fmt_smps(const struct ieee80211_sub_if_data *sdata,
+static ssize_t ieee80211_if_fmt_smps(const struct mac80211_sub_if_data *sdata,
char *buf, int buflen)
{
if (sdata->vif.type != NL80211_IFTYPE_STATION)
@@ -202,7 +202,7 @@ static ssize_t ieee80211_if_fmt_smps(const struct ieee80211_sub_if_data *sdata,
smps_modes[sdata->u.mgd.ap_smps]);
}

-static ssize_t ieee80211_if_parse_smps(struct ieee80211_sub_if_data *sdata,
+static ssize_t ieee80211_if_parse_smps(struct mac80211_sub_if_data *sdata,
const char *buf, int buflen)
{
enum ieee80211_smps_mode mode;
@@ -222,7 +222,7 @@ static ssize_t ieee80211_if_parse_smps(struct ieee80211_sub_if_data *sdata,
__IEEE80211_IF_FILE_W(smps);

static ssize_t ieee80211_if_fmt_tkip_mic_test(
- const struct ieee80211_sub_if_data *sdata, char *buf, int buflen)
+ const struct mac80211_sub_if_data *sdata, char *buf, int buflen)
{
return -EOPNOTSUPP;
}
@@ -249,7 +249,7 @@ static int hwaddr_aton(const char *txt, u8 *addr)
}

static ssize_t ieee80211_if_parse_tkip_mic_test(
- struct ieee80211_sub_if_data *sdata, const char *buf, int buflen)
+ struct mac80211_sub_if_data *sdata, const char *buf, int buflen)
{
struct mac80211_local *local = sdata->local;
u8 addr[ETH_ALEN];
@@ -324,7 +324,7 @@ IEEE80211_IF_FILE(num_sta_ps, u.ap.num_sta_ps, ATOMIC);
IEEE80211_IF_FILE(dtim_count, u.ap.dtim_count, DEC);

static ssize_t ieee80211_if_fmt_num_buffered_multicast(
- const struct ieee80211_sub_if_data *sdata, char *buf, int buflen)
+ const struct mac80211_sub_if_data *sdata, char *buf, int buflen)
{
return scnprintf(buf, buflen, "%u\n",
skb_queue_len(&sdata->u.ap.ps_bc_buf));
@@ -383,7 +383,7 @@ IEEE80211_IF_FILE(dot11MeshHWMPRootMode,
debugfs_create_file(#name, mode, sdata->debugfs.dir, \
sdata, &name##_ops);

-static void add_sta_files(struct ieee80211_sub_if_data *sdata)
+static void add_sta_files(struct mac80211_sub_if_data *sdata)
{
DEBUGFS_ADD(drop_unencrypted);
DEBUGFS_ADD(flags);
@@ -400,7 +400,7 @@ static void add_sta_files(struct ieee80211_sub_if_data *sdata)
DEBUGFS_ADD_MODE(tkip_mic_test, 0200);
}

-static void add_ap_files(struct ieee80211_sub_if_data *sdata)
+static void add_ap_files(struct mac80211_sub_if_data *sdata)
{
DEBUGFS_ADD(drop_unencrypted);
DEBUGFS_ADD(flags);
@@ -415,7 +415,7 @@ static void add_ap_files(struct ieee80211_sub_if_data *sdata)
DEBUGFS_ADD_MODE(tkip_mic_test, 0200);
}

-static void add_wds_files(struct ieee80211_sub_if_data *sdata)
+static void add_wds_files(struct mac80211_sub_if_data *sdata)
{
DEBUGFS_ADD(drop_unencrypted);
DEBUGFS_ADD(flags);
@@ -427,7 +427,7 @@ static void add_wds_files(struct ieee80211_sub_if_data *sdata)
DEBUGFS_ADD(peer);
}

-static void add_vlan_files(struct ieee80211_sub_if_data *sdata)
+static void add_vlan_files(struct mac80211_sub_if_data *sdata)
{
DEBUGFS_ADD(drop_unencrypted);
DEBUGFS_ADD(flags);
@@ -437,7 +437,7 @@ static void add_vlan_files(struct ieee80211_sub_if_data *sdata)
DEBUGFS_ADD(rc_rateidx_mask_5ghz);
}

-static void add_monitor_files(struct ieee80211_sub_if_data *sdata)
+static void add_monitor_files(struct mac80211_sub_if_data *sdata)
{
DEBUGFS_ADD(flags);
DEBUGFS_ADD(state);
@@ -446,7 +446,7 @@ static void add_monitor_files(struct ieee80211_sub_if_data *sdata)

#ifdef CONFIG_MAC80211_MESH

-static void add_mesh_stats(struct ieee80211_sub_if_data *sdata)
+static void add_mesh_stats(struct mac80211_sub_if_data *sdata)
{
struct dentry *dir = debugfs_create_dir("mesh_stats",
sdata->debugfs.dir);
@@ -463,7 +463,7 @@ static void add_mesh_stats(struct ieee80211_sub_if_data *sdata)
#undef MESHSTATS_ADD
}

-static void add_mesh_config(struct ieee80211_sub_if_data *sdata)
+static void add_mesh_config(struct mac80211_sub_if_data *sdata)
{
struct dentry *dir = debugfs_create_dir("mesh_config",
sdata->debugfs.dir);
@@ -490,7 +490,7 @@ static void add_mesh_config(struct ieee80211_sub_if_data *sdata)
}
#endif

-static void add_files(struct ieee80211_sub_if_data *sdata)
+static void add_files(struct mac80211_sub_if_data *sdata)
{
if (!sdata->debugfs.dir)
return;
@@ -525,7 +525,7 @@ static void add_files(struct ieee80211_sub_if_data *sdata)
}
}

-void ieee80211_debugfs_add_netdev(struct ieee80211_sub_if_data *sdata)
+void ieee80211_debugfs_add_netdev(struct mac80211_sub_if_data *sdata)
{
char buf[10+IFNAMSIZ];

@@ -538,7 +538,7 @@ void ieee80211_debugfs_add_netdev(struct ieee80211_sub_if_data *sdata)
add_files(sdata);
}

-void ieee80211_debugfs_remove_netdev(struct ieee80211_sub_if_data *sdata)
+void ieee80211_debugfs_remove_netdev(struct mac80211_sub_if_data *sdata)
{
if (!sdata->debugfs.dir)
return;
@@ -547,7 +547,7 @@ void ieee80211_debugfs_remove_netdev(struct ieee80211_sub_if_data *sdata)
sdata->debugfs.dir = NULL;
}

-void ieee80211_debugfs_rename_netdev(struct ieee80211_sub_if_data *sdata)
+void ieee80211_debugfs_rename_netdev(struct mac80211_sub_if_data *sdata)
{
struct dentry *dir;
char buf[10 + IFNAMSIZ];
diff --git a/net/mac80211/debugfs_netdev.h b/net/mac80211/debugfs_netdev.h
index 79025e7..9add699 100644
--- a/net/mac80211/debugfs_netdev.h
+++ b/net/mac80211/debugfs_netdev.h
@@ -4,18 +4,18 @@
#define __IEEE80211_DEBUGFS_NETDEV_H

#ifdef CONFIG_MAC80211_DEBUGFS
-void ieee80211_debugfs_add_netdev(struct ieee80211_sub_if_data *sdata);
-void ieee80211_debugfs_remove_netdev(struct ieee80211_sub_if_data *sdata);
-void ieee80211_debugfs_rename_netdev(struct ieee80211_sub_if_data *sdata);
+void ieee80211_debugfs_add_netdev(struct mac80211_sub_if_data *sdata);
+void ieee80211_debugfs_remove_netdev(struct mac80211_sub_if_data *sdata);
+void ieee80211_debugfs_rename_netdev(struct mac80211_sub_if_data *sdata);
#else
static inline void ieee80211_debugfs_add_netdev(
- struct ieee80211_sub_if_data *sdata)
+ struct mac80211_sub_if_data *sdata)
{}
static inline void ieee80211_debugfs_remove_netdev(
- struct ieee80211_sub_if_data *sdata)
+ struct mac80211_sub_if_data *sdata)
{}
static inline void ieee80211_debugfs_rename_netdev(
- struct ieee80211_sub_if_data *sdata)
+ struct mac80211_sub_if_data *sdata)
{}
#endif

diff --git a/net/mac80211/driver-ops.h b/net/mac80211/driver-ops.h
index f15f2ca..5242150 100644
--- a/net/mac80211/driver-ops.h
+++ b/net/mac80211/driver-ops.h
@@ -82,7 +82,7 @@ static inline int drv_add_interface(struct mac80211_local *local,
}

static inline int drv_change_interface(struct mac80211_local *local,
- struct ieee80211_sub_if_data *sdata,
+ struct mac80211_sub_if_data *sdata,
enum nl80211_iftype type, bool p2p)
{
int ret;
@@ -118,7 +118,7 @@ static inline int drv_config(struct mac80211_local *local, u32 changed)
}

static inline void drv_bss_info_changed(struct mac80211_local *local,
- struct ieee80211_sub_if_data *sdata,
+ struct mac80211_sub_if_data *sdata,
struct ieee80211_bss_conf *info,
u32 changed)
{
@@ -172,7 +172,7 @@ static inline int drv_set_tim(struct mac80211_local *local,

static inline int drv_set_key(struct mac80211_local *local,
enum set_key_cmd cmd,
- struct ieee80211_sub_if_data *sdata,
+ struct mac80211_sub_if_data *sdata,
struct ieee80211_sta *sta,
struct ieee80211_key_conf *key)
{
@@ -187,7 +187,7 @@ static inline int drv_set_key(struct mac80211_local *local,
}

static inline void drv_update_tkip_key(struct mac80211_local *local,
- struct ieee80211_sub_if_data *sdata,
+ struct mac80211_sub_if_data *sdata,
struct ieee80211_key_conf *conf,
struct sta_info *sta, u32 iv32,
u16 *phase1key)
@@ -205,7 +205,7 @@ static inline void drv_update_tkip_key(struct mac80211_local *local,
}

static inline int drv_hw_scan(struct mac80211_local *local,
- struct ieee80211_sub_if_data *sdata,
+ struct mac80211_sub_if_data *sdata,
struct cfg80211_scan_request *req)
{
int ret;
@@ -220,7 +220,7 @@ static inline int drv_hw_scan(struct mac80211_local *local,

static inline int
drv_sched_scan_start(struct mac80211_local *local,
- struct ieee80211_sub_if_data *sdata,
+ struct mac80211_sub_if_data *sdata,
struct cfg80211_sched_scan_request *req,
struct ieee80211_sched_scan_ies *ies)
{
@@ -236,7 +236,7 @@ drv_sched_scan_start(struct mac80211_local *local,
}

static inline void drv_sched_scan_stop(struct mac80211_local *local,
- struct ieee80211_sub_if_data *sdata)
+ struct mac80211_sub_if_data *sdata)
{
might_sleep();

@@ -332,7 +332,7 @@ static inline int drv_set_coverage_class(struct mac80211_local *local,
}

static inline void drv_sta_notify(struct mac80211_local *local,
- struct ieee80211_sub_if_data *sdata,
+ struct mac80211_sub_if_data *sdata,
enum sta_notify_cmd cmd,
struct ieee80211_sta *sta)
{
@@ -343,7 +343,7 @@ static inline void drv_sta_notify(struct mac80211_local *local,
}

static inline int drv_sta_add(struct mac80211_local *local,
- struct ieee80211_sub_if_data *sdata,
+ struct mac80211_sub_if_data *sdata,
struct ieee80211_sta *sta)
{
int ret = 0;
@@ -360,7 +360,7 @@ static inline int drv_sta_add(struct mac80211_local *local,
}

static inline void drv_sta_remove(struct mac80211_local *local,
- struct ieee80211_sub_if_data *sdata,
+ struct mac80211_sub_if_data *sdata,
struct ieee80211_sta *sta)
{
might_sleep();
@@ -433,7 +433,7 @@ static inline int drv_tx_last_beacon(struct mac80211_local *local)
}

static inline int drv_ampdu_action(struct mac80211_local *local,
- struct ieee80211_sub_if_data *sdata,
+ struct mac80211_sub_if_data *sdata,
enum ieee80211_ampdu_mlme_action action,
struct ieee80211_sta *sta, u16 tid,
u16 *ssn, u8 buf_size)
@@ -621,7 +621,7 @@ static inline bool drv_tx_frames_pending(struct mac80211_local *local)
}

static inline int drv_set_bitrate_mask(struct mac80211_local *local,
- struct ieee80211_sub_if_data *sdata,
+ struct mac80211_sub_if_data *sdata,
const struct cfg80211_bitrate_mask *mask)
{
int ret = -EOPNOTSUPP;
diff --git a/net/mac80211/driver-trace.h b/net/mac80211/driver-trace.h
index ffa02ac..d28aa5e 100644
--- a/net/mac80211/driver-trace.h
+++ b/net/mac80211/driver-trace.h
@@ -57,7 +57,7 @@ DECLARE_EVENT_CLASS(local_only_evt,

DECLARE_EVENT_CLASS(local_sdata_addr_evt,
TP_PROTO(struct mac80211_local *local,
- struct ieee80211_sub_if_data *sdata),
+ struct mac80211_sub_if_data *sdata),
TP_ARGS(local, sdata),

TP_STRUCT__entry(
@@ -100,7 +100,7 @@ DECLARE_EVENT_CLASS(local_u32_evt,

DECLARE_EVENT_CLASS(local_sdata_evt,
TP_PROTO(struct mac80211_local *local,
- struct ieee80211_sub_if_data *sdata),
+ struct mac80211_sub_if_data *sdata),
TP_ARGS(local, sdata),

TP_STRUCT__entry(
@@ -189,13 +189,13 @@ DEFINE_EVENT(local_only_evt, drv_stop,

DEFINE_EVENT(local_sdata_addr_evt, drv_add_interface,
TP_PROTO(struct mac80211_local *local,
- struct ieee80211_sub_if_data *sdata),
+ struct mac80211_sub_if_data *sdata),
TP_ARGS(local, sdata)
);

TRACE_EVENT(drv_change_interface,
TP_PROTO(struct mac80211_local *local,
- struct ieee80211_sub_if_data *sdata,
+ struct mac80211_sub_if_data *sdata,
enum nl80211_iftype type, bool p2p),

TP_ARGS(local, sdata, type, p2p),
@@ -223,7 +223,7 @@ TRACE_EVENT(drv_change_interface,

DEFINE_EVENT(local_sdata_addr_evt, drv_remove_interface,
TP_PROTO(struct mac80211_local *local,
- struct ieee80211_sub_if_data *sdata),
+ struct mac80211_sub_if_data *sdata),
TP_ARGS(local, sdata)
);

@@ -271,7 +271,7 @@ TRACE_EVENT(drv_config,

TRACE_EVENT(drv_bss_info_changed,
TP_PROTO(struct mac80211_local *local,
- struct ieee80211_sub_if_data *sdata,
+ struct mac80211_sub_if_data *sdata,
struct ieee80211_bss_conf *info,
u32 changed),

@@ -394,7 +394,7 @@ TRACE_EVENT(drv_set_tim,

TRACE_EVENT(drv_set_key,
TP_PROTO(struct mac80211_local *local,
- enum set_key_cmd cmd, struct ieee80211_sub_if_data *sdata,
+ enum set_key_cmd cmd, struct mac80211_sub_if_data *sdata,
struct ieee80211_sta *sta,
struct ieee80211_key_conf *key),

@@ -428,7 +428,7 @@ TRACE_EVENT(drv_set_key,

TRACE_EVENT(drv_update_tkip_key,
TP_PROTO(struct mac80211_local *local,
- struct ieee80211_sub_if_data *sdata,
+ struct mac80211_sub_if_data *sdata,
struct ieee80211_key_conf *conf,
struct ieee80211_sta *sta, u32 iv32),

@@ -456,19 +456,19 @@ TRACE_EVENT(drv_update_tkip_key,

DEFINE_EVENT(local_sdata_evt, drv_hw_scan,
TP_PROTO(struct mac80211_local *local,
- struct ieee80211_sub_if_data *sdata),
+ struct mac80211_sub_if_data *sdata),
TP_ARGS(local, sdata)
);

DEFINE_EVENT(local_sdata_evt, drv_sched_scan_start,
TP_PROTO(struct mac80211_local *local,
- struct ieee80211_sub_if_data *sdata),
+ struct mac80211_sub_if_data *sdata),
TP_ARGS(local, sdata)
);

DEFINE_EVENT(local_sdata_evt, drv_sched_scan_stop,
TP_PROTO(struct mac80211_local *local,
- struct ieee80211_sub_if_data *sdata),
+ struct mac80211_sub_if_data *sdata),
TP_ARGS(local, sdata)
);

@@ -571,7 +571,7 @@ TRACE_EVENT(drv_set_coverage_class,

TRACE_EVENT(drv_sta_notify,
TP_PROTO(struct mac80211_local *local,
- struct ieee80211_sub_if_data *sdata,
+ struct mac80211_sub_if_data *sdata,
enum sta_notify_cmd cmd,
struct ieee80211_sta *sta),

@@ -599,7 +599,7 @@ TRACE_EVENT(drv_sta_notify,

TRACE_EVENT(drv_sta_add,
TP_PROTO(struct mac80211_local *local,
- struct ieee80211_sub_if_data *sdata,
+ struct mac80211_sub_if_data *sdata,
struct ieee80211_sta *sta),

TP_ARGS(local, sdata, sta),
@@ -624,7 +624,7 @@ TRACE_EVENT(drv_sta_add,

TRACE_EVENT(drv_sta_remove,
TP_PROTO(struct mac80211_local *local,
- struct ieee80211_sub_if_data *sdata,
+ struct mac80211_sub_if_data *sdata,
struct ieee80211_sta *sta),

TP_ARGS(local, sdata, sta),
@@ -715,7 +715,7 @@ DEFINE_EVENT(local_only_evt, drv_tx_last_beacon,

TRACE_EVENT(drv_ampdu_action,
TP_PROTO(struct mac80211_local *local,
- struct ieee80211_sub_if_data *sdata,
+ struct mac80211_sub_if_data *sdata,
enum ieee80211_ampdu_mlme_action action,
struct ieee80211_sta *sta, u16 tid,
u16 *ssn, u8 buf_size),
@@ -993,7 +993,7 @@ DEFINE_EVENT(local_only_evt, drv_offchannel_tx_cancel_wait,

TRACE_EVENT(drv_set_bitrate_mask,
TP_PROTO(struct mac80211_local *local,
- struct ieee80211_sub_if_data *sdata,
+ struct mac80211_sub_if_data *sdata,
const struct cfg80211_bitrate_mask *mask),

TP_ARGS(local, sdata, mask),
@@ -1044,7 +1044,7 @@ TRACE_EVENT(api_start_tx_ba_session,
);

TRACE_EVENT(api_start_tx_ba_cb,
- TP_PROTO(struct ieee80211_sub_if_data *sdata, const u8 *ra, u16 tid),
+ TP_PROTO(struct mac80211_sub_if_data *sdata, const u8 *ra, u16 tid),

TP_ARGS(sdata, ra, tid),

@@ -1088,7 +1088,7 @@ TRACE_EVENT(api_stop_tx_ba_session,
);

TRACE_EVENT(api_stop_tx_ba_cb,
- TP_PROTO(struct ieee80211_sub_if_data *sdata, const u8 *ra, u16 tid),
+ TP_PROTO(struct mac80211_sub_if_data *sdata, const u8 *ra, u16 tid),

TP_ARGS(sdata, ra, tid),

@@ -1116,7 +1116,7 @@ DEFINE_EVENT(local_only_evt, api_restart_hw,
);

TRACE_EVENT(api_beacon_loss,
- TP_PROTO(struct ieee80211_sub_if_data *sdata),
+ TP_PROTO(struct mac80211_sub_if_data *sdata),

TP_ARGS(sdata),

@@ -1135,7 +1135,7 @@ TRACE_EVENT(api_beacon_loss,
);

TRACE_EVENT(api_connection_loss,
- TP_PROTO(struct ieee80211_sub_if_data *sdata),
+ TP_PROTO(struct mac80211_sub_if_data *sdata),

TP_ARGS(sdata),

@@ -1154,7 +1154,7 @@ TRACE_EVENT(api_connection_loss,
);

TRACE_EVENT(api_cqm_rssi_notify,
- TP_PROTO(struct ieee80211_sub_if_data *sdata,
+ TP_PROTO(struct mac80211_sub_if_data *sdata,
enum nl80211_cqm_rssi_threshold_event rssi_event),

TP_ARGS(sdata, rssi_event),
@@ -1257,7 +1257,7 @@ TRACE_EVENT(api_sta_block_awake,
);

TRACE_EVENT(api_chswitch_done,
- TP_PROTO(struct ieee80211_sub_if_data *sdata, bool success),
+ TP_PROTO(struct mac80211_sub_if_data *sdata, bool success),

TP_ARGS(sdata, success),

diff --git a/net/mac80211/event.c b/net/mac80211/event.c
index d888b5a..1e774e1 100644
--- a/net/mac80211/event.c
+++ b/net/mac80211/event.c
@@ -15,7 +15,7 @@
* the frame that generated the MIC failure (i.e., if it was provided by the
* driver or is still in the frame), it should provide that information.
*/
-void mac80211_ev_michael_mic_failure(struct ieee80211_sub_if_data *sdata, int keyidx,
+void mac80211_ev_michael_mic_failure(struct mac80211_sub_if_data *sdata, int keyidx,
struct ieee80211_hdr *hdr, const u8 *tsc,
gfp_t gfp)
{
diff --git a/net/mac80211/ht.c b/net/mac80211/ht.c
index 1320a0e..5b4a601 100644
--- a/net/mac80211/ht.c
+++ b/net/mac80211/ht.c
@@ -170,7 +170,7 @@ void ieee80211_ba_session_work(struct work_struct *work)
mutex_unlock(&sta->ampdu_mlme.mtx);
}

-void ieee80211_send_delba(struct ieee80211_sub_if_data *sdata,
+void ieee80211_send_delba(struct mac80211_sub_if_data *sdata,
const u8 *da, u16 tid,
u16 initiator, u16 reason_code)
{
@@ -214,7 +214,7 @@ void ieee80211_send_delba(struct ieee80211_sub_if_data *sdata,
ieee80211_tx_skb(sdata, skb);
}

-void ieee80211_process_delba(struct ieee80211_sub_if_data *sdata,
+void ieee80211_process_delba(struct mac80211_sub_if_data *sdata,
struct sta_info *sta,
struct ieee80211_mgmt *mgmt, size_t len)
{
@@ -240,7 +240,7 @@ void ieee80211_process_delba(struct ieee80211_sub_if_data *sdata,
true);
}

-int ieee80211_send_smps_action(struct ieee80211_sub_if_data *sdata,
+int ieee80211_send_smps_action(struct mac80211_sub_if_data *sdata,
enum ieee80211_smps_mode smps, const u8 *da,
const u8 *bssid)
{
@@ -289,8 +289,8 @@ int ieee80211_send_smps_action(struct ieee80211_sub_if_data *sdata,

void ieee80211_request_smps_work(struct work_struct *work)
{
- struct ieee80211_sub_if_data *sdata =
- container_of(work, struct ieee80211_sub_if_data,
+ struct mac80211_sub_if_data *sdata =
+ container_of(work, struct mac80211_sub_if_data,
u.mgd.request_smps_work);

mutex_lock(&sdata->u.mgd.mtx);
@@ -301,7 +301,7 @@ void ieee80211_request_smps_work(struct work_struct *work)
void ieee80211_request_smps(struct ieee80211_vif *vif,
enum ieee80211_smps_mode smps_mode)
{
- struct ieee80211_sub_if_data *sdata = vif_to_sdata(vif);
+ struct mac80211_sub_if_data *sdata = vif_to_sdata(vif);

if (WARN_ON(vif->type != NL80211_IFTYPE_STATION))
return;
diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c
index 5ae5e73..0971f53 100644
--- a/net/mac80211/ibss.c
+++ b/net/mac80211/ibss.c
@@ -36,7 +36,7 @@
#define IEEE80211_IBSS_MAX_STA_ENTRIES 128


-static void ieee80211_rx_mgmt_auth_ibss(struct ieee80211_sub_if_data *sdata,
+static void ieee80211_rx_mgmt_auth_ibss(struct mac80211_sub_if_data *sdata,
struct ieee80211_mgmt *mgmt,
size_t len)
{
@@ -61,7 +61,7 @@ static void ieee80211_rx_mgmt_auth_ibss(struct ieee80211_sub_if_data *sdata,
sdata->u.ibss.bssid, NULL, 0, 0);
}

-static void __ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata,
+static void __ieee80211_sta_join_ibss(struct mac80211_sub_if_data *sdata,
const u8 *bssid, const int beacon_int,
struct ieee80211_channel *chan,
const u32 basic_rates,
@@ -210,7 +210,7 @@ static void __ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata,
cfg80211_ibss_joined(sdata->dev, ifibss->bssid, GFP_KERNEL);
}

-static void ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata,
+static void ieee80211_sta_join_ibss(struct mac80211_sub_if_data *sdata,
struct mac80211_bss *bss)
{
struct cfg80211_bss *cbss =
@@ -250,7 +250,7 @@ static void ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata,
cbss->tsf);
}

-static void ieee80211_rx_bss_info(struct ieee80211_sub_if_data *sdata,
+static void ieee80211_rx_bss_info(struct mac80211_sub_if_data *sdata,
struct ieee80211_mgmt *mgmt,
size_t len,
struct ieee80211_rx_status *rx_status,
@@ -416,7 +416,7 @@ static void ieee80211_rx_bss_info(struct ieee80211_sub_if_data *sdata,
* in IBSS mode, receiving a frame from a yet-unknown station, hence
* must be callable in atomic context.
*/
-struct sta_info *ieee80211_ibss_add_sta(struct ieee80211_sub_if_data *sdata,
+struct sta_info *ieee80211_ibss_add_sta(struct mac80211_sub_if_data *sdata,
u8 *bssid,u8 *addr, u32 supp_rates,
gfp_t gfp)
{
@@ -466,7 +466,7 @@ struct sta_info *ieee80211_ibss_add_sta(struct ieee80211_sub_if_data *sdata,
return sta;
}

-static int ieee80211_sta_active_ibss(struct ieee80211_sub_if_data *sdata)
+static int ieee80211_sta_active_ibss(struct mac80211_sub_if_data *sdata)
{
struct mac80211_local *local = sdata->local;
int active = 0;
@@ -494,7 +494,7 @@ static int ieee80211_sta_active_ibss(struct ieee80211_sub_if_data *sdata)
* This function is called with state == IEEE80211_IBSS_MLME_JOINED
*/

-static void ieee80211_sta_merge_ibss(struct ieee80211_sub_if_data *sdata)
+static void ieee80211_sta_merge_ibss(struct mac80211_sub_if_data *sdata)
{
struct mac80211_if_ibss *ifibss = &sdata->u.ibss;

@@ -523,7 +523,7 @@ static void ieee80211_sta_merge_ibss(struct ieee80211_sub_if_data *sdata)
ifibss->fixed_channel ? ifibss->channel : NULL);
}

-static void ieee80211_sta_create_ibss(struct ieee80211_sub_if_data *sdata)
+static void ieee80211_sta_create_ibss(struct mac80211_sub_if_data *sdata)
{
struct mac80211_if_ibss *ifibss = &sdata->u.ibss;
u8 bssid[ETH_ALEN];
@@ -564,7 +564,7 @@ static void ieee80211_sta_create_ibss(struct ieee80211_sub_if_data *sdata)
* This function is called with state == IEEE80211_IBSS_MLME_SEARCH
*/

-static void ieee80211_sta_find_ibss(struct ieee80211_sub_if_data *sdata)
+static void ieee80211_sta_find_ibss(struct mac80211_sub_if_data *sdata)
{
struct mac80211_if_ibss *ifibss = &sdata->u.ibss;
struct mac80211_local *local = sdata->local;
@@ -653,7 +653,7 @@ static void ieee80211_sta_find_ibss(struct ieee80211_sub_if_data *sdata)
}
}

-static void ieee80211_rx_mgmt_probe_req(struct ieee80211_sub_if_data *sdata,
+static void ieee80211_rx_mgmt_probe_req(struct mac80211_sub_if_data *sdata,
struct sk_buff *req)
{
struct ieee80211_mgmt *mgmt = (void *)req->data;
@@ -723,7 +723,7 @@ static void ieee80211_rx_mgmt_probe_req(struct ieee80211_sub_if_data *sdata,
ieee80211_tx_skb(sdata, skb);
}

-static void ieee80211_rx_mgmt_probe_resp(struct ieee80211_sub_if_data *sdata,
+static void ieee80211_rx_mgmt_probe_resp(struct mac80211_sub_if_data *sdata,
struct ieee80211_mgmt *mgmt,
size_t len,
struct ieee80211_rx_status *rx_status)
@@ -744,7 +744,7 @@ static void ieee80211_rx_mgmt_probe_resp(struct ieee80211_sub_if_data *sdata,
ieee80211_rx_bss_info(sdata, mgmt, len, rx_status, &elems, false);
}

-static void ieee80211_rx_mgmt_beacon(struct ieee80211_sub_if_data *sdata,
+static void ieee80211_rx_mgmt_beacon(struct mac80211_sub_if_data *sdata,
struct ieee80211_mgmt *mgmt,
size_t len,
struct ieee80211_rx_status *rx_status)
@@ -762,7 +762,7 @@ static void ieee80211_rx_mgmt_beacon(struct ieee80211_sub_if_data *sdata,
ieee80211_rx_bss_info(sdata, mgmt, len, rx_status, &elems, true);
}

-void ieee80211_ibss_rx_queued_mgmt(struct ieee80211_sub_if_data *sdata,
+void ieee80211_ibss_rx_queued_mgmt(struct mac80211_sub_if_data *sdata,
struct sk_buff *skb)
{
struct ieee80211_rx_status *rx_status;
@@ -799,7 +799,7 @@ void ieee80211_ibss_rx_queued_mgmt(struct ieee80211_sub_if_data *sdata,
mutex_unlock(&sdata->u.ibss.mtx);
}

-void ieee80211_ibss_work(struct ieee80211_sub_if_data *sdata)
+void ieee80211_ibss_work(struct mac80211_sub_if_data *sdata)
{
struct mac80211_if_ibss *ifibss = &sdata->u.ibss;

@@ -831,8 +831,8 @@ void ieee80211_ibss_work(struct ieee80211_sub_if_data *sdata)

static void ieee80211_ibss_timer(unsigned long data)
{
- struct ieee80211_sub_if_data *sdata =
- (struct ieee80211_sub_if_data *) data;
+ struct mac80211_sub_if_data *sdata =
+ (struct mac80211_sub_if_data *) data;
struct mac80211_if_ibss *ifibss = &sdata->u.ibss;
struct mac80211_local *local = sdata->local;

@@ -845,7 +845,7 @@ static void ieee80211_ibss_timer(unsigned long data)
}

#ifdef CONFIG_PM
-void ieee80211_ibss_quiesce(struct ieee80211_sub_if_data *sdata)
+void ieee80211_ibss_quiesce(struct mac80211_sub_if_data *sdata)
{
struct mac80211_if_ibss *ifibss = &sdata->u.ibss;

@@ -853,7 +853,7 @@ void ieee80211_ibss_quiesce(struct ieee80211_sub_if_data *sdata)
ifibss->timer_running = true;
}

-void ieee80211_ibss_restart(struct ieee80211_sub_if_data *sdata)
+void ieee80211_ibss_restart(struct mac80211_sub_if_data *sdata)
{
struct mac80211_if_ibss *ifibss = &sdata->u.ibss;

@@ -864,7 +864,7 @@ void ieee80211_ibss_restart(struct ieee80211_sub_if_data *sdata)
}
#endif

-void ieee80211_ibss_setup_sdata(struct ieee80211_sub_if_data *sdata)
+void ieee80211_ibss_setup_sdata(struct mac80211_sub_if_data *sdata)
{
struct mac80211_if_ibss *ifibss = &sdata->u.ibss;

@@ -876,7 +876,7 @@ void ieee80211_ibss_setup_sdata(struct ieee80211_sub_if_data *sdata)
/* scan finished notification */
void ieee80211_ibss_notify_scan_completed(struct mac80211_local *local)
{
- struct ieee80211_sub_if_data *sdata;
+ struct mac80211_sub_if_data *sdata;

mutex_lock(&local->iflist_mtx);
list_for_each_entry(sdata, &local->interfaces, list) {
@@ -890,7 +890,7 @@ void ieee80211_ibss_notify_scan_completed(struct mac80211_local *local)
mutex_unlock(&local->iflist_mtx);
}

-int ieee80211_ibss_join(struct ieee80211_sub_if_data *sdata,
+int ieee80211_ibss_join(struct mac80211_sub_if_data *sdata,
struct cfg80211_ibss_params *params)
{
struct sk_buff *skb;
@@ -954,7 +954,7 @@ int ieee80211_ibss_join(struct ieee80211_sub_if_data *sdata,
return 0;
}

-int ieee80211_ibss_leave(struct ieee80211_sub_if_data *sdata)
+int ieee80211_ibss_leave(struct mac80211_sub_if_data *sdata)
{
struct sk_buff *skb;
struct mac80211_if_ibss *ifibss = &sdata->u.ibss;
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
index ccdc564..6eef3e5 100644
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -46,7 +46,7 @@
static int ieee80211_change_mtu(struct net_device *dev, int new_mtu)
{
int meshhdrlen;
- struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
+ struct mac80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);

meshhdrlen = (sdata->vif.type == NL80211_IFTYPE_MESH_POINT) ? 5 : 0;

@@ -66,7 +66,7 @@ static int ieee80211_change_mtu(struct net_device *dev, int new_mtu)

static int ieee80211_change_mac(struct net_device *dev, void *addr)
{
- struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
+ struct mac80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
struct sockaddr *sa = addr;
int ret;

@@ -95,11 +95,11 @@ static inline int identical_mac_addr_allowed(int type1, int type2)
type2 == NL80211_IFTYPE_AP_VLAN));
}

-static int ieee80211_check_concurrent_iface(struct ieee80211_sub_if_data *sdata,
+static int ieee80211_check_concurrent_iface(struct mac80211_sub_if_data *sdata,
enum nl80211_iftype iftype)
{
struct mac80211_local *local = sdata->local;
- struct ieee80211_sub_if_data *nsdata;
+ struct mac80211_sub_if_data *nsdata;
struct net_device *dev = sdata->dev;

ASSERT_RTNL();
@@ -149,7 +149,7 @@ static int ieee80211_check_concurrent_iface(struct ieee80211_sub_if_data *sdata,
return 0;
}

-void ieee80211_adjust_monitor_flags(struct ieee80211_sub_if_data *sdata,
+void ieee80211_adjust_monitor_flags(struct mac80211_sub_if_data *sdata,
const int offset)
{
struct mac80211_local *local = sdata->local;
@@ -176,7 +176,7 @@ void ieee80211_adjust_monitor_flags(struct ieee80211_sub_if_data *sdata,
*/
static int ieee80211_do_open(struct net_device *dev, bool coming_up)
{
- struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
+ struct mac80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
struct mac80211_local *local = sdata->local;
struct sta_info *sta;
u32 changed = 0;
@@ -359,7 +359,7 @@ static int ieee80211_do_open(struct net_device *dev, bool coming_up)

static int ieee80211_open(struct net_device *dev)
{
- struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
+ struct mac80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
int err;

/* fail early if user set an invalid address */
@@ -374,7 +374,7 @@ static int ieee80211_open(struct net_device *dev)
return ieee80211_do_open(dev, true);
}

-static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata,
+static void ieee80211_do_stop(struct mac80211_sub_if_data *sdata,
bool going_down)
{
struct mac80211_local *local = sdata->local;
@@ -448,7 +448,7 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata,

/* APs need special treatment */
if (sdata->vif.type == NL80211_IFTYPE_AP) {
- struct ieee80211_sub_if_data *vlan, *tmpsdata;
+ struct mac80211_sub_if_data *vlan, *tmpsdata;
struct beacon_data *old_beacon =
rtnl_dereference(sdata->u.ap.beacon);

@@ -569,7 +569,7 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata,

static int ieee80211_stop(struct net_device *dev)
{
- struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
+ struct mac80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);

ieee80211_do_stop(sdata, true);

@@ -578,7 +578,7 @@ static int ieee80211_stop(struct net_device *dev)

static void ieee80211_set_multicast_list(struct net_device *dev)
{
- struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
+ struct mac80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
struct mac80211_local *local = sdata->local;
int allmulti, promisc, sdata_allmulti, sdata_promisc;

@@ -614,7 +614,7 @@ static void ieee80211_set_multicast_list(struct net_device *dev)
*/
static void ieee80211_teardown_sdata(struct net_device *dev)
{
- struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
+ struct mac80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
struct mac80211_local *local = sdata->local;
int flushed;
int i;
@@ -655,7 +655,7 @@ static const struct net_device_ops ieee80211_dataif_ops = {
static u16 ieee80211_monitor_select_queue(struct net_device *dev,
struct sk_buff *skb)
{
- struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
+ struct mac80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
struct mac80211_local *local = sdata->local;
struct ieee80211_hdr *hdr;
struct ieee80211_radiotap_header *rtap = (void *)skb->data;
@@ -705,8 +705,8 @@ static void ieee80211_if_setup(struct net_device *dev)

static void ieee80211_iface_work(struct work_struct *work)
{
- struct ieee80211_sub_if_data *sdata =
- container_of(work, struct ieee80211_sub_if_data, work);
+ struct mac80211_sub_if_data *sdata =
+ container_of(work, struct mac80211_sub_if_data, work);
struct mac80211_local *local = sdata->local;
struct sk_buff *skb;
struct sta_info *sta;
@@ -837,7 +837,7 @@ static void ieee80211_iface_work(struct work_struct *work)
/*
* Helper function to initialise an interface to a specific type.
*/
-static void ieee80211_setup_sdata(struct ieee80211_sub_if_data *sdata,
+static void ieee80211_setup_sdata(struct mac80211_sub_if_data *sdata,
enum nl80211_iftype type)
{
/* clear type-dependent union */
@@ -901,7 +901,7 @@ static void ieee80211_setup_sdata(struct ieee80211_sub_if_data *sdata,
ieee80211_debugfs_add_netdev(sdata);
}

-static int ieee80211_runtime_change_iftype(struct ieee80211_sub_if_data *sdata,
+static int ieee80211_runtime_change_iftype(struct mac80211_sub_if_data *sdata,
enum nl80211_iftype type)
{
struct mac80211_local *local = sdata->local;
@@ -972,7 +972,7 @@ static int ieee80211_runtime_change_iftype(struct ieee80211_sub_if_data *sdata,
return ret;
}

-int ieee80211_if_change_type(struct ieee80211_sub_if_data *sdata,
+int ieee80211_if_change_type(struct mac80211_sub_if_data *sdata,
enum nl80211_iftype type)
{
int ret;
@@ -1012,7 +1012,7 @@ static void ieee80211_assign_perm_addr(struct mac80211_local *local,
struct net_device *dev,
enum nl80211_iftype type)
{
- struct ieee80211_sub_if_data *sdata;
+ struct mac80211_sub_if_data *sdata;
u64 mask, start, addr, val, inc;
u8 *m;
u8 tmp_addr[ETH_ALEN];
@@ -1125,7 +1125,7 @@ int ieee80211_if_add(struct mac80211_local *local, const char *name,
struct vif_params *params)
{
struct net_device *ndev;
- struct ieee80211_sub_if_data *sdata = NULL;
+ struct mac80211_sub_if_data *sdata = NULL;
int ret, i;

ASSERT_RTNL();
@@ -1206,7 +1206,7 @@ int ieee80211_if_add(struct mac80211_local *local, const char *name,
return ret;
}

-void ieee80211_if_remove(struct ieee80211_sub_if_data *sdata)
+void ieee80211_if_remove(struct mac80211_sub_if_data *sdata)
{
ASSERT_RTNL();

@@ -1224,7 +1224,7 @@ void ieee80211_if_remove(struct ieee80211_sub_if_data *sdata)
*/
void ieee80211_remove_interfaces(struct mac80211_local *local)
{
- struct ieee80211_sub_if_data *sdata, *tmp;
+ struct mac80211_sub_if_data *sdata, *tmp;
LIST_HEAD(unreg_list);

ASSERT_RTNL();
@@ -1271,7 +1271,7 @@ static u32 ieee80211_idle_on(struct mac80211_local *local)

u32 __ieee80211_recalc_idle(struct mac80211_local *local)
{
- struct ieee80211_sub_if_data *sdata;
+ struct mac80211_sub_if_data *sdata;
int count = 0;
bool working = false, scanning = false, hw_roc = false;
struct mac80211_work *wk;
@@ -1370,7 +1370,7 @@ static int netdev_notify(struct notifier_block *nb,
void *ndev)
{
struct net_device *dev = ndev;
- struct ieee80211_sub_if_data *sdata;
+ struct mac80211_sub_if_data *sdata;

if (state != NETDEV_CHANGENAME)
return 0;
diff --git a/net/mac80211/key.c b/net/mac80211/key.c
index 1eaf1be..389c371 100644
--- a/net/mac80211/key.c
+++ b/net/mac80211/key.c
@@ -63,7 +63,7 @@ static struct ieee80211_sta *get_sta_for_key(struct ieee80211_key *key)

static int ieee80211_key_enable_hw_accel(struct ieee80211_key *key)
{
- struct ieee80211_sub_if_data *sdata;
+ struct mac80211_sub_if_data *sdata;
struct ieee80211_sta *sta;
int ret;

@@ -93,7 +93,7 @@ static int ieee80211_key_enable_hw_accel(struct ieee80211_key *key)
if (!(key->conf.flags & IEEE80211_KEY_FLAG_PAIRWISE))
goto out_unsupported;
sdata = container_of(sdata->bss,
- struct ieee80211_sub_if_data,
+ struct mac80211_sub_if_data,
u.ap);
}

@@ -130,7 +130,7 @@ static int ieee80211_key_enable_hw_accel(struct ieee80211_key *key)

static void ieee80211_key_disable_hw_accel(struct ieee80211_key *key)
{
- struct ieee80211_sub_if_data *sdata;
+ struct mac80211_sub_if_data *sdata;
struct ieee80211_sta *sta;
int ret;

@@ -149,7 +149,7 @@ static void ieee80211_key_disable_hw_accel(struct ieee80211_key *key)

if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN)
sdata = container_of(sdata->bss,
- struct ieee80211_sub_if_data,
+ struct mac80211_sub_if_data,
u.ap);

ret = drv_set_key(key->local, DISABLE_KEY, sdata,
@@ -187,7 +187,7 @@ void ieee80211_key_removed(struct ieee80211_key_conf *key_conf)
}
EXPORT_SYMBOL_GPL(ieee80211_key_removed);

-static void __ieee80211_set_default_key(struct ieee80211_sub_if_data *sdata,
+static void __ieee80211_set_default_key(struct mac80211_sub_if_data *sdata,
int idx, bool uni, bool multi)
{
struct ieee80211_key *key = NULL;
@@ -205,7 +205,7 @@ static void __ieee80211_set_default_key(struct ieee80211_sub_if_data *sdata,
ieee80211_debugfs_key_update_default(sdata);
}

-void ieee80211_set_default_key(struct ieee80211_sub_if_data *sdata, int idx,
+void ieee80211_set_default_key(struct mac80211_sub_if_data *sdata, int idx,
bool uni, bool multi)
{
mutex_lock(&sdata->local->key_mtx);
@@ -214,7 +214,7 @@ void ieee80211_set_default_key(struct ieee80211_sub_if_data *sdata, int idx,
}

static void
-__ieee80211_set_default_mgmt_key(struct ieee80211_sub_if_data *sdata, int idx)
+__ieee80211_set_default_mgmt_key(struct mac80211_sub_if_data *sdata, int idx)
{
struct ieee80211_key *key = NULL;

@@ -229,7 +229,7 @@ __ieee80211_set_default_mgmt_key(struct ieee80211_sub_if_data *sdata, int idx)
ieee80211_debugfs_key_update_default(sdata);
}

-void ieee80211_set_default_mgmt_key(struct ieee80211_sub_if_data *sdata,
+void ieee80211_set_default_mgmt_key(struct mac80211_sub_if_data *sdata,
int idx)
{
mutex_lock(&sdata->local->key_mtx);
@@ -238,7 +238,7 @@ void ieee80211_set_default_mgmt_key(struct ieee80211_sub_if_data *sdata,
}


-static void __ieee80211_key_replace(struct ieee80211_sub_if_data *sdata,
+static void __ieee80211_key_replace(struct mac80211_sub_if_data *sdata,
struct sta_info *sta,
bool pairwise,
struct ieee80211_key *old,
@@ -412,7 +412,7 @@ static void __ieee80211_key_destroy(struct ieee80211_key *key)
}

int ieee80211_key_link(struct ieee80211_key *key,
- struct ieee80211_sub_if_data *sdata,
+ struct mac80211_sub_if_data *sdata,
struct sta_info *sta)
{
struct ieee80211_key *old_key;
@@ -500,7 +500,7 @@ void ieee80211_key_free(struct mac80211_local *local,
mutex_unlock(&local->key_mtx);
}

-void ieee80211_enable_keys(struct ieee80211_sub_if_data *sdata)
+void ieee80211_enable_keys(struct mac80211_sub_if_data *sdata)
{
struct ieee80211_key *key;

@@ -521,7 +521,7 @@ void ieee80211_enable_keys(struct ieee80211_sub_if_data *sdata)
mutex_unlock(&sdata->local->key_mtx);
}

-void ieee80211_disable_keys(struct ieee80211_sub_if_data *sdata)
+void ieee80211_disable_keys(struct mac80211_sub_if_data *sdata)
{
struct ieee80211_key *key;

@@ -535,7 +535,7 @@ void ieee80211_disable_keys(struct ieee80211_sub_if_data *sdata)
mutex_unlock(&sdata->local->key_mtx);
}

-void ieee80211_free_keys(struct ieee80211_sub_if_data *sdata)
+void ieee80211_free_keys(struct mac80211_sub_if_data *sdata)
{
struct ieee80211_key *key, *tmp;

diff --git a/net/mac80211/key.h b/net/mac80211/key.h
index 035fc31..9a930fd 100644
--- a/net/mac80211/key.h
+++ b/net/mac80211/key.h
@@ -32,7 +32,7 @@
#define NUM_RX_DATA_QUEUES 17

struct mac80211_local;
-struct ieee80211_sub_if_data;
+struct mac80211_sub_if_data;
struct sta_info;

/**
@@ -60,7 +60,7 @@ struct tkip_ctx {

struct ieee80211_key {
struct mac80211_local *local;
- struct ieee80211_sub_if_data *sdata;
+ struct mac80211_sub_if_data *sdata;
struct sta_info *sta;

/* for sdata list */
@@ -133,18 +133,18 @@ struct ieee80211_key *ieee80211_key_alloc(u32 cipher, int idx, size_t key_len,
* to make it used, free old key.
*/
int __must_check ieee80211_key_link(struct ieee80211_key *key,
- struct ieee80211_sub_if_data *sdata,
+ struct mac80211_sub_if_data *sdata,
struct sta_info *sta);
void __ieee80211_key_free(struct ieee80211_key *key);
void ieee80211_key_free(struct mac80211_local *local,
struct ieee80211_key *key);
-void ieee80211_set_default_key(struct ieee80211_sub_if_data *sdata, int idx,
+void ieee80211_set_default_key(struct mac80211_sub_if_data *sdata, int idx,
bool uni, bool multi);
-void ieee80211_set_default_mgmt_key(struct ieee80211_sub_if_data *sdata,
+void ieee80211_set_default_mgmt_key(struct mac80211_sub_if_data *sdata,
int idx);
-void ieee80211_free_keys(struct ieee80211_sub_if_data *sdata);
-void ieee80211_enable_keys(struct ieee80211_sub_if_data *sdata);
-void ieee80211_disable_keys(struct ieee80211_sub_if_data *sdata);
+void ieee80211_free_keys(struct mac80211_sub_if_data *sdata);
+void ieee80211_enable_keys(struct mac80211_sub_if_data *sdata);
+void ieee80211_disable_keys(struct mac80211_sub_if_data *sdata);

#define key_mtx_dereference(local, ref) \
rcu_dereference_protected(ref, lockdep_is_held(&((local)->key_mtx)))
diff --git a/net/mac80211/mac80211_i.h b/net/mac80211/mac80211_i.h
index dfc3f77..73ebb14 100644
--- a/net/mac80211/mac80211_i.h
+++ b/net/mac80211/mac80211_i.h
@@ -143,7 +143,7 @@ typedef unsigned __bitwise__ ieee80211_tx_result;
struct mac80211_tx_data {
struct sk_buff *skb;
struct mac80211_local *local;
- struct ieee80211_sub_if_data *sdata;
+ struct mac80211_sub_if_data *sdata;
struct sta_info *sta;
struct ieee80211_key *key;

@@ -197,7 +197,7 @@ enum mac80211_i_rx_flags {
struct mac80211_rx_data {
struct sk_buff *skb;
struct mac80211_local *local;
- struct ieee80211_sub_if_data *sdata;
+ struct mac80211_sub_if_data *sdata;
struct sta_info *sta;
struct ieee80211_key *key;

@@ -284,7 +284,7 @@ struct mac80211_work {

struct rcu_head rcu_head;

- struct ieee80211_sub_if_data *sdata;
+ struct mac80211_sub_if_data *sdata;

enum work_done_result (*done)(struct mac80211_work *wk,
struct sk_buff *skb);
@@ -536,7 +536,7 @@ enum mac80211_sdata_state_bits {
SDATA_STATE_OFFCHANNEL,
};

-struct ieee80211_sub_if_data {
+struct mac80211_sub_if_data {
struct list_head list;

struct wireless_dev wdev;
@@ -616,9 +616,9 @@ struct ieee80211_sub_if_data {
};

static inline
-struct ieee80211_sub_if_data *vif_to_sdata(struct ieee80211_vif *p)
+struct mac80211_sub_if_data *vif_to_sdata(struct ieee80211_vif *p)
{
- return container_of(p, struct ieee80211_sub_if_data, vif);
+ return container_of(p, struct mac80211_sub_if_data, vif);
}

enum sdata_queue_type {
@@ -856,7 +856,7 @@ struct mac80211_local {
unsigned long leave_oper_channel_time;
enum mac80211_scan_state next_scan_state;
struct delayed_work scan_work;
- struct ieee80211_sub_if_data *scan_sdata;
+ struct mac80211_sub_if_data *scan_sdata;
enum nl80211_channel_type _oper_channel_type;
struct ieee80211_channel *oper_channel, *csa_channel;

@@ -937,7 +937,7 @@ struct mac80211_local {
* PS can only be enabled when we have exactly one managed
* interface (and monitors) in PS, this then points there.
*/
- struct ieee80211_sub_if_data *ps_sdata;
+ struct mac80211_sub_if_data *ps_sdata;
struct work_struct dynamic_ps_enable_work;
struct work_struct dynamic_ps_disable_work;
struct timer_list dynamic_ps_timer;
@@ -982,7 +982,7 @@ struct mac80211_local {
struct napi_struct napi;
};

-static inline struct ieee80211_sub_if_data *
+static inline struct mac80211_sub_if_data *
IEEE80211_DEV_TO_SUB_IF(struct net_device *dev)
{
return netdev_priv(dev);
@@ -1079,71 +1079,71 @@ static inline int ieee80211_bssid_match(const u8 *raddr, const u8 *addr)

int ieee80211_hw_config(struct mac80211_local *local, u32 changed);
void ieee80211_tx_set_protected(struct mac80211_tx_data *tx);
-void ieee80211_bss_info_change_notify(struct ieee80211_sub_if_data *sdata,
+void ieee80211_bss_info_change_notify(struct mac80211_sub_if_data *sdata,
u32 changed);
void ieee80211_configure_filter(struct mac80211_local *local);
-u32 ieee80211_reset_erp_info(struct ieee80211_sub_if_data *sdata);
+u32 ieee80211_reset_erp_info(struct mac80211_sub_if_data *sdata);

/* STA code */
-void ieee80211_sta_setup_sdata(struct ieee80211_sub_if_data *sdata);
-int ieee80211_mgd_auth(struct ieee80211_sub_if_data *sdata,
+void ieee80211_sta_setup_sdata(struct mac80211_sub_if_data *sdata);
+int ieee80211_mgd_auth(struct mac80211_sub_if_data *sdata,
struct cfg80211_auth_request *req);
-int ieee80211_mgd_assoc(struct ieee80211_sub_if_data *sdata,
+int ieee80211_mgd_assoc(struct mac80211_sub_if_data *sdata,
struct cfg80211_assoc_request *req);
-int ieee80211_mgd_deauth(struct ieee80211_sub_if_data *sdata,
+int ieee80211_mgd_deauth(struct mac80211_sub_if_data *sdata,
struct cfg80211_deauth_request *req,
void *cookie);
-int ieee80211_mgd_disassoc(struct ieee80211_sub_if_data *sdata,
+int ieee80211_mgd_disassoc(struct mac80211_sub_if_data *sdata,
struct cfg80211_disassoc_request *req,
void *cookie);
void ieee80211_send_pspoll(struct mac80211_local *local,
- struct ieee80211_sub_if_data *sdata);
+ struct mac80211_sub_if_data *sdata);
void ieee80211_recalc_ps(struct mac80211_local *local, s32 latency);
int ieee80211_max_network_latency(struct notifier_block *nb,
unsigned long data, void *dummy);
-int ieee80211_set_arp_filter(struct ieee80211_sub_if_data *sdata);
-void ieee80211_sta_process_chanswitch(struct ieee80211_sub_if_data *sdata,
+int ieee80211_set_arp_filter(struct mac80211_sub_if_data *sdata);
+void ieee80211_sta_process_chanswitch(struct mac80211_sub_if_data *sdata,
struct ieee80211_channel_sw_ie *sw_elem,
struct mac80211_bss *bss,
u64 timestamp);
-void ieee80211_sta_quiesce(struct ieee80211_sub_if_data *sdata);
-void ieee80211_sta_restart(struct ieee80211_sub_if_data *sdata);
-void ieee80211_sta_work(struct ieee80211_sub_if_data *sdata);
-void ieee80211_sta_rx_queued_mgmt(struct ieee80211_sub_if_data *sdata,
+void ieee80211_sta_quiesce(struct mac80211_sub_if_data *sdata);
+void ieee80211_sta_restart(struct mac80211_sub_if_data *sdata);
+void ieee80211_sta_work(struct mac80211_sub_if_data *sdata);
+void ieee80211_sta_rx_queued_mgmt(struct mac80211_sub_if_data *sdata,
struct sk_buff *skb);
-void ieee80211_sta_reset_beacon_monitor(struct ieee80211_sub_if_data *sdata);
-void ieee80211_sta_reset_conn_monitor(struct ieee80211_sub_if_data *sdata);
+void ieee80211_sta_reset_beacon_monitor(struct mac80211_sub_if_data *sdata);
+void ieee80211_sta_reset_conn_monitor(struct mac80211_sub_if_data *sdata);

/* IBSS code */
void ieee80211_ibss_notify_scan_completed(struct mac80211_local *local);
-void ieee80211_ibss_setup_sdata(struct ieee80211_sub_if_data *sdata);
-struct sta_info *ieee80211_ibss_add_sta(struct ieee80211_sub_if_data *sdata,
+void ieee80211_ibss_setup_sdata(struct mac80211_sub_if_data *sdata);
+struct sta_info *ieee80211_ibss_add_sta(struct mac80211_sub_if_data *sdata,
u8 *bssid, u8 *addr, u32 supp_rates,
gfp_t gfp);
-int ieee80211_ibss_join(struct ieee80211_sub_if_data *sdata,
+int ieee80211_ibss_join(struct mac80211_sub_if_data *sdata,
struct cfg80211_ibss_params *params);
-int ieee80211_ibss_leave(struct ieee80211_sub_if_data *sdata);
-void ieee80211_ibss_quiesce(struct ieee80211_sub_if_data *sdata);
-void ieee80211_ibss_restart(struct ieee80211_sub_if_data *sdata);
-void ieee80211_ibss_work(struct ieee80211_sub_if_data *sdata);
-void ieee80211_ibss_rx_queued_mgmt(struct ieee80211_sub_if_data *sdata,
+int ieee80211_ibss_leave(struct mac80211_sub_if_data *sdata);
+void ieee80211_ibss_quiesce(struct mac80211_sub_if_data *sdata);
+void ieee80211_ibss_restart(struct mac80211_sub_if_data *sdata);
+void ieee80211_ibss_work(struct mac80211_sub_if_data *sdata);
+void ieee80211_ibss_rx_queued_mgmt(struct mac80211_sub_if_data *sdata,
struct sk_buff *skb);

/* mesh code */
-void ieee80211_mesh_work(struct ieee80211_sub_if_data *sdata);
-void ieee80211_mesh_rx_queued_mgmt(struct ieee80211_sub_if_data *sdata,
+void ieee80211_mesh_work(struct mac80211_sub_if_data *sdata);
+void ieee80211_mesh_rx_queued_mgmt(struct mac80211_sub_if_data *sdata,
struct sk_buff *skb);

/* scan/BSS handling */
void ieee80211_scan_work(struct work_struct *work);
-int ieee80211_request_internal_scan(struct ieee80211_sub_if_data *sdata,
+int ieee80211_request_internal_scan(struct mac80211_sub_if_data *sdata,
const u8 *ssid, u8 ssid_len,
struct ieee80211_channel *chan);
-int ieee80211_request_scan(struct ieee80211_sub_if_data *sdata,
+int ieee80211_request_scan(struct mac80211_sub_if_data *sdata,
struct cfg80211_scan_request *req);
void ieee80211_scan_cancel(struct mac80211_local *local);
ieee80211_rx_result
-ieee80211_scan_rx(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb);
+ieee80211_scan_rx(struct mac80211_sub_if_data *sdata, struct sk_buff *skb);

void ieee80211_mlme_notify_scan_completed(struct mac80211_local *local);
struct mac80211_bss *
@@ -1161,9 +1161,9 @@ void ieee80211_rx_bss_put(struct mac80211_local *local,
struct mac80211_bss *bss);

/* scheduled scan handling */
-int ieee80211_request_sched_scan_start(struct ieee80211_sub_if_data *sdata,
+int ieee80211_request_sched_scan_start(struct mac80211_sub_if_data *sdata,
struct cfg80211_sched_scan_request *req);
-int ieee80211_request_sched_scan_stop(struct ieee80211_sub_if_data *sdata);
+int ieee80211_request_sched_scan_stop(struct mac80211_sub_if_data *sdata);
void ieee80211_sched_scan_stopped_work(struct work_struct *work);

/* off-channel helpers */
@@ -1183,16 +1183,16 @@ void ieee80211_iface_exit(void);
int ieee80211_if_add(struct mac80211_local *local, const char *name,
struct net_device **new_dev, enum nl80211_iftype type,
struct vif_params *params);
-int ieee80211_if_change_type(struct ieee80211_sub_if_data *sdata,
+int ieee80211_if_change_type(struct mac80211_sub_if_data *sdata,
enum nl80211_iftype type);
-void ieee80211_if_remove(struct ieee80211_sub_if_data *sdata);
+void ieee80211_if_remove(struct mac80211_sub_if_data *sdata);
void ieee80211_remove_interfaces(struct mac80211_local *local);
u32 __ieee80211_recalc_idle(struct mac80211_local *local);
void ieee80211_recalc_idle(struct mac80211_local *local);
-void ieee80211_adjust_monitor_flags(struct ieee80211_sub_if_data *sdata,
+void ieee80211_adjust_monitor_flags(struct mac80211_sub_if_data *sdata,
const int offset);

-static inline bool ieee80211_sdata_running(struct ieee80211_sub_if_data *sdata)
+static inline bool ieee80211_sdata_running(struct mac80211_sub_if_data *sdata)
{
return test_bit(SDATA_STATE_RUNNING, &sdata->state);
}
@@ -1221,11 +1221,11 @@ struct ieee80211_tx_status_rtap_hdr {
void ieee80211_ht_cap_ie_to_sta_ht_cap(struct ieee80211_supported_band *sband,
struct ieee80211_ht_cap *ht_cap_ie,
struct ieee80211_sta_ht_cap *ht_cap);
-void ieee80211_send_bar(struct ieee80211_sub_if_data *sdata, u8 *ra, u16 tid, u16 ssn);
-void ieee80211_send_delba(struct ieee80211_sub_if_data *sdata,
+void ieee80211_send_bar(struct mac80211_sub_if_data *sdata, u8 *ra, u16 tid, u16 ssn);
+void ieee80211_send_delba(struct mac80211_sub_if_data *sdata,
const u8 *da, u16 tid,
u16 initiator, u16 reason_code);
-int ieee80211_send_smps_action(struct ieee80211_sub_if_data *sdata,
+int ieee80211_send_smps_action(struct mac80211_sub_if_data *sdata,
enum ieee80211_smps_mode smps, const u8 *da,
const u8 *bssid);
void ieee80211_request_smps_work(struct work_struct *work);
@@ -1235,7 +1235,7 @@ void ___ieee80211_stop_rx_ba_session(struct sta_info *sta, u16 tid,
void __ieee80211_stop_rx_ba_session(struct sta_info *sta, u16 tid,
u16 initiator, u16 reason, bool stop);
void ieee80211_sta_tear_down_BA_sessions(struct sta_info *sta, bool tx);
-void ieee80211_process_delba(struct ieee80211_sub_if_data *sdata,
+void ieee80211_process_delba(struct mac80211_sub_if_data *sdata,
struct sta_info *sta,
struct ieee80211_mgmt *mgmt, size_t len);
void ieee80211_process_addba_resp(struct mac80211_local *local,
@@ -1260,7 +1260,7 @@ void ieee80211_tx_ba_session_handle_start(struct sta_info *sta, int tid);
void ieee80211_release_reorder_timeout(struct sta_info *sta, int tid);

/* Spectrum management */
-void ieee80211_process_measurement_req(struct ieee80211_sub_if_data *sdata,
+void ieee80211_process_measurement_req(struct mac80211_sub_if_data *sdata,
struct ieee80211_mgmt *mgmt,
size_t len);

@@ -1301,11 +1301,11 @@ u8 *ieee80211_get_bssid(struct ieee80211_hdr *hdr, size_t len,
enum nl80211_iftype type);
int ieee80211_frame_duration(struct mac80211_local *local, size_t len,
int rate, int erp, int short_preamble);
-void mac80211_ev_michael_mic_failure(struct ieee80211_sub_if_data *sdata, int keyidx,
+void mac80211_ev_michael_mic_failure(struct mac80211_sub_if_data *sdata, int keyidx,
struct ieee80211_hdr *hdr, const u8 *tsc,
gfp_t gfp);
-void ieee80211_set_wmm_default(struct ieee80211_sub_if_data *sdata);
-void ieee80211_tx_skb(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb);
+void ieee80211_set_wmm_default(struct mac80211_sub_if_data *sdata);
+void ieee80211_tx_skb(struct mac80211_sub_if_data *sdata, struct sk_buff *skb);
void ieee802_11_parse_elems(u8 *start, size_t len,
struct ieee802_11_elems *elems);
u32 ieee802_11_parse_elems_crc(u8 *start, size_t len,
@@ -1318,11 +1318,11 @@ void ieee80211_dynamic_ps_enable_work(struct work_struct *work);
void ieee80211_dynamic_ps_disable_work(struct work_struct *work);
void ieee80211_dynamic_ps_timer(unsigned long data);
void ieee80211_send_nullfunc(struct mac80211_local *local,
- struct ieee80211_sub_if_data *sdata,
+ struct mac80211_sub_if_data *sdata,
int powersave);
-void ieee80211_sta_rx_notify(struct ieee80211_sub_if_data *sdata,
+void ieee80211_sta_rx_notify(struct mac80211_sub_if_data *sdata,
struct ieee80211_hdr *hdr);
-void ieee80211_sta_tx_notify(struct ieee80211_sub_if_data *sdata,
+void ieee80211_sta_tx_notify(struct mac80211_sub_if_data *sdata,
struct ieee80211_hdr *hdr, bool ack);
void ieee80211_beacon_connection_loss_work(struct work_struct *work);

@@ -1342,7 +1342,7 @@ int ieee80211_add_pending_skbs_fn(struct mac80211_local *local,
struct sk_buff_head *skbs,
void (*fn)(void *data), void *data);

-void ieee80211_send_auth(struct ieee80211_sub_if_data *sdata,
+void ieee80211_send_auth(struct mac80211_sub_if_data *sdata,
u16 transaction, u16 auth_alg,
u8 *extra, size_t extra_len, const u8 *bssid,
const u8 *key, u8 key_len, u8 key_idx);
@@ -1350,21 +1350,21 @@ int ieee80211_build_preq_ies(struct mac80211_local *local, u8 *buffer,
const u8 *ie, size_t ie_len,
enum ieee80211_band band, u32 rate_mask,
u8 channel);
-struct sk_buff *ieee80211_build_probe_req(struct ieee80211_sub_if_data *sdata,
+struct sk_buff *ieee80211_build_probe_req(struct mac80211_sub_if_data *sdata,
u8 *dst,
const u8 *ssid, size_t ssid_len,
const u8 *ie, size_t ie_len);
-void ieee80211_send_probe_req(struct ieee80211_sub_if_data *sdata, u8 *dst,
+void ieee80211_send_probe_req(struct mac80211_sub_if_data *sdata, u8 *dst,
const u8 *ssid, size_t ssid_len,
const u8 *ie, size_t ie_len);

-void ieee80211_sta_def_wmm_params(struct ieee80211_sub_if_data *sdata,
+void ieee80211_sta_def_wmm_params(struct mac80211_sub_if_data *sdata,
const size_t supp_rates_len,
const u8 *supp_rates);
u32 ieee80211_sta_get_rates(struct mac80211_local *local,
struct ieee802_11_elems *elems,
enum ieee80211_band band);
-int __ieee80211_request_smps(struct ieee80211_sub_if_data *sdata,
+int __ieee80211_request_smps(struct mac80211_sub_if_data *sdata,
enum ieee80211_smps_mode smps_mode);
void ieee80211_recalc_smps(struct mac80211_local *local);

@@ -1376,15 +1376,15 @@ size_t ieee80211_ie_split_vendor(const u8 *ies, size_t ielen, size_t offset);
void ieee80211_work_init(struct mac80211_local *local);
void ieee80211_add_work(struct mac80211_work *wk);
void free_work(struct mac80211_work *wk);
-void ieee80211_work_purge(struct ieee80211_sub_if_data *sdata);
-ieee80211_rx_result ieee80211_work_rx_mgmt(struct ieee80211_sub_if_data *sdata,
+void ieee80211_work_purge(struct mac80211_sub_if_data *sdata);
+ieee80211_rx_result ieee80211_work_rx_mgmt(struct mac80211_sub_if_data *sdata,
struct sk_buff *skb);
-int ieee80211_wk_remain_on_channel(struct ieee80211_sub_if_data *sdata,
+int ieee80211_wk_remain_on_channel(struct mac80211_sub_if_data *sdata,
struct ieee80211_channel *chan,
enum nl80211_channel_type channel_type,
unsigned int duration, u64 *cookie);
int ieee80211_wk_cancel_remain_on_channel(
- struct ieee80211_sub_if_data *sdata, u64 cookie);
+ struct mac80211_sub_if_data *sdata, u64 cookie);

/* channel management */
enum ieee80211_chan_mode {
@@ -1395,9 +1395,9 @@ enum ieee80211_chan_mode {

enum ieee80211_chan_mode
ieee80211_get_channel_mode(struct mac80211_local *local,
- struct ieee80211_sub_if_data *ignore);
+ struct mac80211_sub_if_data *ignore);
bool ieee80211_set_channel_type(struct mac80211_local *local,
- struct ieee80211_sub_if_data *sdata,
+ struct mac80211_sub_if_data *sdata,
enum nl80211_channel_type chantype);

#ifdef CONFIG_MAC80211_NOINLINE
diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index bd8c543..fd1f83c 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -231,7 +231,7 @@ int ieee80211_hw_config(struct mac80211_local *local, u32 changed)
return ret;
}

-void ieee80211_bss_info_change_notify(struct ieee80211_sub_if_data *sdata,
+void ieee80211_bss_info_change_notify(struct mac80211_sub_if_data *sdata,
u32 changed)
{
struct mac80211_local *local = sdata->local;
@@ -312,7 +312,7 @@ void ieee80211_bss_info_change_notify(struct ieee80211_sub_if_data *sdata,
drv_bss_info_changed(local, sdata, &sdata->vif.bss_conf, changed);
}

-u32 ieee80211_reset_erp_info(struct ieee80211_sub_if_data *sdata)
+u32 ieee80211_reset_erp_info(struct mac80211_sub_if_data *sdata)
{
sdata->vif.bss_conf.use_cts_prot = false;
sdata->vif.bss_conf.use_short_preamble = false;
@@ -407,7 +407,7 @@ static int ieee80211_ifa_changed(struct notifier_block *nb,
struct net_device *ndev = ifa->ifa_dev->dev;
struct wireless_dev *wdev = ndev->ieee80211_ptr;
struct in_device *idev;
- struct ieee80211_sub_if_data *sdata;
+ struct mac80211_sub_if_data *sdata;
struct ieee80211_bss_conf *bss_conf;
struct mac80211_if_managed *ifmgd;
int c = 0;
diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c
index b86f02e..12bfa03 100644
--- a/net/mac80211/mesh.c
+++ b/net/mac80211/mesh.c
@@ -43,7 +43,7 @@ void ieee80211s_stop(void)

static void ieee80211_mesh_housekeeping_timer(unsigned long data)
{
- struct ieee80211_sub_if_data *sdata = (void *) data;
+ struct mac80211_sub_if_data *sdata = (void *) data;
struct mac80211_local *local = sdata->local;
struct mac80211_if_mesh *ifmsh = &sdata->u.mesh;

@@ -66,7 +66,7 @@ static void ieee80211_mesh_housekeeping_timer(unsigned long data)
* This function checks if the mesh configuration of a mesh point matches the
* local mesh configuration, i.e. if both nodes belong to the same mesh network.
*/
-bool mesh_matches_local(struct ieee802_11_elems *ie, struct ieee80211_sub_if_data *sdata)
+bool mesh_matches_local(struct ieee802_11_elems *ie, struct mac80211_sub_if_data *sdata)
{
struct mac80211_if_mesh *ifmsh = &sdata->u.mesh;

@@ -108,7 +108,7 @@ bool mesh_peer_accepts_plinks(struct ieee802_11_elems *ie)
*
* @sdata: mesh interface in which mesh beacons are going to be updated
*/
-void mesh_accept_plinks_update(struct ieee80211_sub_if_data *sdata)
+void mesh_accept_plinks_update(struct mac80211_sub_if_data *sdata)
{
bool free_plinks;

@@ -124,7 +124,7 @@ void mesh_accept_plinks_update(struct ieee80211_sub_if_data *sdata)
ieee80211_mesh_housekeeping_timer((unsigned long) sdata);
}

-int mesh_rmc_init(struct ieee80211_sub_if_data *sdata)
+int mesh_rmc_init(struct mac80211_sub_if_data *sdata)
{
int i;

@@ -137,7 +137,7 @@ int mesh_rmc_init(struct ieee80211_sub_if_data *sdata)
return 0;
}

-void mesh_rmc_free(struct ieee80211_sub_if_data *sdata)
+void mesh_rmc_free(struct mac80211_sub_if_data *sdata)
{
struct mesh_rmc *rmc = sdata->u.mesh.rmc;
struct rmc_entry *p, *n;
@@ -169,7 +169,7 @@ void mesh_rmc_free(struct ieee80211_sub_if_data *sdata)
* it.
*/
int mesh_rmc_check(u8 *sa, struct ieee80211s_hdr *mesh_hdr,
- struct ieee80211_sub_if_data *sdata)
+ struct mac80211_sub_if_data *sdata)
{
struct mesh_rmc *rmc = sdata->u.mesh.rmc;
u32 seqnum = 0;
@@ -204,7 +204,7 @@ int mesh_rmc_check(u8 *sa, struct ieee80211s_hdr *mesh_hdr,
return 0;
}

-void mesh_mgmt_ies_add(struct sk_buff *skb, struct ieee80211_sub_if_data *sdata)
+void mesh_mgmt_ies_add(struct sk_buff *skb, struct mac80211_sub_if_data *sdata)
{
struct mac80211_local *local = sdata->local;
struct ieee80211_supported_band *sband;
@@ -290,8 +290,8 @@ void mesh_mgmt_ies_add(struct sk_buff *skb, struct ieee80211_sub_if_data *sdata)

static void ieee80211_mesh_path_timer(unsigned long data)
{
- struct ieee80211_sub_if_data *sdata =
- (struct ieee80211_sub_if_data *) data;
+ struct mac80211_sub_if_data *sdata =
+ (struct mac80211_sub_if_data *) data;
struct mac80211_if_mesh *ifmsh = &sdata->u.mesh;
struct mac80211_local *local = sdata->local;

@@ -305,8 +305,8 @@ static void ieee80211_mesh_path_timer(unsigned long data)

static void ieee80211_mesh_path_root_timer(unsigned long data)
{
- struct ieee80211_sub_if_data *sdata =
- (struct ieee80211_sub_if_data *) data;
+ struct mac80211_sub_if_data *sdata =
+ (struct mac80211_sub_if_data *) data;
struct mac80211_if_mesh *ifmsh = &sdata->u.mesh;
struct mac80211_local *local = sdata->local;

@@ -376,7 +376,7 @@ int ieee80211_fill_mesh_addresses(struct ieee80211_hdr *hdr, __le16 *fc,
* Return the header length.
*/
int ieee80211_new_mesh_header(struct ieee80211s_hdr *meshhdr,
- struct ieee80211_sub_if_data *sdata, char *addr4or5,
+ struct mac80211_sub_if_data *sdata, char *addr4or5,
char *addr6)
{
int aelen = 0;
@@ -398,7 +398,7 @@ int ieee80211_new_mesh_header(struct ieee80211s_hdr *meshhdr,
return 6 + aelen;
}

-static void ieee80211_mesh_housekeeping(struct ieee80211_sub_if_data *sdata,
+static void ieee80211_mesh_housekeeping(struct mac80211_sub_if_data *sdata,
struct mac80211_if_mesh *ifmsh)
{
bool free_plinks;
@@ -419,7 +419,7 @@ static void ieee80211_mesh_housekeeping(struct ieee80211_sub_if_data *sdata,
round_jiffies(jiffies + IEEE80211_MESH_HOUSEKEEPING_INTERVAL));
}

-static void ieee80211_mesh_rootpath(struct ieee80211_sub_if_data *sdata)
+static void ieee80211_mesh_rootpath(struct mac80211_sub_if_data *sdata)
{
struct mac80211_if_mesh *ifmsh = &sdata->u.mesh;

@@ -429,7 +429,7 @@ static void ieee80211_mesh_rootpath(struct ieee80211_sub_if_data *sdata)
}

#ifdef CONFIG_PM
-void ieee80211_mesh_quiesce(struct ieee80211_sub_if_data *sdata)
+void ieee80211_mesh_quiesce(struct mac80211_sub_if_data *sdata)
{
struct mac80211_if_mesh *ifmsh = &sdata->u.mesh;

@@ -443,7 +443,7 @@ void ieee80211_mesh_quiesce(struct ieee80211_sub_if_data *sdata)
set_bit(TMR_RUNNING_MPR, &ifmsh->timers_running);
}

-void ieee80211_mesh_restart(struct ieee80211_sub_if_data *sdata)
+void ieee80211_mesh_restart(struct mac80211_sub_if_data *sdata)
{
struct mac80211_if_mesh *ifmsh = &sdata->u.mesh;

@@ -457,7 +457,7 @@ void ieee80211_mesh_restart(struct ieee80211_sub_if_data *sdata)
}
#endif

-void ieee80211_start_mesh(struct ieee80211_sub_if_data *sdata)
+void ieee80211_start_mesh(struct mac80211_sub_if_data *sdata)
{
struct mac80211_if_mesh *ifmsh = &sdata->u.mesh;
struct mac80211_local *local = sdata->local;
@@ -479,7 +479,7 @@ void ieee80211_start_mesh(struct ieee80211_sub_if_data *sdata)
BSS_CHANGED_BEACON_INT);
}

-void ieee80211_stop_mesh(struct ieee80211_sub_if_data *sdata)
+void ieee80211_stop_mesh(struct mac80211_sub_if_data *sdata)
{
struct mac80211_local *local = sdata->local;
struct mac80211_if_mesh *ifmsh = &sdata->u.mesh;
@@ -504,7 +504,7 @@ void ieee80211_stop_mesh(struct ieee80211_sub_if_data *sdata)
ieee80211_configure_filter(local);
}

-static void ieee80211_mesh_rx_bcn_presp(struct ieee80211_sub_if_data *sdata,
+static void ieee80211_mesh_rx_bcn_presp(struct mac80211_sub_if_data *sdata,
u16 stype,
struct ieee80211_mgmt *mgmt,
size_t len,
@@ -551,7 +551,7 @@ static void ieee80211_mesh_rx_bcn_presp(struct ieee80211_sub_if_data *sdata,
}
}

-static void ieee80211_mesh_rx_mgmt_action(struct ieee80211_sub_if_data *sdata,
+static void ieee80211_mesh_rx_mgmt_action(struct mac80211_sub_if_data *sdata,
struct ieee80211_mgmt *mgmt,
size_t len,
struct ieee80211_rx_status *rx_status)
@@ -566,7 +566,7 @@ static void ieee80211_mesh_rx_mgmt_action(struct ieee80211_sub_if_data *sdata,
}
}

-void ieee80211_mesh_rx_queued_mgmt(struct ieee80211_sub_if_data *sdata,
+void ieee80211_mesh_rx_queued_mgmt(struct mac80211_sub_if_data *sdata,
struct sk_buff *skb)
{
struct ieee80211_rx_status *rx_status;
@@ -589,7 +589,7 @@ void ieee80211_mesh_rx_queued_mgmt(struct ieee80211_sub_if_data *sdata,
}
}

-void ieee80211_mesh_work(struct ieee80211_sub_if_data *sdata)
+void ieee80211_mesh_work(struct mac80211_sub_if_data *sdata)
{
struct mac80211_if_mesh *ifmsh = &sdata->u.mesh;

@@ -613,7 +613,7 @@ void ieee80211_mesh_work(struct ieee80211_sub_if_data *sdata)

void ieee80211_mesh_notify_scan_completed(struct mac80211_local *local)
{
- struct ieee80211_sub_if_data *sdata;
+ struct mac80211_sub_if_data *sdata;

rcu_read_lock();
list_for_each_entry_rcu(sdata, &local->interfaces, list)
@@ -622,7 +622,7 @@ void ieee80211_mesh_notify_scan_completed(struct mac80211_local *local)
rcu_read_unlock();
}

-void ieee80211_mesh_init_sdata(struct ieee80211_sub_if_data *sdata)
+void ieee80211_mesh_init_sdata(struct mac80211_sub_if_data *sdata)
{
struct mac80211_if_mesh *ifmsh = &sdata->u.mesh;

diff --git a/net/mac80211/mesh.h b/net/mac80211/mesh.h
index db38d57..6be0fd1 100644
--- a/net/mac80211/mesh.h
+++ b/net/mac80211/mesh.h
@@ -91,7 +91,7 @@ enum mesh_deferred_task_flags {
struct mesh_path {
u8 dst[ETH_ALEN];
u8 mpp[ETH_ALEN]; /* used for MPP or MAP */
- struct ieee80211_sub_if_data *sdata;
+ struct mac80211_sub_if_data *sdata;
struct sta_info __rcu *next_hop;
struct timer_list timer;
struct sk_buff_head frame_queue;
@@ -190,54 +190,54 @@ struct mesh_rmc {
int ieee80211_fill_mesh_addresses(struct ieee80211_hdr *hdr, __le16 *fc,
const u8 *da, const u8 *sa);
int ieee80211_new_mesh_header(struct ieee80211s_hdr *meshhdr,
- struct ieee80211_sub_if_data *sdata, char *addr4or5,
+ struct mac80211_sub_if_data *sdata, char *addr4or5,
char *addr6);
int mesh_rmc_check(u8 *addr, struct ieee80211s_hdr *mesh_hdr,
- struct ieee80211_sub_if_data *sdata);
+ struct mac80211_sub_if_data *sdata);
bool mesh_matches_local(struct ieee802_11_elems *ie,
- struct ieee80211_sub_if_data *sdata);
+ struct mac80211_sub_if_data *sdata);
void mesh_ids_set_default(struct mac80211_if_mesh *mesh);
void mesh_mgmt_ies_add(struct sk_buff *skb,
- struct ieee80211_sub_if_data *sdata);
-void mesh_rmc_free(struct ieee80211_sub_if_data *sdata);
-int mesh_rmc_init(struct ieee80211_sub_if_data *sdata);
+ struct mac80211_sub_if_data *sdata);
+void mesh_rmc_free(struct mac80211_sub_if_data *sdata);
+int mesh_rmc_init(struct mac80211_sub_if_data *sdata);
void ieee80211s_init(void);
void ieee80211s_update_metric(struct mac80211_local *local,
struct sta_info *stainfo, struct sk_buff *skb);
void ieee80211s_stop(void);
-void ieee80211_mesh_init_sdata(struct ieee80211_sub_if_data *sdata);
-void ieee80211_start_mesh(struct ieee80211_sub_if_data *sdata);
-void ieee80211_stop_mesh(struct ieee80211_sub_if_data *sdata);
+void ieee80211_mesh_init_sdata(struct mac80211_sub_if_data *sdata);
+void ieee80211_start_mesh(struct mac80211_sub_if_data *sdata);
+void ieee80211_stop_mesh(struct mac80211_sub_if_data *sdata);
void ieee80211_mesh_root_setup(struct mac80211_if_mesh *ifmsh);

/* Mesh paths */
int mesh_nexthop_lookup(struct sk_buff *skb,
- struct ieee80211_sub_if_data *sdata);
-void mesh_path_start_discovery(struct ieee80211_sub_if_data *sdata);
+ struct mac80211_sub_if_data *sdata);
+void mesh_path_start_discovery(struct mac80211_sub_if_data *sdata);
struct mesh_path *mesh_path_lookup(u8 *dst,
- struct ieee80211_sub_if_data *sdata);
+ struct mac80211_sub_if_data *sdata);
struct mesh_path *mpp_path_lookup(u8 *dst,
- struct ieee80211_sub_if_data *sdata);
-int mpp_path_add(u8 *dst, u8 *mpp, struct ieee80211_sub_if_data *sdata);
+ struct mac80211_sub_if_data *sdata);
+int mpp_path_add(u8 *dst, u8 *mpp, struct mac80211_sub_if_data *sdata);
struct mesh_path *mesh_path_lookup_by_idx(int idx,
- struct ieee80211_sub_if_data *sdata);
+ struct mac80211_sub_if_data *sdata);
void mesh_path_fix_nexthop(struct mesh_path *mpath, struct sta_info *next_hop);
-void mesh_path_expire(struct ieee80211_sub_if_data *sdata);
-void mesh_path_flush(struct ieee80211_sub_if_data *sdata);
-void mesh_rx_path_sel_frame(struct ieee80211_sub_if_data *sdata,
+void mesh_path_expire(struct mac80211_sub_if_data *sdata);
+void mesh_path_flush(struct mac80211_sub_if_data *sdata);
+void mesh_rx_path_sel_frame(struct mac80211_sub_if_data *sdata,
struct ieee80211_mgmt *mgmt, size_t len);
-int mesh_path_add(u8 *dst, struct ieee80211_sub_if_data *sdata);
+int mesh_path_add(u8 *dst, struct mac80211_sub_if_data *sdata);
/* Mesh plinks */
void mesh_neighbour_update(u8 *hw_addr, u32 rates,
- struct ieee80211_sub_if_data *sdata,
+ struct mac80211_sub_if_data *sdata,
struct ieee802_11_elems *ie);
bool mesh_peer_accepts_plinks(struct ieee802_11_elems *ie);
-void mesh_accept_plinks_update(struct ieee80211_sub_if_data *sdata);
+void mesh_accept_plinks_update(struct mac80211_sub_if_data *sdata);
void mesh_plink_broken(struct sta_info *sta);
void mesh_plink_deactivate(struct sta_info *sta);
int mesh_plink_open(struct sta_info *sta);
void mesh_plink_block(struct sta_info *sta);
-void mesh_rx_plink_frame(struct ieee80211_sub_if_data *sdata,
+void mesh_rx_plink_frame(struct mac80211_sub_if_data *sdata,
struct ieee80211_mgmt *mgmt, size_t len,
struct ieee80211_rx_status *rx_status);

@@ -247,33 +247,33 @@ void mesh_mpath_table_grow(void);
void mesh_mpp_table_grow(void);
/* Mesh paths */
int mesh_path_error_tx(u8 ttl, u8 *target, __le32 target_sn, __le16 target_rcode,
- const u8 *ra, struct ieee80211_sub_if_data *sdata);
+ const u8 *ra, struct mac80211_sub_if_data *sdata);
void mesh_path_assign_nexthop(struct mesh_path *mpath, struct sta_info *sta);
void mesh_path_flush_pending(struct mesh_path *mpath);
void mesh_path_tx_pending(struct mesh_path *mpath);
int mesh_pathtbl_init(void);
void mesh_pathtbl_unregister(void);
-int mesh_path_del(u8 *addr, struct ieee80211_sub_if_data *sdata);
+int mesh_path_del(u8 *addr, struct mac80211_sub_if_data *sdata);
void mesh_path_timer(unsigned long data);
void mesh_path_flush_by_nexthop(struct sta_info *sta);
void mesh_path_discard_frame(struct sk_buff *skb,
- struct ieee80211_sub_if_data *sdata);
-void mesh_path_quiesce(struct ieee80211_sub_if_data *sdata);
-void mesh_path_restart(struct ieee80211_sub_if_data *sdata);
-void mesh_path_tx_root_frame(struct ieee80211_sub_if_data *sdata);
+ struct mac80211_sub_if_data *sdata);
+void mesh_path_quiesce(struct mac80211_sub_if_data *sdata);
+void mesh_path_restart(struct mac80211_sub_if_data *sdata);
+void mesh_path_tx_root_frame(struct mac80211_sub_if_data *sdata);

extern int mesh_paths_generation;

#ifdef CONFIG_MAC80211_MESH
extern int mesh_allocated;

-static inline int mesh_plink_free_count(struct ieee80211_sub_if_data *sdata)
+static inline int mesh_plink_free_count(struct mac80211_sub_if_data *sdata)
{
return sdata->u.mesh.mshcfg.dot11MeshMaxPeerLinks -
atomic_read(&sdata->u.mesh.mshstats.estab_plinks);
}

-static inline bool mesh_plink_availables(struct ieee80211_sub_if_data *sdata)
+static inline bool mesh_plink_availables(struct mac80211_sub_if_data *sdata)
{
return (min_t(long, mesh_plink_free_count(sdata),
MESH_MAX_PLINKS - sdata->local->num_sta)) > 0;
@@ -284,28 +284,28 @@ static inline void mesh_path_activate(struct mesh_path *mpath)
mpath->flags |= MESH_PATH_ACTIVE | MESH_PATH_RESOLVED;
}

-static inline bool mesh_path_sel_is_hwmp(struct ieee80211_sub_if_data *sdata)
+static inline bool mesh_path_sel_is_hwmp(struct mac80211_sub_if_data *sdata)
{
return sdata->u.mesh.mesh_pp_id == IEEE80211_PATH_PROTOCOL_HWMP;
}

void ieee80211_mesh_notify_scan_completed(struct mac80211_local *local);

-void ieee80211_mesh_quiesce(struct ieee80211_sub_if_data *sdata);
-void ieee80211_mesh_restart(struct ieee80211_sub_if_data *sdata);
+void ieee80211_mesh_quiesce(struct mac80211_sub_if_data *sdata);
+void ieee80211_mesh_restart(struct mac80211_sub_if_data *sdata);
void mesh_plink_quiesce(struct sta_info *sta);
void mesh_plink_restart(struct sta_info *sta);
#else
#define mesh_allocated 0
static inline void
ieee80211_mesh_notify_scan_completed(struct mac80211_local *local) {}
-static inline void ieee80211_mesh_quiesce(struct ieee80211_sub_if_data *sdata)
+static inline void ieee80211_mesh_quiesce(struct mac80211_sub_if_data *sdata)
{}
-static inline void ieee80211_mesh_restart(struct ieee80211_sub_if_data *sdata)
+static inline void ieee80211_mesh_restart(struct mac80211_sub_if_data *sdata)
{}
static inline void mesh_plink_quiesce(struct sta_info *sta) {}
static inline void mesh_plink_restart(struct sta_info *sta) {}
-static inline bool mesh_path_sel_is_hwmp(struct ieee80211_sub_if_data *sdata)
+static inline bool mesh_path_sel_is_hwmp(struct mac80211_sub_if_data *sdata)
{ return false; }
#endif

diff --git a/net/mac80211/mesh_hwmp.c b/net/mac80211/mesh_hwmp.c
index 4eca250..017ec80 100644
--- a/net/mac80211/mesh_hwmp.c
+++ b/net/mac80211/mesh_hwmp.c
@@ -108,7 +108,7 @@ static int mesh_path_sel_frame_tx(enum mpath_frame_type action, u8 flags,
u8 *orig_addr, __le32 orig_sn, u8 target_flags, u8 *target,
__le32 target_sn, const u8 *da, u8 hop_count, u8 ttl,
__le32 lifetime, __le32 metric, __le32 preq_id,
- struct ieee80211_sub_if_data *sdata)
+ struct mac80211_sub_if_data *sdata)
{
struct mac80211_local *local = sdata->local;
struct sk_buff *skb = dev_alloc_skb(local->hw.extra_tx_headroom + 400);
@@ -202,7 +202,7 @@ static int mesh_path_sel_frame_tx(enum mpath_frame_type action, u8 flags,
*/
int mesh_path_error_tx(u8 ttl, u8 *target, __le32 target_sn,
__le16 target_rcode, const u8 *ra,
- struct ieee80211_sub_if_data *sdata)
+ struct mac80211_sub_if_data *sdata)
{
struct mac80211_local *local = sdata->local;
struct sk_buff *skb = dev_alloc_skb(local->hw.extra_tx_headroom + 400);
@@ -321,7 +321,7 @@ static u32 airtime_link_metric_get(struct mac80211_local *local,
* Notes: this function is the only place (besides user-provided info) where
* path routing information is updated.
*/
-static u32 hwmp_route_info_get(struct ieee80211_sub_if_data *sdata,
+static u32 hwmp_route_info_get(struct mac80211_sub_if_data *sdata,
struct ieee80211_mgmt *mgmt,
u8 *hwmp_ie, enum mpath_frame_type action)
{
@@ -465,7 +465,7 @@ static u32 hwmp_route_info_get(struct ieee80211_sub_if_data *sdata,
return process ? new_metric : 0;
}

-static void hwmp_preq_frame_process(struct ieee80211_sub_if_data *sdata,
+static void hwmp_preq_frame_process(struct mac80211_sub_if_data *sdata,
struct ieee80211_mgmt *mgmt,
u8 *preq_elem, u32 metric)
{
@@ -568,7 +568,7 @@ next_hop_deref_protected(struct mesh_path *mpath)
}


-static void hwmp_prep_frame_process(struct ieee80211_sub_if_data *sdata,
+static void hwmp_prep_frame_process(struct mac80211_sub_if_data *sdata,
struct ieee80211_mgmt *mgmt,
u8 *prep_elem, u32 metric)
{
@@ -633,7 +633,7 @@ fail:
sdata->u.mesh.mshstats.dropped_frames_no_route++;
}

-static void hwmp_perr_frame_process(struct ieee80211_sub_if_data *sdata,
+static void hwmp_perr_frame_process(struct mac80211_sub_if_data *sdata,
struct ieee80211_mgmt *mgmt, u8 *perr_elem)
{
struct mac80211_if_mesh *ifmsh = &sdata->u.mesh;
@@ -675,7 +675,7 @@ static void hwmp_perr_frame_process(struct ieee80211_sub_if_data *sdata,
rcu_read_unlock();
}

-static void hwmp_rann_frame_process(struct ieee80211_sub_if_data *sdata,
+static void hwmp_rann_frame_process(struct mac80211_sub_if_data *sdata,
struct ieee80211_mgmt *mgmt,
struct ieee80211_rann_ie *rann)
{
@@ -725,7 +725,7 @@ static void hwmp_rann_frame_process(struct ieee80211_sub_if_data *sdata,
}


-void mesh_rx_path_sel_frame(struct ieee80211_sub_if_data *sdata,
+void mesh_rx_path_sel_frame(struct mac80211_sub_if_data *sdata,
struct ieee80211_mgmt *mgmt,
size_t len)
{
@@ -782,7 +782,7 @@ void mesh_rx_path_sel_frame(struct ieee80211_sub_if_data *sdata,
*/
static void mesh_queue_preq(struct mesh_path *mpath, u8 flags)
{
- struct ieee80211_sub_if_data *sdata = mpath->sdata;
+ struct mac80211_sub_if_data *sdata = mpath->sdata;
struct mac80211_if_mesh *ifmsh = &sdata->u.mesh;
struct mesh_preq_queue *preq_node;

@@ -827,7 +827,7 @@ static void mesh_queue_preq(struct mesh_path *mpath, u8 flags)
*
* @sdata: local mesh subif
*/
-void mesh_path_start_discovery(struct ieee80211_sub_if_data *sdata)
+void mesh_path_start_discovery(struct mac80211_sub_if_data *sdata)
{
struct mac80211_if_mesh *ifmsh = &sdata->u.mesh;
struct mesh_preq_queue *preq_node;
@@ -918,7 +918,7 @@ enddiscovery:
* in this case.
*/
int mesh_nexthop_lookup(struct sk_buff *skb,
- struct ieee80211_sub_if_data *sdata)
+ struct mac80211_sub_if_data *sdata)
{
struct sk_buff *skb_to_free = NULL;
struct mesh_path *mpath;
@@ -981,7 +981,7 @@ endlookup:
void mesh_path_timer(unsigned long data)
{
struct mesh_path *mpath = (void *) data;
- struct ieee80211_sub_if_data *sdata = mpath->sdata;
+ struct mac80211_sub_if_data *sdata = mpath->sdata;

if (sdata->local->quiescing)
return;
@@ -1004,7 +1004,7 @@ void mesh_path_timer(unsigned long data)
}

void
-mesh_path_tx_root_frame(struct ieee80211_sub_if_data *sdata)
+mesh_path_tx_root_frame(struct mac80211_sub_if_data *sdata)
{
struct mac80211_if_mesh *ifmsh = &sdata->u.mesh;

diff --git a/net/mac80211/mesh_pathtbl.c b/net/mac80211/mesh_pathtbl.c
index c52b981..9b9140e 100644
--- a/net/mac80211/mesh_pathtbl.c
+++ b/net/mac80211/mesh_pathtbl.c
@@ -164,7 +164,7 @@ errcopy:
return -ENOMEM;
}

-static u32 mesh_table_hash(u8 *addr, struct ieee80211_sub_if_data *sdata,
+static u32 mesh_table_hash(u8 *addr, struct mac80211_sub_if_data *sdata,
struct mesh_table *tbl)
{
/* Use last four bytes of hw addr and interface index as hash index */
@@ -215,7 +215,7 @@ void mesh_path_assign_nexthop(struct mesh_path *mpath, struct sta_info *sta)
*
* Locking: must be called within a read rcu section.
*/
-struct mesh_path *mesh_path_lookup(u8 *dst, struct ieee80211_sub_if_data *sdata)
+struct mesh_path *mesh_path_lookup(u8 *dst, struct mac80211_sub_if_data *sdata)
{
struct mesh_path *mpath;
struct hlist_node *n;
@@ -242,7 +242,7 @@ struct mesh_path *mesh_path_lookup(u8 *dst, struct ieee80211_sub_if_data *sdata)
return NULL;
}

-struct mesh_path *mpp_path_lookup(u8 *dst, struct ieee80211_sub_if_data *sdata)
+struct mesh_path *mpp_path_lookup(u8 *dst, struct mac80211_sub_if_data *sdata)
{
struct mesh_path *mpath;
struct hlist_node *n;
@@ -279,7 +279,7 @@ struct mesh_path *mpp_path_lookup(u8 *dst, struct ieee80211_sub_if_data *sdata)
*
* Locking: must be called within a read rcu section.
*/
-struct mesh_path *mesh_path_lookup_by_idx(int idx, struct ieee80211_sub_if_data *sdata)
+struct mesh_path *mesh_path_lookup_by_idx(int idx, struct mac80211_sub_if_data *sdata)
{
struct mesh_table *tbl = rcu_dereference(mesh_paths);
struct mpath_node *node;
@@ -313,7 +313,7 @@ struct mesh_path *mesh_path_lookup_by_idx(int idx, struct ieee80211_sub_if_data
*
* State: the initial state of the new path is set to 0
*/
-int mesh_path_add(u8 *dst, struct ieee80211_sub_if_data *sdata)
+int mesh_path_add(u8 *dst, struct mac80211_sub_if_data *sdata)
{
struct mac80211_if_mesh *ifmsh = &sdata->u.mesh;
struct mac80211_local *local = sdata->local;
@@ -445,7 +445,7 @@ void mesh_mpp_table_grow(void)
write_unlock_bh(&pathtbl_resize_lock);
}

-int mpp_path_add(u8 *dst, u8 *mpp, struct ieee80211_sub_if_data *sdata)
+int mpp_path_add(u8 *dst, u8 *mpp, struct mac80211_sub_if_data *sdata)
{
struct mac80211_if_mesh *ifmsh = &sdata->u.mesh;
struct mac80211_local *local = sdata->local;
@@ -537,7 +537,7 @@ void mesh_plink_broken(struct sta_info *sta)
struct mesh_path *mpath;
struct mpath_node *node;
struct hlist_node *p;
- struct ieee80211_sub_if_data *sdata = sta->sdata;
+ struct mac80211_sub_if_data *sdata = sta->sdata;
int i;

rcu_read_lock();
@@ -590,7 +590,7 @@ void mesh_path_flush_by_nexthop(struct sta_info *sta)
rcu_read_unlock();
}

-void mesh_path_flush(struct ieee80211_sub_if_data *sdata)
+void mesh_path_flush(struct mac80211_sub_if_data *sdata)
{
struct mesh_table *tbl;
struct mesh_path *mpath;
@@ -611,7 +611,7 @@ void mesh_path_flush(struct ieee80211_sub_if_data *sdata)
static void mesh_path_node_reclaim(struct rcu_head *rp)
{
struct mpath_node *node = container_of(rp, struct mpath_node, rcu);
- struct ieee80211_sub_if_data *sdata = node->mpath->sdata;
+ struct mac80211_sub_if_data *sdata = node->mpath->sdata;

del_timer_sync(&node->mpath->timer);
atomic_dec(&sdata->u.mesh.mpaths);
@@ -627,7 +627,7 @@ static void mesh_path_node_reclaim(struct rcu_head *rp)
*
* Returns: 0 if successful
*/
-int mesh_path_del(u8 *addr, struct ieee80211_sub_if_data *sdata)
+int mesh_path_del(u8 *addr, struct mac80211_sub_if_data *sdata)
{
struct mesh_table *tbl;
struct mesh_path *mpath;
@@ -694,7 +694,7 @@ void mesh_path_tx_pending(struct mesh_path *mpath)
* Locking: the function must me called within a rcu_read_lock region
*/
void mesh_path_discard_frame(struct sk_buff *skb,
- struct ieee80211_sub_if_data *sdata)
+ struct mac80211_sub_if_data *sdata)
{
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data;
struct mesh_path *mpath;
@@ -814,7 +814,7 @@ int mesh_pathtbl_init(void)
return 0;
}

-void mesh_path_expire(struct ieee80211_sub_if_data *sdata)
+void mesh_path_expire(struct mac80211_sub_if_data *sdata)
{
struct mesh_table *tbl;
struct mesh_path *mpath;
diff --git a/net/mac80211/mesh_plink.c b/net/mac80211/mesh_plink.c
index a4e2de0..4a40ada 100644
--- a/net/mac80211/mesh_plink.c
+++ b/net/mac80211/mesh_plink.c
@@ -61,14 +61,14 @@ enum plink_event {
};

static inline
-void mesh_plink_inc_estab_count(struct ieee80211_sub_if_data *sdata)
+void mesh_plink_inc_estab_count(struct mac80211_sub_if_data *sdata)
{
atomic_inc(&sdata->u.mesh.mshstats.estab_plinks);
mesh_accept_plinks_update(sdata);
}

static inline
-void mesh_plink_dec_estab_count(struct ieee80211_sub_if_data *sdata)
+void mesh_plink_dec_estab_count(struct mac80211_sub_if_data *sdata)
{
atomic_dec(&sdata->u.mesh.mshstats.estab_plinks);
mesh_accept_plinks_update(sdata);
@@ -92,7 +92,7 @@ static inline void mesh_plink_fsm_restart(struct sta_info *sta)
* NOTE: This is just an alias for sta_info_alloc(), see notes
* on it in the lifecycle management section!
*/
-static struct sta_info *mesh_plink_alloc(struct ieee80211_sub_if_data *sdata,
+static struct sta_info *mesh_plink_alloc(struct mac80211_sub_if_data *sdata,
u8 *hw_addr, u32 rates)
{
struct mac80211_local *local = sdata->local;
@@ -123,7 +123,7 @@ static struct sta_info *mesh_plink_alloc(struct ieee80211_sub_if_data *sdata,
*/
static bool __mesh_plink_deactivate(struct sta_info *sta)
{
- struct ieee80211_sub_if_data *sdata = sta->sdata;
+ struct mac80211_sub_if_data *sdata = sta->sdata;
bool deactivated = false;

if (sta->plink_state == NL80211_PLINK_ESTAB) {
@@ -145,7 +145,7 @@ static bool __mesh_plink_deactivate(struct sta_info *sta)
*/
void mesh_plink_deactivate(struct sta_info *sta)
{
- struct ieee80211_sub_if_data *sdata = sta->sdata;
+ struct mac80211_sub_if_data *sdata = sta->sdata;
bool deactivated;

spin_lock_bh(&sta->lock);
@@ -156,7 +156,7 @@ void mesh_plink_deactivate(struct sta_info *sta)
ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_BEACON);
}

-static int mesh_plink_frame_tx(struct ieee80211_sub_if_data *sdata,
+static int mesh_plink_frame_tx(struct mac80211_sub_if_data *sdata,
enum plink_frame_type action, u8 *da, __le16 llid, __le16 plid,
__le16 reason) {
struct mac80211_local *local = sdata->local;
@@ -238,7 +238,7 @@ static int mesh_plink_frame_tx(struct ieee80211_sub_if_data *sdata,
}

void mesh_neighbour_update(u8 *hw_addr, u32 rates,
- struct ieee80211_sub_if_data *sdata,
+ struct mac80211_sub_if_data *sdata,
struct ieee802_11_elems *elems)
{
struct mac80211_local *local = sdata->local;
@@ -280,7 +280,7 @@ static void mesh_plink_timer(unsigned long data)
{
struct sta_info *sta;
__le16 llid, plid, reason;
- struct ieee80211_sub_if_data *sdata;
+ struct mac80211_sub_if_data *sdata;

/*
* This STA is valid because sta_info_destroy() will
@@ -378,7 +378,7 @@ static inline void mesh_plink_timer_set(struct sta_info *sta, int timeout)
int mesh_plink_open(struct sta_info *sta)
{
__le16 llid;
- struct ieee80211_sub_if_data *sdata = sta->sdata;
+ struct mac80211_sub_if_data *sdata = sta->sdata;

if (!test_sta_flags(sta, WLAN_STA_AUTH))
return -EPERM;
@@ -402,7 +402,7 @@ int mesh_plink_open(struct sta_info *sta)

void mesh_plink_block(struct sta_info *sta)
{
- struct ieee80211_sub_if_data *sdata = sta->sdata;
+ struct mac80211_sub_if_data *sdata = sta->sdata;
bool deactivated;

spin_lock_bh(&sta->lock);
@@ -415,7 +415,7 @@ void mesh_plink_block(struct sta_info *sta)
}


-void mesh_rx_plink_frame(struct ieee80211_sub_if_data *sdata, struct ieee80211_mgmt *mgmt,
+void mesh_rx_plink_frame(struct mac80211_sub_if_data *sdata, struct ieee80211_mgmt *mgmt,
size_t len, struct ieee80211_rx_status *rx_status)
{
struct mac80211_local *local = sdata->local;
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 527bd26..06182b5 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -123,7 +123,7 @@ static void run_again(struct mac80211_if_managed *ifmgd,
mod_timer(&ifmgd->timer, timeout);
}

-void ieee80211_sta_reset_beacon_monitor(struct ieee80211_sub_if_data *sdata)
+void ieee80211_sta_reset_beacon_monitor(struct mac80211_sub_if_data *sdata)
{
if (sdata->local->hw.flags & IEEE80211_HW_BEACON_FILTER)
return;
@@ -132,7 +132,7 @@ void ieee80211_sta_reset_beacon_monitor(struct ieee80211_sub_if_data *sdata)
round_jiffies_up(jiffies + sdata->u.mgd.beacon_timeout));
}

-void ieee80211_sta_reset_conn_monitor(struct ieee80211_sub_if_data *sdata)
+void ieee80211_sta_reset_conn_monitor(struct mac80211_sub_if_data *sdata)
{
struct mac80211_if_managed *ifmgd = &sdata->u.mgd;

@@ -158,7 +158,7 @@ static int ecw2cw(int ecw)
* has been determined as ht configuration depends on the hw's
* HT abilities for a specific band.
*/
-static u32 ieee80211_enable_ht(struct ieee80211_sub_if_data *sdata,
+static u32 ieee80211_enable_ht(struct mac80211_sub_if_data *sdata,
struct ieee80211_ht_info *hti,
const u8 *bssid, u16 ap_ht_cap_flags)
{
@@ -267,7 +267,7 @@ static u32 ieee80211_enable_ht(struct ieee80211_sub_if_data *sdata,

/* frame sending functions */

-static void ieee80211_send_deauth_disassoc(struct ieee80211_sub_if_data *sdata,
+static void ieee80211_send_deauth_disassoc(struct mac80211_sub_if_data *sdata,
const u8 *bssid, u16 stype, u16 reason,
void *cookie, bool send_frame)
{
@@ -314,7 +314,7 @@ static void ieee80211_send_deauth_disassoc(struct ieee80211_sub_if_data *sdata,
}

void ieee80211_send_pspoll(struct mac80211_local *local,
- struct ieee80211_sub_if_data *sdata)
+ struct mac80211_sub_if_data *sdata)
{
struct ieee80211_pspoll *pspoll;
struct sk_buff *skb;
@@ -331,7 +331,7 @@ void ieee80211_send_pspoll(struct mac80211_local *local,
}

void ieee80211_send_nullfunc(struct mac80211_local *local,
- struct ieee80211_sub_if_data *sdata,
+ struct mac80211_sub_if_data *sdata,
int powersave)
{
struct sk_buff *skb;
@@ -350,7 +350,7 @@ void ieee80211_send_nullfunc(struct mac80211_local *local,
}

static void ieee80211_send_4addr_nullfunc(struct mac80211_local *local,
- struct ieee80211_sub_if_data *sdata)
+ struct mac80211_sub_if_data *sdata)
{
struct sk_buff *skb;
struct ieee80211_hdr *nullfunc;
@@ -384,8 +384,8 @@ static void ieee80211_send_4addr_nullfunc(struct mac80211_local *local,
/* spectrum management related things */
static void ieee80211_chswitch_work(struct work_struct *work)
{
- struct ieee80211_sub_if_data *sdata =
- container_of(work, struct ieee80211_sub_if_data, u.mgd.chswitch_work);
+ struct mac80211_sub_if_data *sdata =
+ container_of(work, struct mac80211_sub_if_data, u.mgd.chswitch_work);
struct mac80211_if_managed *ifmgd = &sdata->u.mgd;

if (!ieee80211_sdata_running(sdata))
@@ -414,7 +414,7 @@ static void ieee80211_chswitch_work(struct work_struct *work)

void ieee80211_chswitch_done(struct ieee80211_vif *vif, bool success)
{
- struct ieee80211_sub_if_data *sdata;
+ struct mac80211_sub_if_data *sdata;
struct mac80211_if_managed *ifmgd;

sdata = vif_to_sdata(vif);
@@ -437,8 +437,8 @@ EXPORT_SYMBOL(ieee80211_chswitch_done);

static void ieee80211_chswitch_timer(unsigned long data)
{
- struct ieee80211_sub_if_data *sdata =
- (struct ieee80211_sub_if_data *) data;
+ struct mac80211_sub_if_data *sdata =
+ (struct mac80211_sub_if_data *) data;
struct mac80211_if_managed *ifmgd = &sdata->u.mgd;

if (sdata->local->quiescing) {
@@ -449,7 +449,7 @@ static void ieee80211_chswitch_timer(unsigned long data)
ieee80211_queue_work(&sdata->local->hw, &ifmgd->chswitch_work);
}

-void ieee80211_sta_process_chanswitch(struct ieee80211_sub_if_data *sdata,
+void ieee80211_sta_process_chanswitch(struct mac80211_sub_if_data *sdata,
struct ieee80211_channel_sw_ie *sw_elem,
struct mac80211_bss *bss,
u64 timestamp)
@@ -513,7 +513,7 @@ void ieee80211_sta_process_chanswitch(struct ieee80211_sub_if_data *sdata,
}
}

-static void ieee80211_handle_pwr_constr(struct ieee80211_sub_if_data *sdata,
+static void ieee80211_handle_pwr_constr(struct mac80211_sub_if_data *sdata,
u16 capab_info, u8 *pwr_constr_elem,
u8 pwr_constr_elem_len)
{
@@ -535,7 +535,7 @@ static void ieee80211_handle_pwr_constr(struct ieee80211_sub_if_data *sdata,

void ieee80211_enable_dyn_ps(struct ieee80211_vif *vif)
{
- struct ieee80211_sub_if_data *sdata = vif_to_sdata(vif);
+ struct mac80211_sub_if_data *sdata = vif_to_sdata(vif);
struct mac80211_local *local = sdata->local;
struct ieee80211_conf *conf = &local->hw.conf;

@@ -550,7 +550,7 @@ EXPORT_SYMBOL(ieee80211_enable_dyn_ps);

void ieee80211_disable_dyn_ps(struct ieee80211_vif *vif)
{
- struct ieee80211_sub_if_data *sdata = vif_to_sdata(vif);
+ struct mac80211_sub_if_data *sdata = vif_to_sdata(vif);
struct mac80211_local *local = sdata->local;
struct ieee80211_conf *conf = &local->hw.conf;

@@ -568,7 +568,7 @@ EXPORT_SYMBOL(ieee80211_disable_dyn_ps);

/* powersave */
static void ieee80211_enable_ps(struct mac80211_local *local,
- struct ieee80211_sub_if_data *sdata)
+ struct mac80211_sub_if_data *sdata)
{
struct ieee80211_conf *conf = &local->hw.conf;

@@ -610,7 +610,7 @@ static void ieee80211_change_ps(struct mac80211_local *local)
}
}

-static bool ieee80211_powersave_allowed(struct ieee80211_sub_if_data *sdata)
+static bool ieee80211_powersave_allowed(struct mac80211_sub_if_data *sdata)
{
struct mac80211_if_managed *mgd = &sdata->u.mgd;
struct sta_info *sta = NULL;
@@ -644,7 +644,7 @@ static bool ieee80211_powersave_allowed(struct ieee80211_sub_if_data *sdata)
/* need to hold RTNL or interface lock */
void ieee80211_recalc_ps(struct mac80211_local *local, s32 latency)
{
- struct ieee80211_sub_if_data *sdata, *found = NULL;
+ struct mac80211_sub_if_data *sdata, *found = NULL;
int count = 0;
int timeout;

@@ -754,7 +754,7 @@ void ieee80211_dynamic_ps_enable_work(struct work_struct *work)
struct mac80211_local *local =
container_of(work, struct mac80211_local,
dynamic_ps_enable_work);
- struct ieee80211_sub_if_data *sdata = local->ps_sdata;
+ struct mac80211_sub_if_data *sdata = local->ps_sdata;
struct mac80211_if_managed *ifmgd = &sdata->u.mgd;
unsigned long flags;
int q;
@@ -822,7 +822,7 @@ void ieee80211_dynamic_ps_timer(unsigned long data)

/* MLME */
static void ieee80211_sta_wmm_params(struct mac80211_local *local,
- struct ieee80211_sub_if_data *sdata,
+ struct mac80211_sub_if_data *sdata,
u8 *wmm_param, size_t wmm_param_len)
{
struct ieee80211_tx_queue_params params;
@@ -920,7 +920,7 @@ static void ieee80211_sta_wmm_params(struct mac80211_local *local,
ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_QOS);
}

-static u32 ieee80211_handle_bss_capability(struct ieee80211_sub_if_data *sdata,
+static u32 ieee80211_handle_bss_capability(struct mac80211_sub_if_data *sdata,
u16 capab, bool erp_valid, u8 erp)
{
struct ieee80211_bss_conf *bss_conf = &sdata->vif.bss_conf;
@@ -959,7 +959,7 @@ static u32 ieee80211_handle_bss_capability(struct ieee80211_sub_if_data *sdata,
return changed;
}

-static void ieee80211_set_associated(struct ieee80211_sub_if_data *sdata,
+static void ieee80211_set_associated(struct mac80211_sub_if_data *sdata,
struct cfg80211_bss *cbss,
u32 bss_info_changed)
{
@@ -1028,7 +1028,7 @@ static void ieee80211_set_associated(struct ieee80211_sub_if_data *sdata,
netif_carrier_on(sdata->dev);
}

-static void ieee80211_set_disassoc(struct ieee80211_sub_if_data *sdata,
+static void ieee80211_set_disassoc(struct mac80211_sub_if_data *sdata,
bool remove_sta, bool tx)
{
struct mac80211_if_managed *ifmgd = &sdata->u.mgd;
@@ -1118,7 +1118,7 @@ static void ieee80211_set_disassoc(struct ieee80211_sub_if_data *sdata,
del_timer_sync(&sdata->u.mgd.chswitch_timer);
}

-void ieee80211_sta_rx_notify(struct ieee80211_sub_if_data *sdata,
+void ieee80211_sta_rx_notify(struct mac80211_sub_if_data *sdata,
struct ieee80211_hdr *hdr)
{
/*
@@ -1135,7 +1135,7 @@ void ieee80211_sta_rx_notify(struct ieee80211_sub_if_data *sdata,
ieee80211_sta_reset_conn_monitor(sdata);
}

-static void ieee80211_reset_ap_probe(struct ieee80211_sub_if_data *sdata)
+static void ieee80211_reset_ap_probe(struct mac80211_sub_if_data *sdata)
{
struct mac80211_if_managed *ifmgd = &sdata->u.mgd;

@@ -1164,7 +1164,7 @@ static void ieee80211_reset_ap_probe(struct ieee80211_sub_if_data *sdata)
IEEE80211_CONNECTION_IDLE_TIME));
}

-void ieee80211_sta_tx_notify(struct ieee80211_sub_if_data *sdata,
+void ieee80211_sta_tx_notify(struct mac80211_sub_if_data *sdata,
struct ieee80211_hdr *hdr, bool ack)
{
if (!ieee80211_is_data(hdr->frame_control))
@@ -1183,7 +1183,7 @@ void ieee80211_sta_tx_notify(struct ieee80211_sub_if_data *sdata,
}
}

-static void ieee80211_mgd_probe_ap_send(struct ieee80211_sub_if_data *sdata)
+static void ieee80211_mgd_probe_ap_send(struct mac80211_sub_if_data *sdata)
{
struct mac80211_if_managed *ifmgd = &sdata->u.mgd;
const u8 *ssid;
@@ -1218,7 +1218,7 @@ static void ieee80211_mgd_probe_ap_send(struct ieee80211_sub_if_data *sdata)
run_again(ifmgd, ifmgd->probe_timeout);
}

-static void ieee80211_mgd_probe_ap(struct ieee80211_sub_if_data *sdata,
+static void ieee80211_mgd_probe_ap(struct mac80211_sub_if_data *sdata,
bool beacon)
{
struct mac80211_if_managed *ifmgd = &sdata->u.mgd;
@@ -1280,7 +1280,7 @@ static void ieee80211_mgd_probe_ap(struct ieee80211_sub_if_data *sdata,
struct sk_buff *ieee80211_ap_probereq_get(struct ieee80211_hw *hw,
struct ieee80211_vif *vif)
{
- struct ieee80211_sub_if_data *sdata = vif_to_sdata(vif);
+ struct mac80211_sub_if_data *sdata = vif_to_sdata(vif);
struct mac80211_if_managed *ifmgd = &sdata->u.mgd;
struct sk_buff *skb;
const u8 *ssid;
@@ -1301,7 +1301,7 @@ struct sk_buff *ieee80211_ap_probereq_get(struct ieee80211_hw *hw,
}
EXPORT_SYMBOL(ieee80211_ap_probereq_get);

-static void __ieee80211_connection_loss(struct ieee80211_sub_if_data *sdata)
+static void __ieee80211_connection_loss(struct mac80211_sub_if_data *sdata)
{
struct mac80211_if_managed *ifmgd = &sdata->u.mgd;
struct mac80211_local *local = sdata->local;
@@ -1336,8 +1336,8 @@ static void __ieee80211_connection_loss(struct ieee80211_sub_if_data *sdata)

void ieee80211_beacon_connection_loss_work(struct work_struct *work)
{
- struct ieee80211_sub_if_data *sdata =
- container_of(work, struct ieee80211_sub_if_data,
+ struct mac80211_sub_if_data *sdata =
+ container_of(work, struct mac80211_sub_if_data,
u.mgd.beacon_connection_loss_work);

if (sdata->local->hw.flags & IEEE80211_HW_CONNECTION_MONITOR)
@@ -1348,7 +1348,7 @@ void ieee80211_beacon_connection_loss_work(struct work_struct *work)

void ieee80211_beacon_loss(struct ieee80211_vif *vif)
{
- struct ieee80211_sub_if_data *sdata = vif_to_sdata(vif);
+ struct mac80211_sub_if_data *sdata = vif_to_sdata(vif);
struct ieee80211_hw *hw = &sdata->local->hw;

trace_api_beacon_loss(sdata);
@@ -1360,7 +1360,7 @@ EXPORT_SYMBOL(ieee80211_beacon_loss);

void ieee80211_connection_loss(struct ieee80211_vif *vif)
{
- struct ieee80211_sub_if_data *sdata = vif_to_sdata(vif);
+ struct mac80211_sub_if_data *sdata = vif_to_sdata(vif);
struct ieee80211_hw *hw = &sdata->local->hw;

trace_api_connection_loss(sdata);
@@ -1372,7 +1372,7 @@ EXPORT_SYMBOL(ieee80211_connection_loss);


static enum rx_mgmt_action __must_check
-ieee80211_rx_mgmt_deauth(struct ieee80211_sub_if_data *sdata,
+ieee80211_rx_mgmt_deauth(struct mac80211_sub_if_data *sdata,
struct ieee80211_mgmt *mgmt, size_t len)
{
struct mac80211_if_managed *ifmgd = &sdata->u.mgd;
@@ -1401,7 +1401,7 @@ ieee80211_rx_mgmt_deauth(struct ieee80211_sub_if_data *sdata,


static enum rx_mgmt_action __must_check
-ieee80211_rx_mgmt_disassoc(struct ieee80211_sub_if_data *sdata,
+ieee80211_rx_mgmt_disassoc(struct mac80211_sub_if_data *sdata,
struct ieee80211_mgmt *mgmt, size_t len)
{
struct mac80211_if_managed *ifmgd = &sdata->u.mgd;
@@ -1434,7 +1434,7 @@ ieee80211_rx_mgmt_disassoc(struct ieee80211_sub_if_data *sdata,
static bool ieee80211_assoc_success(struct mac80211_work *wk,
struct ieee80211_mgmt *mgmt, size_t len)
{
- struct ieee80211_sub_if_data *sdata = wk->sdata;
+ struct mac80211_sub_if_data *sdata = wk->sdata;
struct mac80211_if_managed *ifmgd = &sdata->u.mgd;
struct mac80211_local *local = sdata->local;
struct ieee80211_supported_band *sband;
@@ -1599,7 +1599,7 @@ static bool ieee80211_assoc_success(struct mac80211_work *wk,
}


-static void ieee80211_rx_bss_info(struct ieee80211_sub_if_data *sdata,
+static void ieee80211_rx_bss_info(struct mac80211_sub_if_data *sdata,
struct ieee80211_mgmt *mgmt,
size_t len,
struct ieee80211_rx_status *rx_status,
@@ -1654,7 +1654,7 @@ static void ieee80211_rx_bss_info(struct ieee80211_sub_if_data *sdata,
}


-static void ieee80211_rx_mgmt_probe_resp(struct ieee80211_sub_if_data *sdata,
+static void ieee80211_rx_mgmt_probe_resp(struct mac80211_sub_if_data *sdata,
struct sk_buff *skb)
{
struct ieee80211_mgmt *mgmt = (void *)skb->data;
@@ -1705,7 +1705,7 @@ static const u64 care_about_ies =
(1ULL << WLAN_EID_HT_CAPABILITY) |
(1ULL << WLAN_EID_HT_INFORMATION);

-static void ieee80211_rx_mgmt_beacon(struct ieee80211_sub_if_data *sdata,
+static void ieee80211_rx_mgmt_beacon(struct mac80211_sub_if_data *sdata,
struct ieee80211_mgmt *mgmt,
size_t len,
struct ieee80211_rx_status *rx_status)
@@ -1900,7 +1900,7 @@ static void ieee80211_rx_mgmt_beacon(struct ieee80211_sub_if_data *sdata,
ieee80211_bss_info_change_notify(sdata, changed);
}

-void ieee80211_sta_rx_queued_mgmt(struct ieee80211_sub_if_data *sdata,
+void ieee80211_sta_rx_queued_mgmt(struct mac80211_sub_if_data *sdata,
struct sk_buff *skb)
{
struct mac80211_if_managed *ifmgd = &sdata->u.mgd;
@@ -2006,8 +2006,8 @@ void ieee80211_sta_rx_queued_mgmt(struct ieee80211_sub_if_data *sdata,

static void ieee80211_sta_timer(unsigned long data)
{
- struct ieee80211_sub_if_data *sdata =
- (struct ieee80211_sub_if_data *) data;
+ struct mac80211_sub_if_data *sdata =
+ (struct mac80211_sub_if_data *) data;
struct mac80211_if_managed *ifmgd = &sdata->u.mgd;
struct mac80211_local *local = sdata->local;

@@ -2019,7 +2019,7 @@ static void ieee80211_sta_timer(unsigned long data)
ieee80211_queue_work(&local->hw, &sdata->work);
}

-static void ieee80211_sta_connection_lost(struct ieee80211_sub_if_data *sdata,
+static void ieee80211_sta_connection_lost(struct mac80211_sub_if_data *sdata,
u8 *bssid)
{
struct mac80211_local *local = sdata->local;
@@ -2044,7 +2044,7 @@ static void ieee80211_sta_connection_lost(struct ieee80211_sub_if_data *sdata,
mutex_lock(&ifmgd->mtx);
}

-void ieee80211_sta_work(struct ieee80211_sub_if_data *sdata)
+void ieee80211_sta_work(struct mac80211_sub_if_data *sdata)
{
struct mac80211_local *local = sdata->local;
struct mac80211_if_managed *ifmgd = &sdata->u.mgd;
@@ -2128,8 +2128,8 @@ void ieee80211_sta_work(struct ieee80211_sub_if_data *sdata)

static void ieee80211_sta_bcn_mon_timer(unsigned long data)
{
- struct ieee80211_sub_if_data *sdata =
- (struct ieee80211_sub_if_data *) data;
+ struct mac80211_sub_if_data *sdata =
+ (struct mac80211_sub_if_data *) data;
struct mac80211_local *local = sdata->local;

if (local->quiescing)
@@ -2141,8 +2141,8 @@ static void ieee80211_sta_bcn_mon_timer(unsigned long data)

static void ieee80211_sta_conn_mon_timer(unsigned long data)
{
- struct ieee80211_sub_if_data *sdata =
- (struct ieee80211_sub_if_data *) data;
+ struct mac80211_sub_if_data *sdata =
+ (struct mac80211_sub_if_data *) data;
struct mac80211_if_managed *ifmgd = &sdata->u.mgd;
struct mac80211_local *local = sdata->local;

@@ -2154,14 +2154,14 @@ static void ieee80211_sta_conn_mon_timer(unsigned long data)

static void ieee80211_sta_monitor_work(struct work_struct *work)
{
- struct ieee80211_sub_if_data *sdata =
- container_of(work, struct ieee80211_sub_if_data,
+ struct mac80211_sub_if_data *sdata =
+ container_of(work, struct mac80211_sub_if_data,
u.mgd.monitor_work);

ieee80211_mgd_probe_ap(sdata, false);
}

-static void ieee80211_restart_sta_timer(struct ieee80211_sub_if_data *sdata)
+static void ieee80211_restart_sta_timer(struct mac80211_sub_if_data *sdata)
{
if (sdata->vif.type == NL80211_IFTYPE_STATION) {
sdata->u.mgd.flags &= ~(MAC80211_STA_BEACON_POLL |
@@ -2176,7 +2176,7 @@ static void ieee80211_restart_sta_timer(struct ieee80211_sub_if_data *sdata)
}

#ifdef CONFIG_PM
-void ieee80211_sta_quiesce(struct ieee80211_sub_if_data *sdata)
+void ieee80211_sta_quiesce(struct mac80211_sub_if_data *sdata)
{
struct mac80211_if_managed *ifmgd = &sdata->u.mgd;

@@ -2202,7 +2202,7 @@ void ieee80211_sta_quiesce(struct ieee80211_sub_if_data *sdata)
del_timer_sync(&ifmgd->bcn_mon_timer);
}

-void ieee80211_sta_restart(struct ieee80211_sub_if_data *sdata)
+void ieee80211_sta_restart(struct mac80211_sub_if_data *sdata)
{
struct mac80211_if_managed *ifmgd = &sdata->u.mgd;

@@ -2216,7 +2216,7 @@ void ieee80211_sta_restart(struct ieee80211_sub_if_data *sdata)
#endif

/* interface setup */
-void ieee80211_sta_setup_sdata(struct ieee80211_sub_if_data *sdata)
+void ieee80211_sta_setup_sdata(struct mac80211_sub_if_data *sdata)
{
struct mac80211_if_managed *ifmgd;

@@ -2248,7 +2248,7 @@ void ieee80211_sta_setup_sdata(struct ieee80211_sub_if_data *sdata)
/* scan finished notification */
void ieee80211_mlme_notify_scan_completed(struct mac80211_local *local)
{
- struct ieee80211_sub_if_data *sdata = local->scan_sdata;
+ struct mac80211_sub_if_data *sdata = local->scan_sdata;

/* Restart STA timers */
rcu_read_lock();
@@ -2296,7 +2296,7 @@ ieee80211_probe_auth_done(struct mac80211_work *wk,
return WORK_DONE_REQUEUE;
}

-int ieee80211_mgd_auth(struct ieee80211_sub_if_data *sdata,
+int ieee80211_mgd_auth(struct mac80211_sub_if_data *sdata,
struct cfg80211_auth_request *req)
{
const u8 *ssid;
@@ -2409,7 +2409,7 @@ static enum work_done_result ieee80211_assoc_done(struct mac80211_work *wk,
return WORK_DONE_DESTROY;
}

-int ieee80211_mgd_assoc(struct ieee80211_sub_if_data *sdata,
+int ieee80211_mgd_assoc(struct mac80211_sub_if_data *sdata,
struct cfg80211_assoc_request *req)
{
struct mac80211_if_managed *ifmgd = &sdata->u.mgd;
@@ -2534,7 +2534,7 @@ int ieee80211_mgd_assoc(struct ieee80211_sub_if_data *sdata,
return 0;
}

-int ieee80211_mgd_deauth(struct ieee80211_sub_if_data *sdata,
+int ieee80211_mgd_deauth(struct mac80211_sub_if_data *sdata,
struct cfg80211_deauth_request *req,
void *cookie)
{
@@ -2607,7 +2607,7 @@ int ieee80211_mgd_deauth(struct ieee80211_sub_if_data *sdata,
return 0;
}

-int ieee80211_mgd_disassoc(struct ieee80211_sub_if_data *sdata,
+int ieee80211_mgd_disassoc(struct mac80211_sub_if_data *sdata,
struct cfg80211_disassoc_request *req,
void *cookie)
{
@@ -2651,7 +2651,7 @@ void ieee80211_cqm_rssi_notify(struct ieee80211_vif *vif,
enum nl80211_cqm_rssi_threshold_event rssi_event,
gfp_t gfp)
{
- struct ieee80211_sub_if_data *sdata = vif_to_sdata(vif);
+ struct mac80211_sub_if_data *sdata = vif_to_sdata(vif);

trace_api_cqm_rssi_notify(sdata, rssi_event);

diff --git a/net/mac80211/offchannel.c b/net/mac80211/offchannel.c
index 0c97ef7..5473d79 100644
--- a/net/mac80211/offchannel.c
+++ b/net/mac80211/offchannel.c
@@ -23,7 +23,7 @@
* because we *may* be doing work on-operating channel, and want our
* hardware unconditionally awake, but still let the AP send us normal frames.
*/
-static void ieee80211_offchannel_ps_enable(struct ieee80211_sub_if_data *sdata,
+static void ieee80211_offchannel_ps_enable(struct mac80211_sub_if_data *sdata,
bool tell_ap)
{
struct mac80211_local *local = sdata->local;
@@ -61,7 +61,7 @@ static void ieee80211_offchannel_ps_enable(struct ieee80211_sub_if_data *sdata,
}

/* inform AP that we are awake again, unless power save is enabled */
-static void ieee80211_offchannel_ps_disable(struct ieee80211_sub_if_data *sdata)
+static void ieee80211_offchannel_ps_disable(struct mac80211_sub_if_data *sdata)
{
struct mac80211_local *local = sdata->local;

@@ -105,7 +105,7 @@ static void ieee80211_offchannel_ps_disable(struct ieee80211_sub_if_data *sdata)
void ieee80211_offchannel_stop_vifs(struct mac80211_local *local,
bool offchannel_ps_enable)
{
- struct ieee80211_sub_if_data *sdata;
+ struct mac80211_sub_if_data *sdata;

/*
* notify the AP about us leaving the channel and stop all
@@ -140,7 +140,7 @@ void ieee80211_offchannel_stop_vifs(struct mac80211_local *local,
void ieee80211_offchannel_enable_all_ps(struct mac80211_local *local,
bool tell_ap)
{
- struct ieee80211_sub_if_data *sdata;
+ struct mac80211_sub_if_data *sdata;

mutex_lock(&local->iflist_mtx);
list_for_each_entry(sdata, &local->interfaces, list) {
@@ -158,7 +158,7 @@ void ieee80211_offchannel_return(struct mac80211_local *local,
bool enable_beaconing,
bool offchannel_ps_disable)
{
- struct ieee80211_sub_if_data *sdata;
+ struct mac80211_sub_if_data *sdata;

mutex_lock(&local->iflist_mtx);
list_for_each_entry(sdata, &local->interfaces, list) {
@@ -202,7 +202,7 @@ static void ieee80211_hw_roc_start(struct work_struct *work)
{
struct mac80211_local *local =
container_of(work, struct mac80211_local, hw_roc_start);
- struct ieee80211_sub_if_data *sdata;
+ struct mac80211_sub_if_data *sdata;

mutex_lock(&local->mtx);

diff --git a/net/mac80211/pm.c b/net/mac80211/pm.c
index bfc9cf3..47505f0 100644
--- a/net/mac80211/pm.c
+++ b/net/mac80211/pm.c
@@ -9,7 +9,7 @@
int __ieee80211_suspend(struct ieee80211_hw *hw, struct cfg80211_wowlan *wowlan)
{
struct mac80211_local *local = hw_to_local(hw);
- struct ieee80211_sub_if_data *sdata;
+ struct mac80211_sub_if_data *sdata;
struct sta_info *sta;

ieee80211_scan_cancel(local);
@@ -68,7 +68,7 @@ int __ieee80211_suspend(struct ieee80211_hw *hw, struct cfg80211_wowlan *wowlan)
sdata = sta->sdata;
if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN)
sdata = container_of(sdata->bss,
- struct ieee80211_sub_if_data,
+ struct mac80211_sub_if_data,
u.ap);

drv_sta_remove(local, sdata, &sta->sta);
diff --git a/net/mac80211/rate.c b/net/mac80211/rate.c
index 1b2eacf..5384bba 100644
--- a/net/mac80211/rate.c
+++ b/net/mac80211/rate.c
@@ -295,7 +295,7 @@ static void rate_idx_match_mask(struct ieee80211_tx_rate *rate,
*/
}

-void rate_control_get_rate(struct ieee80211_sub_if_data *sdata,
+void rate_control_get_rate(struct mac80211_sub_if_data *sdata,
struct sta_info *sta,
struct ieee80211_tx_rate_control *txrc)
{
diff --git a/net/mac80211/rate.h b/net/mac80211/rate.h
index 5693817..64399a7 100644
--- a/net/mac80211/rate.h
+++ b/net/mac80211/rate.h
@@ -26,7 +26,7 @@ struct rate_control_ref {
struct kref kref;
};

-void rate_control_get_rate(struct ieee80211_sub_if_data *sdata,
+void rate_control_get_rate(struct mac80211_sub_if_data *sdata,
struct sta_info *sta,
struct ieee80211_tx_rate_control *txrc);
struct rate_control_ref *rate_control_get(struct rate_control_ref *ref);
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index d4c83cb..be041e5 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -220,7 +220,7 @@ ieee80211_rx_monitor(struct mac80211_local *local, struct sk_buff *origskb,
struct ieee80211_rate *rate)
{
struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(origskb);
- struct ieee80211_sub_if_data *sdata;
+ struct mac80211_sub_if_data *sdata;
int needed_headroom = 0;
struct sk_buff *skb, *skb2;
struct net_device *prev_dev = NULL;
@@ -936,7 +936,7 @@ ieee80211_rx_h_decrypt(struct mac80211_rx_data *rx)
* have been expected.
*/
struct ieee80211_key *key = NULL;
- struct ieee80211_sub_if_data *sdata = rx->sdata;
+ struct mac80211_sub_if_data *sdata = rx->sdata;
int i;

if (ieee80211_is_mgmt(fc) &&
@@ -1091,7 +1091,7 @@ ieee80211_rx_h_check_more_data(struct mac80211_rx_data *rx)

static void ap_sta_ps_start(struct sta_info *sta)
{
- struct ieee80211_sub_if_data *sdata = sta->sdata;
+ struct mac80211_sub_if_data *sdata = sta->sdata;
struct mac80211_local *local = sdata->local;

atomic_inc(&sdata->bss->num_sta_ps);
@@ -1106,7 +1106,7 @@ static void ap_sta_ps_start(struct sta_info *sta)

static void ap_sta_ps_end(struct sta_info *sta)
{
- struct ieee80211_sub_if_data *sdata = sta->sdata;
+ struct mac80211_sub_if_data *sdata = sta->sdata;

atomic_dec(&sdata->bss->num_sta_ps);

@@ -1255,7 +1255,7 @@ ieee80211_rx_h_sta_process(struct mac80211_rx_data *rx)
} /* ieee80211_rx_h_sta_process */

static inline struct mac80211_fragment_entry *
-ieee80211_reassemble_add(struct ieee80211_sub_if_data *sdata,
+ieee80211_reassemble_add(struct mac80211_sub_if_data *sdata,
unsigned int frag, unsigned int seq, int rx_queue,
struct sk_buff **skb)
{
@@ -1294,7 +1294,7 @@ ieee80211_reassemble_add(struct ieee80211_sub_if_data *sdata,
}

static inline struct mac80211_fragment_entry *
-ieee80211_reassemble_find(struct ieee80211_sub_if_data *sdata,
+ieee80211_reassemble_find(struct mac80211_sub_if_data *sdata,
unsigned int frag, unsigned int seq,
int rx_queue, struct ieee80211_hdr *hdr)
{
@@ -1461,7 +1461,7 @@ ieee80211_rx_h_defragment(struct mac80211_rx_data *rx)
static ieee80211_rx_result debug_noinline
ieee80211_rx_h_ps_poll(struct mac80211_rx_data *rx)
{
- struct ieee80211_sub_if_data *sdata = rx->sdata;
+ struct mac80211_sub_if_data *sdata = rx->sdata;
__le16 fc = ((struct ieee80211_hdr *)rx->skb->data)->frame_control;
struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(rx->skb);

@@ -1594,7 +1594,7 @@ ieee80211_drop_unencrypted_mgmt(struct mac80211_rx_data *rx)
static int
__ieee80211_data_to_8023(struct mac80211_rx_data *rx, bool *port_control)
{
- struct ieee80211_sub_if_data *sdata = rx->sdata;
+ struct mac80211_sub_if_data *sdata = rx->sdata;
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)rx->skb->data;
bool check_port_control = false;
struct ethhdr *ehdr;
@@ -1662,7 +1662,7 @@ static bool ieee80211_frame_allowed(struct mac80211_rx_data *rx, __le16 fc)
static void
ieee80211_deliver_skb(struct mac80211_rx_data *rx)
{
- struct ieee80211_sub_if_data *sdata = rx->sdata;
+ struct mac80211_sub_if_data *sdata = rx->sdata;
struct net_device *dev = sdata->dev;
struct sk_buff *skb, *xmit_skb;
struct ethhdr *ehdr = (struct ethhdr *) rx->skb->data;
@@ -1810,7 +1810,7 @@ ieee80211_rx_h_mesh_fwding(struct mac80211_rx_data *rx)
unsigned int hdrlen;
struct sk_buff *skb = rx->skb, *fwd_skb;
struct mac80211_local *local = rx->local;
- struct ieee80211_sub_if_data *sdata = rx->sdata;
+ struct mac80211_sub_if_data *sdata = rx->sdata;
struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb);

hdr = (struct ieee80211_hdr *) skb->data;
@@ -1921,7 +1921,7 @@ ieee80211_rx_h_mesh_fwding(struct mac80211_rx_data *rx)
static ieee80211_rx_result debug_noinline
ieee80211_rx_h_data(struct mac80211_rx_data *rx)
{
- struct ieee80211_sub_if_data *sdata = rx->sdata;
+ struct mac80211_sub_if_data *sdata = rx->sdata;
struct mac80211_local *local = rx->local;
struct net_device *dev = sdata->dev;
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)rx->skb->data;
@@ -1952,7 +1952,7 @@ ieee80211_rx_h_data(struct mac80211_rx_data *rx)

if (rx->sdata->vif.type == NL80211_IFTYPE_AP_VLAN &&
unlikely(port_control) && sdata->bss) {
- sdata = container_of(sdata->bss, struct ieee80211_sub_if_data,
+ sdata = container_of(sdata->bss, struct mac80211_sub_if_data,
u.ap);
dev = sdata->dev;
rx->sdata = sdata;
@@ -2033,7 +2033,7 @@ ieee80211_rx_h_ctrl(struct mac80211_rx_data *rx)
return RX_DROP_MONITOR;
}

-static void ieee80211_process_sa_query_req(struct ieee80211_sub_if_data *sdata,
+static void ieee80211_process_sa_query_req(struct mac80211_sub_if_data *sdata,
struct ieee80211_mgmt *mgmt,
size_t len)
{
@@ -2109,7 +2109,7 @@ static ieee80211_rx_result debug_noinline
ieee80211_rx_h_action(struct mac80211_rx_data *rx)
{
struct mac80211_local *local = rx->local;
- struct ieee80211_sub_if_data *sdata = rx->sdata;
+ struct mac80211_sub_if_data *sdata = rx->sdata;
struct ieee80211_mgmt *mgmt = (struct ieee80211_mgmt *) rx->skb->data;
struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(rx->skb);
int len = rx->skb->len;
@@ -2277,7 +2277,7 @@ ieee80211_rx_h_action_return(struct mac80211_rx_data *rx)
struct mac80211_local *local = rx->local;
struct ieee80211_mgmt *mgmt = (struct ieee80211_mgmt *) rx->skb->data;
struct sk_buff *nskb;
- struct ieee80211_sub_if_data *sdata = rx->sdata;
+ struct mac80211_sub_if_data *sdata = rx->sdata;
struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(rx->skb);

if (!ieee80211_is_action(mgmt->frame_control))
@@ -2322,7 +2322,7 @@ ieee80211_rx_h_action_return(struct mac80211_rx_data *rx)
static ieee80211_rx_result debug_noinline
ieee80211_rx_h_mgmt(struct mac80211_rx_data *rx)
{
- struct ieee80211_sub_if_data *sdata = rx->sdata;
+ struct mac80211_sub_if_data *sdata = rx->sdata;
ieee80211_rx_result rxs;
struct ieee80211_mgmt *mgmt = (void *)rx->skb->data;
__le16 stype;
@@ -2377,7 +2377,7 @@ ieee80211_rx_h_mgmt(struct mac80211_rx_data *rx)
static void ieee80211_rx_cooked_monitor(struct mac80211_rx_data *rx,
struct ieee80211_rate *rate)
{
- struct ieee80211_sub_if_data *sdata;
+ struct mac80211_sub_if_data *sdata;
struct mac80211_local *local = rx->local;
struct ieee80211_rtap_hdr {
struct ieee80211_radiotap_header hdr;
@@ -2611,7 +2611,7 @@ void ieee80211_release_reorder_timeout(struct sta_info *sta, int tid)
static int prepare_for_handlers(struct mac80211_rx_data *rx,
struct ieee80211_hdr *hdr)
{
- struct ieee80211_sub_if_data *sdata = rx->sdata;
+ struct mac80211_sub_if_data *sdata = rx->sdata;
struct sk_buff *skb = rx->skb;
struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb);
u8 *bssid = ieee80211_get_bssid(hdr, skb->len, sdata->vif.type);
@@ -2704,7 +2704,7 @@ static bool ieee80211_prepare_and_rx_handle(struct mac80211_rx_data *rx,
struct sk_buff *skb, bool consume)
{
struct mac80211_local *local = rx->local;
- struct ieee80211_sub_if_data *sdata = rx->sdata;
+ struct mac80211_sub_if_data *sdata = rx->sdata;
struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb);
struct ieee80211_hdr *hdr = (void *)skb->data;
int prepares;
@@ -2742,11 +2742,11 @@ static void __ieee80211_rx_handle_packet(struct ieee80211_hw *hw,
{
struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb);
struct mac80211_local *local = hw_to_local(hw);
- struct ieee80211_sub_if_data *sdata;
+ struct mac80211_sub_if_data *sdata;
struct ieee80211_hdr *hdr;
__le16 fc;
struct mac80211_rx_data rx;
- struct ieee80211_sub_if_data *prev;
+ struct mac80211_sub_if_data *prev;
struct sta_info *sta, *tmp, *prev_sta;
int err = 0;

diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c
index 7c3d17b..284e0cb 100644
--- a/net/mac80211/scan.c
+++ b/net/mac80211/scan.c
@@ -147,7 +147,7 @@ ieee80211_bss_info_update(struct mac80211_local *local,
}

ieee80211_rx_result
-ieee80211_scan_rx(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb)
+ieee80211_scan_rx(struct mac80211_sub_if_data *sdata, struct sk_buff *skb)
{
struct ieee80211_rx_status *rx_status = IEEE80211_SKB_RXCB(skb);
struct ieee80211_mgmt *mgmt;
@@ -378,7 +378,7 @@ static int ieee80211_start_sw_scan(struct mac80211_local *local)
}


-static int __ieee80211_start_scan(struct ieee80211_sub_if_data *sdata,
+static int __ieee80211_start_scan(struct mac80211_sub_if_data *sdata,
struct cfg80211_scan_request *req)
{
struct mac80211_local *local = sdata->local;
@@ -475,7 +475,7 @@ static void ieee80211_scan_state_decision(struct mac80211_local *local,
bool bad_latency;
bool listen_int_exceeded;
unsigned long min_beacon_int = 0;
- struct ieee80211_sub_if_data *sdata;
+ struct mac80211_sub_if_data *sdata;
struct ieee80211_channel *next_chan;

/*
@@ -651,7 +651,7 @@ static void ieee80211_scan_state_send_probe(struct mac80211_local *local,
unsigned long *next_delay)
{
int i;
- struct ieee80211_sub_if_data *sdata = local->scan_sdata;
+ struct mac80211_sub_if_data *sdata = local->scan_sdata;

for (i = 0; i < local->scan_req->n_ssids; i++)
ieee80211_send_probe_req(
@@ -672,7 +672,7 @@ void ieee80211_scan_work(struct work_struct *work)
{
struct mac80211_local *local =
container_of(work, struct mac80211_local, scan_work.work);
- struct ieee80211_sub_if_data *sdata;
+ struct mac80211_sub_if_data *sdata;
unsigned long next_delay = 0;
bool aborted, hw_scan;

@@ -757,7 +757,7 @@ out:
mutex_unlock(&local->mtx);
}

-int ieee80211_request_scan(struct ieee80211_sub_if_data *sdata,
+int ieee80211_request_scan(struct mac80211_sub_if_data *sdata,
struct cfg80211_scan_request *req)
{
int res;
@@ -769,7 +769,7 @@ int ieee80211_request_scan(struct ieee80211_sub_if_data *sdata,
return res;
}

-int ieee80211_request_internal_scan(struct ieee80211_sub_if_data *sdata,
+int ieee80211_request_internal_scan(struct mac80211_sub_if_data *sdata,
const u8 *ssid, u8 ssid_len,
struct ieee80211_channel *chan)
{
@@ -856,7 +856,7 @@ void ieee80211_scan_cancel(struct mac80211_local *local)
mutex_unlock(&local->mtx);
}

-int ieee80211_request_sched_scan_start(struct ieee80211_sub_if_data *sdata,
+int ieee80211_request_sched_scan_start(struct mac80211_sub_if_data *sdata,
struct cfg80211_sched_scan_request *req)
{
struct mac80211_local *local = sdata->local;
@@ -906,7 +906,7 @@ out:
return ret;
}

-int ieee80211_request_sched_scan_stop(struct ieee80211_sub_if_data *sdata)
+int ieee80211_request_sched_scan_stop(struct mac80211_sub_if_data *sdata)
{
struct mac80211_local *local = sdata->local;
int ret = 0, i;
diff --git a/net/mac80211/spectmgmt.c b/net/mac80211/spectmgmt.c
index fe1e76d..0c9ad56 100644
--- a/net/mac80211/spectmgmt.c
+++ b/net/mac80211/spectmgmt.c
@@ -21,7 +21,7 @@
#include "sta_info.h"
#include "wme.h"

-static void ieee80211_send_refuse_measurement_request(struct ieee80211_sub_if_data *sdata,
+static void ieee80211_send_refuse_measurement_request(struct mac80211_sub_if_data *sdata,
struct ieee80211_msrment_ie *request_ie,
const u8 *da, const u8 *bssid,
u8 dialog_token)
@@ -68,7 +68,7 @@ static void ieee80211_send_refuse_measurement_request(struct ieee80211_sub_if_da
ieee80211_tx_skb(sdata, skb);
}

-void ieee80211_process_measurement_req(struct ieee80211_sub_if_data *sdata,
+void ieee80211_process_measurement_req(struct mac80211_sub_if_data *sdata,
struct ieee80211_mgmt *mgmt,
size_t len)
{
diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c
index d148159..a6b187d 100644
--- a/net/mac80211/sta_info.c
+++ b/net/mac80211/sta_info.c
@@ -90,7 +90,7 @@ static int sta_info_hash_del(struct mac80211_local *local,
}

/* protected by RCU */
-struct sta_info *sta_info_get(struct ieee80211_sub_if_data *sdata,
+struct sta_info *sta_info_get(struct mac80211_sub_if_data *sdata,
const u8 *addr)
{
struct mac80211_local *local = sdata->local;
@@ -116,7 +116,7 @@ struct sta_info *sta_info_get(struct ieee80211_sub_if_data *sdata,
* Get sta info either from the specified interface
* or from one of its vlans
*/
-struct sta_info *sta_info_get_bss(struct ieee80211_sub_if_data *sdata,
+struct sta_info *sta_info_get_bss(struct mac80211_sub_if_data *sdata,
const u8 *addr)
{
struct mac80211_local *local = sdata->local;
@@ -139,7 +139,7 @@ struct sta_info *sta_info_get_bss(struct ieee80211_sub_if_data *sdata,
return sta;
}

-struct sta_info *sta_info_get_by_idx(struct ieee80211_sub_if_data *sdata,
+struct sta_info *sta_info_get_by_idx(struct mac80211_sub_if_data *sdata,
int idx)
{
struct mac80211_local *local = sdata->local;
@@ -226,7 +226,7 @@ static int sta_prepare_rate_control(struct mac80211_local *local,
return 0;
}

-struct sta_info *sta_info_alloc(struct ieee80211_sub_if_data *sdata,
+struct sta_info *sta_info_alloc(struct mac80211_sub_if_data *sdata,
u8 *addr, gfp_t gfp)
{
struct mac80211_local *local = sdata->local;
@@ -287,7 +287,7 @@ struct sta_info *sta_info_alloc(struct ieee80211_sub_if_data *sdata,
static int sta_info_finish_insert(struct sta_info *sta, bool async)
{
struct mac80211_local *local = sta->local;
- struct ieee80211_sub_if_data *sdata = sta->sdata;
+ struct mac80211_sub_if_data *sdata = sta->sdata;
struct station_info sinfo;
unsigned long flags;
int err = 0;
@@ -297,7 +297,7 @@ static int sta_info_finish_insert(struct sta_info *sta, bool async)
/* notify driver */
if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN)
sdata = container_of(sdata->bss,
- struct ieee80211_sub_if_data,
+ struct mac80211_sub_if_data,
u.ap);
err = drv_sta_add(local, sdata, &sta->sta);
if (err) {
@@ -374,7 +374,7 @@ static void sta_info_finish_work(struct work_struct *work)
int sta_info_insert_rcu(struct sta_info *sta) __acquires(RCU)
{
struct mac80211_local *local = sta->local;
- struct ieee80211_sub_if_data *sdata = sta->sdata;
+ struct mac80211_sub_if_data *sdata = sta->sdata;
unsigned long flags;
int err = 0;

@@ -624,7 +624,7 @@ static bool sta_info_cleanup_expire_buffered(struct mac80211_local *local,
static int __must_check __sta_info_destroy(struct sta_info *sta)
{
struct mac80211_local *local;
- struct ieee80211_sub_if_data *sdata;
+ struct mac80211_sub_if_data *sdata;
struct sk_buff *skb;
unsigned long flags;
int ret, i;
@@ -681,7 +681,7 @@ static int __must_check __sta_info_destroy(struct sta_info *sta)
if (sta->uploaded) {
if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN)
sdata = container_of(sdata->bss,
- struct ieee80211_sub_if_data,
+ struct mac80211_sub_if_data,
u.ap);
drv_sta_remove(local, sdata, &sta->sta);
sdata = sta->sdata;
@@ -730,7 +730,7 @@ static int __must_check __sta_info_destroy(struct sta_info *sta)
return 0;
}

-int sta_info_destroy_addr(struct ieee80211_sub_if_data *sdata, const u8 *addr)
+int sta_info_destroy_addr(struct mac80211_sub_if_data *sdata, const u8 *addr)
{
struct sta_info *sta;
int ret;
@@ -743,7 +743,7 @@ int sta_info_destroy_addr(struct ieee80211_sub_if_data *sdata, const u8 *addr)
return ret;
}

-int sta_info_destroy_addr_bss(struct ieee80211_sub_if_data *sdata,
+int sta_info_destroy_addr_bss(struct mac80211_sub_if_data *sdata,
const u8 *addr)
{
struct sta_info *sta;
@@ -806,7 +806,7 @@ void sta_info_stop(struct mac80211_local *local)
* @sdata: matching rule for the net device (sta->dev) or %NULL to match all STAs
*/
int sta_info_flush(struct mac80211_local *local,
- struct ieee80211_sub_if_data *sdata)
+ struct mac80211_sub_if_data *sdata)
{
struct sta_info *sta, *tmp;
int ret = 0;
@@ -826,7 +826,7 @@ int sta_info_flush(struct mac80211_local *local,
return ret;
}

-void ieee80211_sta_expire(struct ieee80211_sub_if_data *sdata,
+void ieee80211_sta_expire(struct mac80211_sub_if_data *sdata,
unsigned long exp_time)
{
struct mac80211_local *local = sdata->local;
@@ -896,7 +896,7 @@ static void clear_sta_ps_flags(void *_sta)
/* powersave support code */
void ieee80211_sta_ps_deliver_wakeup(struct sta_info *sta)
{
- struct ieee80211_sub_if_data *sdata = sta->sdata;
+ struct mac80211_sub_if_data *sdata = sta->sdata;
struct mac80211_local *local = sdata->local;
int sent, buffered;

@@ -923,7 +923,7 @@ void ieee80211_sta_ps_deliver_wakeup(struct sta_info *sta)

void ieee80211_sta_ps_deliver_poll_response(struct sta_info *sta)
{
- struct ieee80211_sub_if_data *sdata = sta->sdata;
+ struct mac80211_sub_if_data *sdata = sta->sdata;
struct mac80211_local *local = sdata->local;
struct sk_buff *skb;
int no_pending_pkts;
diff --git a/net/mac80211/sta_info.h b/net/mac80211/sta_info.h
index 01091da..7e5cb1b 100644
--- a/net/mac80211/sta_info.h
+++ b/net/mac80211/sta_info.h
@@ -245,7 +245,7 @@ struct sta_info {
struct list_head list;
struct sta_info __rcu *hnext;
struct mac80211_local *local;
- struct ieee80211_sub_if_data *sdata;
+ struct mac80211_sub_if_data *sdata;
struct ieee80211_key __rcu *gtk[NUM_DEFAULT_KEYS + NUM_DEFAULT_MGMT_KEYS];
struct ieee80211_key __rcu *ptk;
struct rate_control_ref *rate_ctrl;
@@ -429,10 +429,10 @@ rcu_dereference_protected_tid_tx(struct sta_info *sta, int tid)
/*
* Get a STA info, must be under RCU read lock.
*/
-struct sta_info *sta_info_get(struct ieee80211_sub_if_data *sdata,
+struct sta_info *sta_info_get(struct mac80211_sub_if_data *sdata,
const u8 *addr);

-struct sta_info *sta_info_get_bss(struct ieee80211_sub_if_data *sdata,
+struct sta_info *sta_info_get_bss(struct mac80211_sub_if_data *sdata,
const u8 *addr);

static inline
@@ -461,13 +461,13 @@ void for_each_sta_info_type_check(struct mac80211_local *local,
/*
* Get STA info by index, BROKEN!
*/
-struct sta_info *sta_info_get_by_idx(struct ieee80211_sub_if_data *sdata,
+struct sta_info *sta_info_get_by_idx(struct mac80211_sub_if_data *sdata,
int idx);
/*
* Create a new STA info, caller owns returned structure
* until sta_info_insert().
*/
-struct sta_info *sta_info_alloc(struct ieee80211_sub_if_data *sdata,
+struct sta_info *sta_info_alloc(struct mac80211_sub_if_data *sdata,
u8 *addr, gfp_t gfp);
/*
* Insert STA info into hash table/list, returns zero or a
@@ -481,9 +481,9 @@ int sta_info_insert(struct sta_info *sta);
int sta_info_insert_rcu(struct sta_info *sta) __acquires(RCU);
int sta_info_insert_atomic(struct sta_info *sta);

-int sta_info_destroy_addr(struct ieee80211_sub_if_data *sdata,
+int sta_info_destroy_addr(struct mac80211_sub_if_data *sdata,
const u8 *addr);
-int sta_info_destroy_addr_bss(struct ieee80211_sub_if_data *sdata,
+int sta_info_destroy_addr_bss(struct mac80211_sub_if_data *sdata,
const u8 *addr);

void sta_info_set_tim_bit(struct sta_info *sta);
@@ -492,8 +492,8 @@ void sta_info_clear_tim_bit(struct sta_info *sta);
void sta_info_init(struct mac80211_local *local);
void sta_info_stop(struct mac80211_local *local);
int sta_info_flush(struct mac80211_local *local,
- struct ieee80211_sub_if_data *sdata);
-void ieee80211_sta_expire(struct ieee80211_sub_if_data *sdata,
+ struct mac80211_sub_if_data *sdata);
+void ieee80211_sta_expire(struct mac80211_sub_if_data *sdata,
unsigned long exp_time);

void ieee80211_sta_ps_deliver_wakeup(struct sta_info *sta);
diff --git a/net/mac80211/status.c b/net/mac80211/status.c
index 464cec7..41fe6ed 100644
--- a/net/mac80211/status.c
+++ b/net/mac80211/status.c
@@ -131,7 +131,7 @@ static void ieee80211_frame_acked(struct sta_info *sta, struct sk_buff *skb)
{
struct ieee80211_mgmt *mgmt = (void *) skb->data;
struct mac80211_local *local = sta->local;
- struct ieee80211_sub_if_data *sdata = sta->sdata;
+ struct mac80211_sub_if_data *sdata = sta->sdata;

if (ieee80211_is_action(mgmt->frame_control) &&
sdata->vif.type == NL80211_IFTYPE_STATION &&
@@ -180,7 +180,7 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb)
__le16 fc;
struct ieee80211_supported_band *sband;
struct ieee80211_tx_status_rtap_hdr *rthdr;
- struct ieee80211_sub_if_data *sdata;
+ struct mac80211_sub_if_data *sdata;
struct net_device *prev_dev = NULL;
struct sta_info *sta, *tmp;
int retry_count = -1, i;
diff --git a/net/mac80211/tkip.c b/net/mac80211/tkip.c
index 757e4eb..26f866e 100644
--- a/net/mac80211/tkip.c
+++ b/net/mac80211/tkip.c
@@ -304,11 +304,11 @@ int ieee80211_tkip_decrypt_data(struct crypto_cipher *tfm,
if (key->local->ops->update_tkip_key &&
key->flags & KEY_FLAG_UPLOADED_TO_HARDWARE &&
key->u.tkip.rx[queue].state != TKIP_STATE_PHASE1_HW_UPLOADED) {
- struct ieee80211_sub_if_data *sdata = key->sdata;
+ struct mac80211_sub_if_data *sdata = key->sdata;

if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN)
sdata = container_of(key->sdata->bss,
- struct ieee80211_sub_if_data, u.ap);
+ struct mac80211_sub_if_data, u.ap);
drv_update_tkip_key(key->local, sdata, &key->conf, key->sta,
iv32, key->u.tkip.rx[queue].p1k);
key->u.tkip.rx[queue].state = TKIP_STATE_PHASE1_HW_UPLOADED;
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index fc86744..b6c7e33 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -322,7 +322,7 @@ static void purge_old_ps_buffers(struct mac80211_local *local)
{
int total = 0, purged = 0;
struct sk_buff *skb;
- struct ieee80211_sub_if_data *sdata;
+ struct mac80211_sub_if_data *sdata;
struct sta_info *sta;

/*
@@ -1173,7 +1173,7 @@ static bool ieee80211_tx_prep_agg(struct mac80211_tx_data *tx,
* initialises @tx
*/
static ieee80211_tx_result
-ieee80211_tx_prepare(struct ieee80211_sub_if_data *sdata,
+ieee80211_tx_prepare(struct mac80211_sub_if_data *sdata,
struct mac80211_tx_data *tx,
struct sk_buff *skb)
{
@@ -1290,7 +1290,7 @@ static bool __ieee80211_tx(struct mac80211_local *local, struct sk_buff **skbp,
{
struct sk_buff *skb = *skbp, *next;
struct ieee80211_tx_info *info;
- struct ieee80211_sub_if_data *sdata;
+ struct mac80211_sub_if_data *sdata;
unsigned long flags;
int len;
bool fragm = false;
@@ -1352,7 +1352,7 @@ static bool __ieee80211_tx(struct mac80211_local *local, struct sk_buff **skbp,
break;
case NL80211_IFTYPE_AP_VLAN:
info->control.vif = &container_of(sdata->bss,
- struct ieee80211_sub_if_data, u.ap)->vif;
+ struct mac80211_sub_if_data, u.ap)->vif;
break;
default:
/* keep */
@@ -1436,7 +1436,7 @@ static int invoke_tx_handlers(struct mac80211_tx_data *tx)
/*
* Returns false if the frame couldn't be transmitted but was queued instead.
*/
-static bool ieee80211_tx(struct ieee80211_sub_if_data *sdata,
+static bool ieee80211_tx(struct mac80211_sub_if_data *sdata,
struct sk_buff *skb, bool txpending)
{
struct mac80211_local *local = sdata->local;
@@ -1510,13 +1510,13 @@ static int ieee80211_skb_resize(struct mac80211_local *local,
return 0;
}

-static void ieee80211_xmit(struct ieee80211_sub_if_data *sdata,
+static void ieee80211_xmit(struct mac80211_sub_if_data *sdata,
struct sk_buff *skb)
{
struct mac80211_local *local = sdata->local;
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data;
- struct ieee80211_sub_if_data *tmp_sdata;
+ struct mac80211_sub_if_data *tmp_sdata;
int headroom;
bool may_encrypt;

@@ -1686,7 +1686,7 @@ fail:
netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb,
struct net_device *dev)
{
- struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
+ struct mac80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
struct mac80211_local *local = sdata->local;
struct ieee80211_tx_info *info;
int ret = NETDEV_TX_BUSY, head_need;
@@ -2021,7 +2021,7 @@ static bool ieee80211_tx_pending_skb(struct mac80211_local *local,
struct sk_buff *skb)
{
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
- struct ieee80211_sub_if_data *sdata;
+ struct mac80211_sub_if_data *sdata;
struct sta_info *sta;
struct ieee80211_hdr *hdr;
bool result;
@@ -2046,7 +2046,7 @@ static bool ieee80211_tx_pending_skb(struct mac80211_local *local,
void ieee80211_tx_pending(unsigned long data)
{
struct mac80211_local *local = (struct mac80211_local *)data;
- struct ieee80211_sub_if_data *sdata;
+ struct mac80211_sub_if_data *sdata;
unsigned long flags;
int i;
bool txok;
@@ -2164,7 +2164,7 @@ struct sk_buff *ieee80211_beacon_get_tim(struct ieee80211_hw *hw,
struct mac80211_local *local = hw_to_local(hw);
struct sk_buff *skb = NULL;
struct ieee80211_tx_info *info;
- struct ieee80211_sub_if_data *sdata = NULL;
+ struct mac80211_sub_if_data *sdata = NULL;
struct mac80211_if_ap *ap = NULL;
struct beacon_data *beacon;
struct ieee80211_supported_band *sband;
@@ -2317,7 +2317,7 @@ EXPORT_SYMBOL(ieee80211_beacon_get_tim);
struct sk_buff *ieee80211_pspoll_get(struct ieee80211_hw *hw,
struct ieee80211_vif *vif)
{
- struct ieee80211_sub_if_data *sdata;
+ struct mac80211_sub_if_data *sdata;
struct mac80211_if_managed *ifmgd;
struct ieee80211_pspoll *pspoll;
struct mac80211_local *local;
@@ -2358,7 +2358,7 @@ struct sk_buff *ieee80211_nullfunc_get(struct ieee80211_hw *hw,
struct ieee80211_vif *vif)
{
struct ieee80211_hdr_3addr *nullfunc;
- struct ieee80211_sub_if_data *sdata;
+ struct mac80211_sub_if_data *sdata;
struct mac80211_if_managed *ifmgd;
struct mac80211_local *local;
struct sk_buff *skb;
@@ -2397,7 +2397,7 @@ struct sk_buff *ieee80211_probereq_get(struct ieee80211_hw *hw,
const u8 *ssid, size_t ssid_len,
const u8 *ie, size_t ie_len)
{
- struct ieee80211_sub_if_data *sdata;
+ struct mac80211_sub_if_data *sdata;
struct mac80211_local *local;
struct ieee80211_hdr_3addr *hdr;
struct sk_buff *skb;
@@ -2480,7 +2480,7 @@ ieee80211_get_buffered_bc(struct ieee80211_hw *hw,
struct mac80211_local *local = hw_to_local(hw);
struct sk_buff *skb = NULL;
struct mac80211_tx_data tx;
- struct ieee80211_sub_if_data *sdata;
+ struct mac80211_sub_if_data *sdata;
struct mac80211_if_ap *bss = NULL;
struct beacon_data *beacon;
struct ieee80211_tx_info *info;
@@ -2533,7 +2533,7 @@ ieee80211_get_buffered_bc(struct ieee80211_hw *hw,
}
EXPORT_SYMBOL(ieee80211_get_buffered_bc);

-void ieee80211_tx_skb(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb)
+void ieee80211_tx_skb(struct mac80211_sub_if_data *sdata, struct sk_buff *skb)
{
skb_set_mac_header(skb, 0);
skb_set_network_header(skb, 0);
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index 3766f2e..7e1514c 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -165,7 +165,7 @@ __le16 ieee80211_generic_frame_duration(struct ieee80211_hw *hw,
struct ieee80211_rate *rate)
{
struct mac80211_local *local = hw_to_local(hw);
- struct ieee80211_sub_if_data *sdata;
+ struct mac80211_sub_if_data *sdata;
u16 dur;
int erp;
bool short_preamble = false;
@@ -191,7 +191,7 @@ __le16 ieee80211_rts_duration(struct ieee80211_hw *hw,
{
struct mac80211_local *local = hw_to_local(hw);
struct ieee80211_rate *rate;
- struct ieee80211_sub_if_data *sdata;
+ struct mac80211_sub_if_data *sdata;
bool short_preamble;
int erp;
u16 dur;
@@ -232,7 +232,7 @@ __le16 ieee80211_ctstoself_duration(struct ieee80211_hw *hw,
{
struct mac80211_local *local = hw_to_local(hw);
struct ieee80211_rate *rate;
- struct ieee80211_sub_if_data *sdata;
+ struct mac80211_sub_if_data *sdata;
bool short_preamble;
int erp;
u16 dur;
@@ -268,7 +268,7 @@ static void __ieee80211_wake_queue(struct ieee80211_hw *hw, int queue,
enum queue_stop_reason reason)
{
struct mac80211_local *local = hw_to_local(hw);
- struct ieee80211_sub_if_data *sdata;
+ struct mac80211_sub_if_data *sdata;

trace_wake_queue(local, queue, reason);

@@ -315,7 +315,7 @@ static void __ieee80211_stop_queue(struct ieee80211_hw *hw, int queue,
enum queue_stop_reason reason)
{
struct mac80211_local *local = hw_to_local(hw);
- struct ieee80211_sub_if_data *sdata;
+ struct mac80211_sub_if_data *sdata;

trace_stop_queue(local, queue, reason);

@@ -478,7 +478,7 @@ void ieee80211_iterate_active_interfaces(
void *data)
{
struct mac80211_local *local = hw_to_local(hw);
- struct ieee80211_sub_if_data *sdata;
+ struct mac80211_sub_if_data *sdata;

mutex_lock(&local->iflist_mtx);

@@ -506,7 +506,7 @@ void ieee80211_iterate_active_interfaces_atomic(
void *data)
{
struct mac80211_local *local = hw_to_local(hw);
- struct ieee80211_sub_if_data *sdata;
+ struct mac80211_sub_if_data *sdata;

rcu_read_lock();

@@ -739,7 +739,7 @@ u32 ieee802_11_parse_elems_crc(u8 *start, size_t len,
return crc;
}

-void ieee80211_set_wmm_default(struct ieee80211_sub_if_data *sdata)
+void ieee80211_set_wmm_default(struct mac80211_sub_if_data *sdata)
{
struct mac80211_local *local = sdata->local;
struct ieee80211_tx_queue_params qparam;
@@ -812,7 +812,7 @@ void ieee80211_set_wmm_default(struct ieee80211_sub_if_data *sdata)
}
}

-void ieee80211_sta_def_wmm_params(struct ieee80211_sub_if_data *sdata,
+void ieee80211_sta_def_wmm_params(struct mac80211_sub_if_data *sdata,
const size_t supp_rates_len,
const u8 *supp_rates)
{
@@ -861,7 +861,7 @@ u32 ieee80211_mandatory_rates(struct mac80211_local *local,
return mandatory_rates;
}

-void ieee80211_send_auth(struct ieee80211_sub_if_data *sdata,
+void ieee80211_send_auth(struct mac80211_sub_if_data *sdata,
u16 transaction, u16 auth_alg,
u8 *extra, size_t extra_len, const u8 *bssid,
const u8 *key, u8 key_len, u8 key_idx)
@@ -1015,7 +1015,7 @@ int ieee80211_build_preq_ies(struct mac80211_local *local, u8 *buffer,
return pos - buffer;
}

-struct sk_buff *ieee80211_build_probe_req(struct ieee80211_sub_if_data *sdata,
+struct sk_buff *ieee80211_build_probe_req(struct mac80211_sub_if_data *sdata,
u8 *dst,
const u8 *ssid, size_t ssid_len,
const u8 *ie, size_t ie_len)
@@ -1060,7 +1060,7 @@ struct sk_buff *ieee80211_build_probe_req(struct ieee80211_sub_if_data *sdata,
return skb;
}

-void ieee80211_send_probe_req(struct ieee80211_sub_if_data *sdata, u8 *dst,
+void ieee80211_send_probe_req(struct mac80211_sub_if_data *sdata, u8 *dst,
const u8 *ssid, size_t ssid_len,
const u8 *ie, size_t ie_len)
{
@@ -1121,7 +1121,7 @@ void ieee80211_stop_device(struct mac80211_local *local)
int ieee80211_reconfig(struct mac80211_local *local)
{
struct ieee80211_hw *hw = &local->hw;
- struct ieee80211_sub_if_data *sdata;
+ struct mac80211_sub_if_data *sdata;
struct sta_info *sta;
int res;

@@ -1182,7 +1182,7 @@ int ieee80211_reconfig(struct mac80211_local *local)
sdata = sta->sdata;
if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN)
sdata = container_of(sdata->bss,
- struct ieee80211_sub_if_data,
+ struct mac80211_sub_if_data,
u.ap);

WARN_ON(drv_sta_add(local, sdata, &sta->sta));
@@ -1343,7 +1343,7 @@ static int check_mgd_smps(struct mac80211_if_managed *ifmgd,
/* must hold iflist_mtx */
void ieee80211_recalc_smps(struct mac80211_local *local)
{
- struct ieee80211_sub_if_data *sdata;
+ struct mac80211_sub_if_data *sdata;
enum ieee80211_smps_mode smps_mode = IEEE80211_SMPS_OFF;
int count = 0;

diff --git a/net/mac80211/wme.c b/net/mac80211/wme.c
index e20a843..4311c5d 100644
--- a/net/mac80211/wme.c
+++ b/net/mac80211/wme.c
@@ -54,7 +54,7 @@ static int wme_downgrade_ac(struct sk_buff *skb)


/* Indicate which queue to use. */
-u16 ieee80211_select_queue(struct ieee80211_sub_if_data *sdata,
+u16 ieee80211_select_queue(struct mac80211_sub_if_data *sdata,
struct sk_buff *skb)
{
struct mac80211_local *local = sdata->local;
diff --git a/net/mac80211/wme.h b/net/mac80211/wme.h
index 77a8e8d..e2007e4 100644
--- a/net/mac80211/wme.h
+++ b/net/mac80211/wme.h
@@ -20,7 +20,7 @@

extern const int ieee802_1d_to_ac[8];

-u16 ieee80211_select_queue(struct ieee80211_sub_if_data *sdata,
+u16 ieee80211_select_queue(struct mac80211_sub_if_data *sdata,
struct sk_buff *skb);
void ieee80211_set_qos_hdr(struct mac80211_local *local, struct sk_buff *skb);
u16 ieee80211_downgrade_queue(struct mac80211_local *local,
diff --git a/net/mac80211/work.c b/net/mac80211/work.c
index 2e54555..dbc07cf 100644
--- a/net/mac80211/work.c
+++ b/net/mac80211/work.c
@@ -191,7 +191,7 @@ static void ieee80211_add_ht_ie(struct sk_buff *skb, const u8 *ht_info_ie,
pos += sizeof(u8);
}

-static void ieee80211_send_assoc(struct ieee80211_sub_if_data *sdata,
+static void ieee80211_send_assoc(struct mac80211_sub_if_data *sdata,
struct mac80211_work *wk)
{
struct mac80211_local *local = sdata->local;
@@ -432,7 +432,7 @@ static void ieee80211_remove_auth_bss(struct mac80211_local *local,
static enum work_action __must_check
ieee80211_direct_probe(struct mac80211_work *wk)
{
- struct ieee80211_sub_if_data *sdata = wk->sdata;
+ struct mac80211_sub_if_data *sdata = wk->sdata;
struct mac80211_local *local = sdata->local;

wk->probe_auth.tries++;
@@ -470,7 +470,7 @@ ieee80211_direct_probe(struct mac80211_work *wk)
static enum work_action __must_check
ieee80211_authenticate(struct mac80211_work *wk)
{
- struct ieee80211_sub_if_data *sdata = wk->sdata;
+ struct mac80211_sub_if_data *sdata = wk->sdata;
struct mac80211_local *local = sdata->local;

wk->probe_auth.tries++;
@@ -503,7 +503,7 @@ ieee80211_authenticate(struct mac80211_work *wk)
static enum work_action __must_check
ieee80211_associate(struct mac80211_work *wk)
{
- struct ieee80211_sub_if_data *sdata = wk->sdata;
+ struct mac80211_sub_if_data *sdata = wk->sdata;
struct mac80211_local *local = sdata->local;

wk->assoc.tries++;
@@ -591,7 +591,7 @@ static void ieee80211_auth_challenge(struct mac80211_work *wk,
struct ieee80211_mgmt *mgmt,
size_t len)
{
- struct ieee80211_sub_if_data *sdata = wk->sdata;
+ struct mac80211_sub_if_data *sdata = wk->sdata;
u8 *pos;
struct ieee802_11_elems elems;

@@ -658,7 +658,7 @@ ieee80211_rx_mgmt_assoc_resp(struct mac80211_work *wk,
struct ieee80211_mgmt *mgmt, size_t len,
bool reassoc)
{
- struct ieee80211_sub_if_data *sdata = wk->sdata;
+ struct mac80211_sub_if_data *sdata = wk->sdata;
struct mac80211_local *local = sdata->local;
u16 capab_info, status_code, aid;
struct ieee802_11_elems elems;
@@ -716,7 +716,7 @@ ieee80211_rx_mgmt_probe_resp(struct mac80211_work *wk,
struct ieee80211_mgmt *mgmt, size_t len,
struct ieee80211_rx_status *rx_status)
{
- struct ieee80211_sub_if_data *sdata = wk->sdata;
+ struct mac80211_sub_if_data *sdata = wk->sdata;
struct mac80211_local *local = sdata->local;
size_t baselen;

@@ -740,7 +740,7 @@ static enum work_action __must_check
ieee80211_rx_mgmt_beacon(struct mac80211_work *wk,
struct ieee80211_mgmt *mgmt, size_t len)
{
- struct ieee80211_sub_if_data *sdata = wk->sdata;
+ struct mac80211_sub_if_data *sdata = wk->sdata;
struct mac80211_local *local = sdata->local;

ASSERT_WORK_MTX(local);
@@ -1152,7 +1152,7 @@ void ieee80211_work_init(struct mac80211_local *local)
skb_queue_head_init(&local->work_skb_queue);
}

-void ieee80211_work_purge(struct ieee80211_sub_if_data *sdata)
+void ieee80211_work_purge(struct mac80211_sub_if_data *sdata)
{
struct mac80211_local *local = sdata->local;
struct mac80211_work *wk;
@@ -1183,7 +1183,7 @@ void ieee80211_work_purge(struct ieee80211_sub_if_data *sdata)
mutex_unlock(&local->mtx);
}

-ieee80211_rx_result ieee80211_work_rx_mgmt(struct ieee80211_sub_if_data *sdata,
+ieee80211_rx_result ieee80211_work_rx_mgmt(struct mac80211_sub_if_data *sdata,
struct sk_buff *skb)
{
struct mac80211_local *local = sdata->local;
@@ -1233,7 +1233,7 @@ static enum work_done_result ieee80211_remain_done(struct mac80211_work *wk,
return WORK_DONE_DESTROY;
}

-int ieee80211_wk_remain_on_channel(struct ieee80211_sub_if_data *sdata,
+int ieee80211_wk_remain_on_channel(struct mac80211_sub_if_data *sdata,
struct ieee80211_channel *chan,
enum nl80211_channel_type channel_type,
unsigned int duration, u64 *cookie)
@@ -1259,7 +1259,7 @@ int ieee80211_wk_remain_on_channel(struct ieee80211_sub_if_data *sdata,
return 0;
}

-int ieee80211_wk_cancel_remain_on_channel(struct ieee80211_sub_if_data *sdata,
+int ieee80211_wk_cancel_remain_on_channel(struct mac80211_sub_if_data *sdata,
u64 cookie)
{
struct mac80211_local *local = sdata->local;


2011-05-29 20:04:30

by Kalle Valo

[permalink] [raw]
Subject: [RFC PATCH 03/27] zd1211rw: include mac80211.h from zd_chip.h

zd_chip.h contains one function with a pointer to ieee80211_hw but doesn't
include mac80211.h. As a temporary solution include mac80211.h to avoid
a warning.

Signed-off-by: Kalle Valo <[email protected]>
---
drivers/net/wireless/zd1211rw/zd_chip.h | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/net/wireless/zd1211rw/zd_chip.h b/drivers/net/wireless/zd1211rw/zd_chip.h
index 4be7c3b..117c412 100644
--- a/drivers/net/wireless/zd1211rw/zd_chip.h
+++ b/drivers/net/wireless/zd1211rw/zd_chip.h
@@ -21,6 +21,8 @@
#ifndef _ZD_CHIP_H
#define _ZD_CHIP_H

+#include <net/mac80211.h>
+
#include "zd_rf.h"
#include "zd_usb.h"



2011-05-29 20:07:13

by Kalle Valo

[permalink] [raw]
Subject: [RFC PATCH 26/27] mac80211: change queue stop reasons to use mac80211 prefix

Signed-off-by: Kalle Valo <[email protected]>
---
net/mac80211/agg-tx.c | 4 ++--
net/mac80211/mac80211_i.h | 12 ++++++------
net/mac80211/main.c | 2 +-
net/mac80211/mlme.c | 12 ++++++------
net/mac80211/pm.c | 2 +-
net/mac80211/tx.c | 2 +-
net/mac80211/util.c | 18 +++++++++---------
7 files changed, 26 insertions(+), 26 deletions(-)

diff --git a/net/mac80211/agg-tx.c b/net/mac80211/agg-tx.c
index faa5e50..826ca92 100644
--- a/net/mac80211/agg-tx.c
+++ b/net/mac80211/agg-tx.c
@@ -276,7 +276,7 @@ ieee80211_stop_queue_agg(struct mac80211_local *local, int tid)
if (atomic_inc_return(&local->agg_queue_stop[queue]) == 1)
ieee80211_stop_queue_by_reason(
&local->hw, queue,
- IEEE80211_QUEUE_STOP_REASON_AGGREGATION);
+ MAC80211_QUEUE_STOP_REASON_AGGREGATION);
__acquire(agg_queue);
}

@@ -288,7 +288,7 @@ ieee80211_wake_queue_agg(struct mac80211_local *local, int tid)
if (atomic_dec_return(&local->agg_queue_stop[queue]) == 0)
ieee80211_wake_queue_by_reason(
&local->hw, queue,
- IEEE80211_QUEUE_STOP_REASON_AGGREGATION);
+ MAC80211_QUEUE_STOP_REASON_AGGREGATION);
__release(agg_queue);
}

diff --git a/net/mac80211/mac80211_i.h b/net/mac80211/mac80211_i.h
index bf97b7e..413a2db 100644
--- a/net/mac80211/mac80211_i.h
+++ b/net/mac80211/mac80211_i.h
@@ -633,12 +633,12 @@ enum {
};

enum queue_stop_reason {
- IEEE80211_QUEUE_STOP_REASON_DRIVER,
- IEEE80211_QUEUE_STOP_REASON_PS,
- IEEE80211_QUEUE_STOP_REASON_CSA,
- IEEE80211_QUEUE_STOP_REASON_AGGREGATION,
- IEEE80211_QUEUE_STOP_REASON_SUSPEND,
- IEEE80211_QUEUE_STOP_REASON_SKB_ADD,
+ MAC80211_QUEUE_STOP_REASON_DRIVER,
+ MAC80211_QUEUE_STOP_REASON_PS,
+ MAC80211_QUEUE_STOP_REASON_CSA,
+ MAC80211_QUEUE_STOP_REASON_AGGREGATION,
+ MAC80211_QUEUE_STOP_REASON_SUSPEND,
+ MAC80211_QUEUE_STOP_REASON_SKB_ADD,
};

#ifdef CONFIG_MAC80211_LEDS
diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index a59821e..d9db197 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -380,7 +380,7 @@ void ieee80211_restart_hw(struct ieee80211_hw *hw)

/* use this reason, ieee80211_reconfig will unblock it */
ieee80211_stop_queues_by_reason(hw,
- IEEE80211_QUEUE_STOP_REASON_SUSPEND);
+ MAC80211_QUEUE_STOP_REASON_SUSPEND);

schedule_work(&local->restart_work);
}
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 06182b5..b92dbda 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -233,7 +233,7 @@ static u32 ieee80211_enable_ht(struct mac80211_sub_if_data *sdata,
}

ieee80211_stop_queues_by_reason(&sdata->local->hw,
- IEEE80211_QUEUE_STOP_REASON_CSA);
+ MAC80211_QUEUE_STOP_REASON_CSA);

/* channel_type change automatically detected */
ieee80211_hw_config(local, 0);
@@ -249,7 +249,7 @@ static u32 ieee80211_enable_ht(struct mac80211_sub_if_data *sdata,
}

ieee80211_wake_queues_by_reason(&sdata->local->hw,
- IEEE80211_QUEUE_STOP_REASON_CSA);
+ MAC80211_QUEUE_STOP_REASON_CSA);

ht_opmode = le16_to_cpu(hti->operation_mode);

@@ -406,7 +406,7 @@ static void ieee80211_chswitch_work(struct work_struct *work)
ifmgd->associated->channel = sdata->local->oper_channel;

ieee80211_wake_queues_by_reason(&sdata->local->hw,
- IEEE80211_QUEUE_STOP_REASON_CSA);
+ MAC80211_QUEUE_STOP_REASON_CSA);
out:
ifmgd->flags &= ~MAC80211_STA_CSA_RECEIVED;
mutex_unlock(&ifmgd->mtx);
@@ -489,7 +489,7 @@ void ieee80211_sta_process_chanswitch(struct mac80211_sub_if_data *sdata,
if (sw_elem->mode) {
ch_switch.block_tx = true;
ieee80211_stop_queues_by_reason(&sdata->local->hw,
- IEEE80211_QUEUE_STOP_REASON_CSA);
+ MAC80211_QUEUE_STOP_REASON_CSA);
}
ch_switch.channel = new_ch;
ch_switch.count = sw_elem->count;
@@ -504,7 +504,7 @@ void ieee80211_sta_process_chanswitch(struct mac80211_sub_if_data *sdata,
} else {
if (sw_elem->mode)
ieee80211_stop_queues_by_reason(&sdata->local->hw,
- IEEE80211_QUEUE_STOP_REASON_CSA);
+ MAC80211_QUEUE_STOP_REASON_CSA);
ifmgd->flags |= MAC80211_STA_CSA_RECEIVED;
mod_timer(&ifmgd->chswitch_timer,
jiffies +
@@ -746,7 +746,7 @@ void ieee80211_dynamic_ps_disable_work(struct work_struct *work)
}

ieee80211_wake_queues_by_reason(&local->hw,
- IEEE80211_QUEUE_STOP_REASON_PS);
+ MAC80211_QUEUE_STOP_REASON_PS);
}

void ieee80211_dynamic_ps_enable_work(struct work_struct *work)
diff --git a/net/mac80211/pm.c b/net/mac80211/pm.c
index 47505f0..e41aa9e 100644
--- a/net/mac80211/pm.c
+++ b/net/mac80211/pm.c
@@ -24,7 +24,7 @@ int __ieee80211_suspend(struct ieee80211_hw *hw, struct cfg80211_wowlan *wowlan)
}

ieee80211_stop_queues_by_reason(hw,
- IEEE80211_QUEUE_STOP_REASON_SUSPEND);
+ MAC80211_QUEUE_STOP_REASON_SUSPEND);

/* flush out all packets */
synchronize_net();
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index b6c7e33..8633f30 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -231,7 +231,7 @@ ieee80211_tx_h_dynamic_ps(struct mac80211_tx_data *tx)

if (local->hw.conf.flags & IEEE80211_CONF_PS) {
ieee80211_stop_queues_by_reason(&local->hw,
- IEEE80211_QUEUE_STOP_REASON_PS);
+ MAC80211_QUEUE_STOP_REASON_PS);
ifmgd->flags &= ~MAC80211_STA_NULLFUNC_ACKED;
ieee80211_queue_work(&local->hw,
&local->dynamic_ps_disable_work);
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index 7e1514c..65b0367 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -307,7 +307,7 @@ void ieee80211_wake_queue_by_reason(struct ieee80211_hw *hw, int queue,
void ieee80211_wake_queue(struct ieee80211_hw *hw, int queue)
{
ieee80211_wake_queue_by_reason(hw, queue,
- IEEE80211_QUEUE_STOP_REASON_DRIVER);
+ MAC80211_QUEUE_STOP_REASON_DRIVER);
}
EXPORT_SYMBOL(ieee80211_wake_queue);

@@ -344,7 +344,7 @@ void ieee80211_stop_queue_by_reason(struct ieee80211_hw *hw, int queue,
void ieee80211_stop_queue(struct ieee80211_hw *hw, int queue)
{
ieee80211_stop_queue_by_reason(hw, queue,
- IEEE80211_QUEUE_STOP_REASON_DRIVER);
+ MAC80211_QUEUE_STOP_REASON_DRIVER);
}
EXPORT_SYMBOL(ieee80211_stop_queue);

@@ -362,9 +362,9 @@ void ieee80211_add_pending_skb(struct mac80211_local *local,
}

spin_lock_irqsave(&local->queue_stop_reason_lock, flags);
- __ieee80211_stop_queue(hw, queue, IEEE80211_QUEUE_STOP_REASON_SKB_ADD);
+ __ieee80211_stop_queue(hw, queue, MAC80211_QUEUE_STOP_REASON_SKB_ADD);
__skb_queue_tail(&local->pending[queue], skb);
- __ieee80211_wake_queue(hw, queue, IEEE80211_QUEUE_STOP_REASON_SKB_ADD);
+ __ieee80211_wake_queue(hw, queue, MAC80211_QUEUE_STOP_REASON_SKB_ADD);
spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags);
}

@@ -380,7 +380,7 @@ int ieee80211_add_pending_skbs_fn(struct mac80211_local *local,
spin_lock_irqsave(&local->queue_stop_reason_lock, flags);
for (i = 0; i < hw->queues; i++)
__ieee80211_stop_queue(hw, i,
- IEEE80211_QUEUE_STOP_REASON_SKB_ADD);
+ MAC80211_QUEUE_STOP_REASON_SKB_ADD);

while ((skb = skb_dequeue(skbs))) {
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
@@ -400,7 +400,7 @@ int ieee80211_add_pending_skbs_fn(struct mac80211_local *local,

for (i = 0; i < hw->queues; i++)
__ieee80211_wake_queue(hw, i,
- IEEE80211_QUEUE_STOP_REASON_SKB_ADD);
+ MAC80211_QUEUE_STOP_REASON_SKB_ADD);
spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags);

return ret;
@@ -430,7 +430,7 @@ void ieee80211_stop_queues_by_reason(struct ieee80211_hw *hw,
void ieee80211_stop_queues(struct ieee80211_hw *hw)
{
ieee80211_stop_queues_by_reason(hw,
- IEEE80211_QUEUE_STOP_REASON_DRIVER);
+ MAC80211_QUEUE_STOP_REASON_DRIVER);
}
EXPORT_SYMBOL(ieee80211_stop_queues);

@@ -467,7 +467,7 @@ void ieee80211_wake_queues_by_reason(struct ieee80211_hw *hw,

void ieee80211_wake_queues(struct ieee80211_hw *hw)
{
- ieee80211_wake_queues_by_reason(hw, IEEE80211_QUEUE_STOP_REASON_DRIVER);
+ ieee80211_wake_queues_by_reason(hw, MAC80211_QUEUE_STOP_REASON_DRIVER);
}
EXPORT_SYMBOL(ieee80211_wake_queues);

@@ -1278,7 +1278,7 @@ int ieee80211_reconfig(struct mac80211_local *local)

wake_up:
ieee80211_wake_queues_by_reason(hw,
- IEEE80211_QUEUE_STOP_REASON_SUSPEND);
+ MAC80211_QUEUE_STOP_REASON_SUSPEND);

/*
* If this is for hw restart things are still running.


2011-05-29 20:04:07

by Kalle Valo

[permalink] [raw]
Subject: [RFC PATCH 01/27] iwlegacy: fix stop/wake queue hacks

The hacks break once mac80211-compat.h is taken into use. Fix it by adding
an ifdef check.

Signed-off-by: Kalle Valo <[email protected]>
---
drivers/net/wireless/iwlegacy/iwl-helpers.h | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/drivers/net/wireless/iwlegacy/iwl-helpers.h b/drivers/net/wireless/iwlegacy/iwl-helpers.h
index a6effda..5cf23ea 100644
--- a/drivers/net/wireless/iwlegacy/iwl-helpers.h
+++ b/drivers/net/wireless/iwlegacy/iwl-helpers.h
@@ -132,7 +132,16 @@ static inline void iwl_legacy_stop_queue(struct iwl_priv *priv,
ieee80211_stop_queue(priv->hw, ac);
}

+#ifdef ieee80211_stop_queue
+#undef ieee80211_stop_queue
+#endif
+
#define ieee80211_stop_queue DO_NOT_USE_ieee80211_stop_queue
+
+#ifdef ieee80211_wake_queue
+#undef ieee80211_wake_queue
+#endif
+
#define ieee80211_wake_queue DO_NOT_USE_ieee80211_wake_queue

static inline void iwl_legacy_disable_interrupts(struct iwl_priv *priv)


2011-05-29 20:06:50

by Kalle Valo

[permalink] [raw]
Subject: [RFC PATCH 23/27] mac80211: rename ieee80211_sdata_state_bits to mac80211_sdata_state_bits

Signed-off-by: Kalle Valo <[email protected]>
---
net/mac80211/mac80211_i.h | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/mac80211/mac80211_i.h b/net/mac80211/mac80211_i.h
index 5ae43dc..dfc3f77 100644
--- a/net/mac80211/mac80211_i.h
+++ b/net/mac80211/mac80211_i.h
@@ -524,14 +524,14 @@ enum mac80211_sub_if_data_flags {
};

/**
- * enum ieee80211_sdata_state_bits - virtual interface state bits
+ * enum mac80211_sdata_state_bits - virtual interface state bits
* @SDATA_STATE_RUNNING: virtual interface is up & running; this
* mirrors netif_running() but is separate for interface type
* change handling while the interface is up
* @SDATA_STATE_OFFCHANNEL: This interface is currently in offchannel
* mode, so queues are stopped
*/
-enum ieee80211_sdata_state_bits {
+enum mac80211_sdata_state_bits {
SDATA_STATE_RUNNING,
SDATA_STATE_OFFCHANNEL,
};


2011-05-29 20:06:11

by Kalle Valo

[permalink] [raw]
Subject: [RFC PATCH 17/27] mac80211: rename ieee80211_work to mac80211_work

Signed-off-by: Kalle Valo <[email protected]>
---
net/mac80211/cfg.c | 6 +++---
net/mac80211/iface.c | 2 +-
net/mac80211/mac80211_i.h | 8 ++++----
net/mac80211/mlme.c | 14 +++++++------
net/mac80211/status.c | 2 +-
net/mac80211/work.c | 48 +++++++++++++++++++++++----------------------
6 files changed, 40 insertions(+), 40 deletions(-)

diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 4d1dc36..2ac599f 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -1785,7 +1785,7 @@ static int ieee80211_cancel_remain_on_channel(struct wiphy *wiphy,
}

static enum work_done_result
-ieee80211_offchan_tx_done(struct ieee80211_work *wk, struct sk_buff *skb)
+ieee80211_offchan_tx_done(struct mac80211_work *wk, struct sk_buff *skb)
{
/*
* Use the data embedded in the work struct for reporting
@@ -1816,7 +1816,7 @@ static int ieee80211_mgmt_tx(struct wiphy *wiphy, struct net_device *dev,
struct mac80211_local *local = sdata->local;
struct sk_buff *skb;
struct sta_info *sta;
- struct ieee80211_work *wk;
+ struct mac80211_work *wk;
const struct ieee80211_mgmt *mgmt = (void *)buf;
u32 flags = IEEE80211_TX_INTFL_NL80211_FRAME_TX |
IEEE80211_TX_CTL_REQ_TX_STATUS;
@@ -1983,7 +1983,7 @@ static int ieee80211_mgmt_tx_cancel_wait(struct wiphy *wiphy,
{
struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
struct mac80211_local *local = sdata->local;
- struct ieee80211_work *wk;
+ struct mac80211_work *wk;
int ret = -ENOENT;

mutex_lock(&local->mtx);
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
index 5c44737..f28f68d 100644
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -1274,7 +1274,7 @@ u32 __ieee80211_recalc_idle(struct mac80211_local *local)
struct ieee80211_sub_if_data *sdata;
int count = 0;
bool working = false, scanning = false, hw_roc = false;
- struct ieee80211_work *wk;
+ struct mac80211_work *wk;
unsigned int led_trig_start = 0, led_trig_stop = 0;

#ifdef CONFIG_PROVE_LOCKING
diff --git a/net/mac80211/mac80211_i.h b/net/mac80211/mac80211_i.h
index ad654de..6cc8790 100644
--- a/net/mac80211/mac80211_i.h
+++ b/net/mac80211/mac80211_i.h
@@ -279,14 +279,14 @@ enum work_done_result {
WORK_DONE_REQUEUE,
};

-struct ieee80211_work {
+struct mac80211_work {
struct list_head list;

struct rcu_head rcu_head;

struct ieee80211_sub_if_data *sdata;

- enum work_done_result (*done)(struct ieee80211_work *wk,
+ enum work_done_result (*done)(struct mac80211_work *wk,
struct sk_buff *skb);

struct ieee80211_channel *chan;
@@ -1374,8 +1374,8 @@ size_t ieee80211_ie_split_vendor(const u8 *ies, size_t ielen, size_t offset);

/* internal work items */
void ieee80211_work_init(struct mac80211_local *local);
-void ieee80211_add_work(struct ieee80211_work *wk);
-void free_work(struct ieee80211_work *wk);
+void ieee80211_add_work(struct mac80211_work *wk);
+void free_work(struct mac80211_work *wk);
void ieee80211_work_purge(struct ieee80211_sub_if_data *sdata);
ieee80211_rx_result ieee80211_work_rx_mgmt(struct ieee80211_sub_if_data *sdata,
struct sk_buff *skb);
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index fb72946..272e147 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -1431,7 +1431,7 @@ ieee80211_rx_mgmt_disassoc(struct ieee80211_sub_if_data *sdata,
}


-static bool ieee80211_assoc_success(struct ieee80211_work *wk,
+static bool ieee80211_assoc_success(struct mac80211_work *wk,
struct ieee80211_mgmt *mgmt, size_t len)
{
struct ieee80211_sub_if_data *sdata = wk->sdata;
@@ -1964,7 +1964,7 @@ void ieee80211_sta_rx_queued_mgmt(struct ieee80211_sub_if_data *sdata,
if (skb->len >= 24 + 2 /* mgmt + deauth reason */ &&
(fc & IEEE80211_FCTL_STYPE) == IEEE80211_STYPE_DEAUTH) {
struct mac80211_local *local = sdata->local;
- struct ieee80211_work *wk;
+ struct mac80211_work *wk;

mutex_lock(&local->mtx);
list_for_each_entry(wk, &local->work_list, list) {
@@ -2274,7 +2274,7 @@ int ieee80211_max_network_latency(struct notifier_block *nb,

/* config hooks */
static enum work_done_result
-ieee80211_probe_auth_done(struct ieee80211_work *wk,
+ieee80211_probe_auth_done(struct mac80211_work *wk,
struct sk_buff *skb)
{
if (!skb) {
@@ -2300,7 +2300,7 @@ int ieee80211_mgd_auth(struct ieee80211_sub_if_data *sdata,
struct cfg80211_auth_request *req)
{
const u8 *ssid;
- struct ieee80211_work *wk;
+ struct mac80211_work *wk;
u16 auth_alg;

if (req->local_state_change)
@@ -2363,7 +2363,7 @@ int ieee80211_mgd_auth(struct ieee80211_sub_if_data *sdata,
return 0;
}

-static enum work_done_result ieee80211_assoc_done(struct ieee80211_work *wk,
+static enum work_done_result ieee80211_assoc_done(struct mac80211_work *wk,
struct sk_buff *skb)
{
struct ieee80211_mgmt *mgmt;
@@ -2414,7 +2414,7 @@ int ieee80211_mgd_assoc(struct ieee80211_sub_if_data *sdata,
{
struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
struct mac80211_bss *bss = (void *)req->bss->priv;
- struct ieee80211_work *wk;
+ struct mac80211_work *wk;
const u8 *ssid;
int i;

@@ -2540,7 +2540,7 @@ int ieee80211_mgd_deauth(struct ieee80211_sub_if_data *sdata,
{
struct mac80211_local *local = sdata->local;
struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
- struct ieee80211_work *wk;
+ struct mac80211_work *wk;
u8 bssid[ETH_ALEN];
bool assoc_bss = false;

diff --git a/net/mac80211/status.c b/net/mac80211/status.c
index 108e6b1..86d971b 100644
--- a/net/mac80211/status.c
+++ b/net/mac80211/status.c
@@ -327,7 +327,7 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb)
}

if (info->flags & IEEE80211_TX_INTFL_NL80211_FRAME_TX) {
- struct ieee80211_work *wk;
+ struct mac80211_work *wk;
u64 cookie = (unsigned long)skb;

rcu_read_lock();
diff --git a/net/mac80211/work.c b/net/mac80211/work.c
index 3a14bb8..2e54555 100644
--- a/net/mac80211/work.c
+++ b/net/mac80211/work.c
@@ -67,13 +67,13 @@ static void run_again(struct mac80211_local *local,

static void work_free_rcu(struct rcu_head *head)
{
- struct ieee80211_work *wk =
- container_of(head, struct ieee80211_work, rcu_head);
+ struct mac80211_work *wk =
+ container_of(head, struct mac80211_work, rcu_head);

kfree(wk);
}

-void free_work(struct ieee80211_work *wk)
+void free_work(struct mac80211_work *wk)
{
call_rcu(&wk->rcu_head, work_free_rcu);
}
@@ -192,7 +192,7 @@ static void ieee80211_add_ht_ie(struct sk_buff *skb, const u8 *ht_info_ie,
}

static void ieee80211_send_assoc(struct ieee80211_sub_if_data *sdata,
- struct ieee80211_work *wk)
+ struct mac80211_work *wk)
{
struct mac80211_local *local = sdata->local;
struct sk_buff *skb;
@@ -410,7 +410,7 @@ static void ieee80211_send_assoc(struct ieee80211_sub_if_data *sdata,
}

static void ieee80211_remove_auth_bss(struct mac80211_local *local,
- struct ieee80211_work *wk)
+ struct mac80211_work *wk)
{
struct cfg80211_bss *cbss;
u16 capa_val = WLAN_CAPABILITY_ESS;
@@ -430,7 +430,7 @@ static void ieee80211_remove_auth_bss(struct mac80211_local *local,
}

static enum work_action __must_check
-ieee80211_direct_probe(struct ieee80211_work *wk)
+ieee80211_direct_probe(struct mac80211_work *wk)
{
struct ieee80211_sub_if_data *sdata = wk->sdata;
struct mac80211_local *local = sdata->local;
@@ -468,7 +468,7 @@ ieee80211_direct_probe(struct ieee80211_work *wk)


static enum work_action __must_check
-ieee80211_authenticate(struct ieee80211_work *wk)
+ieee80211_authenticate(struct mac80211_work *wk)
{
struct ieee80211_sub_if_data *sdata = wk->sdata;
struct mac80211_local *local = sdata->local;
@@ -501,7 +501,7 @@ ieee80211_authenticate(struct ieee80211_work *wk)
}

static enum work_action __must_check
-ieee80211_associate(struct ieee80211_work *wk)
+ieee80211_associate(struct mac80211_work *wk)
{
struct ieee80211_sub_if_data *sdata = wk->sdata;
struct mac80211_local *local = sdata->local;
@@ -533,7 +533,7 @@ ieee80211_associate(struct ieee80211_work *wk)
}

static enum work_action __must_check
-ieee80211_remain_on_channel_timeout(struct ieee80211_work *wk)
+ieee80211_remain_on_channel_timeout(struct mac80211_work *wk)
{
/*
* First time we run, do nothing -- the generic code will
@@ -553,7 +553,7 @@ ieee80211_remain_on_channel_timeout(struct ieee80211_work *wk)
}

static enum work_action __must_check
-ieee80211_offchannel_tx(struct ieee80211_work *wk)
+ieee80211_offchannel_tx(struct mac80211_work *wk)
{
if (!wk->started) {
wk->timeout = jiffies + msecs_to_jiffies(wk->offchan_tx.wait);
@@ -572,7 +572,7 @@ ieee80211_offchannel_tx(struct ieee80211_work *wk)
}

static enum work_action __must_check
-ieee80211_assoc_beacon_wait(struct ieee80211_work *wk)
+ieee80211_assoc_beacon_wait(struct mac80211_work *wk)
{
if (wk->started)
return WORK_ACT_TIMEOUT;
@@ -587,7 +587,7 @@ ieee80211_assoc_beacon_wait(struct ieee80211_work *wk)
return WORK_ACT_NONE;
}

-static void ieee80211_auth_challenge(struct ieee80211_work *wk,
+static void ieee80211_auth_challenge(struct mac80211_work *wk,
struct ieee80211_mgmt *mgmt,
size_t len)
{
@@ -607,7 +607,7 @@ static void ieee80211_auth_challenge(struct ieee80211_work *wk,
}

static enum work_action __must_check
-ieee80211_rx_mgmt_auth(struct ieee80211_work *wk,
+ieee80211_rx_mgmt_auth(struct mac80211_work *wk,
struct ieee80211_mgmt *mgmt, size_t len)
{
u16 auth_alg, auth_transaction, status_code;
@@ -654,7 +654,7 @@ ieee80211_rx_mgmt_auth(struct ieee80211_work *wk,
}

static enum work_action __must_check
-ieee80211_rx_mgmt_assoc_resp(struct ieee80211_work *wk,
+ieee80211_rx_mgmt_assoc_resp(struct mac80211_work *wk,
struct ieee80211_mgmt *mgmt, size_t len,
bool reassoc)
{
@@ -712,7 +712,7 @@ ieee80211_rx_mgmt_assoc_resp(struct ieee80211_work *wk,
}

static enum work_action __must_check
-ieee80211_rx_mgmt_probe_resp(struct ieee80211_work *wk,
+ieee80211_rx_mgmt_probe_resp(struct mac80211_work *wk,
struct ieee80211_mgmt *mgmt, size_t len,
struct ieee80211_rx_status *rx_status)
{
@@ -737,7 +737,7 @@ ieee80211_rx_mgmt_probe_resp(struct ieee80211_work *wk,
}

static enum work_action __must_check
-ieee80211_rx_mgmt_beacon(struct ieee80211_work *wk,
+ieee80211_rx_mgmt_beacon(struct mac80211_work *wk,
struct ieee80211_mgmt *mgmt, size_t len)
{
struct ieee80211_sub_if_data *sdata = wk->sdata;
@@ -760,7 +760,7 @@ static void ieee80211_work_rx_queued_mgmt(struct mac80211_local *local,
{
struct ieee80211_rx_status *rx_status;
struct ieee80211_mgmt *mgmt;
- struct ieee80211_work *wk;
+ struct mac80211_work *wk;
enum work_action rma = WORK_ACT_NONE;
u16 fc;

@@ -918,7 +918,7 @@ static void ieee80211_work_work(struct work_struct *work)
struct mac80211_local *local =
container_of(work, struct mac80211_local, work_work);
struct sk_buff *skb;
- struct ieee80211_work *wk, *tmp;
+ struct mac80211_work *wk, *tmp;
LIST_HEAD(free_work);
enum work_action rma;
bool remain_off_channel = false;
@@ -1117,7 +1117,7 @@ static void ieee80211_work_work(struct work_struct *work)
}
}

-void ieee80211_add_work(struct ieee80211_work *wk)
+void ieee80211_add_work(struct mac80211_work *wk)
{
struct mac80211_local *local;

@@ -1155,7 +1155,7 @@ void ieee80211_work_init(struct mac80211_local *local)
void ieee80211_work_purge(struct ieee80211_sub_if_data *sdata)
{
struct mac80211_local *local = sdata->local;
- struct ieee80211_work *wk;
+ struct mac80211_work *wk;
bool cleanup = false;

mutex_lock(&local->mtx);
@@ -1188,7 +1188,7 @@ ieee80211_rx_result ieee80211_work_rx_mgmt(struct ieee80211_sub_if_data *sdata,
{
struct mac80211_local *local = sdata->local;
struct ieee80211_mgmt *mgmt;
- struct ieee80211_work *wk;
+ struct mac80211_work *wk;
u16 fc;

if (skb->len < 24)
@@ -1220,7 +1220,7 @@ ieee80211_rx_result ieee80211_work_rx_mgmt(struct ieee80211_sub_if_data *sdata,
return RX_CONTINUE;
}

-static enum work_done_result ieee80211_remain_done(struct ieee80211_work *wk,
+static enum work_done_result ieee80211_remain_done(struct mac80211_work *wk,
struct sk_buff *skb)
{
/*
@@ -1238,7 +1238,7 @@ int ieee80211_wk_remain_on_channel(struct ieee80211_sub_if_data *sdata,
enum nl80211_channel_type channel_type,
unsigned int duration, u64 *cookie)
{
- struct ieee80211_work *wk;
+ struct mac80211_work *wk;

wk = kzalloc(sizeof(*wk), GFP_KERNEL);
if (!wk)
@@ -1263,7 +1263,7 @@ int ieee80211_wk_cancel_remain_on_channel(struct ieee80211_sub_if_data *sdata,
u64 cookie)
{
struct mac80211_local *local = sdata->local;
- struct ieee80211_work *wk, *tmp;
+ struct mac80211_work *wk, *tmp;
bool found = false;

mutex_lock(&local->mtx);


2011-05-29 20:04:13

by Kalle Valo

[permalink] [raw]
Subject: [RFC PATCH 02/27] iwlwifi: fix stop/wake queue hacks

The hacks break once mac80211-compat.h is taken into use. Fix it by adding
an ifdef check.

Signed-off-by: Kalle Valo <[email protected]>
---
drivers/net/wireless/iwlwifi/iwl-helpers.h | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl-helpers.h b/drivers/net/wireless/iwlwifi/iwl-helpers.h
index 41207a3..9d91552 100644
--- a/drivers/net/wireless/iwlwifi/iwl-helpers.h
+++ b/drivers/net/wireless/iwlwifi/iwl-helpers.h
@@ -120,7 +120,16 @@ static inline void iwl_wake_any_queue(struct iwl_priv *priv,
}
}

+#ifdef ieee80211_stop_queue
+#undef ieee80211_stop_queue
+#endif
+
#define ieee80211_stop_queue DO_NOT_USE_ieee80211_stop_queue
+
+#ifdef ieee80211_wake_queue
+#undef ieee80211_wake_queue
+#endif
+
#define ieee80211_wake_queue DO_NOT_USE_ieee80211_wake_queue

static inline void iwl_disable_interrupts(struct iwl_priv *priv)


2011-05-29 20:05:43

by Kalle Valo

[permalink] [raw]
Subject: [RFC PATCH 13/27] mac80211: rename ieee80211_rx_data to mac80211_rx_data

Signed-off-by: Kalle Valo <[email protected]>
---
net/mac80211/mac80211_i.h | 2 +
net/mac80211/rx.c | 70 +++++++++++++++++++++++----------------------
net/mac80211/wep.c | 2 +
net/mac80211/wep.h | 2 +
net/mac80211/wpa.c | 8 +++--
net/mac80211/wpa.h | 8 +++--
6 files changed, 46 insertions(+), 46 deletions(-)

diff --git a/net/mac80211/mac80211_i.h b/net/mac80211/mac80211_i.h
index 5f7b684..d4aa73f 100644
--- a/net/mac80211/mac80211_i.h
+++ b/net/mac80211/mac80211_i.h
@@ -194,7 +194,7 @@ enum mac80211_i_rx_flags {
MAC80211_RX_CMNTR = BIT(0),
};

-struct ieee80211_rx_data {
+struct mac80211_rx_data {
struct sk_buff *skb;
struct mac80211_local *local;
struct ieee80211_sub_if_data *sdata;
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index 8245813..3c55ec4 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -327,7 +327,7 @@ ieee80211_rx_monitor(struct mac80211_local *local, struct sk_buff *origskb,
}


-static void ieee80211_parse_qos(struct ieee80211_rx_data *rx)
+static void ieee80211_parse_qos(struct mac80211_rx_data *rx)
{
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)rx->skb->data;
struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(rx->skb);
@@ -386,7 +386,7 @@ static void ieee80211_parse_qos(struct ieee80211_rx_data *rx)
* the payload is not supported, the driver is required to move the 802.11
* header to be directly in front of the payload in that case.
*/
-static void ieee80211_verify_alignment(struct ieee80211_rx_data *rx)
+static void ieee80211_verify_alignment(struct mac80211_rx_data *rx)
{
#ifdef CONFIG_MAC80211_VERBOSE_DEBUG
WARN_ONCE((unsigned long)rx->skb->data & 1,
@@ -398,7 +398,7 @@ static void ieee80211_verify_alignment(struct ieee80211_rx_data *rx)
/* rx handlers */

static ieee80211_rx_result debug_noinline
-ieee80211_rx_h_passive_scan(struct ieee80211_rx_data *rx)
+ieee80211_rx_h_passive_scan(struct mac80211_rx_data *rx)
{
struct mac80211_local *local = rx->local;
struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(rx->skb);
@@ -465,7 +465,7 @@ static int ieee80211_get_mmie_keyidx(struct sk_buff *skb)


static ieee80211_rx_result
-ieee80211_rx_mesh_check(struct ieee80211_rx_data *rx)
+ieee80211_rx_mesh_check(struct mac80211_rx_data *rx)
{
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)rx->skb->data;
unsigned int hdrlen = ieee80211_hdrlen(hdr->frame_control);
@@ -739,7 +739,7 @@ static bool ieee80211_sta_manage_reorder_buf(struct ieee80211_hw *hw,
* Reorder MPDUs from A-MPDUs, keeping them on a buffer. Returns
* true if the MPDU was buffered, false if it should be processed.
*/
-static void ieee80211_rx_reorder_ampdu(struct ieee80211_rx_data *rx)
+static void ieee80211_rx_reorder_ampdu(struct mac80211_rx_data *rx)
{
struct sk_buff *skb = rx->skb;
struct mac80211_local *local = rx->local;
@@ -802,7 +802,7 @@ static void ieee80211_rx_reorder_ampdu(struct ieee80211_rx_data *rx)
}

static ieee80211_rx_result debug_noinline
-ieee80211_rx_h_check(struct ieee80211_rx_data *rx)
+ieee80211_rx_h_check(struct mac80211_rx_data *rx)
{
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)rx->skb->data;
struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(rx->skb);
@@ -850,7 +850,7 @@ ieee80211_rx_h_check(struct ieee80211_rx_data *rx)


static ieee80211_rx_result debug_noinline
-ieee80211_rx_h_decrypt(struct ieee80211_rx_data *rx)
+ieee80211_rx_h_decrypt(struct mac80211_rx_data *rx)
{
struct sk_buff *skb = rx->skb;
struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb);
@@ -1057,7 +1057,7 @@ ieee80211_rx_h_decrypt(struct ieee80211_rx_data *rx)
}

static ieee80211_rx_result debug_noinline
-ieee80211_rx_h_check_more_data(struct ieee80211_rx_data *rx)
+ieee80211_rx_h_check_more_data(struct mac80211_rx_data *rx)
{
struct mac80211_local *local;
struct ieee80211_hdr *hdr;
@@ -1148,7 +1148,7 @@ int ieee80211_sta_ps_transition(struct ieee80211_sta *sta, bool start)
EXPORT_SYMBOL(ieee80211_sta_ps_transition);

static ieee80211_rx_result debug_noinline
-ieee80211_rx_h_sta_process(struct ieee80211_rx_data *rx)
+ieee80211_rx_h_sta_process(struct mac80211_rx_data *rx)
{
struct sta_info *sta = rx->sta;
struct sk_buff *skb = rx->skb;
@@ -1337,7 +1337,7 @@ ieee80211_reassemble_find(struct ieee80211_sub_if_data *sdata,
}

static ieee80211_rx_result debug_noinline
-ieee80211_rx_h_defragment(struct ieee80211_rx_data *rx)
+ieee80211_rx_h_defragment(struct mac80211_rx_data *rx)
{
struct ieee80211_hdr *hdr;
u16 sc;
@@ -1459,7 +1459,7 @@ ieee80211_rx_h_defragment(struct ieee80211_rx_data *rx)
}

static ieee80211_rx_result debug_noinline
-ieee80211_rx_h_ps_poll(struct ieee80211_rx_data *rx)
+ieee80211_rx_h_ps_poll(struct mac80211_rx_data *rx)
{
struct ieee80211_sub_if_data *sdata = rx->sdata;
__le16 fc = ((struct ieee80211_hdr *)rx->skb->data)->frame_control;
@@ -1486,7 +1486,7 @@ ieee80211_rx_h_ps_poll(struct ieee80211_rx_data *rx)
}

static ieee80211_rx_result debug_noinline
-ieee80211_rx_h_remove_qos_control(struct ieee80211_rx_data *rx)
+ieee80211_rx_h_remove_qos_control(struct mac80211_rx_data *rx)
{
u8 *data = rx->skb->data;
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)data;
@@ -1505,7 +1505,7 @@ ieee80211_rx_h_remove_qos_control(struct ieee80211_rx_data *rx)
}

static int
-ieee80211_802_1x_port_control(struct ieee80211_rx_data *rx)
+ieee80211_802_1x_port_control(struct mac80211_rx_data *rx)
{
if (unlikely(!rx->sta ||
!test_sta_flags(rx->sta, WLAN_STA_AUTHORIZED)))
@@ -1515,7 +1515,7 @@ ieee80211_802_1x_port_control(struct ieee80211_rx_data *rx)
}

static int
-ieee80211_drop_unencrypted(struct ieee80211_rx_data *rx, __le16 fc)
+ieee80211_drop_unencrypted(struct mac80211_rx_data *rx, __le16 fc)
{
struct sk_buff *skb = rx->skb;
struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb);
@@ -1538,7 +1538,7 @@ ieee80211_drop_unencrypted(struct ieee80211_rx_data *rx, __le16 fc)
}

static int
-ieee80211_drop_unencrypted_mgmt(struct ieee80211_rx_data *rx)
+ieee80211_drop_unencrypted_mgmt(struct mac80211_rx_data *rx)
{
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)rx->skb->data;
struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(rx->skb);
@@ -1592,7 +1592,7 @@ ieee80211_drop_unencrypted_mgmt(struct ieee80211_rx_data *rx)
}

static int
-__ieee80211_data_to_8023(struct ieee80211_rx_data *rx, bool *port_control)
+__ieee80211_data_to_8023(struct mac80211_rx_data *rx, bool *port_control)
{
struct ieee80211_sub_if_data *sdata = rx->sdata;
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)rx->skb->data;
@@ -1634,7 +1634,7 @@ __ieee80211_data_to_8023(struct ieee80211_rx_data *rx, bool *port_control)
/*
* requires that rx->skb is a frame with ethernet header
*/
-static bool ieee80211_frame_allowed(struct ieee80211_rx_data *rx, __le16 fc)
+static bool ieee80211_frame_allowed(struct mac80211_rx_data *rx, __le16 fc)
{
static const u8 pae_group_addr[ETH_ALEN] __aligned(2)
= { 0x01, 0x80, 0xC2, 0x00, 0x00, 0x03 };
@@ -1660,7 +1660,7 @@ static bool ieee80211_frame_allowed(struct ieee80211_rx_data *rx, __le16 fc)
* requires that rx->skb is a frame with ethernet header
*/
static void
-ieee80211_deliver_skb(struct ieee80211_rx_data *rx)
+ieee80211_deliver_skb(struct mac80211_rx_data *rx)
{
struct ieee80211_sub_if_data *sdata = rx->sdata;
struct net_device *dev = sdata->dev;
@@ -1745,7 +1745,7 @@ ieee80211_deliver_skb(struct ieee80211_rx_data *rx)
}

static ieee80211_rx_result debug_noinline
-ieee80211_rx_h_amsdu(struct ieee80211_rx_data *rx)
+ieee80211_rx_h_amsdu(struct mac80211_rx_data *rx)
{
struct net_device *dev = rx->sdata->dev;
struct sk_buff *skb = rx->skb;
@@ -1803,7 +1803,7 @@ ieee80211_rx_h_amsdu(struct ieee80211_rx_data *rx)

#ifdef CONFIG_MAC80211_MESH
static ieee80211_rx_result
-ieee80211_rx_h_mesh_fwding(struct ieee80211_rx_data *rx)
+ieee80211_rx_h_mesh_fwding(struct mac80211_rx_data *rx)
{
struct ieee80211_hdr *hdr;
struct ieee80211s_hdr *mesh_hdr;
@@ -1919,7 +1919,7 @@ ieee80211_rx_h_mesh_fwding(struct ieee80211_rx_data *rx)
#endif

static ieee80211_rx_result debug_noinline
-ieee80211_rx_h_data(struct ieee80211_rx_data *rx)
+ieee80211_rx_h_data(struct mac80211_rx_data *rx)
{
struct ieee80211_sub_if_data *sdata = rx->sdata;
struct mac80211_local *local = rx->local;
@@ -1978,7 +1978,7 @@ ieee80211_rx_h_data(struct ieee80211_rx_data *rx)
}

static ieee80211_rx_result debug_noinline
-ieee80211_rx_h_ctrl(struct ieee80211_rx_data *rx)
+ieee80211_rx_h_ctrl(struct mac80211_rx_data *rx)
{
struct mac80211_local *local = rx->local;
struct ieee80211_hw *hw = &local->hw;
@@ -2080,7 +2080,7 @@ static void ieee80211_process_sa_query_req(struct ieee80211_sub_if_data *sdata,
}

static ieee80211_rx_result debug_noinline
-ieee80211_rx_h_mgmt_check(struct ieee80211_rx_data *rx)
+ieee80211_rx_h_mgmt_check(struct mac80211_rx_data *rx)
{
struct ieee80211_mgmt *mgmt = (struct ieee80211_mgmt *) rx->skb->data;
struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(rx->skb);
@@ -2106,7 +2106,7 @@ ieee80211_rx_h_mgmt_check(struct ieee80211_rx_data *rx)
}

static ieee80211_rx_result debug_noinline
-ieee80211_rx_h_action(struct ieee80211_rx_data *rx)
+ieee80211_rx_h_action(struct mac80211_rx_data *rx)
{
struct mac80211_local *local = rx->local;
struct ieee80211_sub_if_data *sdata = rx->sdata;
@@ -2243,7 +2243,7 @@ ieee80211_rx_h_action(struct ieee80211_rx_data *rx)
}

static ieee80211_rx_result debug_noinline
-ieee80211_rx_h_userspace_mgmt(struct ieee80211_rx_data *rx)
+ieee80211_rx_h_userspace_mgmt(struct mac80211_rx_data *rx)
{
struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(rx->skb);

@@ -2272,7 +2272,7 @@ ieee80211_rx_h_userspace_mgmt(struct ieee80211_rx_data *rx)
}

static ieee80211_rx_result debug_noinline
-ieee80211_rx_h_action_return(struct ieee80211_rx_data *rx)
+ieee80211_rx_h_action_return(struct mac80211_rx_data *rx)
{
struct mac80211_local *local = rx->local;
struct ieee80211_mgmt *mgmt = (struct ieee80211_mgmt *) rx->skb->data;
@@ -2320,7 +2320,7 @@ ieee80211_rx_h_action_return(struct ieee80211_rx_data *rx)
}

static ieee80211_rx_result debug_noinline
-ieee80211_rx_h_mgmt(struct ieee80211_rx_data *rx)
+ieee80211_rx_h_mgmt(struct mac80211_rx_data *rx)
{
struct ieee80211_sub_if_data *sdata = rx->sdata;
ieee80211_rx_result rxs;
@@ -2374,7 +2374,7 @@ ieee80211_rx_h_mgmt(struct ieee80211_rx_data *rx)
}

/* TODO: use MAC80211_RX_FRAGMENTED */
-static void ieee80211_rx_cooked_monitor(struct ieee80211_rx_data *rx,
+static void ieee80211_rx_cooked_monitor(struct mac80211_rx_data *rx,
struct ieee80211_rate *rate)
{
struct ieee80211_sub_if_data *sdata;
@@ -2459,7 +2459,7 @@ static void ieee80211_rx_cooked_monitor(struct ieee80211_rx_data *rx,
dev_kfree_skb(skb);
}

-static void ieee80211_rx_handlers_result(struct ieee80211_rx_data *rx,
+static void ieee80211_rx_handlers_result(struct mac80211_rx_data *rx,
ieee80211_rx_result res)
{
switch (res) {
@@ -2494,7 +2494,7 @@ static void ieee80211_rx_handlers_result(struct ieee80211_rx_data *rx,
}
}

-static void ieee80211_rx_handlers(struct ieee80211_rx_data *rx)
+static void ieee80211_rx_handlers(struct mac80211_rx_data *rx)
{
ieee80211_rx_result res = RX_DROP_MONITOR;
struct sk_buff *skb;
@@ -2555,7 +2555,7 @@ static void ieee80211_rx_handlers(struct ieee80211_rx_data *rx)
spin_unlock(&rx->local->rx_skb_queue.lock);
}

-static void ieee80211_invoke_rx_handlers(struct ieee80211_rx_data *rx)
+static void ieee80211_invoke_rx_handlers(struct mac80211_rx_data *rx)
{
ieee80211_rx_result res = RX_DROP_MONITOR;

@@ -2586,7 +2586,7 @@ static void ieee80211_invoke_rx_handlers(struct ieee80211_rx_data *rx)
*/
void ieee80211_release_reorder_timeout(struct sta_info *sta, int tid)
{
- struct ieee80211_rx_data rx = {
+ struct mac80211_rx_data rx = {
.sta = sta,
.sdata = sta->sdata,
.local = sta->local,
@@ -2608,7 +2608,7 @@ void ieee80211_release_reorder_timeout(struct sta_info *sta, int tid)

/* main receive path */

-static int prepare_for_handlers(struct ieee80211_rx_data *rx,
+static int prepare_for_handlers(struct mac80211_rx_data *rx,
struct ieee80211_hdr *hdr)
{
struct ieee80211_sub_if_data *sdata = rx->sdata;
@@ -2700,7 +2700,7 @@ static int prepare_for_handlers(struct ieee80211_rx_data *rx,
* if consume is true, is equivalent to whether
* or not the skb was consumed.
*/
-static bool ieee80211_prepare_and_rx_handle(struct ieee80211_rx_data *rx,
+static bool ieee80211_prepare_and_rx_handle(struct mac80211_rx_data *rx,
struct sk_buff *skb, bool consume)
{
struct mac80211_local *local = rx->local;
@@ -2745,7 +2745,7 @@ static void __ieee80211_rx_handle_packet(struct ieee80211_hw *hw,
struct ieee80211_sub_if_data *sdata;
struct ieee80211_hdr *hdr;
__le16 fc;
- struct ieee80211_rx_data rx;
+ struct mac80211_rx_data rx;
struct ieee80211_sub_if_data *prev;
struct sta_info *sta, *tmp, *prev_sta;
int err = 0;
diff --git a/net/mac80211/wep.c b/net/mac80211/wep.c
index a0a3f92..1a7c0cc 100644
--- a/net/mac80211/wep.c
+++ b/net/mac80211/wep.c
@@ -281,7 +281,7 @@ bool ieee80211_wep_is_weak_iv(struct sk_buff *skb, struct ieee80211_key *key)
}

ieee80211_rx_result
-ieee80211_crypto_wep_decrypt(struct ieee80211_rx_data *rx)
+ieee80211_crypto_wep_decrypt(struct mac80211_rx_data *rx)
{
struct sk_buff *skb = rx->skb;
struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb);
diff --git a/net/mac80211/wep.h b/net/mac80211/wep.h
index 24a01af..e1d3bad 100644
--- a/net/mac80211/wep.h
+++ b/net/mac80211/wep.h
@@ -28,7 +28,7 @@ int ieee80211_wep_decrypt_data(struct crypto_cipher *tfm, u8 *rc4key,
bool ieee80211_wep_is_weak_iv(struct sk_buff *skb, struct ieee80211_key *key);

ieee80211_rx_result
-ieee80211_crypto_wep_decrypt(struct ieee80211_rx_data *rx);
+ieee80211_crypto_wep_decrypt(struct mac80211_rx_data *rx);
ieee80211_tx_result
ieee80211_crypto_wep_encrypt(struct mac80211_tx_data *tx);

diff --git a/net/mac80211/wpa.c b/net/mac80211/wpa.c
index cf45582..c09e05d 100644
--- a/net/mac80211/wpa.c
+++ b/net/mac80211/wpa.c
@@ -77,7 +77,7 @@ ieee80211_tx_h_michael_mic_add(struct mac80211_tx_data *tx)


ieee80211_rx_result
-ieee80211_rx_h_michael_mic_verify(struct ieee80211_rx_data *rx)
+ieee80211_rx_h_michael_mic_verify(struct mac80211_rx_data *rx)
{
u8 *data, *key = NULL;
size_t data_len;
@@ -228,7 +228,7 @@ ieee80211_crypto_tkip_encrypt(struct mac80211_tx_data *tx)


ieee80211_rx_result
-ieee80211_crypto_tkip_decrypt(struct ieee80211_rx_data *rx)
+ieee80211_crypto_tkip_decrypt(struct mac80211_rx_data *rx)
{
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) rx->skb->data;
int hdrlen, res, hwaccel = 0;
@@ -443,7 +443,7 @@ ieee80211_crypto_ccmp_encrypt(struct mac80211_tx_data *tx)


ieee80211_rx_result
-ieee80211_crypto_ccmp_decrypt(struct ieee80211_rx_data *rx)
+ieee80211_crypto_ccmp_decrypt(struct mac80211_rx_data *rx)
{
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)rx->skb->data;
int hdrlen;
@@ -565,7 +565,7 @@ ieee80211_crypto_aes_cmac_encrypt(struct mac80211_tx_data *tx)


ieee80211_rx_result
-ieee80211_crypto_aes_cmac_decrypt(struct ieee80211_rx_data *rx)
+ieee80211_crypto_aes_cmac_decrypt(struct mac80211_rx_data *rx)
{
struct sk_buff *skb = rx->skb;
struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb);
diff --git a/net/mac80211/wpa.h b/net/mac80211/wpa.h
index 474dec4..1b089d4 100644
--- a/net/mac80211/wpa.h
+++ b/net/mac80211/wpa.h
@@ -16,21 +16,21 @@
ieee80211_tx_result
ieee80211_tx_h_michael_mic_add(struct mac80211_tx_data *tx);
ieee80211_rx_result
-ieee80211_rx_h_michael_mic_verify(struct ieee80211_rx_data *rx);
+ieee80211_rx_h_michael_mic_verify(struct mac80211_rx_data *rx);

ieee80211_tx_result
ieee80211_crypto_tkip_encrypt(struct mac80211_tx_data *tx);
ieee80211_rx_result
-ieee80211_crypto_tkip_decrypt(struct ieee80211_rx_data *rx);
+ieee80211_crypto_tkip_decrypt(struct mac80211_rx_data *rx);

ieee80211_tx_result
ieee80211_crypto_ccmp_encrypt(struct mac80211_tx_data *tx);
ieee80211_rx_result
-ieee80211_crypto_ccmp_decrypt(struct ieee80211_rx_data *rx);
+ieee80211_crypto_ccmp_decrypt(struct mac80211_rx_data *rx);

ieee80211_tx_result
ieee80211_crypto_aes_cmac_encrypt(struct mac80211_tx_data *tx);
ieee80211_rx_result
-ieee80211_crypto_aes_cmac_decrypt(struct ieee80211_rx_data *rx);
+ieee80211_crypto_aes_cmac_decrypt(struct mac80211_rx_data *rx);

#endif /* WPA_H */


2011-05-29 20:04:36

by Kalle Valo

[permalink] [raw]
Subject: [RFC PATCH 04/27] rtlwifi: include mac80211.h from core.h

core.h references ieee80211_ops but doesn't include mac80211.h, which issues
a warning once mac80211-compat.h is taken into use.

Signed-off-by: Kalle Valo <[email protected]>
---
drivers/net/wireless/rtlwifi/core.h | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/net/wireless/rtlwifi/core.h b/drivers/net/wireless/rtlwifi/core.h
index 4b247db..f02824a 100644
--- a/drivers/net/wireless/rtlwifi/core.h
+++ b/drivers/net/wireless/rtlwifi/core.h
@@ -30,6 +30,8 @@
#ifndef __RTL_CORE_H__
#define __RTL_CORE_H__

+#include <net/mac80211.h>
+
#define RTL_SUPPORTED_FILTERS \
(FIF_PROMISC_IN_BSS | \
FIF_ALLMULTI | FIF_CONTROL | \


2011-05-29 20:05:05

by Kalle Valo

[permalink] [raw]
Subject: [RFC PATCH 07/27] mac80211: rename ieee80211_local to mac80211_local

Signed-off-by: Kalle Valo <[email protected]>
---
net/mac80211/agg-rx.c | 6 +-
net/mac80211/agg-tx.c | 32 +++++----
net/mac80211/cfg.c | 64 +++++++++---------
net/mac80211/chan.c | 6 +-
net/mac80211/debugfs.c | 30 ++++-----
net/mac80211/debugfs.h | 4 +
net/mac80211/debugfs_netdev.c | 4 +
net/mac80211/driver-ops.h | 96 ++++++++++++++-------------
net/mac80211/driver-trace.h | 126 ++++++++++++++++++------------------
net/mac80211/ht.c | 4 +
net/mac80211/ibss.c | 18 +++--
net/mac80211/iface.c | 34 +++++-----
net/mac80211/key.c | 4 +
net/mac80211/key.h | 6 +-
net/mac80211/led.c | 34 +++++-----
net/mac80211/led.h | 36 +++++-----
net/mac80211/mac80211_i.h | 90 +++++++++++++-------------
net/mac80211/main.c | 48 +++++++-------
net/mac80211/mesh.c | 16 ++---
net/mac80211/mesh.h | 6 +-
net/mac80211/mesh_hwmp.c | 10 +--
net/mac80211/mesh_pathtbl.c | 4 +
net/mac80211/mesh_plink.c | 8 +-
net/mac80211/mlme.c | 64 +++++++++---------
net/mac80211/offchannel.c | 24 +++----
net/mac80211/pm.c | 2 -
net/mac80211/rate.c | 6 +-
net/mac80211/rate.h | 12 ++-
net/mac80211/rc80211_minstrel.c | 4 +
net/mac80211/rc80211_minstrel_ht.c | 2 -
net/mac80211/rx.c | 40 ++++++-----
net/mac80211/scan.c | 46 +++++++------
net/mac80211/spectmgmt.c | 2 -
net/mac80211/sta_info.c | 44 ++++++-------
net/mac80211/sta_info.h | 10 +--
net/mac80211/status.c | 8 +-
net/mac80211/tx.c | 42 ++++++------
net/mac80211/util.c | 60 +++++++++--------
net/mac80211/wep.c | 14 ++--
net/mac80211/wep.h | 6 +-
net/mac80211/wme.c | 6 +-
net/mac80211/wme.h | 4 +
net/mac80211/work.c | 38 +++++------
43 files changed, 560 insertions(+), 560 deletions(-)

diff --git a/net/mac80211/agg-rx.c b/net/mac80211/agg-rx.c
index 9e92b73..c65a526 100644
--- a/net/mac80211/agg-rx.c
+++ b/net/mac80211/agg-rx.c
@@ -58,7 +58,7 @@ static void ieee80211_free_tid_rx(struct rcu_head *h)
void ___ieee80211_stop_rx_ba_session(struct sta_info *sta, u16 tid,
u16 initiator, u16 reason, bool tx)
{
- struct ieee80211_local *local = sta->local;
+ struct mac80211_local *local = sta->local;
struct tid_ampdu_rx *tid_rx;

lockdep_assert_held(&sta->ampdu_mlme.mtx);
@@ -138,7 +138,7 @@ static void ieee80211_send_addba_resp(struct ieee80211_sub_if_data *sdata, u8 *d
u8 dialog_token, u16 status, u16 policy,
u16 buf_size, u16 timeout)
{
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;
struct sk_buff *skb;
struct ieee80211_mgmt *mgmt;
u16 capab;
@@ -181,7 +181,7 @@ static void ieee80211_send_addba_resp(struct ieee80211_sub_if_data *sdata, u8 *d
ieee80211_tx_skb(sdata, skb);
}

-void ieee80211_process_addba_request(struct ieee80211_local *local,
+void ieee80211_process_addba_request(struct mac80211_local *local,
struct sta_info *sta,
struct ieee80211_mgmt *mgmt,
size_t len)
diff --git a/net/mac80211/agg-tx.c b/net/mac80211/agg-tx.c
index 5f5a7ec..0f19c8f 100644
--- a/net/mac80211/agg-tx.c
+++ b/net/mac80211/agg-tx.c
@@ -61,7 +61,7 @@ static void ieee80211_send_addba_request(struct ieee80211_sub_if_data *sdata,
u8 dialog_token, u16 start_seq_num,
u16 agg_size, u16 timeout)
{
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;
struct sk_buff *skb;
struct ieee80211_mgmt *mgmt;
u16 capab;
@@ -108,7 +108,7 @@ static void ieee80211_send_addba_request(struct ieee80211_sub_if_data *sdata,

void ieee80211_send_bar(struct ieee80211_sub_if_data *sdata, u8 *ra, u16 tid, u16 ssn)
{
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;
struct sk_buff *skb;
struct ieee80211_bar *bar;
u16 bar_control = 0;
@@ -156,7 +156,7 @@ int ___ieee80211_stop_tx_ba_session(struct sta_info *sta, u16 tid,
enum ieee80211_back_parties initiator,
bool tx)
{
- struct ieee80211_local *local = sta->local;
+ struct mac80211_local *local = sta->local;
struct tid_ampdu_tx *tid_tx;
int ret;

@@ -269,7 +269,7 @@ static inline int ieee80211_ac_from_tid(int tid)
* a global "agg_queue_stop" refcount.
*/
static void __acquires(agg_queue)
-ieee80211_stop_queue_agg(struct ieee80211_local *local, int tid)
+ieee80211_stop_queue_agg(struct mac80211_local *local, int tid)
{
int queue = ieee80211_ac_from_tid(tid);

@@ -281,7 +281,7 @@ ieee80211_stop_queue_agg(struct ieee80211_local *local, int tid)
}

static void __releases(agg_queue)
-ieee80211_wake_queue_agg(struct ieee80211_local *local, int tid)
+ieee80211_wake_queue_agg(struct mac80211_local *local, int tid)
{
int queue = ieee80211_ac_from_tid(tid);

@@ -295,7 +295,7 @@ ieee80211_wake_queue_agg(struct ieee80211_local *local, int tid)
void ieee80211_tx_ba_session_handle_start(struct sta_info *sta, int tid)
{
struct tid_ampdu_tx *tid_tx;
- struct ieee80211_local *local = sta->local;
+ struct mac80211_local *local = sta->local;
struct ieee80211_sub_if_data *sdata = sta->sdata;
u16 start_seq_num;
int ret;
@@ -362,7 +362,7 @@ int ieee80211_start_tx_ba_session(struct ieee80211_sta *pubsta, u16 tid,
{
struct sta_info *sta = container_of(pubsta, struct sta_info, sta);
struct ieee80211_sub_if_data *sdata = sta->sdata;
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;
struct tid_ampdu_tx *tid_tx;
int ret = 0;

@@ -464,7 +464,7 @@ EXPORT_SYMBOL(ieee80211_start_tx_ba_session);
* requires a call to ieee80211_agg_splice_finish later
*/
static void __acquires(agg_queue)
-ieee80211_agg_splice_packets(struct ieee80211_local *local,
+ieee80211_agg_splice_packets(struct mac80211_local *local,
struct tid_ampdu_tx *tid_tx, u16 tid)
{
int queue = ieee80211_ac_from_tid(tid);
@@ -486,12 +486,12 @@ ieee80211_agg_splice_packets(struct ieee80211_local *local,
}

static void __releases(agg_queue)
-ieee80211_agg_splice_finish(struct ieee80211_local *local, u16 tid)
+ieee80211_agg_splice_finish(struct mac80211_local *local, u16 tid)
{
ieee80211_wake_queue_agg(local, tid);
}

-static void ieee80211_agg_tx_operational(struct ieee80211_local *local,
+static void ieee80211_agg_tx_operational(struct mac80211_local *local,
struct sta_info *sta, u16 tid)
{
struct tid_ampdu_tx *tid_tx;
@@ -529,7 +529,7 @@ static void ieee80211_agg_tx_operational(struct ieee80211_local *local,
void ieee80211_start_tx_ba_cb(struct ieee80211_vif *vif, u8 *ra, u16 tid)
{
struct ieee80211_sub_if_data *sdata = vif_to_sdata(vif);
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;
struct sta_info *sta;
struct tid_ampdu_tx *tid_tx;

@@ -578,7 +578,7 @@ void ieee80211_start_tx_ba_cb_irqsafe(struct ieee80211_vif *vif,
const u8 *ra, u16 tid)
{
struct ieee80211_sub_if_data *sdata = vif_to_sdata(vif);
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;
struct ieee80211_ra_tid *ra_tid;
struct sk_buff *skb = dev_alloc_skb(0);

@@ -619,7 +619,7 @@ int ieee80211_stop_tx_ba_session(struct ieee80211_sta *pubsta, u16 tid)
{
struct sta_info *sta = container_of(pubsta, struct sta_info, sta);
struct ieee80211_sub_if_data *sdata = sta->sdata;
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;
struct tid_ampdu_tx *tid_tx;
int ret = 0;

@@ -657,7 +657,7 @@ EXPORT_SYMBOL(ieee80211_stop_tx_ba_session);
void ieee80211_stop_tx_ba_cb(struct ieee80211_vif *vif, u8 *ra, u8 tid)
{
struct ieee80211_sub_if_data *sdata = vif_to_sdata(vif);
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;
struct sta_info *sta;
struct tid_ampdu_tx *tid_tx;

@@ -731,7 +731,7 @@ void ieee80211_stop_tx_ba_cb_irqsafe(struct ieee80211_vif *vif,
const u8 *ra, u16 tid)
{
struct ieee80211_sub_if_data *sdata = vif_to_sdata(vif);
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;
struct ieee80211_ra_tid *ra_tid;
struct sk_buff *skb = dev_alloc_skb(0);

@@ -754,7 +754,7 @@ void ieee80211_stop_tx_ba_cb_irqsafe(struct ieee80211_vif *vif,
EXPORT_SYMBOL(ieee80211_stop_tx_ba_cb_irqsafe);


-void ieee80211_process_addba_resp(struct ieee80211_local *local,
+void ieee80211_process_addba_resp(struct mac80211_local *local,
struct sta_info *sta,
struct ieee80211_mgmt *mgmt,
size_t len)
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index d7ac1f3..593c07d 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -24,7 +24,7 @@ static struct net_device *ieee80211_add_iface(struct wiphy *wiphy, char *name,
u32 *flags,
struct vif_params *params)
{
- struct ieee80211_local *local = wiphy_priv(wiphy);
+ struct mac80211_local *local = wiphy_priv(wiphy);
struct net_device *dev;
struct ieee80211_sub_if_data *sdata;
int err;
@@ -68,7 +68,7 @@ static int ieee80211_change_iface(struct wiphy *wiphy,
sdata->u.mgd.use_4addr = params->use_4addr;

if (sdata->vif.type == NL80211_IFTYPE_MONITOR && flags) {
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;

if (ieee80211_sdata_running(sdata)) {
/*
@@ -161,7 +161,7 @@ static int ieee80211_del_key(struct wiphy *wiphy, struct net_device *dev,
u8 key_idx, bool pairwise, const u8 *mac_addr)
{
struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;
struct sta_info *sta;
struct ieee80211_key *key = NULL;
int ret;
@@ -427,7 +427,7 @@ static int ieee80211_dump_station(struct wiphy *wiphy, struct net_device *dev,
static int ieee80211_dump_survey(struct wiphy *wiphy, struct net_device *dev,
int idx, struct survey_info *survey)
{
- struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
+ struct mac80211_local *local = wdev_priv(dev->ieee80211_ptr);

return drv_get_survey(local, idx, survey);
}
@@ -643,7 +643,7 @@ static void ieee80211_send_layer2_update(struct sta_info *sta)
netif_rx_ni(skb);
}

-static void sta_apply_parameters(struct ieee80211_local *local,
+static void sta_apply_parameters(struct mac80211_local *local,
struct sta_info *sta,
struct station_parameters *params)
{
@@ -755,7 +755,7 @@ static void sta_apply_parameters(struct ieee80211_local *local,
static int ieee80211_add_station(struct wiphy *wiphy, struct net_device *dev,
u8 *mac, struct station_parameters *params)
{
- struct ieee80211_local *local = wiphy_priv(wiphy);
+ struct mac80211_local *local = wiphy_priv(wiphy);
struct sta_info *sta;
struct ieee80211_sub_if_data *sdata;
int err;
@@ -806,7 +806,7 @@ static int ieee80211_add_station(struct wiphy *wiphy, struct net_device *dev,
static int ieee80211_del_station(struct wiphy *wiphy, struct net_device *dev,
u8 *mac)
{
- struct ieee80211_local *local = wiphy_priv(wiphy);
+ struct mac80211_local *local = wiphy_priv(wiphy);
struct ieee80211_sub_if_data *sdata;

sdata = IEEE80211_DEV_TO_SUB_IF(dev);
@@ -824,7 +824,7 @@ static int ieee80211_change_station(struct wiphy *wiphy,
struct station_parameters *params)
{
struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
- struct ieee80211_local *local = wiphy_priv(wiphy);
+ struct mac80211_local *local = wiphy_priv(wiphy);
struct sta_info *sta;
struct ieee80211_sub_if_data *vlansdata;

@@ -1195,7 +1195,7 @@ static int ieee80211_change_bss(struct wiphy *wiphy,
if (params->basic_rates) {
int i, j;
u32 rates = 0;
- struct ieee80211_local *local = wiphy_priv(wiphy);
+ struct mac80211_local *local = wiphy_priv(wiphy);
struct ieee80211_supported_band *sband =
wiphy->bands[local->oper_channel->band];

@@ -1231,7 +1231,7 @@ static int ieee80211_change_bss(struct wiphy *wiphy,
static int ieee80211_set_txq_params(struct wiphy *wiphy,
struct ieee80211_txq_params *params)
{
- struct ieee80211_local *local = wiphy_priv(wiphy);
+ struct mac80211_local *local = wiphy_priv(wiphy);
struct ieee80211_tx_queue_params p;

if (!local->ops->conf_tx)
@@ -1264,7 +1264,7 @@ static int ieee80211_set_channel(struct wiphy *wiphy,
struct ieee80211_channel *chan,
enum nl80211_channel_type channel_type)
{
- struct ieee80211_local *local = wiphy_priv(wiphy);
+ struct mac80211_local *local = wiphy_priv(wiphy);
struct ieee80211_sub_if_data *sdata = NULL;
struct ieee80211_channel *old_oper;
enum nl80211_channel_type old_oper_type;
@@ -1388,7 +1388,7 @@ static int ieee80211_auth(struct wiphy *wiphy, struct net_device *dev,
static int ieee80211_assoc(struct wiphy *wiphy, struct net_device *dev,
struct cfg80211_assoc_request *req)
{
- struct ieee80211_local *local = wiphy_priv(wiphy);
+ struct mac80211_local *local = wiphy_priv(wiphy);
struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);

switch (ieee80211_get_channel_mode(local, sdata)) {
@@ -1424,7 +1424,7 @@ static int ieee80211_disassoc(struct wiphy *wiphy, struct net_device *dev,
static int ieee80211_join_ibss(struct wiphy *wiphy, struct net_device *dev,
struct cfg80211_ibss_params *params)
{
- struct ieee80211_local *local = wiphy_priv(wiphy);
+ struct mac80211_local *local = wiphy_priv(wiphy);
struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);

switch (ieee80211_get_channel_mode(local, sdata)) {
@@ -1452,7 +1452,7 @@ static int ieee80211_leave_ibss(struct wiphy *wiphy, struct net_device *dev)

static int ieee80211_set_wiphy_params(struct wiphy *wiphy, u32 changed)
{
- struct ieee80211_local *local = wiphy_priv(wiphy);
+ struct mac80211_local *local = wiphy_priv(wiphy);
int err;

if (changed & WIPHY_PARAM_FRAG_THRESHOLD) {
@@ -1490,7 +1490,7 @@ static int ieee80211_set_wiphy_params(struct wiphy *wiphy, u32 changed)
static int ieee80211_set_tx_power(struct wiphy *wiphy,
enum nl80211_tx_power_setting type, int mbm)
{
- struct ieee80211_local *local = wiphy_priv(wiphy);
+ struct mac80211_local *local = wiphy_priv(wiphy);
struct ieee80211_channel *chan = local->hw.conf.channel;
u32 changes = 0;

@@ -1520,7 +1520,7 @@ static int ieee80211_set_tx_power(struct wiphy *wiphy,

static int ieee80211_get_tx_power(struct wiphy *wiphy, int *dbm)
{
- struct ieee80211_local *local = wiphy_priv(wiphy);
+ struct mac80211_local *local = wiphy_priv(wiphy);

*dbm = local->hw.conf.power_level;

@@ -1539,7 +1539,7 @@ static int ieee80211_set_wds_peer(struct wiphy *wiphy, struct net_device *dev,

static void ieee80211_rfkill_poll(struct wiphy *wiphy)
{
- struct ieee80211_local *local = wiphy_priv(wiphy);
+ struct mac80211_local *local = wiphy_priv(wiphy);

drv_rfkill_poll(local);
}
@@ -1547,7 +1547,7 @@ static void ieee80211_rfkill_poll(struct wiphy *wiphy)
#ifdef CONFIG_NL80211_TESTMODE
static int ieee80211_testmode_cmd(struct wiphy *wiphy, void *data, int len)
{
- struct ieee80211_local *local = wiphy_priv(wiphy);
+ struct mac80211_local *local = wiphy_priv(wiphy);

if (!local->ops->testmode_cmd)
return -EOPNOTSUPP;
@@ -1606,7 +1606,7 @@ static int ieee80211_set_power_mgmt(struct wiphy *wiphy, struct net_device *dev,
bool enabled, int timeout)
{
struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
- struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
+ struct mac80211_local *local = wdev_priv(dev->ieee80211_ptr);

if (sdata->vif.type != NL80211_IFTYPE_STATION)
return -EOPNOTSUPP;
@@ -1639,7 +1639,7 @@ static int ieee80211_set_cqm_rssi_config(struct wiphy *wiphy,
s32 rssi_thold, u32 rssi_hyst)
{
struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
- struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
+ struct mac80211_local *local = wdev_priv(dev->ieee80211_ptr);
struct ieee80211_vif *vif = &sdata->vif;
struct ieee80211_bss_conf *bss_conf = &vif->bss_conf;

@@ -1669,7 +1669,7 @@ static int ieee80211_set_bitrate_mask(struct wiphy *wiphy,
const struct cfg80211_bitrate_mask *mask)
{
struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
- struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
+ struct mac80211_local *local = wdev_priv(dev->ieee80211_ptr);
int i, ret;

if (local->hw.flags & IEEE80211_HW_HAS_RATE_CONTROL) {
@@ -1684,7 +1684,7 @@ static int ieee80211_set_bitrate_mask(struct wiphy *wiphy,
return 0;
}

-static int ieee80211_remain_on_channel_hw(struct ieee80211_local *local,
+static int ieee80211_remain_on_channel_hw(struct mac80211_local *local,
struct net_device *dev,
struct ieee80211_channel *chan,
enum nl80211_channel_type chantype,
@@ -1723,7 +1723,7 @@ static int ieee80211_remain_on_channel(struct wiphy *wiphy,
u64 *cookie)
{
struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;

if (local->ops->remain_on_channel) {
int ret;
@@ -1742,7 +1742,7 @@ static int ieee80211_remain_on_channel(struct wiphy *wiphy,
duration, cookie);
}

-static int ieee80211_cancel_remain_on_channel_hw(struct ieee80211_local *local,
+static int ieee80211_cancel_remain_on_channel_hw(struct mac80211_local *local,
u64 cookie)
{
int ret;
@@ -1769,7 +1769,7 @@ static int ieee80211_cancel_remain_on_channel(struct wiphy *wiphy,
u64 cookie)
{
struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;

if (local->ops->cancel_remain_on_channel) {
int ret;
@@ -1813,7 +1813,7 @@ static int ieee80211_mgmt_tx(struct wiphy *wiphy, struct net_device *dev,
const u8 *buf, size_t len, u64 *cookie)
{
struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;
struct sk_buff *skb;
struct sta_info *sta;
struct ieee80211_work *wk;
@@ -1982,7 +1982,7 @@ static int ieee80211_mgmt_tx_cancel_wait(struct wiphy *wiphy,
u64 cookie)
{
struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;
struct ieee80211_work *wk;
int ret = -ENOENT;

@@ -2040,7 +2040,7 @@ static void ieee80211_mgmt_frame_register(struct wiphy *wiphy,
struct net_device *dev,
u16 frame_type, bool reg)
{
- struct ieee80211_local *local = wiphy_priv(wiphy);
+ struct mac80211_local *local = wiphy_priv(wiphy);

if (frame_type != (IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_PROBE_REQ))
return;
@@ -2055,7 +2055,7 @@ static void ieee80211_mgmt_frame_register(struct wiphy *wiphy,

static int ieee80211_set_antenna(struct wiphy *wiphy, u32 tx_ant, u32 rx_ant)
{
- struct ieee80211_local *local = wiphy_priv(wiphy);
+ struct mac80211_local *local = wiphy_priv(wiphy);

if (local->started)
return -EOPNOTSUPP;
@@ -2065,14 +2065,14 @@ static int ieee80211_set_antenna(struct wiphy *wiphy, u32 tx_ant, u32 rx_ant)

static int ieee80211_get_antenna(struct wiphy *wiphy, u32 *tx_ant, u32 *rx_ant)
{
- struct ieee80211_local *local = wiphy_priv(wiphy);
+ struct mac80211_local *local = wiphy_priv(wiphy);

return drv_get_antenna(local, tx_ant, rx_ant);
}

static int ieee80211_set_ringparam(struct wiphy *wiphy, u32 tx, u32 rx)
{
- struct ieee80211_local *local = wiphy_priv(wiphy);
+ struct mac80211_local *local = wiphy_priv(wiphy);

return drv_set_ringparam(local, tx, rx);
}
@@ -2080,7 +2080,7 @@ static int ieee80211_set_ringparam(struct wiphy *wiphy, u32 tx, u32 rx)
static void ieee80211_get_ringparam(struct wiphy *wiphy,
u32 *tx, u32 *tx_max, u32 *rx, u32 *rx_max)
{
- struct ieee80211_local *local = wiphy_priv(wiphy);
+ struct mac80211_local *local = wiphy_priv(wiphy);

drv_get_ringparam(local, tx, tx_max, rx, rx_max);
}
diff --git a/net/mac80211/chan.c b/net/mac80211/chan.c
index a412c4a..d2fe20d 100644
--- a/net/mac80211/chan.c
+++ b/net/mac80211/chan.c
@@ -6,7 +6,7 @@
#include "mac80211_i.h"

static enum ieee80211_chan_mode
-__ieee80211_get_channel_mode(struct ieee80211_local *local,
+__ieee80211_get_channel_mode(struct mac80211_local *local,
struct ieee80211_sub_if_data *ignore)
{
struct ieee80211_sub_if_data *sdata;
@@ -45,7 +45,7 @@ __ieee80211_get_channel_mode(struct ieee80211_local *local,
}

enum ieee80211_chan_mode
-ieee80211_get_channel_mode(struct ieee80211_local *local,
+ieee80211_get_channel_mode(struct mac80211_local *local,
struct ieee80211_sub_if_data *ignore)
{
enum ieee80211_chan_mode mode;
@@ -57,7 +57,7 @@ ieee80211_get_channel_mode(struct ieee80211_local *local,
return mode;
}

-bool ieee80211_set_channel_type(struct ieee80211_local *local,
+bool ieee80211_set_channel_type(struct mac80211_local *local,
struct ieee80211_sub_if_data *sdata,
enum nl80211_channel_type chantype)
{
diff --git a/net/mac80211/debugfs.c b/net/mac80211/debugfs.c
index e8bd10a..d5a07aa 100644
--- a/net/mac80211/debugfs.c
+++ b/net/mac80211/debugfs.c
@@ -41,7 +41,7 @@ int mac80211_format_buffer(char __user *userbuf, size_t count,
static ssize_t name## _read(struct file *file, char __user *userbuf, \
size_t count, loff_t *ppos) \
{ \
- struct ieee80211_local *local = file->private_data; \
+ struct mac80211_local *local = file->private_data; \
\
return mac80211_format_buffer(userbuf, count, ppos, \
fmt "\n", ##value); \
@@ -81,7 +81,7 @@ DEBUGFS_READONLY_FILE(rate_ctrl_alg, "%s",
static ssize_t tsf_read(struct file *file, char __user *user_buf,
size_t count, loff_t *ppos)
{
- struct ieee80211_local *local = file->private_data;
+ struct mac80211_local *local = file->private_data;
u64 tsf;

tsf = drv_get_tsf(local);
@@ -94,7 +94,7 @@ static ssize_t tsf_write(struct file *file,
const char __user *user_buf,
size_t count, loff_t *ppos)
{
- struct ieee80211_local *local = file->private_data;
+ struct mac80211_local *local = file->private_data;
unsigned long long tsf;
char buf[100];
size_t len;
@@ -132,7 +132,7 @@ static const struct file_operations tsf_ops = {
static ssize_t reset_write(struct file *file, const char __user *user_buf,
size_t count, loff_t *ppos)
{
- struct ieee80211_local *local = file->private_data;
+ struct mac80211_local *local = file->private_data;

rtnl_lock();
__ieee80211_suspend(&local->hw, NULL);
@@ -151,7 +151,7 @@ static const struct file_operations reset_ops = {
static ssize_t noack_read(struct file *file, char __user *user_buf,
size_t count, loff_t *ppos)
{
- struct ieee80211_local *local = file->private_data;
+ struct mac80211_local *local = file->private_data;

return mac80211_format_buffer(user_buf, count, ppos, "%d\n",
local->wifi_wme_noack_test);
@@ -161,7 +161,7 @@ static ssize_t noack_write(struct file *file,
const char __user *user_buf,
size_t count, loff_t *ppos)
{
- struct ieee80211_local *local = file->private_data;
+ struct mac80211_local *local = file->private_data;
char buf[10];
size_t len;

@@ -185,7 +185,7 @@ static const struct file_operations noack_ops = {
static ssize_t uapsd_queues_read(struct file *file, char __user *user_buf,
size_t count, loff_t *ppos)
{
- struct ieee80211_local *local = file->private_data;
+ struct mac80211_local *local = file->private_data;
return mac80211_format_buffer(user_buf, count, ppos, "0x%x\n",
local->uapsd_queues);
}
@@ -194,7 +194,7 @@ static ssize_t uapsd_queues_write(struct file *file,
const char __user *user_buf,
size_t count, loff_t *ppos)
{
- struct ieee80211_local *local = file->private_data;
+ struct mac80211_local *local = file->private_data;
unsigned long val;
char buf[10];
size_t len;
@@ -228,7 +228,7 @@ static const struct file_operations uapsd_queues_ops = {
static ssize_t uapsd_max_sp_len_read(struct file *file, char __user *user_buf,
size_t count, loff_t *ppos)
{
- struct ieee80211_local *local = file->private_data;
+ struct mac80211_local *local = file->private_data;

return mac80211_format_buffer(user_buf, count, ppos, "0x%x\n",
local->uapsd_max_sp_len);
@@ -238,7 +238,7 @@ static ssize_t uapsd_max_sp_len_write(struct file *file,
const char __user *user_buf,
size_t count, loff_t *ppos)
{
- struct ieee80211_local *local = file->private_data;
+ struct mac80211_local *local = file->private_data;
unsigned long val;
char buf[10];
size_t len;
@@ -272,7 +272,7 @@ static const struct file_operations uapsd_max_sp_len_ops = {
static ssize_t channel_type_read(struct file *file, char __user *user_buf,
size_t count, loff_t *ppos)
{
- struct ieee80211_local *local = file->private_data;
+ struct mac80211_local *local = file->private_data;
const char *buf;

switch (local->hw.conf.channel_type) {
@@ -299,7 +299,7 @@ static ssize_t channel_type_read(struct file *file, char __user *user_buf,
static ssize_t hwflags_read(struct file *file, char __user *user_buf,
size_t count, loff_t *ppos)
{
- struct ieee80211_local *local = file->private_data;
+ struct mac80211_local *local = file->private_data;
int mxln = 500;
ssize_t rv;
char *buf = kzalloc(mxln, GFP_KERNEL);
@@ -364,7 +364,7 @@ static ssize_t hwflags_read(struct file *file, char __user *user_buf,
static ssize_t queues_read(struct file *file, char __user *user_buf,
size_t count, loff_t *ppos)
{
- struct ieee80211_local *local = file->private_data;
+ struct mac80211_local *local = file->private_data;
unsigned long flags;
char buf[IEEE80211_MAX_QUEUES * 20];
int q, res = 0;
@@ -385,7 +385,7 @@ DEBUGFS_READONLY_FILE_OPS(queues);

/* statistics stuff */

-static ssize_t format_devstat_counter(struct ieee80211_local *local,
+static ssize_t format_devstat_counter(struct mac80211_local *local,
char __user *userbuf,
size_t count, loff_t *ppos,
int (*printvalue)(struct ieee80211_low_level_stats *stats, char *buf,
@@ -437,7 +437,7 @@ DEBUGFS_DEVSTATS_FILE(dot11RTSFailureCount);
DEBUGFS_DEVSTATS_FILE(dot11FCSErrorCount);
DEBUGFS_DEVSTATS_FILE(dot11RTSSuccessCount);

-void debugfs_hw_add(struct ieee80211_local *local)
+void debugfs_hw_add(struct mac80211_local *local)
{
struct dentry *phyd = local->hw.wiphy->debugfsdir;
struct dentry *statsd;
diff --git a/net/mac80211/debugfs.h b/net/mac80211/debugfs.h
index 7c87529..b7970b4 100644
--- a/net/mac80211/debugfs.h
+++ b/net/mac80211/debugfs.h
@@ -2,12 +2,12 @@
#define __MAC80211_DEBUGFS_H

#ifdef CONFIG_MAC80211_DEBUGFS
-extern void debugfs_hw_add(struct ieee80211_local *local);
+extern void debugfs_hw_add(struct mac80211_local *local);
extern int mac80211_open_file_generic(struct inode *inode, struct file *file);
extern int mac80211_format_buffer(char __user *userbuf, size_t count,
loff_t *ppos, char *fmt, ...);
#else
-static inline void debugfs_hw_add(struct ieee80211_local *local)
+static inline void debugfs_hw_add(struct mac80211_local *local)
{
}
#endif
diff --git a/net/mac80211/debugfs_netdev.c b/net/mac80211/debugfs_netdev.c
index 950c1d5..d2b6a87 100644
--- a/net/mac80211/debugfs_netdev.c
+++ b/net/mac80211/debugfs_netdev.c
@@ -160,7 +160,7 @@ IEEE80211_IF_FILE(ave_beacon, u.mgd.ave_beacon_signal, DEC_DIV_16);
static int ieee80211_set_smps(struct ieee80211_sub_if_data *sdata,
enum ieee80211_smps_mode smps_mode)
{
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;
int err;

if (!(local->hw.flags & IEEE80211_HW_SUPPORTS_STATIC_SMPS) &&
@@ -251,7 +251,7 @@ static int hwaddr_aton(const char *txt, u8 *addr)
static ssize_t ieee80211_if_parse_tkip_mic_test(
struct ieee80211_sub_if_data *sdata, const char *buf, int buflen)
{
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;
u8 addr[ETH_ALEN];
struct sk_buff *skb;
struct ieee80211_hdr *hdr;
diff --git a/net/mac80211/driver-ops.h b/net/mac80211/driver-ops.h
index 06236f6..f15f2ca 100644
--- a/net/mac80211/driver-ops.h
+++ b/net/mac80211/driver-ops.h
@@ -5,12 +5,12 @@
#include "mac80211_i.h"
#include "driver-trace.h"

-static inline void drv_tx(struct ieee80211_local *local, struct sk_buff *skb)
+static inline void drv_tx(struct mac80211_local *local, struct sk_buff *skb)
{
local->ops->tx(&local->hw, skb);
}

-static inline int drv_start(struct ieee80211_local *local)
+static inline int drv_start(struct mac80211_local *local)
{
int ret;

@@ -24,7 +24,7 @@ static inline int drv_start(struct ieee80211_local *local)
return ret;
}

-static inline void drv_stop(struct ieee80211_local *local)
+static inline void drv_stop(struct mac80211_local *local)
{
might_sleep();

@@ -42,7 +42,7 @@ static inline void drv_stop(struct ieee80211_local *local)
}

#ifdef CONFIG_PM
-static inline int drv_suspend(struct ieee80211_local *local,
+static inline int drv_suspend(struct mac80211_local *local,
struct cfg80211_wowlan *wowlan)
{
int ret;
@@ -55,7 +55,7 @@ static inline int drv_suspend(struct ieee80211_local *local,
return ret;
}

-static inline int drv_resume(struct ieee80211_local *local)
+static inline int drv_resume(struct mac80211_local *local)
{
int ret;

@@ -68,7 +68,7 @@ static inline int drv_resume(struct ieee80211_local *local)
}
#endif

-static inline int drv_add_interface(struct ieee80211_local *local,
+static inline int drv_add_interface(struct mac80211_local *local,
struct ieee80211_vif *vif)
{
int ret;
@@ -81,7 +81,7 @@ static inline int drv_add_interface(struct ieee80211_local *local,
return ret;
}

-static inline int drv_change_interface(struct ieee80211_local *local,
+static inline int drv_change_interface(struct mac80211_local *local,
struct ieee80211_sub_if_data *sdata,
enum nl80211_iftype type, bool p2p)
{
@@ -95,7 +95,7 @@ static inline int drv_change_interface(struct ieee80211_local *local,
return ret;
}

-static inline void drv_remove_interface(struct ieee80211_local *local,
+static inline void drv_remove_interface(struct mac80211_local *local,
struct ieee80211_vif *vif)
{
might_sleep();
@@ -105,7 +105,7 @@ static inline void drv_remove_interface(struct ieee80211_local *local,
trace_drv_return_void(local);
}

-static inline int drv_config(struct ieee80211_local *local, u32 changed)
+static inline int drv_config(struct mac80211_local *local, u32 changed)
{
int ret;

@@ -117,7 +117,7 @@ static inline int drv_config(struct ieee80211_local *local, u32 changed)
return ret;
}

-static inline void drv_bss_info_changed(struct ieee80211_local *local,
+static inline void drv_bss_info_changed(struct mac80211_local *local,
struct ieee80211_sub_if_data *sdata,
struct ieee80211_bss_conf *info,
u32 changed)
@@ -130,7 +130,7 @@ static inline void drv_bss_info_changed(struct ieee80211_local *local,
trace_drv_return_void(local);
}

-static inline u64 drv_prepare_multicast(struct ieee80211_local *local,
+static inline u64 drv_prepare_multicast(struct mac80211_local *local,
struct netdev_hw_addr_list *mc_list)
{
u64 ret = 0;
@@ -145,7 +145,7 @@ static inline u64 drv_prepare_multicast(struct ieee80211_local *local,
return ret;
}

-static inline void drv_configure_filter(struct ieee80211_local *local,
+static inline void drv_configure_filter(struct mac80211_local *local,
unsigned int changed_flags,
unsigned int *total_flags,
u64 multicast)
@@ -159,7 +159,7 @@ static inline void drv_configure_filter(struct ieee80211_local *local,
trace_drv_return_void(local);
}

-static inline int drv_set_tim(struct ieee80211_local *local,
+static inline int drv_set_tim(struct mac80211_local *local,
struct ieee80211_sta *sta, bool set)
{
int ret = 0;
@@ -170,7 +170,7 @@ static inline int drv_set_tim(struct ieee80211_local *local,
return ret;
}

-static inline int drv_set_key(struct ieee80211_local *local,
+static inline int drv_set_key(struct mac80211_local *local,
enum set_key_cmd cmd,
struct ieee80211_sub_if_data *sdata,
struct ieee80211_sta *sta,
@@ -186,7 +186,7 @@ static inline int drv_set_key(struct ieee80211_local *local,
return ret;
}

-static inline void drv_update_tkip_key(struct ieee80211_local *local,
+static inline void drv_update_tkip_key(struct mac80211_local *local,
struct ieee80211_sub_if_data *sdata,
struct ieee80211_key_conf *conf,
struct sta_info *sta, u32 iv32,
@@ -204,7 +204,7 @@ static inline void drv_update_tkip_key(struct ieee80211_local *local,
trace_drv_return_void(local);
}

-static inline int drv_hw_scan(struct ieee80211_local *local,
+static inline int drv_hw_scan(struct mac80211_local *local,
struct ieee80211_sub_if_data *sdata,
struct cfg80211_scan_request *req)
{
@@ -219,7 +219,7 @@ static inline int drv_hw_scan(struct ieee80211_local *local,
}

static inline int
-drv_sched_scan_start(struct ieee80211_local *local,
+drv_sched_scan_start(struct mac80211_local *local,
struct ieee80211_sub_if_data *sdata,
struct cfg80211_sched_scan_request *req,
struct ieee80211_sched_scan_ies *ies)
@@ -235,7 +235,7 @@ drv_sched_scan_start(struct ieee80211_local *local,
return ret;
}

-static inline void drv_sched_scan_stop(struct ieee80211_local *local,
+static inline void drv_sched_scan_stop(struct mac80211_local *local,
struct ieee80211_sub_if_data *sdata)
{
might_sleep();
@@ -245,7 +245,7 @@ static inline void drv_sched_scan_stop(struct ieee80211_local *local,
trace_drv_return_void(local);
}

-static inline void drv_sw_scan_start(struct ieee80211_local *local)
+static inline void drv_sw_scan_start(struct mac80211_local *local)
{
might_sleep();

@@ -255,7 +255,7 @@ static inline void drv_sw_scan_start(struct ieee80211_local *local)
trace_drv_return_void(local);
}

-static inline void drv_sw_scan_complete(struct ieee80211_local *local)
+static inline void drv_sw_scan_complete(struct mac80211_local *local)
{
might_sleep();

@@ -265,7 +265,7 @@ static inline void drv_sw_scan_complete(struct ieee80211_local *local)
trace_drv_return_void(local);
}

-static inline int drv_get_stats(struct ieee80211_local *local,
+static inline int drv_get_stats(struct mac80211_local *local,
struct ieee80211_low_level_stats *stats)
{
int ret = -EOPNOTSUPP;
@@ -279,7 +279,7 @@ static inline int drv_get_stats(struct ieee80211_local *local,
return ret;
}

-static inline void drv_get_tkip_seq(struct ieee80211_local *local,
+static inline void drv_get_tkip_seq(struct mac80211_local *local,
u8 hw_key_idx, u32 *iv32, u16 *iv16)
{
if (local->ops->get_tkip_seq)
@@ -287,7 +287,7 @@ static inline void drv_get_tkip_seq(struct ieee80211_local *local,
trace_drv_get_tkip_seq(local, hw_key_idx, iv32, iv16);
}

-static inline int drv_set_frag_threshold(struct ieee80211_local *local,
+static inline int drv_set_frag_threshold(struct mac80211_local *local,
u32 value)
{
int ret = 0;
@@ -301,7 +301,7 @@ static inline int drv_set_frag_threshold(struct ieee80211_local *local,
return ret;
}

-static inline int drv_set_rts_threshold(struct ieee80211_local *local,
+static inline int drv_set_rts_threshold(struct mac80211_local *local,
u32 value)
{
int ret = 0;
@@ -315,7 +315,7 @@ static inline int drv_set_rts_threshold(struct ieee80211_local *local,
return ret;
}

-static inline int drv_set_coverage_class(struct ieee80211_local *local,
+static inline int drv_set_coverage_class(struct mac80211_local *local,
u8 value)
{
int ret = 0;
@@ -331,7 +331,7 @@ static inline int drv_set_coverage_class(struct ieee80211_local *local,
return ret;
}

-static inline void drv_sta_notify(struct ieee80211_local *local,
+static inline void drv_sta_notify(struct mac80211_local *local,
struct ieee80211_sub_if_data *sdata,
enum sta_notify_cmd cmd,
struct ieee80211_sta *sta)
@@ -342,7 +342,7 @@ static inline void drv_sta_notify(struct ieee80211_local *local,
trace_drv_return_void(local);
}

-static inline int drv_sta_add(struct ieee80211_local *local,
+static inline int drv_sta_add(struct mac80211_local *local,
struct ieee80211_sub_if_data *sdata,
struct ieee80211_sta *sta)
{
@@ -359,7 +359,7 @@ static inline int drv_sta_add(struct ieee80211_local *local,
return ret;
}

-static inline void drv_sta_remove(struct ieee80211_local *local,
+static inline void drv_sta_remove(struct mac80211_local *local,
struct ieee80211_sub_if_data *sdata,
struct ieee80211_sta *sta)
{
@@ -372,7 +372,7 @@ static inline void drv_sta_remove(struct ieee80211_local *local,
trace_drv_return_void(local);
}

-static inline int drv_conf_tx(struct ieee80211_local *local, u16 queue,
+static inline int drv_conf_tx(struct mac80211_local *local, u16 queue,
const struct ieee80211_tx_queue_params *params)
{
int ret = -EOPNOTSUPP;
@@ -386,7 +386,7 @@ static inline int drv_conf_tx(struct ieee80211_local *local, u16 queue,
return ret;
}

-static inline u64 drv_get_tsf(struct ieee80211_local *local)
+static inline u64 drv_get_tsf(struct mac80211_local *local)
{
u64 ret = -1ULL;

@@ -399,7 +399,7 @@ static inline u64 drv_get_tsf(struct ieee80211_local *local)
return ret;
}

-static inline void drv_set_tsf(struct ieee80211_local *local, u64 tsf)
+static inline void drv_set_tsf(struct mac80211_local *local, u64 tsf)
{
might_sleep();

@@ -409,7 +409,7 @@ static inline void drv_set_tsf(struct ieee80211_local *local, u64 tsf)
trace_drv_return_void(local);
}

-static inline void drv_reset_tsf(struct ieee80211_local *local)
+static inline void drv_reset_tsf(struct mac80211_local *local)
{
might_sleep();

@@ -419,7 +419,7 @@ static inline void drv_reset_tsf(struct ieee80211_local *local)
trace_drv_return_void(local);
}

-static inline int drv_tx_last_beacon(struct ieee80211_local *local)
+static inline int drv_tx_last_beacon(struct mac80211_local *local)
{
int ret = 0; /* default unsuported op for less congestion */

@@ -432,7 +432,7 @@ static inline int drv_tx_last_beacon(struct ieee80211_local *local)
return ret;
}

-static inline int drv_ampdu_action(struct ieee80211_local *local,
+static inline int drv_ampdu_action(struct mac80211_local *local,
struct ieee80211_sub_if_data *sdata,
enum ieee80211_ampdu_mlme_action action,
struct ieee80211_sta *sta, u16 tid,
@@ -453,7 +453,7 @@ static inline int drv_ampdu_action(struct ieee80211_local *local,
return ret;
}

-static inline int drv_get_survey(struct ieee80211_local *local, int idx,
+static inline int drv_get_survey(struct mac80211_local *local, int idx,
struct survey_info *survey)
{
int ret = -EOPNOTSUPP;
@@ -468,7 +468,7 @@ static inline int drv_get_survey(struct ieee80211_local *local, int idx,
return ret;
}

-static inline void drv_rfkill_poll(struct ieee80211_local *local)
+static inline void drv_rfkill_poll(struct mac80211_local *local)
{
might_sleep();

@@ -476,7 +476,7 @@ static inline void drv_rfkill_poll(struct ieee80211_local *local)
local->ops->rfkill_poll(&local->hw);
}

-static inline void drv_flush(struct ieee80211_local *local, bool drop)
+static inline void drv_flush(struct mac80211_local *local, bool drop)
{
might_sleep();

@@ -486,7 +486,7 @@ static inline void drv_flush(struct ieee80211_local *local, bool drop)
trace_drv_return_void(local);
}

-static inline void drv_channel_switch(struct ieee80211_local *local,
+static inline void drv_channel_switch(struct mac80211_local *local,
struct ieee80211_channel_switch *ch_switch)
{
might_sleep();
@@ -497,7 +497,7 @@ static inline void drv_channel_switch(struct ieee80211_local *local,
}


-static inline int drv_set_antenna(struct ieee80211_local *local,
+static inline int drv_set_antenna(struct mac80211_local *local,
u32 tx_ant, u32 rx_ant)
{
int ret = -EOPNOTSUPP;
@@ -508,7 +508,7 @@ static inline int drv_set_antenna(struct ieee80211_local *local,
return ret;
}

-static inline int drv_get_antenna(struct ieee80211_local *local,
+static inline int drv_get_antenna(struct mac80211_local *local,
u32 *tx_ant, u32 *rx_ant)
{
int ret = -EOPNOTSUPP;
@@ -519,7 +519,7 @@ static inline int drv_get_antenna(struct ieee80211_local *local,
return ret;
}

-static inline int drv_remain_on_channel(struct ieee80211_local *local,
+static inline int drv_remain_on_channel(struct mac80211_local *local,
struct ieee80211_channel *chan,
enum nl80211_channel_type chantype,
unsigned int duration)
@@ -536,7 +536,7 @@ static inline int drv_remain_on_channel(struct ieee80211_local *local,
return ret;
}

-static inline int drv_cancel_remain_on_channel(struct ieee80211_local *local)
+static inline int drv_cancel_remain_on_channel(struct mac80211_local *local)
{
int ret;

@@ -549,7 +549,7 @@ static inline int drv_cancel_remain_on_channel(struct ieee80211_local *local)
return ret;
}

-static inline int drv_offchannel_tx(struct ieee80211_local *local,
+static inline int drv_offchannel_tx(struct mac80211_local *local,
struct sk_buff *skb,
struct ieee80211_channel *chan,
enum nl80211_channel_type channel_type,
@@ -567,7 +567,7 @@ static inline int drv_offchannel_tx(struct ieee80211_local *local,
return ret;
}

-static inline int drv_offchannel_tx_cancel_wait(struct ieee80211_local *local)
+static inline int drv_offchannel_tx_cancel_wait(struct mac80211_local *local)
{
int ret;

@@ -580,7 +580,7 @@ static inline int drv_offchannel_tx_cancel_wait(struct ieee80211_local *local)
return ret;
}

-static inline int drv_set_ringparam(struct ieee80211_local *local,
+static inline int drv_set_ringparam(struct mac80211_local *local,
u32 tx, u32 rx)
{
int ret = -ENOTSUPP;
@@ -595,7 +595,7 @@ static inline int drv_set_ringparam(struct ieee80211_local *local,
return ret;
}

-static inline void drv_get_ringparam(struct ieee80211_local *local,
+static inline void drv_get_ringparam(struct mac80211_local *local,
u32 *tx, u32 *tx_max, u32 *rx, u32 *rx_max)
{
might_sleep();
@@ -606,7 +606,7 @@ static inline void drv_get_ringparam(struct ieee80211_local *local,
trace_drv_return_void(local);
}

-static inline bool drv_tx_frames_pending(struct ieee80211_local *local)
+static inline bool drv_tx_frames_pending(struct mac80211_local *local)
{
bool ret = false;

@@ -620,7 +620,7 @@ static inline bool drv_tx_frames_pending(struct ieee80211_local *local)
return ret;
}

-static inline int drv_set_bitrate_mask(struct ieee80211_local *local,
+static inline int drv_set_bitrate_mask(struct mac80211_local *local,
struct ieee80211_sub_if_data *sdata,
const struct cfg80211_bitrate_mask *mask)
{
diff --git a/net/mac80211/driver-trace.h b/net/mac80211/driver-trace.h
index 399ae8c..ffa02ac 100644
--- a/net/mac80211/driver-trace.h
+++ b/net/mac80211/driver-trace.h
@@ -44,7 +44,7 @@ static inline void trace_ ## name(proto) {}
*/

DECLARE_EVENT_CLASS(local_only_evt,
- TP_PROTO(struct ieee80211_local *local),
+ TP_PROTO(struct mac80211_local *local),
TP_ARGS(local),
TP_STRUCT__entry(
LOCAL_ENTRY
@@ -56,7 +56,7 @@ DECLARE_EVENT_CLASS(local_only_evt,
);

DECLARE_EVENT_CLASS(local_sdata_addr_evt,
- TP_PROTO(struct ieee80211_local *local,
+ TP_PROTO(struct mac80211_local *local,
struct ieee80211_sub_if_data *sdata),
TP_ARGS(local, sdata),

@@ -79,7 +79,7 @@ DECLARE_EVENT_CLASS(local_sdata_addr_evt,
);

DECLARE_EVENT_CLASS(local_u32_evt,
- TP_PROTO(struct ieee80211_local *local, u32 value),
+ TP_PROTO(struct mac80211_local *local, u32 value),
TP_ARGS(local, value),

TP_STRUCT__entry(
@@ -99,7 +99,7 @@ DECLARE_EVENT_CLASS(local_u32_evt,
);

DECLARE_EVENT_CLASS(local_sdata_evt,
- TP_PROTO(struct ieee80211_local *local,
+ TP_PROTO(struct mac80211_local *local,
struct ieee80211_sub_if_data *sdata),
TP_ARGS(local, sdata),

@@ -120,12 +120,12 @@ DECLARE_EVENT_CLASS(local_sdata_evt,
);

DEFINE_EVENT(local_only_evt, drv_return_void,
- TP_PROTO(struct ieee80211_local *local),
+ TP_PROTO(struct mac80211_local *local),
TP_ARGS(local)
);

TRACE_EVENT(drv_return_int,
- TP_PROTO(struct ieee80211_local *local, int ret),
+ TP_PROTO(struct mac80211_local *local, int ret),
TP_ARGS(local, ret),
TP_STRUCT__entry(
LOCAL_ENTRY
@@ -139,7 +139,7 @@ TRACE_EVENT(drv_return_int,
);

TRACE_EVENT(drv_return_bool,
- TP_PROTO(struct ieee80211_local *local, bool ret),
+ TP_PROTO(struct mac80211_local *local, bool ret),
TP_ARGS(local, ret),
TP_STRUCT__entry(
LOCAL_ENTRY
@@ -154,7 +154,7 @@ TRACE_EVENT(drv_return_bool,
);

TRACE_EVENT(drv_return_u64,
- TP_PROTO(struct ieee80211_local *local, u64 ret),
+ TP_PROTO(struct mac80211_local *local, u64 ret),
TP_ARGS(local, ret),
TP_STRUCT__entry(
LOCAL_ENTRY
@@ -168,33 +168,33 @@ TRACE_EVENT(drv_return_u64,
);

DEFINE_EVENT(local_only_evt, drv_start,
- TP_PROTO(struct ieee80211_local *local),
+ TP_PROTO(struct mac80211_local *local),
TP_ARGS(local)
);

DEFINE_EVENT(local_only_evt, drv_suspend,
- TP_PROTO(struct ieee80211_local *local),
+ TP_PROTO(struct mac80211_local *local),
TP_ARGS(local)
);

DEFINE_EVENT(local_only_evt, drv_resume,
- TP_PROTO(struct ieee80211_local *local),
+ TP_PROTO(struct mac80211_local *local),
TP_ARGS(local)
);

DEFINE_EVENT(local_only_evt, drv_stop,
- TP_PROTO(struct ieee80211_local *local),
+ TP_PROTO(struct mac80211_local *local),
TP_ARGS(local)
);

DEFINE_EVENT(local_sdata_addr_evt, drv_add_interface,
- TP_PROTO(struct ieee80211_local *local,
+ TP_PROTO(struct mac80211_local *local,
struct ieee80211_sub_if_data *sdata),
TP_ARGS(local, sdata)
);

TRACE_EVENT(drv_change_interface,
- TP_PROTO(struct ieee80211_local *local,
+ TP_PROTO(struct mac80211_local *local,
struct ieee80211_sub_if_data *sdata,
enum nl80211_iftype type, bool p2p),

@@ -222,13 +222,13 @@ TRACE_EVENT(drv_change_interface,
);

DEFINE_EVENT(local_sdata_addr_evt, drv_remove_interface,
- TP_PROTO(struct ieee80211_local *local,
+ TP_PROTO(struct mac80211_local *local,
struct ieee80211_sub_if_data *sdata),
TP_ARGS(local, sdata)
);

TRACE_EVENT(drv_config,
- TP_PROTO(struct ieee80211_local *local,
+ TP_PROTO(struct mac80211_local *local,
u32 changed),

TP_ARGS(local, changed),
@@ -270,7 +270,7 @@ TRACE_EVENT(drv_config,
);

TRACE_EVENT(drv_bss_info_changed,
- TP_PROTO(struct ieee80211_local *local,
+ TP_PROTO(struct mac80211_local *local,
struct ieee80211_sub_if_data *sdata,
struct ieee80211_bss_conf *info,
u32 changed),
@@ -320,7 +320,7 @@ TRACE_EVENT(drv_bss_info_changed,
);

TRACE_EVENT(drv_prepare_multicast,
- TP_PROTO(struct ieee80211_local *local, int mc_count),
+ TP_PROTO(struct mac80211_local *local, int mc_count),

TP_ARGS(local, mc_count),

@@ -341,7 +341,7 @@ TRACE_EVENT(drv_prepare_multicast,
);

TRACE_EVENT(drv_configure_filter,
- TP_PROTO(struct ieee80211_local *local,
+ TP_PROTO(struct mac80211_local *local,
unsigned int changed_flags,
unsigned int *total_flags,
u64 multicast),
@@ -369,7 +369,7 @@ TRACE_EVENT(drv_configure_filter,
);

TRACE_EVENT(drv_set_tim,
- TP_PROTO(struct ieee80211_local *local,
+ TP_PROTO(struct mac80211_local *local,
struct ieee80211_sta *sta, bool set),

TP_ARGS(local, sta, set),
@@ -393,7 +393,7 @@ TRACE_EVENT(drv_set_tim,
);

TRACE_EVENT(drv_set_key,
- TP_PROTO(struct ieee80211_local *local,
+ TP_PROTO(struct mac80211_local *local,
enum set_key_cmd cmd, struct ieee80211_sub_if_data *sdata,
struct ieee80211_sta *sta,
struct ieee80211_key_conf *key),
@@ -427,7 +427,7 @@ TRACE_EVENT(drv_set_key,
);

TRACE_EVENT(drv_update_tkip_key,
- TP_PROTO(struct ieee80211_local *local,
+ TP_PROTO(struct mac80211_local *local,
struct ieee80211_sub_if_data *sdata,
struct ieee80211_key_conf *conf,
struct ieee80211_sta *sta, u32 iv32),
@@ -455,35 +455,35 @@ TRACE_EVENT(drv_update_tkip_key,
);

DEFINE_EVENT(local_sdata_evt, drv_hw_scan,
- TP_PROTO(struct ieee80211_local *local,
+ TP_PROTO(struct mac80211_local *local,
struct ieee80211_sub_if_data *sdata),
TP_ARGS(local, sdata)
);

DEFINE_EVENT(local_sdata_evt, drv_sched_scan_start,
- TP_PROTO(struct ieee80211_local *local,
+ TP_PROTO(struct mac80211_local *local,
struct ieee80211_sub_if_data *sdata),
TP_ARGS(local, sdata)
);

DEFINE_EVENT(local_sdata_evt, drv_sched_scan_stop,
- TP_PROTO(struct ieee80211_local *local,
+ TP_PROTO(struct mac80211_local *local,
struct ieee80211_sub_if_data *sdata),
TP_ARGS(local, sdata)
);

DEFINE_EVENT(local_only_evt, drv_sw_scan_start,
- TP_PROTO(struct ieee80211_local *local),
+ TP_PROTO(struct mac80211_local *local),
TP_ARGS(local)
);

DEFINE_EVENT(local_only_evt, drv_sw_scan_complete,
- TP_PROTO(struct ieee80211_local *local),
+ TP_PROTO(struct mac80211_local *local),
TP_ARGS(local)
);

TRACE_EVENT(drv_get_stats,
- TP_PROTO(struct ieee80211_local *local,
+ TP_PROTO(struct mac80211_local *local,
struct ieee80211_low_level_stats *stats,
int ret),

@@ -514,7 +514,7 @@ TRACE_EVENT(drv_get_stats,
);

TRACE_EVENT(drv_get_tkip_seq,
- TP_PROTO(struct ieee80211_local *local,
+ TP_PROTO(struct mac80211_local *local,
u8 hw_key_idx, u32 *iv32, u16 *iv16),

TP_ARGS(local, hw_key_idx, iv32, iv16),
@@ -539,17 +539,17 @@ TRACE_EVENT(drv_get_tkip_seq,
);

DEFINE_EVENT(local_u32_evt, drv_set_frag_threshold,
- TP_PROTO(struct ieee80211_local *local, u32 value),
+ TP_PROTO(struct mac80211_local *local, u32 value),
TP_ARGS(local, value)
);

DEFINE_EVENT(local_u32_evt, drv_set_rts_threshold,
- TP_PROTO(struct ieee80211_local *local, u32 value),
+ TP_PROTO(struct mac80211_local *local, u32 value),
TP_ARGS(local, value)
);

TRACE_EVENT(drv_set_coverage_class,
- TP_PROTO(struct ieee80211_local *local, u8 value),
+ TP_PROTO(struct mac80211_local *local, u8 value),

TP_ARGS(local, value),

@@ -570,7 +570,7 @@ TRACE_EVENT(drv_set_coverage_class,
);

TRACE_EVENT(drv_sta_notify,
- TP_PROTO(struct ieee80211_local *local,
+ TP_PROTO(struct mac80211_local *local,
struct ieee80211_sub_if_data *sdata,
enum sta_notify_cmd cmd,
struct ieee80211_sta *sta),
@@ -598,7 +598,7 @@ TRACE_EVENT(drv_sta_notify,
);

TRACE_EVENT(drv_sta_add,
- TP_PROTO(struct ieee80211_local *local,
+ TP_PROTO(struct mac80211_local *local,
struct ieee80211_sub_if_data *sdata,
struct ieee80211_sta *sta),

@@ -623,7 +623,7 @@ TRACE_EVENT(drv_sta_add,
);

TRACE_EVENT(drv_sta_remove,
- TP_PROTO(struct ieee80211_local *local,
+ TP_PROTO(struct mac80211_local *local,
struct ieee80211_sub_if_data *sdata,
struct ieee80211_sta *sta),

@@ -648,7 +648,7 @@ TRACE_EVENT(drv_sta_remove,
);

TRACE_EVENT(drv_conf_tx,
- TP_PROTO(struct ieee80211_local *local, u16 queue,
+ TP_PROTO(struct mac80211_local *local, u16 queue,
const struct ieee80211_tx_queue_params *params),

TP_ARGS(local, queue, params),
@@ -678,12 +678,12 @@ TRACE_EVENT(drv_conf_tx,
);

DEFINE_EVENT(local_only_evt, drv_get_tsf,
- TP_PROTO(struct ieee80211_local *local),
+ TP_PROTO(struct mac80211_local *local),
TP_ARGS(local)
);

TRACE_EVENT(drv_set_tsf,
- TP_PROTO(struct ieee80211_local *local, u64 tsf),
+ TP_PROTO(struct mac80211_local *local, u64 tsf),

TP_ARGS(local, tsf),

@@ -704,17 +704,17 @@ TRACE_EVENT(drv_set_tsf,
);

DEFINE_EVENT(local_only_evt, drv_reset_tsf,
- TP_PROTO(struct ieee80211_local *local),
+ TP_PROTO(struct mac80211_local *local),
TP_ARGS(local)
);

DEFINE_EVENT(local_only_evt, drv_tx_last_beacon,
- TP_PROTO(struct ieee80211_local *local),
+ TP_PROTO(struct mac80211_local *local),
TP_ARGS(local)
);

TRACE_EVENT(drv_ampdu_action,
- TP_PROTO(struct ieee80211_local *local,
+ TP_PROTO(struct mac80211_local *local,
struct ieee80211_sub_if_data *sdata,
enum ieee80211_ampdu_mlme_action action,
struct ieee80211_sta *sta, u16 tid,
@@ -750,7 +750,7 @@ TRACE_EVENT(drv_ampdu_action,
);

TRACE_EVENT(drv_get_survey,
- TP_PROTO(struct ieee80211_local *local, int idx,
+ TP_PROTO(struct mac80211_local *local, int idx,
struct survey_info *survey),

TP_ARGS(local, idx, survey),
@@ -772,7 +772,7 @@ TRACE_EVENT(drv_get_survey,
);

TRACE_EVENT(drv_flush,
- TP_PROTO(struct ieee80211_local *local, bool drop),
+ TP_PROTO(struct mac80211_local *local, bool drop),

TP_ARGS(local, drop),

@@ -793,7 +793,7 @@ TRACE_EVENT(drv_flush,
);

TRACE_EVENT(drv_channel_switch,
- TP_PROTO(struct ieee80211_local *local,
+ TP_PROTO(struct mac80211_local *local,
struct ieee80211_channel_switch *ch_switch),

TP_ARGS(local, ch_switch),
@@ -821,7 +821,7 @@ TRACE_EVENT(drv_channel_switch,
);

TRACE_EVENT(drv_set_antenna,
- TP_PROTO(struct ieee80211_local *local, u32 tx_ant, u32 rx_ant, int ret),
+ TP_PROTO(struct mac80211_local *local, u32 tx_ant, u32 rx_ant, int ret),

TP_ARGS(local, tx_ant, rx_ant, ret),

@@ -846,7 +846,7 @@ TRACE_EVENT(drv_set_antenna,
);

TRACE_EVENT(drv_get_antenna,
- TP_PROTO(struct ieee80211_local *local, u32 tx_ant, u32 rx_ant, int ret),
+ TP_PROTO(struct mac80211_local *local, u32 tx_ant, u32 rx_ant, int ret),

TP_ARGS(local, tx_ant, rx_ant, ret),

@@ -871,7 +871,7 @@ TRACE_EVENT(drv_get_antenna,
);

TRACE_EVENT(drv_remain_on_channel,
- TP_PROTO(struct ieee80211_local *local, struct ieee80211_channel *chan,
+ TP_PROTO(struct mac80211_local *local, struct ieee80211_channel *chan,
enum nl80211_channel_type chantype, unsigned int duration),

TP_ARGS(local, chan, chantype, duration),
@@ -897,12 +897,12 @@ TRACE_EVENT(drv_remain_on_channel,
);

DEFINE_EVENT(local_only_evt, drv_cancel_remain_on_channel,
- TP_PROTO(struct ieee80211_local *local),
+ TP_PROTO(struct mac80211_local *local),
TP_ARGS(local)
);

TRACE_EVENT(drv_offchannel_tx,
- TP_PROTO(struct ieee80211_local *local, struct sk_buff *skb,
+ TP_PROTO(struct mac80211_local *local, struct sk_buff *skb,
struct ieee80211_channel *chan,
enum nl80211_channel_type channel_type,
unsigned int wait),
@@ -930,7 +930,7 @@ TRACE_EVENT(drv_offchannel_tx,
);

TRACE_EVENT(drv_set_ringparam,
- TP_PROTO(struct ieee80211_local *local, u32 tx, u32 rx),
+ TP_PROTO(struct mac80211_local *local, u32 tx, u32 rx),

TP_ARGS(local, tx, rx),

@@ -953,7 +953,7 @@ TRACE_EVENT(drv_set_ringparam,
);

TRACE_EVENT(drv_get_ringparam,
- TP_PROTO(struct ieee80211_local *local, u32 *tx, u32 *tx_max,
+ TP_PROTO(struct mac80211_local *local, u32 *tx, u32 *tx_max,
u32 *rx, u32 *rx_max),

TP_ARGS(local, tx, tx_max, rx, rx_max),
@@ -982,17 +982,17 @@ TRACE_EVENT(drv_get_ringparam,
);

DEFINE_EVENT(local_only_evt, drv_tx_frames_pending,
- TP_PROTO(struct ieee80211_local *local),
+ TP_PROTO(struct mac80211_local *local),
TP_ARGS(local)
);

DEFINE_EVENT(local_only_evt, drv_offchannel_tx_cancel_wait,
- TP_PROTO(struct ieee80211_local *local),
+ TP_PROTO(struct mac80211_local *local),
TP_ARGS(local)
);

TRACE_EVENT(drv_set_bitrate_mask,
- TP_PROTO(struct ieee80211_local *local,
+ TP_PROTO(struct mac80211_local *local,
struct ieee80211_sub_if_data *sdata,
const struct cfg80211_bitrate_mask *mask),

@@ -1111,7 +1111,7 @@ TRACE_EVENT(api_stop_tx_ba_cb,
);

DEFINE_EVENT(local_only_evt, api_restart_hw,
- TP_PROTO(struct ieee80211_local *local),
+ TP_PROTO(struct mac80211_local *local),
TP_ARGS(local)
);

@@ -1176,7 +1176,7 @@ TRACE_EVENT(api_cqm_rssi_notify,
);

TRACE_EVENT(api_scan_completed,
- TP_PROTO(struct ieee80211_local *local, bool aborted),
+ TP_PROTO(struct mac80211_local *local, bool aborted),

TP_ARGS(local, aborted),

@@ -1197,7 +1197,7 @@ TRACE_EVENT(api_scan_completed,
);

TRACE_EVENT(api_sched_scan_results,
- TP_PROTO(struct ieee80211_local *local),
+ TP_PROTO(struct mac80211_local *local),

TP_ARGS(local),

@@ -1215,7 +1215,7 @@ TRACE_EVENT(api_sched_scan_results,
);

TRACE_EVENT(api_sched_scan_stopped,
- TP_PROTO(struct ieee80211_local *local),
+ TP_PROTO(struct mac80211_local *local),

TP_ARGS(local),

@@ -1233,7 +1233,7 @@ TRACE_EVENT(api_sched_scan_stopped,
);

TRACE_EVENT(api_sta_block_awake,
- TP_PROTO(struct ieee80211_local *local,
+ TP_PROTO(struct mac80211_local *local,
struct ieee80211_sta *sta, bool block),

TP_ARGS(local, sta, block),
@@ -1278,12 +1278,12 @@ TRACE_EVENT(api_chswitch_done,
);

DEFINE_EVENT(local_only_evt, api_ready_on_channel,
- TP_PROTO(struct ieee80211_local *local),
+ TP_PROTO(struct mac80211_local *local),
TP_ARGS(local)
);

DEFINE_EVENT(local_only_evt, api_remain_on_channel_expired,
- TP_PROTO(struct ieee80211_local *local),
+ TP_PROTO(struct mac80211_local *local),
TP_ARGS(local)
);

@@ -1293,7 +1293,7 @@ DEFINE_EVENT(local_only_evt, api_remain_on_channel_expired,
*/

TRACE_EVENT(wake_queue,
- TP_PROTO(struct ieee80211_local *local, u16 queue,
+ TP_PROTO(struct mac80211_local *local, u16 queue,
enum queue_stop_reason reason),

TP_ARGS(local, queue, reason),
@@ -1317,7 +1317,7 @@ TRACE_EVENT(wake_queue,
);

TRACE_EVENT(stop_queue,
- TP_PROTO(struct ieee80211_local *local, u16 queue,
+ TP_PROTO(struct mac80211_local *local, u16 queue,
enum queue_stop_reason reason),

TP_ARGS(local, queue, reason),
diff --git a/net/mac80211/ht.c b/net/mac80211/ht.c
index b931771..1320a0e 100644
--- a/net/mac80211/ht.c
+++ b/net/mac80211/ht.c
@@ -174,7 +174,7 @@ void ieee80211_send_delba(struct ieee80211_sub_if_data *sdata,
const u8 *da, u16 tid,
u16 initiator, u16 reason_code)
{
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;
struct sk_buff *skb;
struct ieee80211_mgmt *mgmt;
u16 params;
@@ -244,7 +244,7 @@ int ieee80211_send_smps_action(struct ieee80211_sub_if_data *sdata,
enum ieee80211_smps_mode smps, const u8 *da,
const u8 *bssid)
{
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;
struct sk_buff *skb;
struct ieee80211_mgmt *action_frame;

diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c
index 917041a..2533947 100644
--- a/net/mac80211/ibss.c
+++ b/net/mac80211/ibss.c
@@ -68,7 +68,7 @@ static void __ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata,
const u16 capability, u64 tsf)
{
struct ieee80211_if_ibss *ifibss = &sdata->u.ibss;
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;
int rates, i;
struct sk_buff *skb;
struct ieee80211_mgmt *mgmt;
@@ -257,7 +257,7 @@ static void ieee80211_rx_bss_info(struct ieee80211_sub_if_data *sdata,
struct ieee802_11_elems *elems,
bool beacon)
{
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;
int freq;
struct cfg80211_bss *cbss;
struct ieee80211_bss *bss;
@@ -421,7 +421,7 @@ struct sta_info *ieee80211_ibss_add_sta(struct ieee80211_sub_if_data *sdata,
gfp_t gfp)
{
struct ieee80211_if_ibss *ifibss = &sdata->u.ibss;
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;
struct sta_info *sta;
int band = local->hw.conf.channel->band;

@@ -468,7 +468,7 @@ struct sta_info *ieee80211_ibss_add_sta(struct ieee80211_sub_if_data *sdata,

static int ieee80211_sta_active_ibss(struct ieee80211_sub_if_data *sdata)
{
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;
int active = 0;
struct sta_info *sta;

@@ -567,7 +567,7 @@ static void ieee80211_sta_create_ibss(struct ieee80211_sub_if_data *sdata)
static void ieee80211_sta_find_ibss(struct ieee80211_sub_if_data *sdata)
{
struct ieee80211_if_ibss *ifibss = &sdata->u.ibss;
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;
struct cfg80211_bss *cbss;
struct ieee80211_channel *chan = NULL;
const u8 *bssid = NULL;
@@ -658,7 +658,7 @@ static void ieee80211_rx_mgmt_probe_req(struct ieee80211_sub_if_data *sdata,
{
struct ieee80211_mgmt *mgmt = (void *)req->data;
struct ieee80211_if_ibss *ifibss = &sdata->u.ibss;
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;
int tx_last_beacon, len = req->len;
struct sk_buff *skb;
struct ieee80211_mgmt *resp;
@@ -834,7 +834,7 @@ static void ieee80211_ibss_timer(unsigned long data)
struct ieee80211_sub_if_data *sdata =
(struct ieee80211_sub_if_data *) data;
struct ieee80211_if_ibss *ifibss = &sdata->u.ibss;
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;

if (local->quiescing) {
ifibss->timer_running = true;
@@ -874,7 +874,7 @@ void ieee80211_ibss_setup_sdata(struct ieee80211_sub_if_data *sdata)
}

/* scan finished notification */
-void ieee80211_ibss_notify_scan_completed(struct ieee80211_local *local)
+void ieee80211_ibss_notify_scan_completed(struct mac80211_local *local)
{
struct ieee80211_sub_if_data *sdata;

@@ -958,7 +958,7 @@ int ieee80211_ibss_leave(struct ieee80211_sub_if_data *sdata)
{
struct sk_buff *skb;
struct ieee80211_if_ibss *ifibss = &sdata->u.ibss;
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;
struct cfg80211_bss *cbss;
u16 capability;
int active_ibss;
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
index 08e987e..5c44737 100644
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -29,7 +29,7 @@
/**
* DOC: Interface list locking
*
- * The interface list in each struct ieee80211_local is protected
+ * The interface list in each struct mac80211_local is protected
* three-fold:
*
* (1) modifications may only be done under the RTNL
@@ -98,7 +98,7 @@ static inline int identical_mac_addr_allowed(int type1, int type2)
static int ieee80211_check_concurrent_iface(struct ieee80211_sub_if_data *sdata,
enum nl80211_iftype iftype)
{
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;
struct ieee80211_sub_if_data *nsdata;
struct net_device *dev = sdata->dev;

@@ -152,7 +152,7 @@ static int ieee80211_check_concurrent_iface(struct ieee80211_sub_if_data *sdata,
void ieee80211_adjust_monitor_flags(struct ieee80211_sub_if_data *sdata,
const int offset)
{
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;
u32 flags = sdata->u.mntr_flags;

#define ADJUST(_f, _s) do { \
@@ -177,7 +177,7 @@ void ieee80211_adjust_monitor_flags(struct ieee80211_sub_if_data *sdata,
static int ieee80211_do_open(struct net_device *dev, bool coming_up)
{
struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;
struct sta_info *sta;
u32 changed = 0;
int res;
@@ -377,7 +377,7 @@ static int ieee80211_open(struct net_device *dev)
static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata,
bool going_down)
{
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;
unsigned long flags;
struct sk_buff *skb, *tmp;
u32 hw_reconf_flags = 0;
@@ -579,7 +579,7 @@ static int ieee80211_stop(struct net_device *dev)
static void ieee80211_set_multicast_list(struct net_device *dev)
{
struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;
int allmulti, promisc, sdata_allmulti, sdata_promisc;

allmulti = !!(dev->flags & IFF_ALLMULTI);
@@ -615,7 +615,7 @@ static void ieee80211_set_multicast_list(struct net_device *dev)
static void ieee80211_teardown_sdata(struct net_device *dev)
{
struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;
int flushed;
int i;

@@ -656,7 +656,7 @@ static u16 ieee80211_monitor_select_queue(struct net_device *dev,
struct sk_buff *skb)
{
struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;
struct ieee80211_hdr *hdr;
struct ieee80211_radiotap_header *rtap = (void *)skb->data;
u8 *p;
@@ -707,7 +707,7 @@ static void ieee80211_iface_work(struct work_struct *work)
{
struct ieee80211_sub_if_data *sdata =
container_of(work, struct ieee80211_sub_if_data, work);
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;
struct sk_buff *skb;
struct sta_info *sta;
struct ieee80211_ra_tid *ra_tid;
@@ -904,7 +904,7 @@ static void ieee80211_setup_sdata(struct ieee80211_sub_if_data *sdata,
static int ieee80211_runtime_change_iftype(struct ieee80211_sub_if_data *sdata,
enum nl80211_iftype type)
{
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;
int ret, err;
enum nl80211_iftype internal_type = type;
bool p2p = false;
@@ -1008,7 +1008,7 @@ int ieee80211_if_change_type(struct ieee80211_sub_if_data *sdata,
return 0;
}

-static void ieee80211_assign_perm_addr(struct ieee80211_local *local,
+static void ieee80211_assign_perm_addr(struct mac80211_local *local,
struct net_device *dev,
enum nl80211_iftype type)
{
@@ -1120,7 +1120,7 @@ static void ieee80211_assign_perm_addr(struct ieee80211_local *local,
mutex_unlock(&local->iflist_mtx);
}

-int ieee80211_if_add(struct ieee80211_local *local, const char *name,
+int ieee80211_if_add(struct mac80211_local *local, const char *name,
struct net_device **new_dev, enum nl80211_iftype type,
struct vif_params *params)
{
@@ -1222,7 +1222,7 @@ void ieee80211_if_remove(struct ieee80211_sub_if_data *sdata)
* Remove all interfaces, may only be called at hardware unregistration
* time because it doesn't do RCU-safe list removals.
*/
-void ieee80211_remove_interfaces(struct ieee80211_local *local)
+void ieee80211_remove_interfaces(struct mac80211_local *local)
{
struct ieee80211_sub_if_data *sdata, *tmp;
LIST_HEAD(unreg_list);
@@ -1240,7 +1240,7 @@ void ieee80211_remove_interfaces(struct ieee80211_local *local)
list_del(&unreg_list);
}

-static u32 ieee80211_idle_off(struct ieee80211_local *local,
+static u32 ieee80211_idle_off(struct mac80211_local *local,
const char *reason)
{
if (!(local->hw.conf.flags & IEEE80211_CONF_IDLE))
@@ -1254,7 +1254,7 @@ static u32 ieee80211_idle_off(struct ieee80211_local *local,
return IEEE80211_CONF_CHANGE_IDLE;
}

-static u32 ieee80211_idle_on(struct ieee80211_local *local)
+static u32 ieee80211_idle_on(struct mac80211_local *local)
{
if (local->hw.conf.flags & IEEE80211_CONF_IDLE)
return 0;
@@ -1269,7 +1269,7 @@ static u32 ieee80211_idle_on(struct ieee80211_local *local)
return IEEE80211_CONF_CHANGE_IDLE;
}

-u32 __ieee80211_recalc_idle(struct ieee80211_local *local)
+u32 __ieee80211_recalc_idle(struct mac80211_local *local)
{
struct ieee80211_sub_if_data *sdata;
int count = 0;
@@ -1354,7 +1354,7 @@ u32 __ieee80211_recalc_idle(struct ieee80211_local *local)
return 0;
}

-void ieee80211_recalc_idle(struct ieee80211_local *local)
+void ieee80211_recalc_idle(struct mac80211_local *local)
{
u32 chg;

diff --git a/net/mac80211/key.c b/net/mac80211/key.c
index 6093e51..1eaf1be 100644
--- a/net/mac80211/key.c
+++ b/net/mac80211/key.c
@@ -48,7 +48,7 @@

static const u8 bcast_addr[ETH_ALEN] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF };

-static void assert_key_lock(struct ieee80211_local *local)
+static void assert_key_lock(struct mac80211_local *local)
{
lockdep_assert_held(&local->key_mtx);
}
@@ -492,7 +492,7 @@ void __ieee80211_key_free(struct ieee80211_key *key)
__ieee80211_key_destroy(key);
}

-void ieee80211_key_free(struct ieee80211_local *local,
+void ieee80211_key_free(struct mac80211_local *local,
struct ieee80211_key *key)
{
mutex_lock(&local->key_mtx);
diff --git a/net/mac80211/key.h b/net/mac80211/key.h
index d801d53..035fc31 100644
--- a/net/mac80211/key.h
+++ b/net/mac80211/key.h
@@ -31,7 +31,7 @@

#define NUM_RX_DATA_QUEUES 17

-struct ieee80211_local;
+struct mac80211_local;
struct ieee80211_sub_if_data;
struct sta_info;

@@ -59,7 +59,7 @@ struct tkip_ctx {
};

struct ieee80211_key {
- struct ieee80211_local *local;
+ struct mac80211_local *local;
struct ieee80211_sub_if_data *sdata;
struct sta_info *sta;

@@ -136,7 +136,7 @@ int __must_check ieee80211_key_link(struct ieee80211_key *key,
struct ieee80211_sub_if_data *sdata,
struct sta_info *sta);
void __ieee80211_key_free(struct ieee80211_key *key);
-void ieee80211_key_free(struct ieee80211_local *local,
+void ieee80211_key_free(struct mac80211_local *local,
struct ieee80211_key *key);
void ieee80211_set_default_key(struct ieee80211_sub_if_data *sdata, int idx,
bool uni, bool multi);
diff --git a/net/mac80211/led.c b/net/mac80211/led.c
index 1459033..0d2fd97 100644
--- a/net/mac80211/led.c
+++ b/net/mac80211/led.c
@@ -11,7 +11,7 @@
#include <linux/slab.h>
#include "led.h"

-void ieee80211_led_rx(struct ieee80211_local *local)
+void ieee80211_led_rx(struct mac80211_local *local)
{
if (unlikely(!local->rx_led))
return;
@@ -22,7 +22,7 @@ void ieee80211_led_rx(struct ieee80211_local *local)
}

/* q is 1 if a packet was enqueued, 0 if it has been transmitted */
-void ieee80211_led_tx(struct ieee80211_local *local, int q)
+void ieee80211_led_tx(struct mac80211_local *local, int q)
{
if (unlikely(!local->tx_led))
return;
@@ -34,7 +34,7 @@ void ieee80211_led_tx(struct ieee80211_local *local, int q)
led_trigger_event(local->tx_led, LED_FULL);
}

-void ieee80211_led_assoc(struct ieee80211_local *local, bool associated)
+void ieee80211_led_assoc(struct mac80211_local *local, bool associated)
{
if (unlikely(!local->assoc_led))
return;
@@ -44,7 +44,7 @@ void ieee80211_led_assoc(struct ieee80211_local *local, bool associated)
led_trigger_event(local->assoc_led, LED_OFF);
}

-void ieee80211_led_radio(struct ieee80211_local *local, bool enabled)
+void ieee80211_led_radio(struct mac80211_local *local, bool enabled)
{
if (unlikely(!local->radio_led))
return;
@@ -54,7 +54,7 @@ void ieee80211_led_radio(struct ieee80211_local *local, bool enabled)
led_trigger_event(local->radio_led, LED_OFF);
}

-void ieee80211_led_names(struct ieee80211_local *local)
+void ieee80211_led_names(struct mac80211_local *local)
{
snprintf(local->rx_led_name, sizeof(local->rx_led_name),
"%srx", wiphy_name(local->hw.wiphy));
@@ -66,7 +66,7 @@ void ieee80211_led_names(struct ieee80211_local *local)
"%sradio", wiphy_name(local->hw.wiphy));
}

-void ieee80211_led_init(struct ieee80211_local *local)
+void ieee80211_led_init(struct mac80211_local *local)
{
local->rx_led = kzalloc(sizeof(struct led_trigger), GFP_KERNEL);
if (local->rx_led) {
@@ -112,7 +112,7 @@ void ieee80211_led_init(struct ieee80211_local *local)
}
}

-void ieee80211_led_exit(struct ieee80211_local *local)
+void ieee80211_led_exit(struct mac80211_local *local)
{
if (local->radio_led) {
led_trigger_unregister(local->radio_led);
@@ -139,7 +139,7 @@ void ieee80211_led_exit(struct ieee80211_local *local)

char *__ieee80211_get_radio_led_name(struct ieee80211_hw *hw)
{
- struct ieee80211_local *local = hw_to_local(hw);
+ struct mac80211_local *local = hw_to_local(hw);

return local->radio_led_name;
}
@@ -147,7 +147,7 @@ EXPORT_SYMBOL(__ieee80211_get_radio_led_name);

char *__ieee80211_get_assoc_led_name(struct ieee80211_hw *hw)
{
- struct ieee80211_local *local = hw_to_local(hw);
+ struct mac80211_local *local = hw_to_local(hw);

return local->assoc_led_name;
}
@@ -155,7 +155,7 @@ EXPORT_SYMBOL(__ieee80211_get_assoc_led_name);

char *__ieee80211_get_tx_led_name(struct ieee80211_hw *hw)
{
- struct ieee80211_local *local = hw_to_local(hw);
+ struct mac80211_local *local = hw_to_local(hw);

return local->tx_led_name;
}
@@ -163,13 +163,13 @@ EXPORT_SYMBOL(__ieee80211_get_tx_led_name);

char *__ieee80211_get_rx_led_name(struct ieee80211_hw *hw)
{
- struct ieee80211_local *local = hw_to_local(hw);
+ struct mac80211_local *local = hw_to_local(hw);

return local->rx_led_name;
}
EXPORT_SYMBOL(__ieee80211_get_rx_led_name);

-static unsigned long tpt_trig_traffic(struct ieee80211_local *local,
+static unsigned long tpt_trig_traffic(struct mac80211_local *local,
struct tpt_led_trigger *tpt_trig)
{
unsigned long traffic, delta;
@@ -183,7 +183,7 @@ static unsigned long tpt_trig_traffic(struct ieee80211_local *local,

static void tpt_trig_timer(unsigned long data)
{
- struct ieee80211_local *local = (void *)data;
+ struct mac80211_local *local = (void *)data;
struct tpt_led_trigger *tpt_trig = local->tpt_led_trigger;
struct led_classdev *led_cdev;
unsigned long on, off, tpt;
@@ -220,7 +220,7 @@ char *__ieee80211_create_tpt_led_trigger(struct ieee80211_hw *hw,
const struct ieee80211_tpt_blink *blink_table,
unsigned int blink_table_len)
{
- struct ieee80211_local *local = hw_to_local(hw);
+ struct mac80211_local *local = hw_to_local(hw);
struct tpt_led_trigger *tpt_trig;

if (WARN_ON(local->tpt_led_trigger))
@@ -247,7 +247,7 @@ char *__ieee80211_create_tpt_led_trigger(struct ieee80211_hw *hw,
}
EXPORT_SYMBOL(__ieee80211_create_tpt_led_trigger);

-static void ieee80211_start_tpt_led_trig(struct ieee80211_local *local)
+static void ieee80211_start_tpt_led_trig(struct mac80211_local *local)
{
struct tpt_led_trigger *tpt_trig = local->tpt_led_trigger;

@@ -262,7 +262,7 @@ static void ieee80211_start_tpt_led_trig(struct ieee80211_local *local)
mod_timer(&tpt_trig->timer, round_jiffies(jiffies + HZ));
}

-static void ieee80211_stop_tpt_led_trig(struct ieee80211_local *local)
+static void ieee80211_stop_tpt_led_trig(struct mac80211_local *local)
{
struct tpt_led_trigger *tpt_trig = local->tpt_led_trigger;
struct led_classdev *led_cdev;
@@ -279,7 +279,7 @@ static void ieee80211_stop_tpt_led_trig(struct ieee80211_local *local)
read_unlock(&tpt_trig->trig.leddev_list_lock);
}

-void ieee80211_mod_tpt_led_trig(struct ieee80211_local *local,
+void ieee80211_mod_tpt_led_trig(struct mac80211_local *local,
unsigned int types_on, unsigned int types_off)
{
struct tpt_led_trigger *tpt_trig = local->tpt_led_trigger;
diff --git a/net/mac80211/led.h b/net/mac80211/led.h
index 9be15dd..9219e7e 100644
--- a/net/mac80211/led.h
+++ b/net/mac80211/led.h
@@ -12,42 +12,42 @@
#include "mac80211_i.h"

#ifdef CONFIG_MAC80211_LEDS
-void ieee80211_led_rx(struct ieee80211_local *local);
-void ieee80211_led_tx(struct ieee80211_local *local, int q);
-void ieee80211_led_assoc(struct ieee80211_local *local,
+void ieee80211_led_rx(struct mac80211_local *local);
+void ieee80211_led_tx(struct mac80211_local *local, int q);
+void ieee80211_led_assoc(struct mac80211_local *local,
bool associated);
-void ieee80211_led_radio(struct ieee80211_local *local,
+void ieee80211_led_radio(struct mac80211_local *local,
bool enabled);
-void ieee80211_led_names(struct ieee80211_local *local);
-void ieee80211_led_init(struct ieee80211_local *local);
-void ieee80211_led_exit(struct ieee80211_local *local);
-void ieee80211_mod_tpt_led_trig(struct ieee80211_local *local,
+void ieee80211_led_names(struct mac80211_local *local);
+void ieee80211_led_init(struct mac80211_local *local);
+void ieee80211_led_exit(struct mac80211_local *local);
+void ieee80211_mod_tpt_led_trig(struct mac80211_local *local,
unsigned int types_on, unsigned int types_off);
#else
-static inline void ieee80211_led_rx(struct ieee80211_local *local)
+static inline void ieee80211_led_rx(struct mac80211_local *local)
{
}
-static inline void ieee80211_led_tx(struct ieee80211_local *local, int q)
+static inline void ieee80211_led_tx(struct mac80211_local *local, int q)
{
}
-static inline void ieee80211_led_assoc(struct ieee80211_local *local,
+static inline void ieee80211_led_assoc(struct mac80211_local *local,
bool associated)
{
}
-static inline void ieee80211_led_radio(struct ieee80211_local *local,
+static inline void ieee80211_led_radio(struct mac80211_local *local,
bool enabled)
{
}
-static inline void ieee80211_led_names(struct ieee80211_local *local)
+static inline void ieee80211_led_names(struct mac80211_local *local)
{
}
-static inline void ieee80211_led_init(struct ieee80211_local *local)
+static inline void ieee80211_led_init(struct mac80211_local *local)
{
}
-static inline void ieee80211_led_exit(struct ieee80211_local *local)
+static inline void ieee80211_led_exit(struct mac80211_local *local)
{
}
-static inline void ieee80211_mod_tpt_led_trig(struct ieee80211_local *local,
+static inline void ieee80211_mod_tpt_led_trig(struct mac80211_local *local,
unsigned int types_on,
unsigned int types_off)
{
@@ -55,7 +55,7 @@ static inline void ieee80211_mod_tpt_led_trig(struct ieee80211_local *local,
#endif

static inline void
-ieee80211_tpt_led_trig_tx(struct ieee80211_local *local, __le16 fc, int bytes)
+ieee80211_tpt_led_trig_tx(struct mac80211_local *local, __le16 fc, int bytes)
{
#ifdef CONFIG_MAC80211_LEDS
if (local->tpt_led_trigger && ieee80211_is_data(fc))
@@ -64,7 +64,7 @@ ieee80211_tpt_led_trig_tx(struct ieee80211_local *local, __le16 fc, int bytes)
}

static inline void
-ieee80211_tpt_led_trig_rx(struct ieee80211_local *local, __le16 fc, int bytes)
+ieee80211_tpt_led_trig_rx(struct mac80211_local *local, __le16 fc, int bytes)
{
#ifdef CONFIG_MAC80211_LEDS
if (local->tpt_led_trigger && ieee80211_is_data(fc))
diff --git a/net/mac80211/mac80211_i.h b/net/mac80211/mac80211_i.h
index cb1ec5f..82e60c2 100644
--- a/net/mac80211/mac80211_i.h
+++ b/net/mac80211/mac80211_i.h
@@ -30,7 +30,7 @@
#include "key.h"
#include "sta_info.h"

-struct ieee80211_local;
+struct mac80211_local;

/* Maximum number of broadcast/multicast frames to buffer when some of the
* associated stations are using power saving. */
@@ -142,7 +142,7 @@ typedef unsigned __bitwise__ ieee80211_tx_result;

struct ieee80211_tx_data {
struct sk_buff *skb;
- struct ieee80211_local *local;
+ struct mac80211_local *local;
struct ieee80211_sub_if_data *sdata;
struct sta_info *sta;
struct ieee80211_key *key;
@@ -196,7 +196,7 @@ enum ieee80211_rx_flags {

struct ieee80211_rx_data {
struct sk_buff *skb;
- struct ieee80211_local *local;
+ struct mac80211_local *local;
struct ieee80211_sub_if_data *sdata;
struct sta_info *sta;
struct ieee80211_key *key;
@@ -545,7 +545,7 @@ struct ieee80211_sub_if_data {
struct list_head key_list;

struct net_device *dev;
- struct ieee80211_local *local;
+ struct mac80211_local *local;

unsigned int flags;

@@ -695,7 +695,7 @@ enum mac80211_scan_state {
SCAN_ENTER_OPER_CHANNEL,
};

-struct ieee80211_local {
+struct mac80211_local {
/* embed the driver visible part.
* don't cast (use the static inlines below), but we keep
* it first anyway so they become a no-op */
@@ -1057,14 +1057,14 @@ struct ieee802_11_elems {
u8 timeout_int_len;
};

-static inline struct ieee80211_local *hw_to_local(
+static inline struct mac80211_local *hw_to_local(
struct ieee80211_hw *hw)
{
- return container_of(hw, struct ieee80211_local, hw);
+ return container_of(hw, struct mac80211_local, hw);
}

static inline struct ieee80211_hw *local_to_hw(
- struct ieee80211_local *local)
+ struct mac80211_local *local)
{
return &local->hw;
}
@@ -1077,11 +1077,11 @@ static inline int ieee80211_bssid_match(const u8 *raddr, const u8 *addr)
}


-int ieee80211_hw_config(struct ieee80211_local *local, u32 changed);
+int ieee80211_hw_config(struct mac80211_local *local, u32 changed);
void ieee80211_tx_set_protected(struct ieee80211_tx_data *tx);
void ieee80211_bss_info_change_notify(struct ieee80211_sub_if_data *sdata,
u32 changed);
-void ieee80211_configure_filter(struct ieee80211_local *local);
+void ieee80211_configure_filter(struct mac80211_local *local);
u32 ieee80211_reset_erp_info(struct ieee80211_sub_if_data *sdata);

/* STA code */
@@ -1096,9 +1096,9 @@ int ieee80211_mgd_deauth(struct ieee80211_sub_if_data *sdata,
int ieee80211_mgd_disassoc(struct ieee80211_sub_if_data *sdata,
struct cfg80211_disassoc_request *req,
void *cookie);
-void ieee80211_send_pspoll(struct ieee80211_local *local,
+void ieee80211_send_pspoll(struct mac80211_local *local,
struct ieee80211_sub_if_data *sdata);
-void ieee80211_recalc_ps(struct ieee80211_local *local, s32 latency);
+void ieee80211_recalc_ps(struct mac80211_local *local, s32 latency);
int ieee80211_max_network_latency(struct notifier_block *nb,
unsigned long data, void *dummy);
int ieee80211_set_arp_filter(struct ieee80211_sub_if_data *sdata);
@@ -1115,7 +1115,7 @@ void ieee80211_sta_reset_beacon_monitor(struct ieee80211_sub_if_data *sdata);
void ieee80211_sta_reset_conn_monitor(struct ieee80211_sub_if_data *sdata);

/* IBSS code */
-void ieee80211_ibss_notify_scan_completed(struct ieee80211_local *local);
+void ieee80211_ibss_notify_scan_completed(struct mac80211_local *local);
void ieee80211_ibss_setup_sdata(struct ieee80211_sub_if_data *sdata);
struct sta_info *ieee80211_ibss_add_sta(struct ieee80211_sub_if_data *sdata,
u8 *bssid, u8 *addr, u32 supp_rates,
@@ -1141,13 +1141,13 @@ int ieee80211_request_internal_scan(struct ieee80211_sub_if_data *sdata,
struct ieee80211_channel *chan);
int ieee80211_request_scan(struct ieee80211_sub_if_data *sdata,
struct cfg80211_scan_request *req);
-void ieee80211_scan_cancel(struct ieee80211_local *local);
+void ieee80211_scan_cancel(struct mac80211_local *local);
ieee80211_rx_result
ieee80211_scan_rx(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb);

-void ieee80211_mlme_notify_scan_completed(struct ieee80211_local *local);
+void ieee80211_mlme_notify_scan_completed(struct mac80211_local *local);
struct ieee80211_bss *
-ieee80211_bss_info_update(struct ieee80211_local *local,
+ieee80211_bss_info_update(struct mac80211_local *local,
struct ieee80211_rx_status *rx_status,
struct ieee80211_mgmt *mgmt,
size_t len,
@@ -1155,9 +1155,9 @@ ieee80211_bss_info_update(struct ieee80211_local *local,
struct ieee80211_channel *channel,
bool beacon);
struct ieee80211_bss *
-ieee80211_rx_bss_get(struct ieee80211_local *local, u8 *bssid, int freq,
+ieee80211_rx_bss_get(struct mac80211_local *local, u8 *bssid, int freq,
u8 *ssid, u8 ssid_len);
-void ieee80211_rx_bss_put(struct ieee80211_local *local,
+void ieee80211_rx_bss_put(struct mac80211_local *local,
struct ieee80211_bss *bss);

/* scheduled scan handling */
@@ -1167,28 +1167,28 @@ int ieee80211_request_sched_scan_stop(struct ieee80211_sub_if_data *sdata);
void ieee80211_sched_scan_stopped_work(struct work_struct *work);

/* off-channel helpers */
-bool ieee80211_cfg_on_oper_channel(struct ieee80211_local *local);
-void ieee80211_offchannel_enable_all_ps(struct ieee80211_local *local,
+bool ieee80211_cfg_on_oper_channel(struct mac80211_local *local);
+void ieee80211_offchannel_enable_all_ps(struct mac80211_local *local,
bool tell_ap);
-void ieee80211_offchannel_stop_vifs(struct ieee80211_local *local,
+void ieee80211_offchannel_stop_vifs(struct mac80211_local *local,
bool offchannel_ps_enable);
-void ieee80211_offchannel_return(struct ieee80211_local *local,
+void ieee80211_offchannel_return(struct mac80211_local *local,
bool enable_beaconing,
bool offchannel_ps_disable);
-void ieee80211_hw_roc_setup(struct ieee80211_local *local);
+void ieee80211_hw_roc_setup(struct mac80211_local *local);

/* interface handling */
int ieee80211_iface_init(void);
void ieee80211_iface_exit(void);
-int ieee80211_if_add(struct ieee80211_local *local, const char *name,
+int ieee80211_if_add(struct mac80211_local *local, const char *name,
struct net_device **new_dev, enum nl80211_iftype type,
struct vif_params *params);
int ieee80211_if_change_type(struct ieee80211_sub_if_data *sdata,
enum nl80211_iftype type);
void ieee80211_if_remove(struct ieee80211_sub_if_data *sdata);
-void ieee80211_remove_interfaces(struct ieee80211_local *local);
-u32 __ieee80211_recalc_idle(struct ieee80211_local *local);
-void ieee80211_recalc_idle(struct ieee80211_local *local);
+void ieee80211_remove_interfaces(struct mac80211_local *local);
+u32 __ieee80211_recalc_idle(struct mac80211_local *local);
+void ieee80211_recalc_idle(struct mac80211_local *local);
void ieee80211_adjust_monitor_flags(struct ieee80211_sub_if_data *sdata,
const int offset);

@@ -1198,7 +1198,7 @@ static inline bool ieee80211_sdata_running(struct ieee80211_sub_if_data *sdata)
}

/* tx handling */
-void ieee80211_clear_tx_pending(struct ieee80211_local *local);
+void ieee80211_clear_tx_pending(struct mac80211_local *local);
void ieee80211_tx_pending(unsigned long data);
netdev_tx_t ieee80211_monitor_start_xmit(struct sk_buff *skb,
struct net_device *dev);
@@ -1238,11 +1238,11 @@ void ieee80211_sta_tear_down_BA_sessions(struct sta_info *sta, bool tx);
void ieee80211_process_delba(struct ieee80211_sub_if_data *sdata,
struct sta_info *sta,
struct ieee80211_mgmt *mgmt, size_t len);
-void ieee80211_process_addba_resp(struct ieee80211_local *local,
+void ieee80211_process_addba_resp(struct mac80211_local *local,
struct sta_info *sta,
struct ieee80211_mgmt *mgmt,
size_t len);
-void ieee80211_process_addba_request(struct ieee80211_local *local,
+void ieee80211_process_addba_request(struct mac80211_local *local,
struct sta_info *sta,
struct ieee80211_mgmt *mgmt,
size_t len);
@@ -1265,8 +1265,8 @@ void ieee80211_process_measurement_req(struct ieee80211_sub_if_data *sdata,
size_t len);

/* Suspend/resume and hw reconfiguration */
-int ieee80211_reconfig(struct ieee80211_local *local);
-void ieee80211_stop_device(struct ieee80211_local *local);
+int ieee80211_reconfig(struct mac80211_local *local);
+void ieee80211_stop_device(struct mac80211_local *local);

#ifdef CONFIG_PM
int __ieee80211_suspend(struct ieee80211_hw *hw,
@@ -1274,7 +1274,7 @@ int __ieee80211_suspend(struct ieee80211_hw *hw,

static inline int __ieee80211_resume(struct ieee80211_hw *hw)
{
- struct ieee80211_local *local = hw_to_local(hw);
+ struct mac80211_local *local = hw_to_local(hw);

WARN(test_bit(SCAN_HW_SCANNING, &local->scanning),
"%s: resume with hardware scan still in progress\n",
@@ -1299,7 +1299,7 @@ static inline int __ieee80211_resume(struct ieee80211_hw *hw)
extern void *mac80211_wiphy_privid; /* for wiphy privid */
u8 *ieee80211_get_bssid(struct ieee80211_hdr *hdr, size_t len,
enum nl80211_iftype type);
-int ieee80211_frame_duration(struct ieee80211_local *local, size_t len,
+int ieee80211_frame_duration(struct mac80211_local *local, size_t len,
int rate, int erp, int short_preamble);
void mac80211_ev_michael_mic_failure(struct ieee80211_sub_if_data *sdata, int keyidx,
struct ieee80211_hdr *hdr, const u8 *tsc,
@@ -1311,13 +1311,13 @@ void ieee802_11_parse_elems(u8 *start, size_t len,
u32 ieee802_11_parse_elems_crc(u8 *start, size_t len,
struct ieee802_11_elems *elems,
u64 filter, u32 crc);
-u32 ieee80211_mandatory_rates(struct ieee80211_local *local,
+u32 ieee80211_mandatory_rates(struct mac80211_local *local,
enum ieee80211_band band);

void ieee80211_dynamic_ps_enable_work(struct work_struct *work);
void ieee80211_dynamic_ps_disable_work(struct work_struct *work);
void ieee80211_dynamic_ps_timer(unsigned long data);
-void ieee80211_send_nullfunc(struct ieee80211_local *local,
+void ieee80211_send_nullfunc(struct mac80211_local *local,
struct ieee80211_sub_if_data *sdata,
int powersave);
void ieee80211_sta_rx_notify(struct ieee80211_sub_if_data *sdata,
@@ -1334,11 +1334,11 @@ void ieee80211_wake_queue_by_reason(struct ieee80211_hw *hw, int queue,
enum queue_stop_reason reason);
void ieee80211_stop_queue_by_reason(struct ieee80211_hw *hw, int queue,
enum queue_stop_reason reason);
-void ieee80211_add_pending_skb(struct ieee80211_local *local,
+void ieee80211_add_pending_skb(struct mac80211_local *local,
struct sk_buff *skb);
-int ieee80211_add_pending_skbs(struct ieee80211_local *local,
+int ieee80211_add_pending_skbs(struct mac80211_local *local,
struct sk_buff_head *skbs);
-int ieee80211_add_pending_skbs_fn(struct ieee80211_local *local,
+int ieee80211_add_pending_skbs_fn(struct mac80211_local *local,
struct sk_buff_head *skbs,
void (*fn)(void *data), void *data);

@@ -1346,7 +1346,7 @@ void ieee80211_send_auth(struct ieee80211_sub_if_data *sdata,
u16 transaction, u16 auth_alg,
u8 *extra, size_t extra_len, const u8 *bssid,
const u8 *key, u8 key_len, u8 key_idx);
-int ieee80211_build_preq_ies(struct ieee80211_local *local, u8 *buffer,
+int ieee80211_build_preq_ies(struct mac80211_local *local, u8 *buffer,
const u8 *ie, size_t ie_len,
enum ieee80211_band band, u32 rate_mask,
u8 channel);
@@ -1361,19 +1361,19 @@ void ieee80211_send_probe_req(struct ieee80211_sub_if_data *sdata, u8 *dst,
void ieee80211_sta_def_wmm_params(struct ieee80211_sub_if_data *sdata,
const size_t supp_rates_len,
const u8 *supp_rates);
-u32 ieee80211_sta_get_rates(struct ieee80211_local *local,
+u32 ieee80211_sta_get_rates(struct mac80211_local *local,
struct ieee802_11_elems *elems,
enum ieee80211_band band);
int __ieee80211_request_smps(struct ieee80211_sub_if_data *sdata,
enum ieee80211_smps_mode smps_mode);
-void ieee80211_recalc_smps(struct ieee80211_local *local);
+void ieee80211_recalc_smps(struct mac80211_local *local);

size_t ieee80211_ie_split(const u8 *ies, size_t ielen,
const u8 *ids, int n_ids, size_t offset);
size_t ieee80211_ie_split_vendor(const u8 *ies, size_t ielen, size_t offset);

/* internal work items */
-void ieee80211_work_init(struct ieee80211_local *local);
+void ieee80211_work_init(struct mac80211_local *local);
void ieee80211_add_work(struct ieee80211_work *wk);
void free_work(struct ieee80211_work *wk);
void ieee80211_work_purge(struct ieee80211_sub_if_data *sdata);
@@ -1394,9 +1394,9 @@ enum ieee80211_chan_mode {
};

enum ieee80211_chan_mode
-ieee80211_get_channel_mode(struct ieee80211_local *local,
+ieee80211_get_channel_mode(struct mac80211_local *local,
struct ieee80211_sub_if_data *ignore);
-bool ieee80211_set_channel_type(struct ieee80211_local *local,
+bool ieee80211_set_channel_type(struct mac80211_local *local,
struct ieee80211_sub_if_data *sdata,
enum nl80211_channel_type chantype);

diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index 0186aba..87416c3 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -35,7 +35,7 @@

static struct lock_class_key ieee80211_rx_skb_queue_class;

-void ieee80211_configure_filter(struct ieee80211_local *local)
+void ieee80211_configure_filter(struct mac80211_local *local)
{
u64 mc;
unsigned int changed_flags;
@@ -86,8 +86,8 @@ void ieee80211_configure_filter(struct ieee80211_local *local)

static void ieee80211_reconfig_filter(struct work_struct *work)
{
- struct ieee80211_local *local =
- container_of(work, struct ieee80211_local, reconfig_filter);
+ struct mac80211_local *local =
+ container_of(work, struct mac80211_local, reconfig_filter);

ieee80211_configure_filter(local);
}
@@ -98,7 +98,7 @@ static void ieee80211_reconfig_filter(struct work_struct *work)
* configured on the operating channel. Compares channel-type
* as well.
*/
-bool ieee80211_cfg_on_oper_channel(struct ieee80211_local *local)
+bool ieee80211_cfg_on_oper_channel(struct mac80211_local *local)
{
struct ieee80211_channel *chan, *scan_chan;
enum nl80211_channel_type channel_type;
@@ -133,7 +133,7 @@ bool ieee80211_cfg_on_oper_channel(struct ieee80211_local *local)
return true;
}

-int ieee80211_hw_config(struct ieee80211_local *local, u32 changed)
+int ieee80211_hw_config(struct mac80211_local *local, u32 changed)
{
struct ieee80211_channel *chan, *scan_chan;
int ret = 0;
@@ -234,7 +234,7 @@ int ieee80211_hw_config(struct ieee80211_local *local, u32 changed)
void ieee80211_bss_info_change_notify(struct ieee80211_sub_if_data *sdata,
u32 changed)
{
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;
static const u8 zero[ETH_ALEN] = { 0 };

if (!changed)
@@ -324,7 +324,7 @@ u32 ieee80211_reset_erp_info(struct ieee80211_sub_if_data *sdata)

static void ieee80211_tasklet_handler(unsigned long data)
{
- struct ieee80211_local *local = (struct ieee80211_local *) data;
+ struct mac80211_local *local = (struct mac80211_local *) data;
struct sk_buff *skb;

while ((skb = skb_dequeue(&local->skb_queue)) ||
@@ -351,8 +351,8 @@ static void ieee80211_tasklet_handler(unsigned long data)

static void ieee80211_restart_work(struct work_struct *work)
{
- struct ieee80211_local *local =
- container_of(work, struct ieee80211_local, restart_work);
+ struct mac80211_local *local =
+ container_of(work, struct mac80211_local, restart_work);

/* wait for scan work complete */
flush_workqueue(local->workqueue);
@@ -371,7 +371,7 @@ static void ieee80211_restart_work(struct work_struct *work)

void ieee80211_restart_hw(struct ieee80211_hw *hw)
{
- struct ieee80211_local *local = hw_to_local(hw);
+ struct mac80211_local *local = hw_to_local(hw);

trace_api_restart_hw(local);

@@ -388,8 +388,8 @@ EXPORT_SYMBOL(ieee80211_restart_hw);

static void ieee80211_recalc_smps_work(struct work_struct *work)
{
- struct ieee80211_local *local =
- container_of(work, struct ieee80211_local, recalc_smps);
+ struct mac80211_local *local =
+ container_of(work, struct mac80211_local, recalc_smps);

mutex_lock(&local->iflist_mtx);
ieee80211_recalc_smps(local);
@@ -401,8 +401,8 @@ static int ieee80211_ifa_changed(struct notifier_block *nb,
unsigned long data, void *arg)
{
struct in_ifaddr *ifa = arg;
- struct ieee80211_local *local =
- container_of(nb, struct ieee80211_local,
+ struct mac80211_local *local =
+ container_of(nb, struct mac80211_local,
ifa_notifier);
struct net_device *ndev = ifa->ifa_dev->dev;
struct wireless_dev *wdev = ndev->ieee80211_ptr;
@@ -468,15 +468,15 @@ static int ieee80211_ifa_changed(struct notifier_block *nb,

static int ieee80211_napi_poll(struct napi_struct *napi, int budget)
{
- struct ieee80211_local *local =
- container_of(napi, struct ieee80211_local, napi);
+ struct mac80211_local *local =
+ container_of(napi, struct mac80211_local, napi);

return local->ops->napi_poll(&local->hw, budget);
}

void ieee80211_napi_schedule(struct ieee80211_hw *hw)
{
- struct ieee80211_local *local = hw_to_local(hw);
+ struct mac80211_local *local = hw_to_local(hw);

napi_schedule(&local->napi);
}
@@ -484,7 +484,7 @@ EXPORT_SYMBOL(ieee80211_napi_schedule);

void ieee80211_napi_complete(struct ieee80211_hw *hw)
{
- struct ieee80211_local *local = hw_to_local(hw);
+ struct mac80211_local *local = hw_to_local(hw);

napi_complete(&local->napi);
}
@@ -549,12 +549,12 @@ ieee80211_default_mgmt_stypes[NUM_NL80211_IFTYPES] = {
struct ieee80211_hw *ieee80211_alloc_hw(size_t priv_data_len,
const struct ieee80211_ops *ops)
{
- struct ieee80211_local *local;
+ struct mac80211_local *local;
int priv_size, i;
struct wiphy *wiphy;

/* Ensure 32-byte alignment of our private data and hw private data.
- * We use the wiphy priv data for both our ieee80211_local and for
+ * We use the wiphy priv data for both our mac80211_local and for
* the driver's private data
*
* In memory it'll be like this:
@@ -562,7 +562,7 @@ struct ieee80211_hw *ieee80211_alloc_hw(size_t priv_data_len,
* +-------------------------+
* | struct wiphy |
* +-------------------------+
- * | struct ieee80211_local |
+ * | struct mac80211_local |
* +-------------------------+
* | driver's private data |
* +-------------------------+
@@ -684,7 +684,7 @@ EXPORT_SYMBOL(ieee80211_alloc_hw);

int ieee80211_register_hw(struct ieee80211_hw *hw)
{
- struct ieee80211_local *local = hw_to_local(hw);
+ struct mac80211_local *local = hw_to_local(hw);
int result, i;
enum ieee80211_band band;
int channels, max_bitrates;
@@ -980,7 +980,7 @@ EXPORT_SYMBOL(ieee80211_register_hw);

void ieee80211_unregister_hw(struct ieee80211_hw *hw)
{
- struct ieee80211_local *local = hw_to_local(hw);
+ struct mac80211_local *local = hw_to_local(hw);

tasklet_kill(&local->tx_pending_tasklet);
tasklet_kill(&local->tasklet);
@@ -1032,7 +1032,7 @@ EXPORT_SYMBOL(ieee80211_unregister_hw);

void ieee80211_free_hw(struct ieee80211_hw *hw)
{
- struct ieee80211_local *local = hw_to_local(hw);
+ struct mac80211_local *local = hw_to_local(hw);

mutex_destroy(&local->iflist_mtx);
mutex_destroy(&local->mtx);
diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c
index 69b284c..f39a6ef 100644
--- a/net/mac80211/mesh.c
+++ b/net/mac80211/mesh.c
@@ -44,7 +44,7 @@ void ieee80211s_stop(void)
static void ieee80211_mesh_housekeeping_timer(unsigned long data)
{
struct ieee80211_sub_if_data *sdata = (void *) data;
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;
struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;

set_bit(MESH_WORK_HOUSEKEEPING, &ifmsh->wrkq_flags);
@@ -206,7 +206,7 @@ int mesh_rmc_check(u8 *sa, struct ieee80211s_hdr *mesh_hdr,

void mesh_mgmt_ies_add(struct sk_buff *skb, struct ieee80211_sub_if_data *sdata)
{
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;
struct ieee80211_supported_band *sband;
u8 *pos;
int len, i, rate;
@@ -293,7 +293,7 @@ static void ieee80211_mesh_path_timer(unsigned long data)
struct ieee80211_sub_if_data *sdata =
(struct ieee80211_sub_if_data *) data;
struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;

if (local->quiescing) {
set_bit(TMR_RUNNING_MP, &ifmsh->timers_running);
@@ -308,7 +308,7 @@ static void ieee80211_mesh_path_root_timer(unsigned long data)
struct ieee80211_sub_if_data *sdata =
(struct ieee80211_sub_if_data *) data;
struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;

set_bit(MESH_WORK_ROOT, &ifmsh->wrkq_flags);

@@ -460,7 +460,7 @@ void ieee80211_mesh_restart(struct ieee80211_sub_if_data *sdata)
void ieee80211_start_mesh(struct ieee80211_sub_if_data *sdata)
{
struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;

local->fif_other_bss++;
/* mesh ifaces must set allmulti to forward mcast traffic */
@@ -481,7 +481,7 @@ void ieee80211_start_mesh(struct ieee80211_sub_if_data *sdata)

void ieee80211_stop_mesh(struct ieee80211_sub_if_data *sdata)
{
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;
struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;

ifmsh->mesh_id_len = 0;
@@ -510,7 +510,7 @@ static void ieee80211_mesh_rx_bcn_presp(struct ieee80211_sub_if_data *sdata,
size_t len,
struct ieee80211_rx_status *rx_status)
{
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;
struct ieee802_11_elems elems;
struct ieee80211_channel *channel;
u32 supp_rates = 0;
@@ -611,7 +611,7 @@ void ieee80211_mesh_work(struct ieee80211_sub_if_data *sdata)
ieee80211_mesh_rootpath(sdata);
}

-void ieee80211_mesh_notify_scan_completed(struct ieee80211_local *local)
+void ieee80211_mesh_notify_scan_completed(struct mac80211_local *local)
{
struct ieee80211_sub_if_data *sdata;

diff --git a/net/mac80211/mesh.h b/net/mac80211/mesh.h
index df4a9a1..d3b0201 100644
--- a/net/mac80211/mesh.h
+++ b/net/mac80211/mesh.h
@@ -202,7 +202,7 @@ void mesh_mgmt_ies_add(struct sk_buff *skb,
void mesh_rmc_free(struct ieee80211_sub_if_data *sdata);
int mesh_rmc_init(struct ieee80211_sub_if_data *sdata);
void ieee80211s_init(void);
-void ieee80211s_update_metric(struct ieee80211_local *local,
+void ieee80211s_update_metric(struct mac80211_local *local,
struct sta_info *stainfo, struct sk_buff *skb);
void ieee80211s_stop(void);
void ieee80211_mesh_init_sdata(struct ieee80211_sub_if_data *sdata);
@@ -289,7 +289,7 @@ static inline bool mesh_path_sel_is_hwmp(struct ieee80211_sub_if_data *sdata)
return sdata->u.mesh.mesh_pp_id == IEEE80211_PATH_PROTOCOL_HWMP;
}

-void ieee80211_mesh_notify_scan_completed(struct ieee80211_local *local);
+void ieee80211_mesh_notify_scan_completed(struct mac80211_local *local);

void ieee80211_mesh_quiesce(struct ieee80211_sub_if_data *sdata);
void ieee80211_mesh_restart(struct ieee80211_sub_if_data *sdata);
@@ -298,7 +298,7 @@ void mesh_plink_restart(struct sta_info *sta);
#else
#define mesh_allocated 0
static inline void
-ieee80211_mesh_notify_scan_completed(struct ieee80211_local *local) {}
+ieee80211_mesh_notify_scan_completed(struct mac80211_local *local) {}
static inline void ieee80211_mesh_quiesce(struct ieee80211_sub_if_data *sdata)
{}
static inline void ieee80211_mesh_restart(struct ieee80211_sub_if_data *sdata)
diff --git a/net/mac80211/mesh_hwmp.c b/net/mac80211/mesh_hwmp.c
index 2b18053..dc8746f 100644
--- a/net/mac80211/mesh_hwmp.c
+++ b/net/mac80211/mesh_hwmp.c
@@ -110,7 +110,7 @@ static int mesh_path_sel_frame_tx(enum mpath_frame_type action, u8 flags,
__le32 lifetime, __le32 metric, __le32 preq_id,
struct ieee80211_sub_if_data *sdata)
{
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;
struct sk_buff *skb = dev_alloc_skb(local->hw.extra_tx_headroom + 400);
struct ieee80211_mgmt *mgmt;
u8 *pos;
@@ -204,7 +204,7 @@ int mesh_path_error_tx(u8 ttl, u8 *target, __le32 target_sn,
__le16 target_rcode, const u8 *ra,
struct ieee80211_sub_if_data *sdata)
{
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;
struct sk_buff *skb = dev_alloc_skb(local->hw.extra_tx_headroom + 400);
struct ieee80211_mgmt *mgmt;
u8 *pos;
@@ -255,7 +255,7 @@ int mesh_path_error_tx(u8 ttl, u8 *target, __le32 target_sn,
return 0;
}

-void ieee80211s_update_metric(struct ieee80211_local *local,
+void ieee80211s_update_metric(struct mac80211_local *local,
struct sta_info *stainfo, struct sk_buff *skb)
{
struct ieee80211_tx_info *txinfo = IEEE80211_SKB_CB(skb);
@@ -273,7 +273,7 @@ void ieee80211s_update_metric(struct ieee80211_local *local,
mesh_plink_broken(stainfo);
}

-static u32 airtime_link_metric_get(struct ieee80211_local *local,
+static u32 airtime_link_metric_get(struct mac80211_local *local,
struct sta_info *sta)
{
struct ieee80211_supported_band *sband;
@@ -325,7 +325,7 @@ static u32 hwmp_route_info_get(struct ieee80211_sub_if_data *sdata,
struct ieee80211_mgmt *mgmt,
u8 *hwmp_ie, enum mpath_frame_type action)
{
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;
struct mesh_path *mpath;
struct sta_info *sta;
bool fresh_info;
diff --git a/net/mac80211/mesh_pathtbl.c b/net/mac80211/mesh_pathtbl.c
index bf7989c..c99fb89 100644
--- a/net/mac80211/mesh_pathtbl.c
+++ b/net/mac80211/mesh_pathtbl.c
@@ -316,7 +316,7 @@ struct mesh_path *mesh_path_lookup_by_idx(int idx, struct ieee80211_sub_if_data
int mesh_path_add(u8 *dst, struct ieee80211_sub_if_data *sdata)
{
struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;
struct mesh_table *tbl;
struct mesh_path *mpath, *new_mpath;
struct mpath_node *node, *new_node;
@@ -448,7 +448,7 @@ void mesh_mpp_table_grow(void)
int mpp_path_add(u8 *dst, u8 *mpp, struct ieee80211_sub_if_data *sdata)
{
struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;
struct mesh_table *tbl;
struct mesh_path *mpath, *new_mpath;
struct mpath_node *node, *new_node;
diff --git a/net/mac80211/mesh_plink.c b/net/mac80211/mesh_plink.c
index 1832c46..a4e2de0 100644
--- a/net/mac80211/mesh_plink.c
+++ b/net/mac80211/mesh_plink.c
@@ -95,7 +95,7 @@ static inline void mesh_plink_fsm_restart(struct sta_info *sta)
static struct sta_info *mesh_plink_alloc(struct ieee80211_sub_if_data *sdata,
u8 *hw_addr, u32 rates)
{
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;
struct sta_info *sta;

if (local->num_sta >= MESH_MAX_PLINKS)
@@ -159,7 +159,7 @@ void mesh_plink_deactivate(struct sta_info *sta)
static int mesh_plink_frame_tx(struct ieee80211_sub_if_data *sdata,
enum plink_frame_type action, u8 *da, __le16 llid, __le16 plid,
__le16 reason) {
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;
struct sk_buff *skb = dev_alloc_skb(local->hw.extra_tx_headroom + 400 +
sdata->u.mesh.ie_len);
struct ieee80211_mgmt *mgmt;
@@ -241,7 +241,7 @@ void mesh_neighbour_update(u8 *hw_addr, u32 rates,
struct ieee80211_sub_if_data *sdata,
struct ieee802_11_elems *elems)
{
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;
struct sta_info *sta;

rcu_read_lock();
@@ -418,7 +418,7 @@ void mesh_plink_block(struct sta_info *sta)
void mesh_rx_plink_frame(struct ieee80211_sub_if_data *sdata, struct ieee80211_mgmt *mgmt,
size_t len, struct ieee80211_rx_status *rx_status)
{
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;
struct ieee802_11_elems elems;
struct sta_info *sta;
enum plink_event event;
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index b1692a6..451a9fd 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -162,7 +162,7 @@ static u32 ieee80211_enable_ht(struct ieee80211_sub_if_data *sdata,
struct ieee80211_ht_info *hti,
const u8 *bssid, u16 ap_ht_cap_flags)
{
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;
struct ieee80211_supported_band *sband;
struct sta_info *sta;
u32 changed = 0;
@@ -271,7 +271,7 @@ static void ieee80211_send_deauth_disassoc(struct ieee80211_sub_if_data *sdata,
const u8 *bssid, u16 stype, u16 reason,
void *cookie, bool send_frame)
{
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;
struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
struct sk_buff *skb;
struct ieee80211_mgmt *mgmt;
@@ -313,7 +313,7 @@ static void ieee80211_send_deauth_disassoc(struct ieee80211_sub_if_data *sdata,
kfree_skb(skb);
}

-void ieee80211_send_pspoll(struct ieee80211_local *local,
+void ieee80211_send_pspoll(struct mac80211_local *local,
struct ieee80211_sub_if_data *sdata)
{
struct ieee80211_pspoll *pspoll;
@@ -330,7 +330,7 @@ void ieee80211_send_pspoll(struct ieee80211_local *local,
ieee80211_tx_skb(sdata, skb);
}

-void ieee80211_send_nullfunc(struct ieee80211_local *local,
+void ieee80211_send_nullfunc(struct mac80211_local *local,
struct ieee80211_sub_if_data *sdata,
int powersave)
{
@@ -349,7 +349,7 @@ void ieee80211_send_nullfunc(struct ieee80211_local *local,
ieee80211_tx_skb(sdata, skb);
}

-static void ieee80211_send_4addr_nullfunc(struct ieee80211_local *local,
+static void ieee80211_send_4addr_nullfunc(struct mac80211_local *local,
struct ieee80211_sub_if_data *sdata)
{
struct sk_buff *skb;
@@ -536,7 +536,7 @@ static void ieee80211_handle_pwr_constr(struct ieee80211_sub_if_data *sdata,
void ieee80211_enable_dyn_ps(struct ieee80211_vif *vif)
{
struct ieee80211_sub_if_data *sdata = vif_to_sdata(vif);
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;
struct ieee80211_conf *conf = &local->hw.conf;

WARN_ON(sdata->vif.type != NL80211_IFTYPE_STATION ||
@@ -551,7 +551,7 @@ EXPORT_SYMBOL(ieee80211_enable_dyn_ps);
void ieee80211_disable_dyn_ps(struct ieee80211_vif *vif)
{
struct ieee80211_sub_if_data *sdata = vif_to_sdata(vif);
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;
struct ieee80211_conf *conf = &local->hw.conf;

WARN_ON(sdata->vif.type != NL80211_IFTYPE_STATION ||
@@ -567,7 +567,7 @@ void ieee80211_disable_dyn_ps(struct ieee80211_vif *vif)
EXPORT_SYMBOL(ieee80211_disable_dyn_ps);

/* powersave */
-static void ieee80211_enable_ps(struct ieee80211_local *local,
+static void ieee80211_enable_ps(struct mac80211_local *local,
struct ieee80211_sub_if_data *sdata)
{
struct ieee80211_conf *conf = &local->hw.conf;
@@ -596,7 +596,7 @@ static void ieee80211_enable_ps(struct ieee80211_local *local,
}
}

-static void ieee80211_change_ps(struct ieee80211_local *local)
+static void ieee80211_change_ps(struct mac80211_local *local)
{
struct ieee80211_conf *conf = &local->hw.conf;

@@ -642,7 +642,7 @@ static bool ieee80211_powersave_allowed(struct ieee80211_sub_if_data *sdata)
}

/* need to hold RTNL or interface lock */
-void ieee80211_recalc_ps(struct ieee80211_local *local, s32 latency)
+void ieee80211_recalc_ps(struct mac80211_local *local, s32 latency)
{
struct ieee80211_sub_if_data *sdata, *found = NULL;
int count = 0;
@@ -736,8 +736,8 @@ void ieee80211_recalc_ps(struct ieee80211_local *local, s32 latency)

void ieee80211_dynamic_ps_disable_work(struct work_struct *work)
{
- struct ieee80211_local *local =
- container_of(work, struct ieee80211_local,
+ struct mac80211_local *local =
+ container_of(work, struct mac80211_local,
dynamic_ps_disable_work);

if (local->hw.conf.flags & IEEE80211_CONF_PS) {
@@ -751,8 +751,8 @@ void ieee80211_dynamic_ps_disable_work(struct work_struct *work)

void ieee80211_dynamic_ps_enable_work(struct work_struct *work)
{
- struct ieee80211_local *local =
- container_of(work, struct ieee80211_local,
+ struct mac80211_local *local =
+ container_of(work, struct mac80211_local,
dynamic_ps_enable_work);
struct ieee80211_sub_if_data *sdata = local->ps_sdata;
struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
@@ -812,7 +812,7 @@ void ieee80211_dynamic_ps_enable_work(struct work_struct *work)

void ieee80211_dynamic_ps_timer(unsigned long data)
{
- struct ieee80211_local *local = (void *) data;
+ struct mac80211_local *local = (void *) data;

if (local->quiescing || local->suspended)
return;
@@ -821,7 +821,7 @@ void ieee80211_dynamic_ps_timer(unsigned long data)
}

/* MLME */
-static void ieee80211_sta_wmm_params(struct ieee80211_local *local,
+static void ieee80211_sta_wmm_params(struct mac80211_local *local,
struct ieee80211_sub_if_data *sdata,
u8 *wmm_param, size_t wmm_param_len)
{
@@ -964,7 +964,7 @@ static void ieee80211_set_associated(struct ieee80211_sub_if_data *sdata,
u32 bss_info_changed)
{
struct ieee80211_bss *bss = (void *)cbss->priv;
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;
struct ieee80211_bss_conf *bss_conf = &sdata->vif.bss_conf;

bss_info_changed |= BSS_CHANGED_ASSOC;
@@ -1032,7 +1032,7 @@ static void ieee80211_set_disassoc(struct ieee80211_sub_if_data *sdata,
bool remove_sta, bool tx)
{
struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;
struct sta_info *sta;
u32 changed = 0, config_changed = 0;
u8 bssid[ETH_ALEN];
@@ -1304,7 +1304,7 @@ EXPORT_SYMBOL(ieee80211_ap_probereq_get);
static void __ieee80211_connection_loss(struct ieee80211_sub_if_data *sdata)
{
struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;
u8 bssid[ETH_ALEN];

mutex_lock(&ifmgd->mtx);
@@ -1436,7 +1436,7 @@ static bool ieee80211_assoc_success(struct ieee80211_work *wk,
{
struct ieee80211_sub_if_data *sdata = wk->sdata;
struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;
struct ieee80211_supported_band *sband;
struct sta_info *sta;
struct cfg80211_bss *cbss = wk->assoc.bss;
@@ -1606,7 +1606,7 @@ static void ieee80211_rx_bss_info(struct ieee80211_sub_if_data *sdata,
struct ieee802_11_elems *elems,
bool beacon)
{
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;
int freq;
struct ieee80211_bss *bss;
struct ieee80211_channel *channel;
@@ -1714,7 +1714,7 @@ static void ieee80211_rx_mgmt_beacon(struct ieee80211_sub_if_data *sdata,
struct ieee80211_bss_conf *bss_conf = &sdata->vif.bss_conf;
size_t baselen;
struct ieee802_11_elems elems;
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;
u32 changed = 0;
bool erp_valid, directed_tim = false;
u8 erp_value = 0;
@@ -1963,7 +1963,7 @@ void ieee80211_sta_rx_queued_mgmt(struct ieee80211_sub_if_data *sdata,

if (skb->len >= 24 + 2 /* mgmt + deauth reason */ &&
(fc & IEEE80211_FCTL_STYPE) == IEEE80211_STYPE_DEAUTH) {
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;
struct ieee80211_work *wk;

mutex_lock(&local->mtx);
@@ -2009,7 +2009,7 @@ static void ieee80211_sta_timer(unsigned long data)
struct ieee80211_sub_if_data *sdata =
(struct ieee80211_sub_if_data *) data;
struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;

if (local->quiescing) {
set_bit(TMR_RUNNING_TIMER, &ifmgd->timers_running);
@@ -2022,7 +2022,7 @@ static void ieee80211_sta_timer(unsigned long data)
static void ieee80211_sta_connection_lost(struct ieee80211_sub_if_data *sdata,
u8 *bssid)
{
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;
struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;

ifmgd->flags &= ~(IEEE80211_STA_CONNECTION_POLL |
@@ -2046,7 +2046,7 @@ static void ieee80211_sta_connection_lost(struct ieee80211_sub_if_data *sdata,

void ieee80211_sta_work(struct ieee80211_sub_if_data *sdata)
{
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;
struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;

/* then process the rest of the work */
@@ -2130,7 +2130,7 @@ static void ieee80211_sta_bcn_mon_timer(unsigned long data)
{
struct ieee80211_sub_if_data *sdata =
(struct ieee80211_sub_if_data *) data;
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;

if (local->quiescing)
return;
@@ -2144,7 +2144,7 @@ static void ieee80211_sta_conn_mon_timer(unsigned long data)
struct ieee80211_sub_if_data *sdata =
(struct ieee80211_sub_if_data *) data;
struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;

if (local->quiescing)
return;
@@ -2246,7 +2246,7 @@ void ieee80211_sta_setup_sdata(struct ieee80211_sub_if_data *sdata)
}

/* scan finished notification */
-void ieee80211_mlme_notify_scan_completed(struct ieee80211_local *local)
+void ieee80211_mlme_notify_scan_completed(struct mac80211_local *local)
{
struct ieee80211_sub_if_data *sdata = local->scan_sdata;

@@ -2261,8 +2261,8 @@ int ieee80211_max_network_latency(struct notifier_block *nb,
unsigned long data, void *dummy)
{
s32 latency_usec = (s32) data;
- struct ieee80211_local *local =
- container_of(nb, struct ieee80211_local,
+ struct mac80211_local *local =
+ container_of(nb, struct mac80211_local,
network_latency_notifier);

mutex_lock(&local->iflist_mtx);
@@ -2538,7 +2538,7 @@ int ieee80211_mgd_deauth(struct ieee80211_sub_if_data *sdata,
struct cfg80211_deauth_request *req,
void *cookie)
{
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;
struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
struct ieee80211_work *wk;
u8 bssid[ETH_ALEN];
diff --git a/net/mac80211/offchannel.c b/net/mac80211/offchannel.c
index f6047f9..46814ee 100644
--- a/net/mac80211/offchannel.c
+++ b/net/mac80211/offchannel.c
@@ -26,7 +26,7 @@
static void ieee80211_offchannel_ps_enable(struct ieee80211_sub_if_data *sdata,
bool tell_ap)
{
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;
struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;

local->offchannel_ps_enabled = false;
@@ -63,7 +63,7 @@ static void ieee80211_offchannel_ps_enable(struct ieee80211_sub_if_data *sdata,
/* inform AP that we are awake again, unless power save is enabled */
static void ieee80211_offchannel_ps_disable(struct ieee80211_sub_if_data *sdata)
{
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;

if (!local->ps_sdata)
ieee80211_send_nullfunc(local, sdata, 0);
@@ -102,7 +102,7 @@ static void ieee80211_offchannel_ps_disable(struct ieee80211_sub_if_data *sdata)
ieee80211_sta_reset_conn_monitor(sdata);
}

-void ieee80211_offchannel_stop_vifs(struct ieee80211_local *local,
+void ieee80211_offchannel_stop_vifs(struct mac80211_local *local,
bool offchannel_ps_enable)
{
struct ieee80211_sub_if_data *sdata;
@@ -137,7 +137,7 @@ void ieee80211_offchannel_stop_vifs(struct ieee80211_local *local,
mutex_unlock(&local->iflist_mtx);
}

-void ieee80211_offchannel_enable_all_ps(struct ieee80211_local *local,
+void ieee80211_offchannel_enable_all_ps(struct mac80211_local *local,
bool tell_ap)
{
struct ieee80211_sub_if_data *sdata;
@@ -154,7 +154,7 @@ void ieee80211_offchannel_enable_all_ps(struct ieee80211_local *local,
mutex_unlock(&local->iflist_mtx);
}

-void ieee80211_offchannel_return(struct ieee80211_local *local,
+void ieee80211_offchannel_return(struct mac80211_local *local,
bool enable_beaconing,
bool offchannel_ps_disable)
{
@@ -200,8 +200,8 @@ void ieee80211_offchannel_return(struct ieee80211_local *local,

static void ieee80211_hw_roc_start(struct work_struct *work)
{
- struct ieee80211_local *local =
- container_of(work, struct ieee80211_local, hw_roc_start);
+ struct mac80211_local *local =
+ container_of(work, struct mac80211_local, hw_roc_start);
struct ieee80211_sub_if_data *sdata;

mutex_lock(&local->mtx);
@@ -231,7 +231,7 @@ static void ieee80211_hw_roc_start(struct work_struct *work)

void ieee80211_ready_on_channel(struct ieee80211_hw *hw)
{
- struct ieee80211_local *local = hw_to_local(hw);
+ struct mac80211_local *local = hw_to_local(hw);

trace_api_ready_on_channel(local);

@@ -241,8 +241,8 @@ EXPORT_SYMBOL_GPL(ieee80211_ready_on_channel);

static void ieee80211_hw_roc_done(struct work_struct *work)
{
- struct ieee80211_local *local =
- container_of(work, struct ieee80211_local, hw_roc_done);
+ struct mac80211_local *local =
+ container_of(work, struct mac80211_local, hw_roc_done);

mutex_lock(&local->mtx);

@@ -268,7 +268,7 @@ static void ieee80211_hw_roc_done(struct work_struct *work)

void ieee80211_remain_on_channel_expired(struct ieee80211_hw *hw)
{
- struct ieee80211_local *local = hw_to_local(hw);
+ struct mac80211_local *local = hw_to_local(hw);

trace_api_remain_on_channel_expired(local);

@@ -276,7 +276,7 @@ void ieee80211_remain_on_channel_expired(struct ieee80211_hw *hw)
}
EXPORT_SYMBOL_GPL(ieee80211_remain_on_channel_expired);

-void ieee80211_hw_roc_setup(struct ieee80211_local *local)
+void ieee80211_hw_roc_setup(struct mac80211_local *local)
{
INIT_WORK(&local->hw_roc_start, ieee80211_hw_roc_start);
INIT_WORK(&local->hw_roc_done, ieee80211_hw_roc_done);
diff --git a/net/mac80211/pm.c b/net/mac80211/pm.c
index 75cdb9f..bfc9cf3 100644
--- a/net/mac80211/pm.c
+++ b/net/mac80211/pm.c
@@ -8,7 +8,7 @@

int __ieee80211_suspend(struct ieee80211_hw *hw, struct cfg80211_wowlan *wowlan)
{
- struct ieee80211_local *local = hw_to_local(hw);
+ struct mac80211_local *local = hw_to_local(hw);
struct ieee80211_sub_if_data *sdata;
struct sta_info *sta;

diff --git a/net/mac80211/rate.c b/net/mac80211/rate.c
index 88e2659..1b2eacf 100644
--- a/net/mac80211/rate.c
+++ b/net/mac80211/rate.c
@@ -150,7 +150,7 @@ static const struct file_operations rcname_ops = {
#endif

static struct rate_control_ref *rate_control_alloc(const char *name,
- struct ieee80211_local *local)
+ struct mac80211_local *local)
{
struct dentry *debugfsdir = NULL;
struct rate_control_ref *ref;
@@ -364,7 +364,7 @@ void rate_control_put(struct rate_control_ref *ref)
kref_put(&ref->kref, rate_control_release);
}

-int ieee80211_init_rate_ctrl_alg(struct ieee80211_local *local,
+int ieee80211_init_rate_ctrl_alg(struct mac80211_local *local,
const char *name)
{
struct rate_control_ref *ref, *old;
@@ -400,7 +400,7 @@ int ieee80211_init_rate_ctrl_alg(struct ieee80211_local *local,
return 0;
}

-void rate_control_deinitialize(struct ieee80211_local *local)
+void rate_control_deinitialize(struct mac80211_local *local)
{
struct rate_control_ref *ref;

diff --git a/net/mac80211/rate.h b/net/mac80211/rate.h
index b22c1de..5693817 100644
--- a/net/mac80211/rate.h
+++ b/net/mac80211/rate.h
@@ -20,7 +20,7 @@
#include "sta_info.h"

struct rate_control_ref {
- struct ieee80211_local *local;
+ struct mac80211_local *local;
struct rate_control_ops *ops;
void *priv;
struct kref kref;
@@ -32,7 +32,7 @@ void rate_control_get_rate(struct ieee80211_sub_if_data *sdata,
struct rate_control_ref *rate_control_get(struct rate_control_ref *ref);
void rate_control_put(struct rate_control_ref *ref);

-static inline void rate_control_tx_status(struct ieee80211_local *local,
+static inline void rate_control_tx_status(struct mac80211_local *local,
struct ieee80211_supported_band *sband,
struct sta_info *sta,
struct sk_buff *skb)
@@ -50,7 +50,7 @@ static inline void rate_control_tx_status(struct ieee80211_local *local,

static inline void rate_control_rate_init(struct sta_info *sta)
{
- struct ieee80211_local *local = sta->sdata->local;
+ struct mac80211_local *local = sta->sdata->local;
struct rate_control_ref *ref = sta->rate_ctrl;
struct ieee80211_sta *ista = &sta->sta;
void *priv_sta = sta->rate_ctrl_priv;
@@ -64,7 +64,7 @@ static inline void rate_control_rate_init(struct sta_info *sta)
ref->ops->rate_init(ref->priv, sband, ista, priv_sta);
}

-static inline void rate_control_rate_update(struct ieee80211_local *local,
+static inline void rate_control_rate_update(struct mac80211_local *local,
struct ieee80211_supported_band *sband,
struct sta_info *sta, u32 changed,
enum nl80211_channel_type oper_chan_type)
@@ -115,9 +115,9 @@ static inline void rate_control_remove_sta_debugfs(struct sta_info *sta)

/* Get a reference to the rate control algorithm. If `name' is NULL, get the
* first available algorithm. */
-int ieee80211_init_rate_ctrl_alg(struct ieee80211_local *local,
+int ieee80211_init_rate_ctrl_alg(struct mac80211_local *local,
const char *name);
-void rate_control_deinitialize(struct ieee80211_local *local);
+void rate_control_deinitialize(struct mac80211_local *local);


/* Rate control algorithms */
diff --git a/net/mac80211/rc80211_minstrel.c b/net/mac80211/rc80211_minstrel.c
index 8adac67..ee747f3 100644
--- a/net/mac80211/rc80211_minstrel.c
+++ b/net/mac80211/rc80211_minstrel.c
@@ -334,7 +334,7 @@ minstrel_get_rate(void *priv, struct ieee80211_sta *sta,


static void
-calc_rate_durations(struct minstrel_sta_info *mi, struct ieee80211_local *local,
+calc_rate_durations(struct minstrel_sta_info *mi, struct mac80211_local *local,
struct minstrel_rate *d, struct ieee80211_rate *rate)
{
int erp = !!(rate->flags & IEEE80211_RATE_ERP_G);
@@ -379,7 +379,7 @@ minstrel_rate_init(void *priv, struct ieee80211_supported_band *sband,
{
struct minstrel_sta_info *mi = priv_sta;
struct minstrel_priv *mp = priv;
- struct ieee80211_local *local = hw_to_local(mp->hw);
+ struct mac80211_local *local = hw_to_local(mp->hw);
struct ieee80211_rate *ctl_rate;
unsigned int i, n = 0;
unsigned int t_slot = 9; /* FIXME: get real slot time */
diff --git a/net/mac80211/rc80211_minstrel_ht.c b/net/mac80211/rc80211_minstrel_ht.c
index 333b511..d949aaf 100644
--- a/net/mac80211/rc80211_minstrel_ht.c
+++ b/net/mac80211/rc80211_minstrel_ht.c
@@ -672,7 +672,7 @@ minstrel_ht_update_caps(void *priv, struct ieee80211_supported_band *sband,
struct minstrel_ht_sta_priv *msp = priv_sta;
struct minstrel_ht_sta *mi = &msp->ht;
struct ieee80211_mcs_info *mcs = &sta->ht_cap.mcs;
- struct ieee80211_local *local = hw_to_local(mp->hw);
+ struct mac80211_local *local = hw_to_local(mp->hw);
u16 sta_cap = sta->ht_cap.cap;
int n_supported = 0;
int ack_dur;
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index 3c0dbf2..22d066d 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -34,7 +34,7 @@
* This function cleans up the SKB, i.e. it removes all the stuff
* only useful for monitoring.
*/
-static struct sk_buff *remove_monitor_info(struct ieee80211_local *local,
+static struct sk_buff *remove_monitor_info(struct mac80211_local *local,
struct sk_buff *skb)
{
if (local->hw.flags & IEEE80211_HW_RX_INCLUDES_FCS) {
@@ -69,7 +69,7 @@ static inline int should_drop_frame(struct sk_buff *skb,
}

static int
-ieee80211_rx_radiotap_len(struct ieee80211_local *local,
+ieee80211_rx_radiotap_len(struct mac80211_local *local,
struct ieee80211_rx_status *status)
{
int len;
@@ -97,7 +97,7 @@ ieee80211_rx_radiotap_len(struct ieee80211_local *local,
* add a radiotap header containing all the fields which the hardware provided.
*/
static void
-ieee80211_add_rx_radiotap_header(struct ieee80211_local *local,
+ieee80211_add_rx_radiotap_header(struct mac80211_local *local,
struct sk_buff *skb,
struct ieee80211_rate *rate,
int rtap_len)
@@ -216,7 +216,7 @@ ieee80211_add_rx_radiotap_header(struct ieee80211_local *local,
* radiotap header the driver might have added.
*/
static struct sk_buff *
-ieee80211_rx_monitor(struct ieee80211_local *local, struct sk_buff *origskb,
+ieee80211_rx_monitor(struct mac80211_local *local, struct sk_buff *origskb,
struct ieee80211_rate *rate)
{
struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(origskb);
@@ -400,7 +400,7 @@ static void ieee80211_verify_alignment(struct ieee80211_rx_data *rx)
static ieee80211_rx_result debug_noinline
ieee80211_rx_h_passive_scan(struct ieee80211_rx_data *rx)
{
- struct ieee80211_local *local = rx->local;
+ struct mac80211_local *local = rx->local;
struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(rx->skb);
struct sk_buff *skb = rx->skb;

@@ -550,7 +550,7 @@ static void ieee80211_release_reorder_frame(struct ieee80211_hw *hw,
struct tid_ampdu_rx *tid_agg_rx,
int index)
{
- struct ieee80211_local *local = hw_to_local(hw);
+ struct mac80211_local *local = hw_to_local(hw);
struct sk_buff *skb = tid_agg_rx->reorder_buf[index];
struct ieee80211_rx_status *status;

@@ -742,7 +742,7 @@ static bool ieee80211_sta_manage_reorder_buf(struct ieee80211_hw *hw,
static void ieee80211_rx_reorder_ampdu(struct ieee80211_rx_data *rx)
{
struct sk_buff *skb = rx->skb;
- struct ieee80211_local *local = rx->local;
+ struct mac80211_local *local = rx->local;
struct ieee80211_hw *hw = &local->hw;
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data;
struct sta_info *sta = rx->sta;
@@ -1059,7 +1059,7 @@ ieee80211_rx_h_decrypt(struct ieee80211_rx_data *rx)
static ieee80211_rx_result debug_noinline
ieee80211_rx_h_check_more_data(struct ieee80211_rx_data *rx)
{
- struct ieee80211_local *local;
+ struct mac80211_local *local;
struct ieee80211_hdr *hdr;
struct sk_buff *skb;

@@ -1092,7 +1092,7 @@ ieee80211_rx_h_check_more_data(struct ieee80211_rx_data *rx)
static void ap_sta_ps_start(struct sta_info *sta)
{
struct ieee80211_sub_if_data *sdata = sta->sdata;
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;

atomic_inc(&sdata->bss->num_sta_ps);
set_sta_flags(sta, WLAN_STA_PS_STA);
@@ -1809,7 +1809,7 @@ ieee80211_rx_h_mesh_fwding(struct ieee80211_rx_data *rx)
struct ieee80211s_hdr *mesh_hdr;
unsigned int hdrlen;
struct sk_buff *skb = rx->skb, *fwd_skb;
- struct ieee80211_local *local = rx->local;
+ struct mac80211_local *local = rx->local;
struct ieee80211_sub_if_data *sdata = rx->sdata;
struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb);

@@ -1922,7 +1922,7 @@ static ieee80211_rx_result debug_noinline
ieee80211_rx_h_data(struct ieee80211_rx_data *rx)
{
struct ieee80211_sub_if_data *sdata = rx->sdata;
- struct ieee80211_local *local = rx->local;
+ struct mac80211_local *local = rx->local;
struct net_device *dev = sdata->dev;
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)rx->skb->data;
__le16 fc = hdr->frame_control;
@@ -1980,7 +1980,7 @@ ieee80211_rx_h_data(struct ieee80211_rx_data *rx)
static ieee80211_rx_result debug_noinline
ieee80211_rx_h_ctrl(struct ieee80211_rx_data *rx)
{
- struct ieee80211_local *local = rx->local;
+ struct mac80211_local *local = rx->local;
struct ieee80211_hw *hw = &local->hw;
struct sk_buff *skb = rx->skb;
struct ieee80211_bar *bar = (struct ieee80211_bar *)skb->data;
@@ -2037,7 +2037,7 @@ static void ieee80211_process_sa_query_req(struct ieee80211_sub_if_data *sdata,
struct ieee80211_mgmt *mgmt,
size_t len)
{
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;
struct sk_buff *skb;
struct ieee80211_mgmt *resp;

@@ -2108,7 +2108,7 @@ ieee80211_rx_h_mgmt_check(struct ieee80211_rx_data *rx)
static ieee80211_rx_result debug_noinline
ieee80211_rx_h_action(struct ieee80211_rx_data *rx)
{
- struct ieee80211_local *local = rx->local;
+ struct mac80211_local *local = rx->local;
struct ieee80211_sub_if_data *sdata = rx->sdata;
struct ieee80211_mgmt *mgmt = (struct ieee80211_mgmt *) rx->skb->data;
struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(rx->skb);
@@ -2274,7 +2274,7 @@ ieee80211_rx_h_userspace_mgmt(struct ieee80211_rx_data *rx)
static ieee80211_rx_result debug_noinline
ieee80211_rx_h_action_return(struct ieee80211_rx_data *rx)
{
- struct ieee80211_local *local = rx->local;
+ struct mac80211_local *local = rx->local;
struct ieee80211_mgmt *mgmt = (struct ieee80211_mgmt *) rx->skb->data;
struct sk_buff *nskb;
struct ieee80211_sub_if_data *sdata = rx->sdata;
@@ -2378,7 +2378,7 @@ static void ieee80211_rx_cooked_monitor(struct ieee80211_rx_data *rx,
struct ieee80211_rate *rate)
{
struct ieee80211_sub_if_data *sdata;
- struct ieee80211_local *local = rx->local;
+ struct mac80211_local *local = rx->local;
struct ieee80211_rtap_hdr {
struct ieee80211_radiotap_header hdr;
u8 flags;
@@ -2703,7 +2703,7 @@ static int prepare_for_handlers(struct ieee80211_rx_data *rx,
static bool ieee80211_prepare_and_rx_handle(struct ieee80211_rx_data *rx,
struct sk_buff *skb, bool consume)
{
- struct ieee80211_local *local = rx->local;
+ struct mac80211_local *local = rx->local;
struct ieee80211_sub_if_data *sdata = rx->sdata;
struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb);
struct ieee80211_hdr *hdr = (void *)skb->data;
@@ -2741,7 +2741,7 @@ static void __ieee80211_rx_handle_packet(struct ieee80211_hw *hw,
struct sk_buff *skb)
{
struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb);
- struct ieee80211_local *local = hw_to_local(hw);
+ struct mac80211_local *local = hw_to_local(hw);
struct ieee80211_sub_if_data *sdata;
struct ieee80211_hdr *hdr;
__le16 fc;
@@ -2848,7 +2848,7 @@ static void __ieee80211_rx_handle_packet(struct ieee80211_hw *hw,
*/
void ieee80211_rx(struct ieee80211_hw *hw, struct sk_buff *skb)
{
- struct ieee80211_local *local = hw_to_local(hw);
+ struct mac80211_local *local = hw_to_local(hw);
struct ieee80211_rate *rate = NULL;
struct ieee80211_supported_band *sband;
struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb);
@@ -2951,7 +2951,7 @@ EXPORT_SYMBOL(ieee80211_rx);
* context. Post the skb on the queue and schedule the tasklet */
void ieee80211_rx_irqsafe(struct ieee80211_hw *hw, struct sk_buff *skb)
{
- struct ieee80211_local *local = hw_to_local(hw);
+ struct mac80211_local *local = hw_to_local(hw);

BUILD_BUG_ON(sizeof(struct ieee80211_rx_status) > sizeof(skb->cb));

diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c
index c21b720..e7b8be2 100644
--- a/net/mac80211/scan.c
+++ b/net/mac80211/scan.c
@@ -28,7 +28,7 @@
#define IEEE80211_PASSIVE_CHANNEL_TIME (HZ / 8)

struct ieee80211_bss *
-ieee80211_rx_bss_get(struct ieee80211_local *local, u8 *bssid, int freq,
+ieee80211_rx_bss_get(struct mac80211_local *local, u8 *bssid, int freq,
u8 *ssid, u8 ssid_len)
{
struct cfg80211_bss *cbss;
@@ -49,7 +49,7 @@ static void ieee80211_rx_bss_free(struct cfg80211_bss *cbss)
kfree(bss_mesh_cfg(bss));
}

-void ieee80211_rx_bss_put(struct ieee80211_local *local,
+void ieee80211_rx_bss_put(struct mac80211_local *local,
struct ieee80211_bss *bss)
{
if (!bss)
@@ -75,7 +75,7 @@ static bool is_uapsd_supported(struct ieee802_11_elems *elems)
}

struct ieee80211_bss *
-ieee80211_bss_info_update(struct ieee80211_local *local,
+ieee80211_bss_info_update(struct mac80211_local *local,
struct ieee80211_rx_status *rx_status,
struct ieee80211_mgmt *mgmt,
size_t len,
@@ -225,7 +225,7 @@ ieee80211_scan_rx(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb)
}

/* return false if no more work */
-static bool ieee80211_prep_hw_scan(struct ieee80211_local *local)
+static bool ieee80211_prep_hw_scan(struct mac80211_local *local)
{
struct cfg80211_scan_request *req = local->scan_req;
enum ieee80211_band band;
@@ -261,7 +261,7 @@ static bool ieee80211_prep_hw_scan(struct ieee80211_local *local)
static void __ieee80211_scan_completed(struct ieee80211_hw *hw, bool aborted,
bool was_hw_scan)
{
- struct ieee80211_local *local = hw_to_local(hw);
+ struct mac80211_local *local = hw_to_local(hw);
bool on_oper_chan;
bool enable_beacons = false;

@@ -327,7 +327,7 @@ static void __ieee80211_scan_completed(struct ieee80211_hw *hw, bool aborted,

void ieee80211_scan_completed(struct ieee80211_hw *hw, bool aborted)
{
- struct ieee80211_local *local = hw_to_local(hw);
+ struct mac80211_local *local = hw_to_local(hw);

trace_api_scan_completed(local, aborted);

@@ -338,7 +338,7 @@ void ieee80211_scan_completed(struct ieee80211_hw *hw, bool aborted)
}
EXPORT_SYMBOL(ieee80211_scan_completed);

-static int ieee80211_start_sw_scan(struct ieee80211_local *local)
+static int ieee80211_start_sw_scan(struct mac80211_local *local)
{
/*
* Hardware/driver doesn't support hw_scan, so use software
@@ -381,7 +381,7 @@ static int ieee80211_start_sw_scan(struct ieee80211_local *local)
static int __ieee80211_start_scan(struct ieee80211_sub_if_data *sdata,
struct cfg80211_scan_request *req)
{
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;
int rc;

lockdep_assert_held(&local->mtx);
@@ -467,7 +467,7 @@ ieee80211_scan_get_channel_time(struct ieee80211_channel *chan)
return IEEE80211_PROBE_DELAY + IEEE80211_CHANNEL_TIME;
}

-static void ieee80211_scan_state_decision(struct ieee80211_local *local,
+static void ieee80211_scan_state_decision(struct mac80211_local *local,
unsigned long *next_delay)
{
bool associated = false;
@@ -557,7 +557,7 @@ static void ieee80211_scan_state_decision(struct ieee80211_local *local,
*next_delay = 0;
}

-static void ieee80211_scan_state_leave_oper_channel(struct ieee80211_local *local,
+static void ieee80211_scan_state_leave_oper_channel(struct mac80211_local *local,
unsigned long *next_delay)
{
/* PS will already be in off-channel mode,
@@ -581,7 +581,7 @@ static void ieee80211_scan_state_leave_oper_channel(struct ieee80211_local *loca
local->next_scan_state = SCAN_SET_CHANNEL;
}

-static void ieee80211_scan_state_enter_oper_channel(struct ieee80211_local *local,
+static void ieee80211_scan_state_enter_oper_channel(struct mac80211_local *local,
unsigned long *next_delay)
{
/* switch back to the operating channel */
@@ -600,7 +600,7 @@ static void ieee80211_scan_state_enter_oper_channel(struct ieee80211_local *loca
local->next_scan_state = SCAN_DECISION;
}

-static void ieee80211_scan_state_set_channel(struct ieee80211_local *local,
+static void ieee80211_scan_state_set_channel(struct mac80211_local *local,
unsigned long *next_delay)
{
int skip;
@@ -647,7 +647,7 @@ static void ieee80211_scan_state_set_channel(struct ieee80211_local *local,
local->next_scan_state = SCAN_SEND_PROBE;
}

-static void ieee80211_scan_state_send_probe(struct ieee80211_local *local,
+static void ieee80211_scan_state_send_probe(struct mac80211_local *local,
unsigned long *next_delay)
{
int i;
@@ -670,8 +670,8 @@ static void ieee80211_scan_state_send_probe(struct ieee80211_local *local,

void ieee80211_scan_work(struct work_struct *work)
{
- struct ieee80211_local *local =
- container_of(work, struct ieee80211_local, scan_work.work);
+ struct mac80211_local *local =
+ container_of(work, struct mac80211_local, scan_work.work);
struct ieee80211_sub_if_data *sdata;
unsigned long next_delay = 0;
bool aborted, hw_scan;
@@ -773,7 +773,7 @@ int ieee80211_request_internal_scan(struct ieee80211_sub_if_data *sdata,
const u8 *ssid, u8 ssid_len,
struct ieee80211_channel *chan)
{
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;
int ret = -EBUSY;
enum ieee80211_band band;

@@ -819,7 +819,7 @@ int ieee80211_request_internal_scan(struct ieee80211_sub_if_data *sdata,
/*
* Only call this function when a scan can't be queued -- under RTNL.
*/
-void ieee80211_scan_cancel(struct ieee80211_local *local)
+void ieee80211_scan_cancel(struct mac80211_local *local)
{
bool abortscan;

@@ -859,7 +859,7 @@ void ieee80211_scan_cancel(struct ieee80211_local *local)
int ieee80211_request_sched_scan_start(struct ieee80211_sub_if_data *sdata,
struct cfg80211_sched_scan_request *req)
{
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;
int ret, i;

mutex_lock(&sdata->local->mtx);
@@ -908,7 +908,7 @@ out:

int ieee80211_request_sched_scan_stop(struct ieee80211_sub_if_data *sdata)
{
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;
int ret = 0, i;

mutex_lock(&sdata->local->mtx);
@@ -933,7 +933,7 @@ out:

void ieee80211_sched_scan_results(struct ieee80211_hw *hw)
{
- struct ieee80211_local *local = hw_to_local(hw);
+ struct mac80211_local *local = hw_to_local(hw);

trace_api_sched_scan_results(local);

@@ -943,8 +943,8 @@ EXPORT_SYMBOL(ieee80211_sched_scan_results);

void ieee80211_sched_scan_stopped_work(struct work_struct *work)
{
- struct ieee80211_local *local =
- container_of(work, struct ieee80211_local,
+ struct mac80211_local *local =
+ container_of(work, struct mac80211_local,
sched_scan_stopped_work);
int i;

@@ -967,7 +967,7 @@ void ieee80211_sched_scan_stopped_work(struct work_struct *work)

void ieee80211_sched_scan_stopped(struct ieee80211_hw *hw)
{
- struct ieee80211_local *local = hw_to_local(hw);
+ struct mac80211_local *local = hw_to_local(hw);

trace_api_sched_scan_stopped(local);

diff --git a/net/mac80211/spectmgmt.c b/net/mac80211/spectmgmt.c
index 667cc06..fe1e76d 100644
--- a/net/mac80211/spectmgmt.c
+++ b/net/mac80211/spectmgmt.c
@@ -26,7 +26,7 @@ static void ieee80211_send_refuse_measurement_request(struct ieee80211_sub_if_da
const u8 *da, const u8 *bssid,
u8 dialog_token)
{
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;
struct sk_buff *skb;
struct ieee80211_mgmt *msr_report;

diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c
index e125bc4..5f649aa 100644
--- a/net/mac80211/sta_info.c
+++ b/net/mac80211/sta_info.c
@@ -62,7 +62,7 @@
*/

/* Caller must hold local->sta_lock */
-static int sta_info_hash_del(struct ieee80211_local *local,
+static int sta_info_hash_del(struct mac80211_local *local,
struct sta_info *sta)
{
struct sta_info *s;
@@ -93,7 +93,7 @@ static int sta_info_hash_del(struct ieee80211_local *local,
struct sta_info *sta_info_get(struct ieee80211_sub_if_data *sdata,
const u8 *addr)
{
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;
struct sta_info *sta;

sta = rcu_dereference_check(local->sta_hash[STA_HASH(addr)],
@@ -119,7 +119,7 @@ struct sta_info *sta_info_get(struct ieee80211_sub_if_data *sdata,
struct sta_info *sta_info_get_bss(struct ieee80211_sub_if_data *sdata,
const u8 *addr)
{
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;
struct sta_info *sta;

sta = rcu_dereference_check(local->sta_hash[STA_HASH(addr)],
@@ -142,7 +142,7 @@ struct sta_info *sta_info_get_bss(struct ieee80211_sub_if_data *sdata,
struct sta_info *sta_info_get_by_idx(struct ieee80211_sub_if_data *sdata,
int idx)
{
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;
struct sta_info *sta;
int i = 0;

@@ -168,7 +168,7 @@ struct sta_info *sta_info_get_by_idx(struct ieee80211_sub_if_data *sdata,
* This function must undo everything done by sta_info_alloc()
* that may happen before sta_info_insert().
*/
-static void __sta_info_free(struct ieee80211_local *local,
+static void __sta_info_free(struct mac80211_local *local,
struct sta_info *sta)
{
if (sta->rate_ctrl) {
@@ -184,7 +184,7 @@ static void __sta_info_free(struct ieee80211_local *local,
}

/* Caller must hold local->sta_lock */
-static void sta_info_hash_add(struct ieee80211_local *local,
+static void sta_info_hash_add(struct mac80211_local *local,
struct sta_info *sta)
{
sta->hnext = local->sta_hash[STA_HASH(sta->sta.addr)];
@@ -209,7 +209,7 @@ static void sta_unblock(struct work_struct *wk)
clear_sta_flags(sta, WLAN_STA_PS_DRIVER);
}

-static int sta_prepare_rate_control(struct ieee80211_local *local,
+static int sta_prepare_rate_control(struct mac80211_local *local,
struct sta_info *sta, gfp_t gfp)
{
if (local->hw.flags & IEEE80211_HW_HAS_RATE_CONTROL)
@@ -229,7 +229,7 @@ static int sta_prepare_rate_control(struct ieee80211_local *local,
struct sta_info *sta_info_alloc(struct ieee80211_sub_if_data *sdata,
u8 *addr, gfp_t gfp)
{
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;
struct sta_info *sta;
struct timespec uptime;
int i;
@@ -286,7 +286,7 @@ struct sta_info *sta_info_alloc(struct ieee80211_sub_if_data *sdata,

static int sta_info_finish_insert(struct sta_info *sta, bool async)
{
- struct ieee80211_local *local = sta->local;
+ struct mac80211_local *local = sta->local;
struct ieee80211_sub_if_data *sdata = sta->sdata;
struct station_info sinfo;
unsigned long flags;
@@ -342,7 +342,7 @@ static int sta_info_finish_insert(struct sta_info *sta, bool async)
return 0;
}

-static void sta_info_finish_pending(struct ieee80211_local *local)
+static void sta_info_finish_pending(struct mac80211_local *local)
{
struct sta_info *sta;
unsigned long flags;
@@ -363,8 +363,8 @@ static void sta_info_finish_pending(struct ieee80211_local *local)

static void sta_info_finish_work(struct work_struct *work)
{
- struct ieee80211_local *local =
- container_of(work, struct ieee80211_local, sta_finish_work);
+ struct mac80211_local *local =
+ container_of(work, struct mac80211_local, sta_finish_work);

mutex_lock(&local->sta_mtx);
sta_info_finish_pending(local);
@@ -373,7 +373,7 @@ static void sta_info_finish_work(struct work_struct *work)

int sta_info_insert_rcu(struct sta_info *sta) __acquires(RCU)
{
- struct ieee80211_local *local = sta->local;
+ struct mac80211_local *local = sta->local;
struct ieee80211_sub_if_data *sdata = sta->sdata;
unsigned long flags;
int err = 0;
@@ -585,7 +585,7 @@ static int sta_info_buffer_expired(struct sta_info *sta,
}


-static bool sta_info_cleanup_expire_buffered(struct ieee80211_local *local,
+static bool sta_info_cleanup_expire_buffered(struct mac80211_local *local,
struct sta_info *sta)
{
unsigned long flags;
@@ -623,7 +623,7 @@ static bool sta_info_cleanup_expire_buffered(struct ieee80211_local *local,

static int __must_check __sta_info_destroy(struct sta_info *sta)
{
- struct ieee80211_local *local;
+ struct mac80211_local *local;
struct ieee80211_sub_if_data *sdata;
struct sk_buff *skb;
unsigned long flags;
@@ -759,7 +759,7 @@ int sta_info_destroy_addr_bss(struct ieee80211_sub_if_data *sdata,

static void sta_info_cleanup(unsigned long data)
{
- struct ieee80211_local *local = (struct ieee80211_local *) data;
+ struct mac80211_local *local = (struct mac80211_local *) data;
struct sta_info *sta;
bool timer_needed = false;

@@ -779,7 +779,7 @@ static void sta_info_cleanup(unsigned long data)
round_jiffies(jiffies + STA_INFO_CLEANUP_INTERVAL));
}

-void sta_info_init(struct ieee80211_local *local)
+void sta_info_init(struct mac80211_local *local)
{
spin_lock_init(&local->sta_lock);
mutex_init(&local->sta_mtx);
@@ -791,7 +791,7 @@ void sta_info_init(struct ieee80211_local *local)
(unsigned long)local);
}

-void sta_info_stop(struct ieee80211_local *local)
+void sta_info_stop(struct mac80211_local *local)
{
del_timer(&local->sta_cleanup);
sta_info_flush(local, NULL);
@@ -805,7 +805,7 @@ void sta_info_stop(struct ieee80211_local *local)
* @local: local interface data
* @sdata: matching rule for the net device (sta->dev) or %NULL to match all STAs
*/
-int sta_info_flush(struct ieee80211_local *local,
+int sta_info_flush(struct mac80211_local *local,
struct ieee80211_sub_if_data *sdata)
{
struct sta_info *sta, *tmp;
@@ -829,7 +829,7 @@ int sta_info_flush(struct ieee80211_local *local,
void ieee80211_sta_expire(struct ieee80211_sub_if_data *sdata,
unsigned long exp_time)
{
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;
struct sta_info *sta, *tmp;

mutex_lock(&local->sta_mtx);
@@ -897,7 +897,7 @@ static void clear_sta_ps_flags(void *_sta)
void ieee80211_sta_ps_deliver_wakeup(struct sta_info *sta)
{
struct ieee80211_sub_if_data *sdata = sta->sdata;
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;
int sent, buffered;

clear_sta_flags(sta, WLAN_STA_PS_DRIVER_BUF);
@@ -924,7 +924,7 @@ void ieee80211_sta_ps_deliver_wakeup(struct sta_info *sta)
void ieee80211_sta_ps_deliver_poll_response(struct sta_info *sta)
{
struct ieee80211_sub_if_data *sdata = sta->sdata;
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;
struct sk_buff *skb;
int no_pending_pkts;

diff --git a/net/mac80211/sta_info.h b/net/mac80211/sta_info.h
index c6ae871..01091da 100644
--- a/net/mac80211/sta_info.h
+++ b/net/mac80211/sta_info.h
@@ -244,7 +244,7 @@ struct sta_info {
/* General information, mostly static */
struct list_head list;
struct sta_info __rcu *hnext;
- struct ieee80211_local *local;
+ struct mac80211_local *local;
struct ieee80211_sub_if_data *sdata;
struct ieee80211_key __rcu *gtk[NUM_DEFAULT_KEYS + NUM_DEFAULT_MGMT_KEYS];
struct ieee80211_key __rcu *ptk;
@@ -436,7 +436,7 @@ struct sta_info *sta_info_get_bss(struct ieee80211_sub_if_data *sdata,
const u8 *addr);

static inline
-void for_each_sta_info_type_check(struct ieee80211_local *local,
+void for_each_sta_info_type_check(struct mac80211_local *local,
const u8 *addr,
struct sta_info *sta,
struct sta_info *nxt)
@@ -489,9 +489,9 @@ int sta_info_destroy_addr_bss(struct ieee80211_sub_if_data *sdata,
void sta_info_set_tim_bit(struct sta_info *sta);
void sta_info_clear_tim_bit(struct sta_info *sta);

-void sta_info_init(struct ieee80211_local *local);
-void sta_info_stop(struct ieee80211_local *local);
-int sta_info_flush(struct ieee80211_local *local,
+void sta_info_init(struct mac80211_local *local);
+void sta_info_stop(struct mac80211_local *local);
+int sta_info_flush(struct mac80211_local *local,
struct ieee80211_sub_if_data *sdata);
void ieee80211_sta_expire(struct ieee80211_sub_if_data *sdata,
unsigned long exp_time);
diff --git a/net/mac80211/status.c b/net/mac80211/status.c
index b69e8af..26d2c40 100644
--- a/net/mac80211/status.c
+++ b/net/mac80211/status.c
@@ -19,7 +19,7 @@
void ieee80211_tx_status_irqsafe(struct ieee80211_hw *hw,
struct sk_buff *skb)
{
- struct ieee80211_local *local = hw_to_local(hw);
+ struct mac80211_local *local = hw_to_local(hw);
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
int tmp;

@@ -38,7 +38,7 @@ void ieee80211_tx_status_irqsafe(struct ieee80211_hw *hw,
}
EXPORT_SYMBOL(ieee80211_tx_status_irqsafe);

-static void ieee80211_handle_filtered_frame(struct ieee80211_local *local,
+static void ieee80211_handle_filtered_frame(struct mac80211_local *local,
struct sta_info *sta,
struct sk_buff *skb)
{
@@ -130,7 +130,7 @@ static void ieee80211_handle_filtered_frame(struct ieee80211_local *local,
static void ieee80211_frame_acked(struct sta_info *sta, struct sk_buff *skb)
{
struct ieee80211_mgmt *mgmt = (void *) skb->data;
- struct ieee80211_local *local = sta->local;
+ struct mac80211_local *local = sta->local;
struct ieee80211_sub_if_data *sdata = sta->sdata;

if (ieee80211_is_action(mgmt->frame_control) &&
@@ -174,7 +174,7 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb)
{
struct sk_buff *skb2;
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data;
- struct ieee80211_local *local = hw_to_local(hw);
+ struct mac80211_local *local = hw_to_local(hw);
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
u16 frag, type;
__le16 fc;
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 3aa5836..17b2924 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -40,7 +40,7 @@ static __le16 ieee80211_duration(struct ieee80211_tx_data *tx, int group_addr,
{
int rate, mrate, erp, dur, i;
struct ieee80211_rate *txrate;
- struct ieee80211_local *local = tx->local;
+ struct mac80211_local *local = tx->local;
struct ieee80211_supported_band *sband;
struct ieee80211_hdr *hdr;
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(tx->skb);
@@ -169,7 +169,7 @@ static __le16 ieee80211_duration(struct ieee80211_tx_data *tx, int group_addr,
return cpu_to_le16(dur);
}

-static inline int is_ieee80211_device(struct ieee80211_local *local,
+static inline int is_ieee80211_device(struct mac80211_local *local,
struct net_device *dev)
{
return local == wdev_priv(dev->ieee80211_ptr);
@@ -179,7 +179,7 @@ static inline int is_ieee80211_device(struct ieee80211_local *local,
static ieee80211_tx_result debug_noinline
ieee80211_tx_h_dynamic_ps(struct ieee80211_tx_data *tx)
{
- struct ieee80211_local *local = tx->local;
+ struct mac80211_local *local = tx->local;
struct ieee80211_if_managed *ifmgd;

/* driver doesn't support power save */
@@ -318,7 +318,7 @@ ieee80211_tx_h_check_assoc(struct ieee80211_tx_data *tx)
* of buffered frames for power saving STAs. This situation should not really
* happen often during normal operation, so dropping the oldest buffered packet
* from each queue should be OK to make some room for new frames. */
-static void purge_old_ps_buffers(struct ieee80211_local *local)
+static void purge_old_ps_buffers(struct mac80211_local *local)
{
int total = 0, purged = 0;
struct sk_buff *skb;
@@ -434,7 +434,7 @@ ieee80211_tx_h_unicast_ps_buf(struct ieee80211_tx_data *tx)
struct sta_info *sta = tx->sta;
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(tx->skb);
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)tx->skb->data;
- struct ieee80211_local *local = tx->local;
+ struct mac80211_local *local = tx->local;
u32 staflags;

if (unlikely(!sta ||
@@ -833,7 +833,7 @@ ieee80211_tx_h_sequence(struct ieee80211_tx_data *tx)
return TX_CONTINUE;
}

-static int ieee80211_fragment(struct ieee80211_local *local,
+static int ieee80211_fragment(struct mac80211_local *local,
struct sk_buff *skb, int hdrlen,
int frag_threshold)
{
@@ -1177,7 +1177,7 @@ ieee80211_tx_prepare(struct ieee80211_sub_if_data *sdata,
struct ieee80211_tx_data *tx,
struct sk_buff *skb)
{
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;
struct ieee80211_hdr *hdr;
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
int hdrlen, tid;
@@ -1285,7 +1285,7 @@ ieee80211_tx_prepare(struct ieee80211_sub_if_data *sdata,
/*
* Returns false if the frame couldn't be transmitted but was queued instead.
*/
-static bool __ieee80211_tx(struct ieee80211_local *local, struct sk_buff **skbp,
+static bool __ieee80211_tx(struct mac80211_local *local, struct sk_buff **skbp,
struct sta_info *sta, bool txpending)
{
struct sk_buff *skb = *skbp, *next;
@@ -1439,7 +1439,7 @@ static int invoke_tx_handlers(struct ieee80211_tx_data *tx)
static bool ieee80211_tx(struct ieee80211_sub_if_data *sdata,
struct sk_buff *skb, bool txpending)
{
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;
struct ieee80211_tx_data tx;
ieee80211_tx_result res_prepare;
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
@@ -1474,7 +1474,7 @@ static bool ieee80211_tx(struct ieee80211_sub_if_data *sdata,

/* device xmit handlers */

-static int ieee80211_skb_resize(struct ieee80211_local *local,
+static int ieee80211_skb_resize(struct mac80211_local *local,
struct sk_buff *skb,
int head_need, bool may_encrypt)
{
@@ -1513,7 +1513,7 @@ static int ieee80211_skb_resize(struct ieee80211_local *local,
static void ieee80211_xmit(struct ieee80211_sub_if_data *sdata,
struct sk_buff *skb)
{
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data;
struct ieee80211_sub_if_data *tmp_sdata;
@@ -1599,7 +1599,7 @@ static void ieee80211_xmit(struct ieee80211_sub_if_data *sdata,
netdev_tx_t ieee80211_monitor_start_xmit(struct sk_buff *skb,
struct net_device *dev)
{
- struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
+ struct mac80211_local *local = wdev_priv(dev->ieee80211_ptr);
struct ieee80211_channel *chan = local->hw.conf.channel;
struct ieee80211_radiotap_header *prthdr =
(struct ieee80211_radiotap_header *)skb->data;
@@ -1687,7 +1687,7 @@ netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb,
struct net_device *dev)
{
struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;
struct ieee80211_tx_info *info;
int ret = NETDEV_TX_BUSY, head_need;
u16 ethertype, hdrlen, meshhdrlen = 0;
@@ -2004,7 +2004,7 @@ netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb,
* ieee80211_clear_tx_pending may not be called in a context where
* it is possible that it packets could come in again.
*/
-void ieee80211_clear_tx_pending(struct ieee80211_local *local)
+void ieee80211_clear_tx_pending(struct mac80211_local *local)
{
int i;

@@ -2017,7 +2017,7 @@ void ieee80211_clear_tx_pending(struct ieee80211_local *local)
* which in this case means re-queued -- take as an indication to stop sending
* more pending frames.
*/
-static bool ieee80211_tx_pending_skb(struct ieee80211_local *local,
+static bool ieee80211_tx_pending_skb(struct mac80211_local *local,
struct sk_buff *skb)
{
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
@@ -2045,7 +2045,7 @@ static bool ieee80211_tx_pending_skb(struct ieee80211_local *local,
*/
void ieee80211_tx_pending(unsigned long data)
{
- struct ieee80211_local *local = (struct ieee80211_local *)data;
+ struct mac80211_local *local = (struct mac80211_local *)data;
struct ieee80211_sub_if_data *sdata;
unsigned long flags;
int i;
@@ -2161,7 +2161,7 @@ struct sk_buff *ieee80211_beacon_get_tim(struct ieee80211_hw *hw,
struct ieee80211_vif *vif,
u16 *tim_offset, u16 *tim_length)
{
- struct ieee80211_local *local = hw_to_local(hw);
+ struct mac80211_local *local = hw_to_local(hw);
struct sk_buff *skb = NULL;
struct ieee80211_tx_info *info;
struct ieee80211_sub_if_data *sdata = NULL;
@@ -2320,7 +2320,7 @@ struct sk_buff *ieee80211_pspoll_get(struct ieee80211_hw *hw,
struct ieee80211_sub_if_data *sdata;
struct ieee80211_if_managed *ifmgd;
struct ieee80211_pspoll *pspoll;
- struct ieee80211_local *local;
+ struct mac80211_local *local;
struct sk_buff *skb;

if (WARN_ON(vif->type != NL80211_IFTYPE_STATION))
@@ -2360,7 +2360,7 @@ struct sk_buff *ieee80211_nullfunc_get(struct ieee80211_hw *hw,
struct ieee80211_hdr_3addr *nullfunc;
struct ieee80211_sub_if_data *sdata;
struct ieee80211_if_managed *ifmgd;
- struct ieee80211_local *local;
+ struct mac80211_local *local;
struct sk_buff *skb;

if (WARN_ON(vif->type != NL80211_IFTYPE_STATION))
@@ -2398,7 +2398,7 @@ struct sk_buff *ieee80211_probereq_get(struct ieee80211_hw *hw,
const u8 *ie, size_t ie_len)
{
struct ieee80211_sub_if_data *sdata;
- struct ieee80211_local *local;
+ struct mac80211_local *local;
struct ieee80211_hdr_3addr *hdr;
struct sk_buff *skb;
size_t ie_ssid_len;
@@ -2477,7 +2477,7 @@ struct sk_buff *
ieee80211_get_buffered_bc(struct ieee80211_hw *hw,
struct ieee80211_vif *vif)
{
- struct ieee80211_local *local = hw_to_local(hw);
+ struct mac80211_local *local = hw_to_local(hw);
struct sk_buff *skb = NULL;
struct ieee80211_tx_data tx;
struct ieee80211_sub_if_data *sdata;
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index 4be7132..ae6daaa 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -37,7 +37,7 @@ void *mac80211_wiphy_privid = &mac80211_wiphy_privid;

struct ieee80211_hw *wiphy_to_ieee80211_hw(struct wiphy *wiphy)
{
- struct ieee80211_local *local;
+ struct mac80211_local *local;
BUG_ON(!wiphy);

local = wiphy_priv(wiphy);
@@ -105,7 +105,7 @@ void ieee80211_tx_set_protected(struct ieee80211_tx_data *tx)
} while ((skb = skb->next));
}

-int ieee80211_frame_duration(struct ieee80211_local *local, size_t len,
+int ieee80211_frame_duration(struct mac80211_local *local, size_t len,
int rate, int erp, int short_preamble)
{
int dur;
@@ -164,7 +164,7 @@ __le16 ieee80211_generic_frame_duration(struct ieee80211_hw *hw,
size_t frame_len,
struct ieee80211_rate *rate)
{
- struct ieee80211_local *local = hw_to_local(hw);
+ struct mac80211_local *local = hw_to_local(hw);
struct ieee80211_sub_if_data *sdata;
u16 dur;
int erp;
@@ -189,7 +189,7 @@ __le16 ieee80211_rts_duration(struct ieee80211_hw *hw,
struct ieee80211_vif *vif, size_t frame_len,
const struct ieee80211_tx_info *frame_txctl)
{
- struct ieee80211_local *local = hw_to_local(hw);
+ struct mac80211_local *local = hw_to_local(hw);
struct ieee80211_rate *rate;
struct ieee80211_sub_if_data *sdata;
bool short_preamble;
@@ -230,7 +230,7 @@ __le16 ieee80211_ctstoself_duration(struct ieee80211_hw *hw,
size_t frame_len,
const struct ieee80211_tx_info *frame_txctl)
{
- struct ieee80211_local *local = hw_to_local(hw);
+ struct mac80211_local *local = hw_to_local(hw);
struct ieee80211_rate *rate;
struct ieee80211_sub_if_data *sdata;
bool short_preamble;
@@ -267,7 +267,7 @@ EXPORT_SYMBOL(ieee80211_ctstoself_duration);
static void __ieee80211_wake_queue(struct ieee80211_hw *hw, int queue,
enum queue_stop_reason reason)
{
- struct ieee80211_local *local = hw_to_local(hw);
+ struct mac80211_local *local = hw_to_local(hw);
struct ieee80211_sub_if_data *sdata;

trace_wake_queue(local, queue, reason);
@@ -296,7 +296,7 @@ static void __ieee80211_wake_queue(struct ieee80211_hw *hw, int queue,
void ieee80211_wake_queue_by_reason(struct ieee80211_hw *hw, int queue,
enum queue_stop_reason reason)
{
- struct ieee80211_local *local = hw_to_local(hw);
+ struct mac80211_local *local = hw_to_local(hw);
unsigned long flags;

spin_lock_irqsave(&local->queue_stop_reason_lock, flags);
@@ -314,7 +314,7 @@ EXPORT_SYMBOL(ieee80211_wake_queue);
static void __ieee80211_stop_queue(struct ieee80211_hw *hw, int queue,
enum queue_stop_reason reason)
{
- struct ieee80211_local *local = hw_to_local(hw);
+ struct mac80211_local *local = hw_to_local(hw);
struct ieee80211_sub_if_data *sdata;

trace_stop_queue(local, queue, reason);
@@ -333,7 +333,7 @@ static void __ieee80211_stop_queue(struct ieee80211_hw *hw, int queue,
void ieee80211_stop_queue_by_reason(struct ieee80211_hw *hw, int queue,
enum queue_stop_reason reason)
{
- struct ieee80211_local *local = hw_to_local(hw);
+ struct mac80211_local *local = hw_to_local(hw);
unsigned long flags;

spin_lock_irqsave(&local->queue_stop_reason_lock, flags);
@@ -348,7 +348,7 @@ void ieee80211_stop_queue(struct ieee80211_hw *hw, int queue)
}
EXPORT_SYMBOL(ieee80211_stop_queue);

-void ieee80211_add_pending_skb(struct ieee80211_local *local,
+void ieee80211_add_pending_skb(struct mac80211_local *local,
struct sk_buff *skb)
{
struct ieee80211_hw *hw = &local->hw;
@@ -368,7 +368,7 @@ void ieee80211_add_pending_skb(struct ieee80211_local *local,
spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags);
}

-int ieee80211_add_pending_skbs_fn(struct ieee80211_local *local,
+int ieee80211_add_pending_skbs_fn(struct mac80211_local *local,
struct sk_buff_head *skbs,
void (*fn)(void *data), void *data)
{
@@ -406,7 +406,7 @@ int ieee80211_add_pending_skbs_fn(struct ieee80211_local *local,
return ret;
}

-int ieee80211_add_pending_skbs(struct ieee80211_local *local,
+int ieee80211_add_pending_skbs(struct mac80211_local *local,
struct sk_buff_head *skbs)
{
return ieee80211_add_pending_skbs_fn(local, skbs, NULL, NULL);
@@ -415,7 +415,7 @@ int ieee80211_add_pending_skbs(struct ieee80211_local *local,
void ieee80211_stop_queues_by_reason(struct ieee80211_hw *hw,
enum queue_stop_reason reason)
{
- struct ieee80211_local *local = hw_to_local(hw);
+ struct mac80211_local *local = hw_to_local(hw);
unsigned long flags;
int i;

@@ -436,7 +436,7 @@ EXPORT_SYMBOL(ieee80211_stop_queues);

int ieee80211_queue_stopped(struct ieee80211_hw *hw, int queue)
{
- struct ieee80211_local *local = hw_to_local(hw);
+ struct mac80211_local *local = hw_to_local(hw);
unsigned long flags;
int ret;

@@ -453,7 +453,7 @@ EXPORT_SYMBOL(ieee80211_queue_stopped);
void ieee80211_wake_queues_by_reason(struct ieee80211_hw *hw,
enum queue_stop_reason reason)
{
- struct ieee80211_local *local = hw_to_local(hw);
+ struct mac80211_local *local = hw_to_local(hw);
unsigned long flags;
int i;

@@ -477,7 +477,7 @@ void ieee80211_iterate_active_interfaces(
struct ieee80211_vif *vif),
void *data)
{
- struct ieee80211_local *local = hw_to_local(hw);
+ struct mac80211_local *local = hw_to_local(hw);
struct ieee80211_sub_if_data *sdata;

mutex_lock(&local->iflist_mtx);
@@ -505,7 +505,7 @@ void ieee80211_iterate_active_interfaces_atomic(
struct ieee80211_vif *vif),
void *data)
{
- struct ieee80211_local *local = hw_to_local(hw);
+ struct mac80211_local *local = hw_to_local(hw);
struct ieee80211_sub_if_data *sdata;

rcu_read_lock();
@@ -534,7 +534,7 @@ EXPORT_SYMBOL_GPL(ieee80211_iterate_active_interfaces_atomic);
* mac80211 stuffing into the workqueue which we haven't yet
* cleared during mac80211's suspend cycle.
*/
-static bool ieee80211_can_queue_work(struct ieee80211_local *local)
+static bool ieee80211_can_queue_work(struct mac80211_local *local)
{
if (WARN(local->suspended && !local->resuming,
"queueing ieee80211 work while going to suspend\n"))
@@ -545,7 +545,7 @@ static bool ieee80211_can_queue_work(struct ieee80211_local *local)

void ieee80211_queue_work(struct ieee80211_hw *hw, struct work_struct *work)
{
- struct ieee80211_local *local = hw_to_local(hw);
+ struct mac80211_local *local = hw_to_local(hw);

if (!ieee80211_can_queue_work(local))
return;
@@ -558,7 +558,7 @@ void ieee80211_queue_delayed_work(struct ieee80211_hw *hw,
struct delayed_work *dwork,
unsigned long delay)
{
- struct ieee80211_local *local = hw_to_local(hw);
+ struct mac80211_local *local = hw_to_local(hw);

if (!ieee80211_can_queue_work(local))
return;
@@ -741,7 +741,7 @@ u32 ieee802_11_parse_elems_crc(u8 *start, size_t len,

void ieee80211_set_wmm_default(struct ieee80211_sub_if_data *sdata)
{
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;
struct ieee80211_tx_queue_params qparam;
int queue;
bool use_11b;
@@ -816,7 +816,7 @@ void ieee80211_sta_def_wmm_params(struct ieee80211_sub_if_data *sdata,
const size_t supp_rates_len,
const u8 *supp_rates)
{
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;
int i, have_higher_than_11mbit = 0;

/* cf. IEEE 802.11 9.2.12 */
@@ -833,7 +833,7 @@ void ieee80211_sta_def_wmm_params(struct ieee80211_sub_if_data *sdata,
ieee80211_set_wmm_default(sdata);
}

-u32 ieee80211_mandatory_rates(struct ieee80211_local *local,
+u32 ieee80211_mandatory_rates(struct mac80211_local *local,
enum ieee80211_band band)
{
struct ieee80211_supported_band *sband;
@@ -866,7 +866,7 @@ void ieee80211_send_auth(struct ieee80211_sub_if_data *sdata,
u8 *extra, size_t extra_len, const u8 *bssid,
const u8 *key, u8 key_len, u8 key_idx)
{
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;
struct sk_buff *skb;
struct ieee80211_mgmt *mgmt;
int err;
@@ -903,7 +903,7 @@ void ieee80211_send_auth(struct ieee80211_sub_if_data *sdata,
ieee80211_tx_skb(sdata, skb);
}

-int ieee80211_build_preq_ies(struct ieee80211_local *local, u8 *buffer,
+int ieee80211_build_preq_ies(struct mac80211_local *local, u8 *buffer,
const u8 *ie, size_t ie_len,
enum ieee80211_band band, u32 rate_mask,
u8 channel)
@@ -1020,7 +1020,7 @@ struct sk_buff *ieee80211_build_probe_req(struct ieee80211_sub_if_data *sdata,
const u8 *ssid, size_t ssid_len,
const u8 *ie, size_t ie_len)
{
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;
struct sk_buff *skb;
struct ieee80211_mgmt *mgmt;
size_t buf_len;
@@ -1071,7 +1071,7 @@ void ieee80211_send_probe_req(struct ieee80211_sub_if_data *sdata, u8 *dst,
ieee80211_tx_skb(sdata, skb);
}

-u32 ieee80211_sta_get_rates(struct ieee80211_local *local,
+u32 ieee80211_sta_get_rates(struct mac80211_local *local,
struct ieee802_11_elems *elems,
enum ieee80211_band band)
{
@@ -1107,7 +1107,7 @@ u32 ieee80211_sta_get_rates(struct ieee80211_local *local,
return supp_rates;
}

-void ieee80211_stop_device(struct ieee80211_local *local)
+void ieee80211_stop_device(struct mac80211_local *local)
{
ieee80211_led_radio(local, false);
ieee80211_mod_tpt_led_trig(local, 0, IEEE80211_TPT_LEDTRIG_FL_RADIO);
@@ -1118,7 +1118,7 @@ void ieee80211_stop_device(struct ieee80211_local *local)
drv_stop(local);
}

-int ieee80211_reconfig(struct ieee80211_local *local)
+int ieee80211_reconfig(struct mac80211_local *local)
{
struct ieee80211_hw *hw = &local->hw;
struct ieee80211_sub_if_data *sdata;
@@ -1341,7 +1341,7 @@ static int check_mgd_smps(struct ieee80211_if_managed *ifmgd,
}

/* must hold iflist_mtx */
-void ieee80211_recalc_smps(struct ieee80211_local *local)
+void ieee80211_recalc_smps(struct mac80211_local *local)
{
struct ieee80211_sub_if_data *sdata;
enum ieee80211_smps_mode smps_mode = IEEE80211_SMPS_OFF;
diff --git a/net/mac80211/wep.c b/net/mac80211/wep.c
index cf15e91..0f599fb 100644
--- a/net/mac80211/wep.c
+++ b/net/mac80211/wep.c
@@ -25,7 +25,7 @@
#include "wep.h"


-int ieee80211_wep_init(struct ieee80211_local *local)
+int ieee80211_wep_init(struct mac80211_local *local)
{
/* start WEP IV from a random value */
get_random_bytes(&local->wep_iv, WEP_IV_LEN);
@@ -46,7 +46,7 @@ int ieee80211_wep_init(struct ieee80211_local *local)
return 0;
}

-void ieee80211_wep_free(struct ieee80211_local *local)
+void ieee80211_wep_free(struct mac80211_local *local)
{
if (!IS_ERR(local->wep_tx_tfm))
crypto_free_cipher(local->wep_tx_tfm);
@@ -70,7 +70,7 @@ static inline bool ieee80211_wep_weak_iv(u32 iv, int keylen)
}


-static void ieee80211_wep_get_iv(struct ieee80211_local *local,
+static void ieee80211_wep_get_iv(struct mac80211_local *local,
int keylen, int keyidx, u8 *iv)
{
local->wep_iv++;
@@ -87,7 +87,7 @@ static void ieee80211_wep_get_iv(struct ieee80211_local *local,
}


-static u8 *ieee80211_wep_add_iv(struct ieee80211_local *local,
+static u8 *ieee80211_wep_add_iv(struct mac80211_local *local,
struct sk_buff *skb,
int keylen, int keyidx)
{
@@ -109,7 +109,7 @@ static u8 *ieee80211_wep_add_iv(struct ieee80211_local *local,
}


-static void ieee80211_wep_remove_iv(struct ieee80211_local *local,
+static void ieee80211_wep_remove_iv(struct mac80211_local *local,
struct sk_buff *skb,
struct ieee80211_key *key)
{
@@ -152,7 +152,7 @@ int ieee80211_wep_encrypt_data(struct crypto_cipher *tfm, u8 *rc4key,
*
* WEP frame payload: IV + TX key idx, RC4(data), ICV = RC4(CRC32(data))
*/
-int ieee80211_wep_encrypt(struct ieee80211_local *local,
+int ieee80211_wep_encrypt(struct mac80211_local *local,
struct sk_buff *skb,
const u8 *key, int keylen, int keyidx)
{
@@ -213,7 +213,7 @@ int ieee80211_wep_decrypt_data(struct crypto_cipher *tfm, u8 *rc4key,
* failure. If frame is OK, IV and ICV will be removed, i.e., decrypted payload
* is moved to the beginning of the skb and skb length will be reduced.
*/
-static int ieee80211_wep_decrypt(struct ieee80211_local *local,
+static int ieee80211_wep_decrypt(struct mac80211_local *local,
struct sk_buff *skb,
struct ieee80211_key *key)
{
diff --git a/net/mac80211/wep.h b/net/mac80211/wep.h
index f265c02..1ef436c 100644
--- a/net/mac80211/wep.h
+++ b/net/mac80211/wep.h
@@ -16,11 +16,11 @@
#include "mac80211_i.h"
#include "key.h"

-int ieee80211_wep_init(struct ieee80211_local *local);
-void ieee80211_wep_free(struct ieee80211_local *local);
+int ieee80211_wep_init(struct mac80211_local *local);
+void ieee80211_wep_free(struct mac80211_local *local);
int ieee80211_wep_encrypt_data(struct crypto_cipher *tfm, u8 *rc4key,
size_t klen, u8 *data, size_t data_len);
-int ieee80211_wep_encrypt(struct ieee80211_local *local,
+int ieee80211_wep_encrypt(struct mac80211_local *local,
struct sk_buff *skb,
const u8 *key, int keylen, int keyidx);
int ieee80211_wep_decrypt_data(struct crypto_cipher *tfm, u8 *rc4key,
diff --git a/net/mac80211/wme.c b/net/mac80211/wme.c
index 74f60ab..e20a843 100644
--- a/net/mac80211/wme.c
+++ b/net/mac80211/wme.c
@@ -57,7 +57,7 @@ static int wme_downgrade_ac(struct sk_buff *skb)
u16 ieee80211_select_queue(struct ieee80211_sub_if_data *sdata,
struct sk_buff *skb)
{
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;
struct sta_info *sta = NULL;
const u8 *ra = NULL;
bool qos = false;
@@ -119,7 +119,7 @@ u16 ieee80211_select_queue(struct ieee80211_sub_if_data *sdata,
return ieee80211_downgrade_queue(local, skb);
}

-u16 ieee80211_downgrade_queue(struct ieee80211_local *local,
+u16 ieee80211_downgrade_queue(struct mac80211_local *local,
struct sk_buff *skb)
{
/* in case we are a client verify acm is not set for this ac */
@@ -139,7 +139,7 @@ u16 ieee80211_downgrade_queue(struct ieee80211_local *local,
return ieee802_1d_to_ac[skb->priority];
}

-void ieee80211_set_qos_hdr(struct ieee80211_local *local, struct sk_buff *skb)
+void ieee80211_set_qos_hdr(struct mac80211_local *local, struct sk_buff *skb)
{
struct ieee80211_hdr *hdr = (void *)skb->data;

diff --git a/net/mac80211/wme.h b/net/mac80211/wme.h
index 32f17c1..77a8e8d 100644
--- a/net/mac80211/wme.h
+++ b/net/mac80211/wme.h
@@ -22,8 +22,8 @@ extern const int ieee802_1d_to_ac[8];

u16 ieee80211_select_queue(struct ieee80211_sub_if_data *sdata,
struct sk_buff *skb);
-void ieee80211_set_qos_hdr(struct ieee80211_local *local, struct sk_buff *skb);
-u16 ieee80211_downgrade_queue(struct ieee80211_local *local,
+void ieee80211_set_qos_hdr(struct mac80211_local *local, struct sk_buff *skb);
+u16 ieee80211_downgrade_queue(struct mac80211_local *local,
struct sk_buff *skb);


diff --git a/net/mac80211/work.c b/net/mac80211/work.c
index bfc4ba7..8856c5e 100644
--- a/net/mac80211/work.c
+++ b/net/mac80211/work.c
@@ -40,7 +40,7 @@ enum work_action {


/* utils */
-static inline void ASSERT_WORK_MTX(struct ieee80211_local *local)
+static inline void ASSERT_WORK_MTX(struct mac80211_local *local)
{
lockdep_assert_held(&local->mtx);
}
@@ -55,7 +55,7 @@ static inline void ASSERT_WORK_MTX(struct ieee80211_local *local)
* has happened -- the work that runs from this timer will
* do that.
*/
-static void run_again(struct ieee80211_local *local,
+static void run_again(struct mac80211_local *local,
unsigned long timeout)
{
ASSERT_WORK_MTX(local);
@@ -194,7 +194,7 @@ static void ieee80211_add_ht_ie(struct sk_buff *skb, const u8 *ht_info_ie,
static void ieee80211_send_assoc(struct ieee80211_sub_if_data *sdata,
struct ieee80211_work *wk)
{
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;
struct sk_buff *skb;
struct ieee80211_mgmt *mgmt;
u8 *pos, qos_info;
@@ -409,7 +409,7 @@ static void ieee80211_send_assoc(struct ieee80211_sub_if_data *sdata,
ieee80211_tx_skb(sdata, skb);
}

-static void ieee80211_remove_auth_bss(struct ieee80211_local *local,
+static void ieee80211_remove_auth_bss(struct mac80211_local *local,
struct ieee80211_work *wk)
{
struct cfg80211_bss *cbss;
@@ -433,7 +433,7 @@ static enum work_action __must_check
ieee80211_direct_probe(struct ieee80211_work *wk)
{
struct ieee80211_sub_if_data *sdata = wk->sdata;
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;

wk->probe_auth.tries++;
if (wk->probe_auth.tries > IEEE80211_AUTH_MAX_TRIES) {
@@ -471,7 +471,7 @@ static enum work_action __must_check
ieee80211_authenticate(struct ieee80211_work *wk)
{
struct ieee80211_sub_if_data *sdata = wk->sdata;
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;

wk->probe_auth.tries++;
if (wk->probe_auth.tries > IEEE80211_AUTH_MAX_TRIES) {
@@ -504,7 +504,7 @@ static enum work_action __must_check
ieee80211_associate(struct ieee80211_work *wk)
{
struct ieee80211_sub_if_data *sdata = wk->sdata;
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;

wk->assoc.tries++;
if (wk->assoc.tries > IEEE80211_ASSOC_MAX_TRIES) {
@@ -659,7 +659,7 @@ ieee80211_rx_mgmt_assoc_resp(struct ieee80211_work *wk,
bool reassoc)
{
struct ieee80211_sub_if_data *sdata = wk->sdata;
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;
u16 capab_info, status_code, aid;
struct ieee802_11_elems elems;
u8 *pos;
@@ -717,7 +717,7 @@ ieee80211_rx_mgmt_probe_resp(struct ieee80211_work *wk,
struct ieee80211_rx_status *rx_status)
{
struct ieee80211_sub_if_data *sdata = wk->sdata;
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;
size_t baselen;

ASSERT_WORK_MTX(local);
@@ -741,7 +741,7 @@ ieee80211_rx_mgmt_beacon(struct ieee80211_work *wk,
struct ieee80211_mgmt *mgmt, size_t len)
{
struct ieee80211_sub_if_data *sdata = wk->sdata;
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;

ASSERT_WORK_MTX(local);

@@ -755,7 +755,7 @@ ieee80211_rx_mgmt_beacon(struct ieee80211_work *wk,
return WORK_ACT_DONE;
}

-static void ieee80211_work_rx_queued_mgmt(struct ieee80211_local *local,
+static void ieee80211_work_rx_queued_mgmt(struct mac80211_local *local,
struct sk_buff *skb)
{
struct ieee80211_rx_status *rx_status;
@@ -905,7 +905,7 @@ ieee80211_calc_ct(enum nl80211_channel_type wk_ct,

static void ieee80211_work_timer(unsigned long data)
{
- struct ieee80211_local *local = (void *) data;
+ struct mac80211_local *local = (void *) data;

if (local->quiescing)
return;
@@ -915,8 +915,8 @@ static void ieee80211_work_timer(unsigned long data)

static void ieee80211_work_work(struct work_struct *work)
{
- struct ieee80211_local *local =
- container_of(work, struct ieee80211_local, work_work);
+ struct mac80211_local *local =
+ container_of(work, struct mac80211_local, work_work);
struct sk_buff *skb;
struct ieee80211_work *wk, *tmp;
LIST_HEAD(free_work);
@@ -1119,7 +1119,7 @@ static void ieee80211_work_work(struct work_struct *work)

void ieee80211_add_work(struct ieee80211_work *wk)
{
- struct ieee80211_local *local;
+ struct mac80211_local *local;

if (WARN_ON(!wk->chan))
return;
@@ -1143,7 +1143,7 @@ void ieee80211_add_work(struct ieee80211_work *wk)
ieee80211_queue_work(&local->hw, &local->work_work);
}

-void ieee80211_work_init(struct ieee80211_local *local)
+void ieee80211_work_init(struct mac80211_local *local)
{
INIT_LIST_HEAD(&local->work_list);
setup_timer(&local->work_timer, ieee80211_work_timer,
@@ -1154,7 +1154,7 @@ void ieee80211_work_init(struct ieee80211_local *local)

void ieee80211_work_purge(struct ieee80211_sub_if_data *sdata)
{
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;
struct ieee80211_work *wk;
bool cleanup = false;

@@ -1186,7 +1186,7 @@ void ieee80211_work_purge(struct ieee80211_sub_if_data *sdata)
ieee80211_rx_result ieee80211_work_rx_mgmt(struct ieee80211_sub_if_data *sdata,
struct sk_buff *skb)
{
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;
struct ieee80211_mgmt *mgmt;
struct ieee80211_work *wk;
u16 fc;
@@ -1262,7 +1262,7 @@ int ieee80211_wk_remain_on_channel(struct ieee80211_sub_if_data *sdata,
int ieee80211_wk_cancel_remain_on_channel(struct ieee80211_sub_if_data *sdata,
u64 cookie)
{
- struct ieee80211_local *local = sdata->local;
+ struct mac80211_local *local = sdata->local;
struct ieee80211_work *wk, *tmp;
bool found = false;



2011-05-29 20:05:50

by Kalle Valo

[permalink] [raw]
Subject: [RFC PATCH 14/27] mac80211: rename ieee80211_if_ap to mac80211_if_ap

Signed-off-by: Kalle Valo <[email protected]>
---
net/mac80211/mac80211_i.h | 6 +++---
net/mac80211/sta_info.c | 8 ++++----
net/mac80211/tx.c | 8 ++++----
3 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/net/mac80211/mac80211_i.h b/net/mac80211/mac80211_i.h
index d4aa73f..f41a342 100644
--- a/net/mac80211/mac80211_i.h
+++ b/net/mac80211/mac80211_i.h
@@ -213,7 +213,7 @@ struct beacon_data {
int dtim_period;
};

-struct ieee80211_if_ap {
+struct mac80211_if_ap {
struct beacon_data __rcu *beacon;

struct list_head vlans;
@@ -587,13 +587,13 @@ struct ieee80211_sub_if_data {
* corresponding AP in VLAN mode, NULL for
* all others (might be needed later in IBSS)
*/
- struct ieee80211_if_ap *bss;
+ struct mac80211_if_ap *bss;

/* bitmap of allowed (non-MCS) rate indexes for rate control */
u32 rc_rateidx_mask[IEEE80211_NUM_BANDS];

union {
- struct ieee80211_if_ap ap;
+ struct mac80211_if_ap ap;
struct ieee80211_if_wds wds;
struct ieee80211_if_vlan vlan;
struct ieee80211_if_managed mgd;
diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c
index 5f649aa..d148159 100644
--- a/net/mac80211/sta_info.c
+++ b/net/mac80211/sta_info.c
@@ -496,7 +496,7 @@ int sta_info_insert(struct sta_info *sta)
return err;
}

-static inline void __bss_tim_set(struct ieee80211_if_ap *bss, u16 aid)
+static inline void __bss_tim_set(struct mac80211_if_ap *bss, u16 aid)
{
/*
* This format has been mandated by the IEEE specifications,
@@ -505,7 +505,7 @@ static inline void __bss_tim_set(struct ieee80211_if_ap *bss, u16 aid)
bss->tim[aid / 8] |= (1 << (aid % 8));
}

-static inline void __bss_tim_clear(struct ieee80211_if_ap *bss, u16 aid)
+static inline void __bss_tim_clear(struct mac80211_if_ap *bss, u16 aid)
{
/*
* This format has been mandated by the IEEE specifications,
@@ -514,7 +514,7 @@ static inline void __bss_tim_clear(struct ieee80211_if_ap *bss, u16 aid)
bss->tim[aid / 8] &= ~(1 << (aid % 8));
}

-static void __sta_info_set_tim_bit(struct ieee80211_if_ap *bss,
+static void __sta_info_set_tim_bit(struct mac80211_if_ap *bss,
struct sta_info *sta)
{
BUG_ON(!bss);
@@ -539,7 +539,7 @@ void sta_info_set_tim_bit(struct sta_info *sta)
spin_unlock_irqrestore(&sta->local->sta_lock, flags);
}

-static void __sta_info_clear_tim_bit(struct ieee80211_if_ap *bss,
+static void __sta_info_clear_tim_bit(struct mac80211_if_ap *bss,
struct sta_info *sta)
{
BUG_ON(!bss);
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 02f6968..85b2a0c 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -331,7 +331,7 @@ static void purge_old_ps_buffers(struct mac80211_local *local)
rcu_read_lock();

list_for_each_entry_rcu(sdata, &local->interfaces, list) {
- struct ieee80211_if_ap *ap;
+ struct mac80211_if_ap *ap;
if (sdata->vif.type != NL80211_IFTYPE_AP)
continue;
ap = &sdata->u.ap;
@@ -2093,7 +2093,7 @@ void ieee80211_tx_pending(unsigned long data)

/* functions for drivers to get certain frames */

-static void ieee80211_beacon_add_tim(struct ieee80211_if_ap *bss,
+static void ieee80211_beacon_add_tim(struct mac80211_if_ap *bss,
struct sk_buff *skb,
struct beacon_data *beacon)
{
@@ -2165,7 +2165,7 @@ struct sk_buff *ieee80211_beacon_get_tim(struct ieee80211_hw *hw,
struct sk_buff *skb = NULL;
struct ieee80211_tx_info *info;
struct ieee80211_sub_if_data *sdata = NULL;
- struct ieee80211_if_ap *ap = NULL;
+ struct mac80211_if_ap *ap = NULL;
struct beacon_data *beacon;
struct ieee80211_supported_band *sband;
enum ieee80211_band band = local->hw.conf.channel->band;
@@ -2481,7 +2481,7 @@ ieee80211_get_buffered_bc(struct ieee80211_hw *hw,
struct sk_buff *skb = NULL;
struct mac80211_tx_data tx;
struct ieee80211_sub_if_data *sdata;
- struct ieee80211_if_ap *bss = NULL;
+ struct mac80211_if_ap *bss = NULL;
struct beacon_data *beacon;
struct ieee80211_tx_info *info;



2011-05-29 20:06:37

by Kalle Valo

[permalink] [raw]
Subject: [RFC PATCH 21/27] mac80211: rename ieee80211_if_mesh to mac80211_if_mesh

Signed-off-by: Kalle Valo <[email protected]>
---
net/mac80211/cfg.c | 6 +++---
net/mac80211/mac80211_i.h | 4 ++--
net/mac80211/mesh.c | 26 +++++++++++++-------------
net/mac80211/mesh.h | 4 ++--
net/mac80211/mesh_hwmp.c | 12 ++++++------
net/mac80211/mesh_pathtbl.c | 4 ++--
6 files changed, 28 insertions(+), 28 deletions(-)

diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 2ac599f..1954c9c 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -1047,7 +1047,7 @@ static inline bool _chg_mesh_attr(enum nl80211_meshconf_params parm, u32 mask)
return (mask >> (parm-1)) & 0x1;
}

-static int copy_mesh_setup(struct ieee80211_if_mesh *ifmsh,
+static int copy_mesh_setup(struct mac80211_if_mesh *ifmsh,
const struct mesh_setup *setup)
{
u8 *new_ie;
@@ -1087,7 +1087,7 @@ static int ieee80211_update_mesh_config(struct wiphy *wiphy,
{
struct mesh_config *conf;
struct ieee80211_sub_if_data *sdata;
- struct ieee80211_if_mesh *ifmsh;
+ struct mac80211_if_mesh *ifmsh;

sdata = IEEE80211_DEV_TO_SUB_IF(dev);
ifmsh = &sdata->u.mesh;
@@ -1139,7 +1139,7 @@ static int ieee80211_join_mesh(struct wiphy *wiphy, struct net_device *dev,
const struct mesh_setup *setup)
{
struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
- struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;
+ struct mac80211_if_mesh *ifmsh = &sdata->u.mesh;
int err;

memcpy(&ifmsh->mshcfg, conf, sizeof(struct mesh_config));
diff --git a/net/mac80211/mac80211_i.h b/net/mac80211/mac80211_i.h
index b609d9a..43bfc2f 100644
--- a/net/mac80211/mac80211_i.h
+++ b/net/mac80211/mac80211_i.h
@@ -451,7 +451,7 @@ struct mac80211_if_ibss {
} state;
};

-struct ieee80211_if_mesh {
+struct mac80211_if_mesh {
struct timer_list housekeeping_timer;
struct timer_list mesh_path_timer;
struct timer_list mesh_path_root_timer;
@@ -598,7 +598,7 @@ struct ieee80211_sub_if_data {
struct mac80211_if_vlan vlan;
struct mac80211_if_managed mgd;
struct mac80211_if_ibss ibss;
- struct ieee80211_if_mesh mesh;
+ struct mac80211_if_mesh mesh;
u32 mntr_flags;
} u;

diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c
index f39a6ef..b86f02e 100644
--- a/net/mac80211/mesh.c
+++ b/net/mac80211/mesh.c
@@ -45,7 +45,7 @@ static void ieee80211_mesh_housekeeping_timer(unsigned long data)
{
struct ieee80211_sub_if_data *sdata = (void *) data;
struct mac80211_local *local = sdata->local;
- struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;
+ struct mac80211_if_mesh *ifmsh = &sdata->u.mesh;

set_bit(MESH_WORK_HOUSEKEEPING, &ifmsh->wrkq_flags);

@@ -68,7 +68,7 @@ static void ieee80211_mesh_housekeeping_timer(unsigned long data)
*/
bool mesh_matches_local(struct ieee802_11_elems *ie, struct ieee80211_sub_if_data *sdata)
{
- struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;
+ struct mac80211_if_mesh *ifmsh = &sdata->u.mesh;

/*
* As support for each feature is added, check for matching
@@ -292,7 +292,7 @@ static void ieee80211_mesh_path_timer(unsigned long data)
{
struct ieee80211_sub_if_data *sdata =
(struct ieee80211_sub_if_data *) data;
- struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;
+ struct mac80211_if_mesh *ifmsh = &sdata->u.mesh;
struct mac80211_local *local = sdata->local;

if (local->quiescing) {
@@ -307,7 +307,7 @@ static void ieee80211_mesh_path_root_timer(unsigned long data)
{
struct ieee80211_sub_if_data *sdata =
(struct ieee80211_sub_if_data *) data;
- struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;
+ struct mac80211_if_mesh *ifmsh = &sdata->u.mesh;
struct mac80211_local *local = sdata->local;

set_bit(MESH_WORK_ROOT, &ifmsh->wrkq_flags);
@@ -320,7 +320,7 @@ static void ieee80211_mesh_path_root_timer(unsigned long data)
ieee80211_queue_work(&local->hw, &sdata->work);
}

-void ieee80211_mesh_root_setup(struct ieee80211_if_mesh *ifmsh)
+void ieee80211_mesh_root_setup(struct mac80211_if_mesh *ifmsh)
{
if (ifmsh->mshcfg.dot11MeshHWMPRootMode)
set_bit(MESH_WORK_ROOT, &ifmsh->wrkq_flags);
@@ -399,7 +399,7 @@ int ieee80211_new_mesh_header(struct ieee80211s_hdr *meshhdr,
}

static void ieee80211_mesh_housekeeping(struct ieee80211_sub_if_data *sdata,
- struct ieee80211_if_mesh *ifmsh)
+ struct mac80211_if_mesh *ifmsh)
{
bool free_plinks;

@@ -421,7 +421,7 @@ static void ieee80211_mesh_housekeeping(struct ieee80211_sub_if_data *sdata,

static void ieee80211_mesh_rootpath(struct ieee80211_sub_if_data *sdata)
{
- struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;
+ struct mac80211_if_mesh *ifmsh = &sdata->u.mesh;

mesh_path_tx_root_frame(sdata);
mod_timer(&ifmsh->mesh_path_root_timer,
@@ -431,7 +431,7 @@ static void ieee80211_mesh_rootpath(struct ieee80211_sub_if_data *sdata)
#ifdef CONFIG_PM
void ieee80211_mesh_quiesce(struct ieee80211_sub_if_data *sdata)
{
- struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;
+ struct mac80211_if_mesh *ifmsh = &sdata->u.mesh;

/* use atomic bitops in case both timers fire at the same time */

@@ -445,7 +445,7 @@ void ieee80211_mesh_quiesce(struct ieee80211_sub_if_data *sdata)

void ieee80211_mesh_restart(struct ieee80211_sub_if_data *sdata)
{
- struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;
+ struct mac80211_if_mesh *ifmsh = &sdata->u.mesh;

if (test_and_clear_bit(TMR_RUNNING_HK, &ifmsh->timers_running))
add_timer(&ifmsh->housekeeping_timer);
@@ -459,7 +459,7 @@ void ieee80211_mesh_restart(struct ieee80211_sub_if_data *sdata)

void ieee80211_start_mesh(struct ieee80211_sub_if_data *sdata)
{
- struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;
+ struct mac80211_if_mesh *ifmsh = &sdata->u.mesh;
struct mac80211_local *local = sdata->local;

local->fif_other_bss++;
@@ -482,7 +482,7 @@ void ieee80211_start_mesh(struct ieee80211_sub_if_data *sdata)
void ieee80211_stop_mesh(struct ieee80211_sub_if_data *sdata)
{
struct mac80211_local *local = sdata->local;
- struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;
+ struct mac80211_if_mesh *ifmsh = &sdata->u.mesh;

ifmsh->mesh_id_len = 0;
ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_BEACON_ENABLED);
@@ -591,7 +591,7 @@ void ieee80211_mesh_rx_queued_mgmt(struct ieee80211_sub_if_data *sdata,

void ieee80211_mesh_work(struct ieee80211_sub_if_data *sdata)
{
- struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;
+ struct mac80211_if_mesh *ifmsh = &sdata->u.mesh;

if (ifmsh->preq_queue_len &&
time_after(jiffies,
@@ -624,7 +624,7 @@ void ieee80211_mesh_notify_scan_completed(struct mac80211_local *local)

void ieee80211_mesh_init_sdata(struct ieee80211_sub_if_data *sdata)
{
- struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;
+ struct mac80211_if_mesh *ifmsh = &sdata->u.mesh;

setup_timer(&ifmsh->housekeeping_timer,
ieee80211_mesh_housekeeping_timer,
diff --git a/net/mac80211/mesh.h b/net/mac80211/mesh.h
index d3b0201..db38d57 100644
--- a/net/mac80211/mesh.h
+++ b/net/mac80211/mesh.h
@@ -196,7 +196,7 @@ int mesh_rmc_check(u8 *addr, struct ieee80211s_hdr *mesh_hdr,
struct ieee80211_sub_if_data *sdata);
bool mesh_matches_local(struct ieee802_11_elems *ie,
struct ieee80211_sub_if_data *sdata);
-void mesh_ids_set_default(struct ieee80211_if_mesh *mesh);
+void mesh_ids_set_default(struct mac80211_if_mesh *mesh);
void mesh_mgmt_ies_add(struct sk_buff *skb,
struct ieee80211_sub_if_data *sdata);
void mesh_rmc_free(struct ieee80211_sub_if_data *sdata);
@@ -208,7 +208,7 @@ void ieee80211s_stop(void);
void ieee80211_mesh_init_sdata(struct ieee80211_sub_if_data *sdata);
void ieee80211_start_mesh(struct ieee80211_sub_if_data *sdata);
void ieee80211_stop_mesh(struct ieee80211_sub_if_data *sdata);
-void ieee80211_mesh_root_setup(struct ieee80211_if_mesh *ifmsh);
+void ieee80211_mesh_root_setup(struct mac80211_if_mesh *ifmsh);

/* Mesh paths */
int mesh_nexthop_lookup(struct sk_buff *skb,
diff --git a/net/mac80211/mesh_hwmp.c b/net/mac80211/mesh_hwmp.c
index dc8746f..4eca250 100644
--- a/net/mac80211/mesh_hwmp.c
+++ b/net/mac80211/mesh_hwmp.c
@@ -469,7 +469,7 @@ static void hwmp_preq_frame_process(struct ieee80211_sub_if_data *sdata,
struct ieee80211_mgmt *mgmt,
u8 *preq_elem, u32 metric)
{
- struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;
+ struct mac80211_if_mesh *ifmsh = &sdata->u.mesh;
struct mesh_path *mpath;
u8 *target_addr, *orig_addr;
u8 target_flags, ttl;
@@ -636,7 +636,7 @@ fail:
static void hwmp_perr_frame_process(struct ieee80211_sub_if_data *sdata,
struct ieee80211_mgmt *mgmt, u8 *perr_elem)
{
- struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;
+ struct mac80211_if_mesh *ifmsh = &sdata->u.mesh;
struct mesh_path *mpath;
u8 ttl;
u8 *ta, *target_addr;
@@ -679,7 +679,7 @@ static void hwmp_rann_frame_process(struct ieee80211_sub_if_data *sdata,
struct ieee80211_mgmt *mgmt,
struct ieee80211_rann_ie *rann)
{
- struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;
+ struct mac80211_if_mesh *ifmsh = &sdata->u.mesh;
struct mesh_path *mpath;
u8 ttl, flags, hopcount;
u8 *orig_addr;
@@ -783,7 +783,7 @@ void mesh_rx_path_sel_frame(struct ieee80211_sub_if_data *sdata,
static void mesh_queue_preq(struct mesh_path *mpath, u8 flags)
{
struct ieee80211_sub_if_data *sdata = mpath->sdata;
- struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;
+ struct mac80211_if_mesh *ifmsh = &sdata->u.mesh;
struct mesh_preq_queue *preq_node;

preq_node = kmalloc(sizeof(struct mesh_preq_queue), GFP_ATOMIC);
@@ -829,7 +829,7 @@ static void mesh_queue_preq(struct mesh_path *mpath, u8 flags)
*/
void mesh_path_start_discovery(struct ieee80211_sub_if_data *sdata)
{
- struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;
+ struct mac80211_if_mesh *ifmsh = &sdata->u.mesh;
struct mesh_preq_queue *preq_node;
struct mesh_path *mpath;
u8 ttl, target_flags;
@@ -1006,7 +1006,7 @@ void mesh_path_timer(unsigned long data)
void
mesh_path_tx_root_frame(struct ieee80211_sub_if_data *sdata)
{
- struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;
+ struct mac80211_if_mesh *ifmsh = &sdata->u.mesh;

mesh_path_sel_frame_tx(MPATH_RANN, 0, sdata->vif.addr,
cpu_to_le32(++ifmsh->sn),
diff --git a/net/mac80211/mesh_pathtbl.c b/net/mac80211/mesh_pathtbl.c
index c99fb89..c52b981 100644
--- a/net/mac80211/mesh_pathtbl.c
+++ b/net/mac80211/mesh_pathtbl.c
@@ -315,7 +315,7 @@ struct mesh_path *mesh_path_lookup_by_idx(int idx, struct ieee80211_sub_if_data
*/
int mesh_path_add(u8 *dst, struct ieee80211_sub_if_data *sdata)
{
- struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;
+ struct mac80211_if_mesh *ifmsh = &sdata->u.mesh;
struct mac80211_local *local = sdata->local;
struct mesh_table *tbl;
struct mesh_path *mpath, *new_mpath;
@@ -447,7 +447,7 @@ void mesh_mpp_table_grow(void)

int mpp_path_add(u8 *dst, u8 *mpp, struct ieee80211_sub_if_data *sdata)
{
- struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;
+ struct mac80211_if_mesh *ifmsh = &sdata->u.mesh;
struct mac80211_local *local = sdata->local;
struct mesh_table *tbl;
struct mesh_path *mpath, *new_mpath;


2011-05-29 20:05:09

by Kalle Valo

[permalink] [raw]
Subject: [RFC PATCH 08/27] mac80211: rename ieee80211_fragment_entry to mac80211_fragment_entry

Signed-off-by: Kalle Valo <[email protected]>
---
net/mac80211/mac80211_i.h | 4 ++--
net/mac80211/rx.c | 10 +++++-----
2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/net/mac80211/mac80211_i.h b/net/mac80211/mac80211_i.h
index 82e60c2..ddaf7de 100644
--- a/net/mac80211/mac80211_i.h
+++ b/net/mac80211/mac80211_i.h
@@ -62,7 +62,7 @@ struct mac80211_local;
#define IEEE80211_DEFAULT_MAX_SP_LEN \
IEEE80211_WMM_IE_STA_QOSINFO_SP_ALL

-struct ieee80211_fragment_entry {
+struct mac80211_fragment_entry {
unsigned long first_frag_time;
unsigned int seq;
unsigned int rx_queue;
@@ -565,7 +565,7 @@ struct ieee80211_sub_if_data {
bool old_idle;

/* Fragment table for host-based reassembly */
- struct ieee80211_fragment_entry fragments[IEEE80211_FRAGMENT_MAX];
+ struct mac80211_fragment_entry fragments[IEEE80211_FRAGMENT_MAX];
unsigned int fragment_next;

struct ieee80211_key __rcu *keys[NUM_DEFAULT_KEYS + NUM_DEFAULT_MGMT_KEYS];
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index 22d066d..d49fa8b 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -1254,12 +1254,12 @@ ieee80211_rx_h_sta_process(struct ieee80211_rx_data *rx)
return RX_CONTINUE;
} /* ieee80211_rx_h_sta_process */

-static inline struct ieee80211_fragment_entry *
+static inline struct mac80211_fragment_entry *
ieee80211_reassemble_add(struct ieee80211_sub_if_data *sdata,
unsigned int frag, unsigned int seq, int rx_queue,
struct sk_buff **skb)
{
- struct ieee80211_fragment_entry *entry;
+ struct mac80211_fragment_entry *entry;
int idx;

idx = sdata->fragment_next;
@@ -1293,12 +1293,12 @@ ieee80211_reassemble_add(struct ieee80211_sub_if_data *sdata,
return entry;
}

-static inline struct ieee80211_fragment_entry *
+static inline struct mac80211_fragment_entry *
ieee80211_reassemble_find(struct ieee80211_sub_if_data *sdata,
unsigned int frag, unsigned int seq,
int rx_queue, struct ieee80211_hdr *hdr)
{
- struct ieee80211_fragment_entry *entry;
+ struct mac80211_fragment_entry *entry;
int i, idx;

idx = sdata->fragment_next;
@@ -1343,7 +1343,7 @@ ieee80211_rx_h_defragment(struct ieee80211_rx_data *rx)
u16 sc;
__le16 fc;
unsigned int frag, seq;
- struct ieee80211_fragment_entry *entry;
+ struct mac80211_fragment_entry *entry;
struct sk_buff *skb;
struct ieee80211_rx_status *status;



2011-05-29 20:05:56

by Kalle Valo

[permalink] [raw]
Subject: [RFC PATCH 15/27] mac80211: change ieee80211_if_wds and _vlan to use mac80211 prefix

Signed-off-by: Kalle Valo <[email protected]>
---
net/mac80211/mac80211_i.h | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/net/mac80211/mac80211_i.h b/net/mac80211/mac80211_i.h
index f41a342..dc30f13 100644
--- a/net/mac80211/mac80211_i.h
+++ b/net/mac80211/mac80211_i.h
@@ -228,12 +228,12 @@ struct mac80211_if_ap {
bool dtim_bc_mc;
};

-struct ieee80211_if_wds {
+struct mac80211_if_wds {
struct sta_info *sta;
u8 remote_addr[ETH_ALEN];
};

-struct ieee80211_if_vlan {
+struct mac80211_if_vlan {
struct list_head list;

/* used for all tx if the VLAN is configured to 4-addr mode */
@@ -594,8 +594,8 @@ struct ieee80211_sub_if_data {

union {
struct mac80211_if_ap ap;
- struct ieee80211_if_wds wds;
- struct ieee80211_if_vlan vlan;
+ struct mac80211_if_wds wds;
+ struct mac80211_if_vlan vlan;
struct ieee80211_if_managed mgd;
struct ieee80211_if_ibss ibss;
struct ieee80211_if_mesh mesh;


2011-05-29 20:05:36

by Kalle Valo

[permalink] [raw]
Subject: [RFC PATCH 12/27] mac80211: rename ieee80211_rx_flags to mac80211_i_rx_flags

Add _i_ because, strangely enough, mac80211_i.h already has another
definition of mac80211_rx_flags.

Signed-off-by: Kalle Valo <[email protected]>
---
net/mac80211/mac80211_i.h | 6 +++---
net/mac80211/rx.c | 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/net/mac80211/mac80211_i.h b/net/mac80211/mac80211_i.h
index 4ef1594..5f7b684 100644
--- a/net/mac80211/mac80211_i.h
+++ b/net/mac80211/mac80211_i.h
@@ -183,15 +183,15 @@ enum mac80211_packet_rx_flags {
};

/**
- * enum ieee80211_rx_flags - RX data flags
+ * enum mac80211_i_rx_flags - RX data flags
*
* @MAC80211_RX_CMNTR: received on cooked monitor already
*
* These flags are used across handling multiple interfaces
* for a single frame.
*/
-enum ieee80211_rx_flags {
- IEEE80211_RX_CMNTR = BIT(0),
+enum mac80211_i_rx_flags {
+ MAC80211_RX_CMNTR = BIT(0),
};

struct ieee80211_rx_data {
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index 12086b4..8245813 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -2394,9 +2394,9 @@ static void ieee80211_rx_cooked_monitor(struct ieee80211_rx_data *rx,
* If cooked monitor has been processed already, then
* don't do it again. If not, set the flag.
*/
- if (rx->flags & IEEE80211_RX_CMNTR)
+ if (rx->flags & MAC80211_RX_CMNTR)
goto out_free_skb;
- rx->flags |= IEEE80211_RX_CMNTR;
+ rx->flags |= MAC80211_RX_CMNTR;

if (skb_headroom(skb) < sizeof(*rthdr) &&
pskb_expand_head(skb, sizeof(*rthdr), 0, GFP_ATOMIC))


2011-05-29 20:07:20

by Kalle Valo

[permalink] [raw]
Subject: [RFC PATCH 27/27] mac80211: use mac80211_hw

Signed-off-by: Kalle Valo <[email protected]>
---
net/mac80211/led.c | 10 ++++----
net/mac80211/mac80211_i.h | 22 +++++++++--------
net/mac80211/main.c | 14 +++++------
net/mac80211/mlme.c | 6 ++---
net/mac80211/offchannel.c | 4 ++-
net/mac80211/pm.c | 2 +-
net/mac80211/rc80211_minstrel.c | 4 ++-
net/mac80211/rc80211_minstrel.h | 2 +-
net/mac80211/rc80211_minstrel_ht.c | 4 ++-
net/mac80211/rc80211_pid_algo.c | 2 +-
net/mac80211/rx.c | 18 +++++++-------
net/mac80211/scan.c | 8 +++---
net/mac80211/sta_info.c | 4 ++-
net/mac80211/status.c | 4 ++-
net/mac80211/tx.c | 14 +++++------
net/mac80211/util.c | 46 ++++++++++++++++++------------------
16 files changed, 82 insertions(+), 82 deletions(-)

diff --git a/net/mac80211/led.c b/net/mac80211/led.c
index 0d2fd97..2a14969 100644
--- a/net/mac80211/led.c
+++ b/net/mac80211/led.c
@@ -137,7 +137,7 @@ void ieee80211_led_exit(struct mac80211_local *local)
}
}

-char *__ieee80211_get_radio_led_name(struct ieee80211_hw *hw)
+char *__ieee80211_get_radio_led_name(struct mac80211_hw *hw)
{
struct mac80211_local *local = hw_to_local(hw);

@@ -145,7 +145,7 @@ char *__ieee80211_get_radio_led_name(struct ieee80211_hw *hw)
}
EXPORT_SYMBOL(__ieee80211_get_radio_led_name);

-char *__ieee80211_get_assoc_led_name(struct ieee80211_hw *hw)
+char *__ieee80211_get_assoc_led_name(struct mac80211_hw *hw)
{
struct mac80211_local *local = hw_to_local(hw);

@@ -153,7 +153,7 @@ char *__ieee80211_get_assoc_led_name(struct ieee80211_hw *hw)
}
EXPORT_SYMBOL(__ieee80211_get_assoc_led_name);

-char *__ieee80211_get_tx_led_name(struct ieee80211_hw *hw)
+char *__ieee80211_get_tx_led_name(struct mac80211_hw *hw)
{
struct mac80211_local *local = hw_to_local(hw);

@@ -161,7 +161,7 @@ char *__ieee80211_get_tx_led_name(struct ieee80211_hw *hw)
}
EXPORT_SYMBOL(__ieee80211_get_tx_led_name);

-char *__ieee80211_get_rx_led_name(struct ieee80211_hw *hw)
+char *__ieee80211_get_rx_led_name(struct mac80211_hw *hw)
{
struct mac80211_local *local = hw_to_local(hw);

@@ -215,7 +215,7 @@ static void tpt_trig_timer(unsigned long data)
read_unlock(&tpt_trig->trig.leddev_list_lock);
}

-char *__ieee80211_create_tpt_led_trigger(struct ieee80211_hw *hw,
+char *__ieee80211_create_tpt_led_trigger(struct mac80211_hw *hw,
unsigned int flags,
const struct ieee80211_tpt_blink *blink_table,
unsigned int blink_table_len)
diff --git a/net/mac80211/mac80211_i.h b/net/mac80211/mac80211_i.h
index 413a2db..fb22305 100644
--- a/net/mac80211/mac80211_i.h
+++ b/net/mac80211/mac80211_i.h
@@ -699,7 +699,7 @@ struct mac80211_local {
/* embed the driver visible part.
* don't cast (use the static inlines below), but we keep
* it first anyway so they become a no-op */
- struct ieee80211_hw hw;
+ struct mac80211_hw hw;

const struct ieee80211_ops *ops;

@@ -1058,12 +1058,12 @@ struct ieee802_11_elems {
};

static inline struct mac80211_local *hw_to_local(
- struct ieee80211_hw *hw)
+ struct mac80211_hw *hw)
{
return container_of(hw, struct mac80211_local, hw);
}

-static inline struct ieee80211_hw *local_to_hw(
+static inline struct mac80211_hw *local_to_hw(
struct mac80211_local *local)
{
return &local->hw;
@@ -1269,10 +1269,10 @@ int ieee80211_reconfig(struct mac80211_local *local);
void ieee80211_stop_device(struct mac80211_local *local);

#ifdef CONFIG_PM
-int __ieee80211_suspend(struct ieee80211_hw *hw,
+int __ieee80211_suspend(struct mac80211_hw *hw,
struct cfg80211_wowlan *wowlan);

-static inline int __ieee80211_resume(struct ieee80211_hw *hw)
+static inline int __ieee80211_resume(struct mac80211_hw *hw)
{
struct mac80211_local *local = hw_to_local(hw);

@@ -1283,13 +1283,13 @@ static inline int __ieee80211_resume(struct ieee80211_hw *hw)
return ieee80211_reconfig(hw_to_local(hw));
}
#else
-static inline int __ieee80211_suspend(struct ieee80211_hw *hw,
+static inline int __ieee80211_suspend(struct mac80211_hw *hw,
struct cfg80211_wowlan *wowlan)
{
return 0;
}

-static inline int __ieee80211_resume(struct ieee80211_hw *hw)
+static inline int __ieee80211_resume(struct mac80211_hw *hw)
{
return 0;
}
@@ -1326,13 +1326,13 @@ void ieee80211_sta_tx_notify(struct mac80211_sub_if_data *sdata,
struct ieee80211_hdr *hdr, bool ack);
void ieee80211_beacon_connection_loss_work(struct work_struct *work);

-void ieee80211_wake_queues_by_reason(struct ieee80211_hw *hw,
+void ieee80211_wake_queues_by_reason(struct mac80211_hw *hw,
enum queue_stop_reason reason);
-void ieee80211_stop_queues_by_reason(struct ieee80211_hw *hw,
+void ieee80211_stop_queues_by_reason(struct mac80211_hw *hw,
enum queue_stop_reason reason);
-void ieee80211_wake_queue_by_reason(struct ieee80211_hw *hw, int queue,
+void ieee80211_wake_queue_by_reason(struct mac80211_hw *hw, int queue,
enum queue_stop_reason reason);
-void ieee80211_stop_queue_by_reason(struct ieee80211_hw *hw, int queue,
+void ieee80211_stop_queue_by_reason(struct mac80211_hw *hw, int queue,
enum queue_stop_reason reason);
void ieee80211_add_pending_skb(struct mac80211_local *local,
struct sk_buff *skb);
diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index d9db197..7f03a3e 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -369,7 +369,7 @@ static void ieee80211_restart_work(struct work_struct *work)
rtnl_unlock();
}

-void ieee80211_restart_hw(struct ieee80211_hw *hw)
+void ieee80211_restart_hw(struct mac80211_hw *hw)
{
struct mac80211_local *local = hw_to_local(hw);

@@ -474,7 +474,7 @@ static int ieee80211_napi_poll(struct napi_struct *napi, int budget)
return local->ops->napi_poll(&local->hw, budget);
}

-void ieee80211_napi_schedule(struct ieee80211_hw *hw)
+void ieee80211_napi_schedule(struct mac80211_hw *hw)
{
struct mac80211_local *local = hw_to_local(hw);

@@ -482,7 +482,7 @@ void ieee80211_napi_schedule(struct ieee80211_hw *hw)
}
EXPORT_SYMBOL(ieee80211_napi_schedule);

-void ieee80211_napi_complete(struct ieee80211_hw *hw)
+void ieee80211_napi_complete(struct mac80211_hw *hw)
{
struct mac80211_local *local = hw_to_local(hw);

@@ -546,7 +546,7 @@ ieee80211_default_mgmt_stypes[NUM_NL80211_IFTYPES] = {
},
};

-struct ieee80211_hw *ieee80211_alloc_hw(size_t priv_data_len,
+struct mac80211_hw *ieee80211_alloc_hw(size_t priv_data_len,
const struct ieee80211_ops *ops)
{
struct mac80211_local *local;
@@ -682,7 +682,7 @@ struct ieee80211_hw *ieee80211_alloc_hw(size_t priv_data_len,
}
EXPORT_SYMBOL(ieee80211_alloc_hw);

-int ieee80211_register_hw(struct ieee80211_hw *hw)
+int ieee80211_register_hw(struct mac80211_hw *hw)
{
struct mac80211_local *local = hw_to_local(hw);
int result, i;
@@ -978,7 +978,7 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
}
EXPORT_SYMBOL(ieee80211_register_hw);

-void ieee80211_unregister_hw(struct ieee80211_hw *hw)
+void ieee80211_unregister_hw(struct mac80211_hw *hw)
{
struct mac80211_local *local = hw_to_local(hw);

@@ -1030,7 +1030,7 @@ void ieee80211_unregister_hw(struct ieee80211_hw *hw)
}
EXPORT_SYMBOL(ieee80211_unregister_hw);

-void ieee80211_free_hw(struct ieee80211_hw *hw)
+void ieee80211_free_hw(struct mac80211_hw *hw)
{
struct mac80211_local *local = hw_to_local(hw);

diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index b92dbda..54a9762 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -1277,7 +1277,7 @@ static void ieee80211_mgd_probe_ap(struct mac80211_sub_if_data *sdata,
mutex_unlock(&ifmgd->mtx);
}

-struct sk_buff *ieee80211_ap_probereq_get(struct ieee80211_hw *hw,
+struct sk_buff *ieee80211_ap_probereq_get(struct mac80211_hw *hw,
struct ieee80211_vif *vif)
{
struct mac80211_sub_if_data *sdata = vif_to_sdata(vif);
@@ -1349,7 +1349,7 @@ void ieee80211_beacon_connection_loss_work(struct work_struct *work)
void ieee80211_beacon_loss(struct ieee80211_vif *vif)
{
struct mac80211_sub_if_data *sdata = vif_to_sdata(vif);
- struct ieee80211_hw *hw = &sdata->local->hw;
+ struct mac80211_hw *hw = &sdata->local->hw;

trace_api_beacon_loss(sdata);

@@ -1361,7 +1361,7 @@ EXPORT_SYMBOL(ieee80211_beacon_loss);
void ieee80211_connection_loss(struct ieee80211_vif *vif)
{
struct mac80211_sub_if_data *sdata = vif_to_sdata(vif);
- struct ieee80211_hw *hw = &sdata->local->hw;
+ struct mac80211_hw *hw = &sdata->local->hw;

trace_api_connection_loss(sdata);

diff --git a/net/mac80211/offchannel.c b/net/mac80211/offchannel.c
index 5473d79..9449fcf 100644
--- a/net/mac80211/offchannel.c
+++ b/net/mac80211/offchannel.c
@@ -229,7 +229,7 @@ static void ieee80211_hw_roc_start(struct work_struct *work)
mutex_unlock(&local->mtx);
}

-void ieee80211_ready_on_channel(struct ieee80211_hw *hw)
+void ieee80211_ready_on_channel(struct mac80211_hw *hw)
{
struct mac80211_local *local = hw_to_local(hw);

@@ -266,7 +266,7 @@ static void ieee80211_hw_roc_done(struct work_struct *work)
mutex_unlock(&local->mtx);
}

-void ieee80211_remain_on_channel_expired(struct ieee80211_hw *hw)
+void ieee80211_remain_on_channel_expired(struct mac80211_hw *hw)
{
struct mac80211_local *local = hw_to_local(hw);

diff --git a/net/mac80211/pm.c b/net/mac80211/pm.c
index e41aa9e..f2786f9 100644
--- a/net/mac80211/pm.c
+++ b/net/mac80211/pm.c
@@ -6,7 +6,7 @@
#include "driver-ops.h"
#include "led.h"

-int __ieee80211_suspend(struct ieee80211_hw *hw, struct cfg80211_wowlan *wowlan)
+int __ieee80211_suspend(struct mac80211_hw *hw, struct cfg80211_wowlan *wowlan)
{
struct mac80211_local *local = hw_to_local(hw);
struct mac80211_sub_if_data *sdata;
diff --git a/net/mac80211/rc80211_minstrel.c b/net/mac80211/rc80211_minstrel.c
index ee747f3..4152157 100644
--- a/net/mac80211/rc80211_minstrel.c
+++ b/net/mac80211/rc80211_minstrel.c
@@ -451,7 +451,7 @@ minstrel_alloc_sta(void *priv, struct ieee80211_sta *sta, gfp_t gfp)
struct ieee80211_supported_band *sband;
struct minstrel_sta_info *mi;
struct minstrel_priv *mp = priv;
- struct ieee80211_hw *hw = mp->hw;
+ struct mac80211_hw *hw = mp->hw;
int max_rates = 0;
int i;

@@ -494,7 +494,7 @@ minstrel_free_sta(void *priv, struct ieee80211_sta *sta, void *priv_sta)
}

static void *
-minstrel_alloc(struct ieee80211_hw *hw, struct dentry *debugfsdir)
+minstrel_alloc(struct mac80211_hw *hw, struct dentry *debugfsdir)
{
struct minstrel_priv *mp;

diff --git a/net/mac80211/rc80211_minstrel.h b/net/mac80211/rc80211_minstrel.h
index 0f5a833..3ad117d 100644
--- a/net/mac80211/rc80211_minstrel.h
+++ b/net/mac80211/rc80211_minstrel.h
@@ -68,7 +68,7 @@ struct minstrel_sta_info {
};

struct minstrel_priv {
- struct ieee80211_hw *hw;
+ struct mac80211_hw *hw;
bool has_mrr;
unsigned int cw_min;
unsigned int cw_max;
diff --git a/net/mac80211/rc80211_minstrel_ht.c b/net/mac80211/rc80211_minstrel_ht.c
index d949aaf..eb09bef 100644
--- a/net/mac80211/rc80211_minstrel_ht.c
+++ b/net/mac80211/rc80211_minstrel_ht.c
@@ -777,7 +777,7 @@ minstrel_ht_alloc_sta(void *priv, struct ieee80211_sta *sta, gfp_t gfp)
struct ieee80211_supported_band *sband;
struct minstrel_ht_sta_priv *msp;
struct minstrel_priv *mp = priv;
- struct ieee80211_hw *hw = mp->hw;
+ struct mac80211_hw *hw = mp->hw;
int max_rates = 0;
int i;

@@ -819,7 +819,7 @@ minstrel_ht_free_sta(void *priv, struct ieee80211_sta *sta, void *priv_sta)
}

static void *
-minstrel_ht_alloc(struct ieee80211_hw *hw, struct dentry *debugfsdir)
+minstrel_ht_alloc(struct mac80211_hw *hw, struct dentry *debugfsdir)
{
return mac80211_minstrel.alloc(hw, debugfsdir);
}
diff --git a/net/mac80211/rc80211_pid_algo.c b/net/mac80211/rc80211_pid_algo.c
index aeda654..a0800f0 100644
--- a/net/mac80211/rc80211_pid_algo.c
+++ b/net/mac80211/rc80211_pid_algo.c
@@ -336,7 +336,7 @@ rate_control_pid_rate_init(void *priv, struct ieee80211_supported_band *sband,
spinfo->txrate_idx = rate_lowest_index(sband, sta);
}

-static void *rate_control_pid_alloc(struct ieee80211_hw *hw,
+static void *rate_control_pid_alloc(struct mac80211_hw *hw,
struct dentry *debugfsdir)
{
struct rc_pid_info *pinfo;
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index 3893271..5c5990d 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -546,7 +546,7 @@ static inline u16 seq_sub(u16 sq1, u16 sq2)
}


-static void ieee80211_release_reorder_frame(struct ieee80211_hw *hw,
+static void ieee80211_release_reorder_frame(struct mac80211_hw *hw,
struct tid_ampdu_rx *tid_agg_rx,
int index)
{
@@ -570,7 +570,7 @@ no_frame:
tid_agg_rx->head_seq_num = seq_inc(tid_agg_rx->head_seq_num);
}

-static void ieee80211_release_reorder_frames(struct ieee80211_hw *hw,
+static void ieee80211_release_reorder_frames(struct mac80211_hw *hw,
struct tid_ampdu_rx *tid_agg_rx,
u16 head_seq_num)
{
@@ -596,7 +596,7 @@ static void ieee80211_release_reorder_frames(struct ieee80211_hw *hw,
*/
#define HT_RX_REORDER_BUF_TIMEOUT (HZ / 10)

-static void ieee80211_sta_reorder_release(struct ieee80211_hw *hw,
+static void ieee80211_sta_reorder_release(struct mac80211_hw *hw,
struct tid_ampdu_rx *tid_agg_rx)
{
int index, j;
@@ -669,7 +669,7 @@ static void ieee80211_sta_reorder_release(struct ieee80211_hw *hw,
* rcu_read_lock protection. It returns false if the frame
* can be processed immediately, true if it was consumed.
*/
-static bool ieee80211_sta_manage_reorder_buf(struct ieee80211_hw *hw,
+static bool ieee80211_sta_manage_reorder_buf(struct mac80211_hw *hw,
struct tid_ampdu_rx *tid_agg_rx,
struct sk_buff *skb)
{
@@ -743,7 +743,7 @@ static void ieee80211_rx_reorder_ampdu(struct mac80211_rx_data *rx)
{
struct sk_buff *skb = rx->skb;
struct mac80211_local *local = rx->local;
- struct ieee80211_hw *hw = &local->hw;
+ struct mac80211_hw *hw = &local->hw;
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data;
struct sta_info *sta = rx->sta;
struct tid_ampdu_rx *tid_agg_rx;
@@ -1981,7 +1981,7 @@ static ieee80211_rx_result debug_noinline
ieee80211_rx_h_ctrl(struct mac80211_rx_data *rx)
{
struct mac80211_local *local = rx->local;
- struct ieee80211_hw *hw = &local->hw;
+ struct mac80211_hw *hw = &local->hw;
struct sk_buff *skb = rx->skb;
struct ieee80211_bar *bar = (struct ieee80211_bar *)skb->data;
struct tid_ampdu_rx *tid_agg_rx;
@@ -2737,7 +2737,7 @@ static bool ieee80211_prepare_and_rx_handle(struct mac80211_rx_data *rx,
* This is the actual Rx frames handler. as it blongs to Rx path it must
* be called with rcu_read_lock protection.
*/
-static void __ieee80211_rx_handle_packet(struct ieee80211_hw *hw,
+static void __ieee80211_rx_handle_packet(struct mac80211_hw *hw,
struct sk_buff *skb)
{
struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb);
@@ -2846,7 +2846,7 @@ static void __ieee80211_rx_handle_packet(struct ieee80211_hw *hw,
* This is the receive path handler. It is called by a low level driver when an
* 802.11 MPDU is received from the hardware.
*/
-void ieee80211_rx(struct ieee80211_hw *hw, struct sk_buff *skb)
+void ieee80211_rx(struct mac80211_hw *hw, struct sk_buff *skb)
{
struct mac80211_local *local = hw_to_local(hw);
struct ieee80211_rate *rate = NULL;
@@ -2949,7 +2949,7 @@ EXPORT_SYMBOL(ieee80211_rx);

/* This is a version of the rx handler that can be called from hard irq
* context. Post the skb on the queue and schedule the tasklet */
-void ieee80211_rx_irqsafe(struct ieee80211_hw *hw, struct sk_buff *skb)
+void ieee80211_rx_irqsafe(struct mac80211_hw *hw, struct sk_buff *skb)
{
struct mac80211_local *local = hw_to_local(hw);

diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c
index 284e0cb..225bbd5 100644
--- a/net/mac80211/scan.c
+++ b/net/mac80211/scan.c
@@ -258,7 +258,7 @@ static bool ieee80211_prep_hw_scan(struct mac80211_local *local)
return true;
}

-static void __ieee80211_scan_completed(struct ieee80211_hw *hw, bool aborted,
+static void __ieee80211_scan_completed(struct mac80211_hw *hw, bool aborted,
bool was_hw_scan)
{
struct mac80211_local *local = hw_to_local(hw);
@@ -325,7 +325,7 @@ static void __ieee80211_scan_completed(struct ieee80211_hw *hw, bool aborted,
ieee80211_queue_work(&local->hw, &local->work_work);
}

-void ieee80211_scan_completed(struct ieee80211_hw *hw, bool aborted)
+void ieee80211_scan_completed(struct mac80211_hw *hw, bool aborted)
{
struct mac80211_local *local = hw_to_local(hw);

@@ -931,7 +931,7 @@ out:
return ret;
}

-void ieee80211_sched_scan_results(struct ieee80211_hw *hw)
+void ieee80211_sched_scan_results(struct mac80211_hw *hw)
{
struct mac80211_local *local = hw_to_local(hw);

@@ -965,7 +965,7 @@ void ieee80211_sched_scan_stopped_work(struct work_struct *work)
cfg80211_sched_scan_stopped(local->hw.wiphy);
}

-void ieee80211_sched_scan_stopped(struct ieee80211_hw *hw)
+void ieee80211_sched_scan_stopped(struct mac80211_hw *hw)
{
struct mac80211_local *local = hw_to_local(hw);

diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c
index a6b187d..866a0da 100644
--- a/net/mac80211/sta_info.c
+++ b/net/mac80211/sta_info.c
@@ -844,7 +844,7 @@ void ieee80211_sta_expire(struct mac80211_sub_if_data *sdata,
mutex_unlock(&local->sta_mtx);
}

-struct ieee80211_sta *ieee80211_find_sta_by_ifaddr(struct ieee80211_hw *hw,
+struct ieee80211_sta *ieee80211_find_sta_by_ifaddr(struct mac80211_hw *hw,
const u8 *addr,
const u8 *localaddr)
{
@@ -980,7 +980,7 @@ void ieee80211_sta_ps_deliver_poll_response(struct sta_info *sta)
}
}

-void ieee80211_sta_block_awake(struct ieee80211_hw *hw,
+void ieee80211_sta_block_awake(struct mac80211_hw *hw,
struct ieee80211_sta *pubsta, bool block)
{
struct sta_info *sta = container_of(pubsta, struct sta_info, sta);
diff --git a/net/mac80211/status.c b/net/mac80211/status.c
index 37c886d..919d648 100644
--- a/net/mac80211/status.c
+++ b/net/mac80211/status.c
@@ -16,7 +16,7 @@
#include "led.h"


-void ieee80211_tx_status_irqsafe(struct ieee80211_hw *hw,
+void ieee80211_tx_status_irqsafe(struct mac80211_hw *hw,
struct sk_buff *skb)
{
struct mac80211_local *local = hw_to_local(hw);
@@ -170,7 +170,7 @@ static void ieee80211_frame_acked(struct sta_info *sta, struct sk_buff *skb)
*/
#define STA_LOST_PKT_THRESHOLD 50

-void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb)
+void ieee80211_tx_status(struct mac80211_hw *hw, struct sk_buff *skb)
{
struct sk_buff *skb2;
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data;
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 8633f30..9aa1c22 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -2157,7 +2157,7 @@ static void ieee80211_beacon_add_tim(struct mac80211_if_ap *bss,
}
}

-struct sk_buff *ieee80211_beacon_get_tim(struct ieee80211_hw *hw,
+struct sk_buff *ieee80211_beacon_get_tim(struct mac80211_hw *hw,
struct ieee80211_vif *vif,
u16 *tim_offset, u16 *tim_length)
{
@@ -2314,7 +2314,7 @@ struct sk_buff *ieee80211_beacon_get_tim(struct ieee80211_hw *hw,
}
EXPORT_SYMBOL(ieee80211_beacon_get_tim);

-struct sk_buff *ieee80211_pspoll_get(struct ieee80211_hw *hw,
+struct sk_buff *ieee80211_pspoll_get(struct mac80211_hw *hw,
struct ieee80211_vif *vif)
{
struct mac80211_sub_if_data *sdata;
@@ -2354,7 +2354,7 @@ struct sk_buff *ieee80211_pspoll_get(struct ieee80211_hw *hw,
}
EXPORT_SYMBOL(ieee80211_pspoll_get);

-struct sk_buff *ieee80211_nullfunc_get(struct ieee80211_hw *hw,
+struct sk_buff *ieee80211_nullfunc_get(struct mac80211_hw *hw,
struct ieee80211_vif *vif)
{
struct ieee80211_hdr_3addr *nullfunc;
@@ -2392,7 +2392,7 @@ struct sk_buff *ieee80211_nullfunc_get(struct ieee80211_hw *hw,
}
EXPORT_SYMBOL(ieee80211_nullfunc_get);

-struct sk_buff *ieee80211_probereq_get(struct ieee80211_hw *hw,
+struct sk_buff *ieee80211_probereq_get(struct mac80211_hw *hw,
struct ieee80211_vif *vif,
const u8 *ssid, size_t ssid_len,
const u8 *ie, size_t ie_len)
@@ -2442,7 +2442,7 @@ struct sk_buff *ieee80211_probereq_get(struct ieee80211_hw *hw,
}
EXPORT_SYMBOL(ieee80211_probereq_get);

-void ieee80211_rts_get(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
+void ieee80211_rts_get(struct mac80211_hw *hw, struct ieee80211_vif *vif,
const void *frame, size_t frame_len,
const struct ieee80211_tx_info *frame_txctl,
struct ieee80211_rts *rts)
@@ -2458,7 +2458,7 @@ void ieee80211_rts_get(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
}
EXPORT_SYMBOL(ieee80211_rts_get);

-void ieee80211_ctstoself_get(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
+void ieee80211_ctstoself_get(struct mac80211_hw *hw, struct ieee80211_vif *vif,
const void *frame, size_t frame_len,
const struct ieee80211_tx_info *frame_txctl,
struct ieee80211_cts *cts)
@@ -2474,7 +2474,7 @@ void ieee80211_ctstoself_get(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
EXPORT_SYMBOL(ieee80211_ctstoself_get);

struct sk_buff *
-ieee80211_get_buffered_bc(struct ieee80211_hw *hw,
+ieee80211_get_buffered_bc(struct mac80211_hw *hw,
struct ieee80211_vif *vif)
{
struct mac80211_local *local = hw_to_local(hw);
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index 65b0367..b9a83d0 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -35,7 +35,7 @@
/* privid for wiphys to determine whether they belong to us or not */
void *mac80211_wiphy_privid = &mac80211_wiphy_privid;

-struct ieee80211_hw *wiphy_to_ieee80211_hw(struct wiphy *wiphy)
+struct mac80211_hw *wiphy_to_mac80211_hw(struct wiphy *wiphy)
{
struct mac80211_local *local;
BUG_ON(!wiphy);
@@ -43,7 +43,7 @@ struct ieee80211_hw *wiphy_to_ieee80211_hw(struct wiphy *wiphy)
local = wiphy_priv(wiphy);
return &local->hw;
}
-EXPORT_SYMBOL(wiphy_to_ieee80211_hw);
+EXPORT_SYMBOL(wiphy_to_mac80211_hw);

u8 *ieee80211_get_bssid(struct ieee80211_hdr *hdr, size_t len,
enum nl80211_iftype type)
@@ -159,7 +159,7 @@ int ieee80211_frame_duration(struct mac80211_local *local, size_t len,
}

/* Exported duration function for driver use */
-__le16 ieee80211_generic_frame_duration(struct ieee80211_hw *hw,
+__le16 ieee80211_generic_frame_duration(struct mac80211_hw *hw,
struct ieee80211_vif *vif,
size_t frame_len,
struct ieee80211_rate *rate)
@@ -185,7 +185,7 @@ __le16 ieee80211_generic_frame_duration(struct ieee80211_hw *hw,
}
EXPORT_SYMBOL(ieee80211_generic_frame_duration);

-__le16 ieee80211_rts_duration(struct ieee80211_hw *hw,
+__le16 ieee80211_rts_duration(struct mac80211_hw *hw,
struct ieee80211_vif *vif, size_t frame_len,
const struct ieee80211_tx_info *frame_txctl)
{
@@ -225,7 +225,7 @@ __le16 ieee80211_rts_duration(struct ieee80211_hw *hw,
}
EXPORT_SYMBOL(ieee80211_rts_duration);

-__le16 ieee80211_ctstoself_duration(struct ieee80211_hw *hw,
+__le16 ieee80211_ctstoself_duration(struct mac80211_hw *hw,
struct ieee80211_vif *vif,
size_t frame_len,
const struct ieee80211_tx_info *frame_txctl)
@@ -264,7 +264,7 @@ __le16 ieee80211_ctstoself_duration(struct ieee80211_hw *hw,
}
EXPORT_SYMBOL(ieee80211_ctstoself_duration);

-static void __ieee80211_wake_queue(struct ieee80211_hw *hw, int queue,
+static void __ieee80211_wake_queue(struct mac80211_hw *hw, int queue,
enum queue_stop_reason reason)
{
struct mac80211_local *local = hw_to_local(hw);
@@ -293,7 +293,7 @@ static void __ieee80211_wake_queue(struct ieee80211_hw *hw, int queue,
tasklet_schedule(&local->tx_pending_tasklet);
}

-void ieee80211_wake_queue_by_reason(struct ieee80211_hw *hw, int queue,
+void ieee80211_wake_queue_by_reason(struct mac80211_hw *hw, int queue,
enum queue_stop_reason reason)
{
struct mac80211_local *local = hw_to_local(hw);
@@ -304,14 +304,14 @@ void ieee80211_wake_queue_by_reason(struct ieee80211_hw *hw, int queue,
spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags);
}

-void ieee80211_wake_queue(struct ieee80211_hw *hw, int queue)
+void ieee80211_wake_queue(struct mac80211_hw *hw, int queue)
{
ieee80211_wake_queue_by_reason(hw, queue,
MAC80211_QUEUE_STOP_REASON_DRIVER);
}
EXPORT_SYMBOL(ieee80211_wake_queue);

-static void __ieee80211_stop_queue(struct ieee80211_hw *hw, int queue,
+static void __ieee80211_stop_queue(struct mac80211_hw *hw, int queue,
enum queue_stop_reason reason)
{
struct mac80211_local *local = hw_to_local(hw);
@@ -330,7 +330,7 @@ static void __ieee80211_stop_queue(struct ieee80211_hw *hw, int queue,
rcu_read_unlock();
}

-void ieee80211_stop_queue_by_reason(struct ieee80211_hw *hw, int queue,
+void ieee80211_stop_queue_by_reason(struct mac80211_hw *hw, int queue,
enum queue_stop_reason reason)
{
struct mac80211_local *local = hw_to_local(hw);
@@ -341,7 +341,7 @@ void ieee80211_stop_queue_by_reason(struct ieee80211_hw *hw, int queue,
spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags);
}

-void ieee80211_stop_queue(struct ieee80211_hw *hw, int queue)
+void ieee80211_stop_queue(struct mac80211_hw *hw, int queue)
{
ieee80211_stop_queue_by_reason(hw, queue,
MAC80211_QUEUE_STOP_REASON_DRIVER);
@@ -351,7 +351,7 @@ EXPORT_SYMBOL(ieee80211_stop_queue);
void ieee80211_add_pending_skb(struct mac80211_local *local,
struct sk_buff *skb)
{
- struct ieee80211_hw *hw = &local->hw;
+ struct mac80211_hw *hw = &local->hw;
unsigned long flags;
int queue = skb_get_queue_mapping(skb);
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
@@ -372,7 +372,7 @@ int ieee80211_add_pending_skbs_fn(struct mac80211_local *local,
struct sk_buff_head *skbs,
void (*fn)(void *data), void *data)
{
- struct ieee80211_hw *hw = &local->hw;
+ struct mac80211_hw *hw = &local->hw;
struct sk_buff *skb;
unsigned long flags;
int queue, ret = 0, i;
@@ -412,7 +412,7 @@ int ieee80211_add_pending_skbs(struct mac80211_local *local,
return ieee80211_add_pending_skbs_fn(local, skbs, NULL, NULL);
}

-void ieee80211_stop_queues_by_reason(struct ieee80211_hw *hw,
+void ieee80211_stop_queues_by_reason(struct mac80211_hw *hw,
enum queue_stop_reason reason)
{
struct mac80211_local *local = hw_to_local(hw);
@@ -427,14 +427,14 @@ void ieee80211_stop_queues_by_reason(struct ieee80211_hw *hw,
spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags);
}

-void ieee80211_stop_queues(struct ieee80211_hw *hw)
+void ieee80211_stop_queues(struct mac80211_hw *hw)
{
ieee80211_stop_queues_by_reason(hw,
MAC80211_QUEUE_STOP_REASON_DRIVER);
}
EXPORT_SYMBOL(ieee80211_stop_queues);

-int ieee80211_queue_stopped(struct ieee80211_hw *hw, int queue)
+int ieee80211_queue_stopped(struct mac80211_hw *hw, int queue)
{
struct mac80211_local *local = hw_to_local(hw);
unsigned long flags;
@@ -450,7 +450,7 @@ int ieee80211_queue_stopped(struct ieee80211_hw *hw, int queue)
}
EXPORT_SYMBOL(ieee80211_queue_stopped);

-void ieee80211_wake_queues_by_reason(struct ieee80211_hw *hw,
+void ieee80211_wake_queues_by_reason(struct mac80211_hw *hw,
enum queue_stop_reason reason)
{
struct mac80211_local *local = hw_to_local(hw);
@@ -465,14 +465,14 @@ void ieee80211_wake_queues_by_reason(struct ieee80211_hw *hw,
spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags);
}

-void ieee80211_wake_queues(struct ieee80211_hw *hw)
+void ieee80211_wake_queues(struct mac80211_hw *hw)
{
ieee80211_wake_queues_by_reason(hw, MAC80211_QUEUE_STOP_REASON_DRIVER);
}
EXPORT_SYMBOL(ieee80211_wake_queues);

void ieee80211_iterate_active_interfaces(
- struct ieee80211_hw *hw,
+ struct mac80211_hw *hw,
void (*iterator)(void *data, u8 *mac,
struct ieee80211_vif *vif),
void *data)
@@ -500,7 +500,7 @@ void ieee80211_iterate_active_interfaces(
EXPORT_SYMBOL_GPL(ieee80211_iterate_active_interfaces);

void ieee80211_iterate_active_interfaces_atomic(
- struct ieee80211_hw *hw,
+ struct mac80211_hw *hw,
void (*iterator)(void *data, u8 *mac,
struct ieee80211_vif *vif),
void *data)
@@ -543,7 +543,7 @@ static bool ieee80211_can_queue_work(struct mac80211_local *local)
return true;
}

-void ieee80211_queue_work(struct ieee80211_hw *hw, struct work_struct *work)
+void ieee80211_queue_work(struct mac80211_hw *hw, struct work_struct *work)
{
struct mac80211_local *local = hw_to_local(hw);

@@ -554,7 +554,7 @@ void ieee80211_queue_work(struct ieee80211_hw *hw, struct work_struct *work)
}
EXPORT_SYMBOL(ieee80211_queue_work);

-void ieee80211_queue_delayed_work(struct ieee80211_hw *hw,
+void ieee80211_queue_delayed_work(struct mac80211_hw *hw,
struct delayed_work *dwork,
unsigned long delay)
{
@@ -1120,7 +1120,7 @@ void ieee80211_stop_device(struct mac80211_local *local)

int ieee80211_reconfig(struct mac80211_local *local)
{
- struct ieee80211_hw *hw = &local->hw;
+ struct mac80211_hw *hw = &local->hw;
struct mac80211_sub_if_data *sdata;
struct sta_info *sta;
int res;


2011-05-31 17:46:32

by Walter Goldens

[permalink] [raw]
Subject: Re: [RFC PATCH 03/27] zd1211rw: include mac80211.h from zd_chip.h


> >> Date: Sunday, May 29, 2011, 11:04 PM
> >> zd_chip.h contains one function with
> >> a pointer to ieee80211_hw but doesn't
> >> include mac80211.h. As a temporary solution
> include
> >> mac80211.h to avoid
> >> a warning.
> >
> > I'm still getting a warning with this patch. I think
> this happened when Jussi fixed some stuff awhile back.
> >
> > In function ‘zd_mac_alloc_hw’:
> > drivers/net/wireless/zd1211rw/zd_mac.c:1340:7:
> warning: statement with no effect
>
> Hm.. I'm not getting this with wireless-testing.
>

Ubuntu's default kernels 2.6.35 and .38 exhibit this warning when compiling compat-wireless. If my memory serves me right, the warning began to occur right after you've submitted a patch to rename CR* marcos to ZD_CR*.

Walter

2011-05-31 08:01:52

by Walter Goldens

[permalink] [raw]
Subject: Re: [RFC PATCH 03/27] zd1211rw: include mac80211.h from zd_chip.h


> Date: Sunday, May 29, 2011, 11:04 PM
> zd_chip.h contains one function with
> a pointer to ieee80211_hw but doesn't
> include mac80211.h. As a temporary solution include
> mac80211.h to avoid
> a warning.

I'm still getting a warning with this patch. I think this happened when Jussi fixed some stuff awhile back.

In function ‘zd_mac_alloc_hw’:
drivers/net/wireless/zd1211rw/zd_mac.c:1340:7: warning: statement with no effect

Walter

2011-06-04 08:16:24

by Walter Goldens

[permalink] [raw]
Subject: Re: [RFC PATCH 03/27] zd1211rw: include mac80211.h from zd_chip.h


> >
> >> >> Date: Sunday, May 29, 2011, 11:04 PM
> >> >> zd_chip.h contains one function with
> >> >> a pointer to ieee80211_hw but doesn't
> >> >> include mac80211.h. As a temporary
> solution
> >> include
> >> >> mac80211.h to avoid
> >> >> a warning.
> >> >
> >> > I'm still getting a warning with this patch.
> I think
> >> this happened when Jussi fixed some stuff awhile
> back.
> >> >
> >> > In function ‘zd_mac_alloc_hw’:
> >> >
> drivers/net/wireless/zd1211rw/zd_mac.c:1340:7:
> >> warning: statement with no effect
> >>
> >> Hm.. I'm not getting this with wireless-testing.
> >>
> >
> > Ubuntu's default kernels 2.6.35 and .38 exhibit this
> warning when compiling compat-wireless. If my memory serves
> me right, the warning began to occur right after you've
> submitted a patch to rename CR* marcos to ZD_CR*.
>
> Compiled compat-wireless-2011-05-30 on Ubuntu 11.04, 64bit:
> 2.6.38-8-generic & 2.6.38-8-server and 32bit:
> 2.6.38-8-generic & 2.6.38-8-generic-pae. No warnings at
> zd1211rw at all. (?)
>

Apologies for the delay. It appears I may have applied an injection patch to the zd1211rw which resulted in the warning reported above. Unfortunately, the zd1211rw does monitor, but will not inject outright.

Walter