aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/spectmgmt.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211/spectmgmt.c')
-rw-r--r--net/mac80211/spectmgmt.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/net/mac80211/spectmgmt.c b/net/mac80211/spectmgmt.c
index 47bb2aed2813..5f7a2624ed74 100644
--- a/net/mac80211/spectmgmt.c
+++ b/net/mac80211/spectmgmt.c
@@ -88,16 +88,16 @@ void ieee80211_process_measurement_req(struct ieee80211_sub_if_data *sdata,
88void ieee80211_chswitch_work(struct work_struct *work) 88void ieee80211_chswitch_work(struct work_struct *work)
89{ 89{
90 struct ieee80211_sub_if_data *sdata = 90 struct ieee80211_sub_if_data *sdata =
91 container_of(work, struct ieee80211_sub_if_data, u.sta.chswitch_work); 91 container_of(work, struct ieee80211_sub_if_data, u.mgd.chswitch_work);
92 struct ieee80211_bss *bss; 92 struct ieee80211_bss *bss;
93 struct ieee80211_if_sta *ifsta = &sdata->u.sta; 93 struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
94 94
95 if (!netif_running(sdata->dev)) 95 if (!netif_running(sdata->dev))
96 return; 96 return;
97 97
98 bss = ieee80211_rx_bss_get(sdata->local, ifsta->bssid, 98 bss = ieee80211_rx_bss_get(sdata->local, ifmgd->bssid,
99 sdata->local->hw.conf.channel->center_freq, 99 sdata->local->hw.conf.channel->center_freq,
100 ifsta->ssid, ifsta->ssid_len); 100 ifmgd->ssid, ifmgd->ssid_len);
101 if (!bss) 101 if (!bss)
102 goto exit; 102 goto exit;
103 103
@@ -108,7 +108,7 @@ void ieee80211_chswitch_work(struct work_struct *work)
108 108
109 ieee80211_rx_bss_put(sdata->local, bss); 109 ieee80211_rx_bss_put(sdata->local, bss);
110exit: 110exit:
111 ifsta->flags &= ~IEEE80211_STA_CSA_RECEIVED; 111 ifmgd->flags &= ~IEEE80211_STA_CSA_RECEIVED;
112 ieee80211_wake_queues_by_reason(&sdata->local->hw, 112 ieee80211_wake_queues_by_reason(&sdata->local->hw,
113 IEEE80211_QUEUE_STOP_REASON_CSA); 113 IEEE80211_QUEUE_STOP_REASON_CSA);
114} 114}
@@ -117,9 +117,9 @@ void ieee80211_chswitch_timer(unsigned long data)
117{ 117{
118 struct ieee80211_sub_if_data *sdata = 118 struct ieee80211_sub_if_data *sdata =
119 (struct ieee80211_sub_if_data *) data; 119 (struct ieee80211_sub_if_data *) data;
120 struct ieee80211_if_sta *ifsta = &sdata->u.sta; 120 struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
121 121
122 queue_work(sdata->local->hw.workqueue, &ifsta->chswitch_work); 122 queue_work(sdata->local->hw.workqueue, &ifmgd->chswitch_work);
123} 123}
124 124
125void ieee80211_process_chanswitch(struct ieee80211_sub_if_data *sdata, 125void ieee80211_process_chanswitch(struct ieee80211_sub_if_data *sdata,
@@ -127,14 +127,14 @@ void ieee80211_process_chanswitch(struct ieee80211_sub_if_data *sdata,
127 struct ieee80211_bss *bss) 127 struct ieee80211_bss *bss)
128{ 128{
129 struct ieee80211_channel *new_ch; 129 struct ieee80211_channel *new_ch;
130 struct ieee80211_if_sta *ifsta = &sdata->u.sta; 130 struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
131 int new_freq = ieee80211_channel_to_frequency(sw_elem->new_ch_num); 131 int new_freq = ieee80211_channel_to_frequency(sw_elem->new_ch_num);
132 132
133 /* FIXME: Handle ADHOC later */ 133 /* FIXME: Handle ADHOC later */
134 if (sdata->vif.type != NL80211_IFTYPE_STATION) 134 if (sdata->vif.type != NL80211_IFTYPE_STATION)
135 return; 135 return;
136 136
137 if (ifsta->state != IEEE80211_STA_MLME_ASSOCIATED) 137 if (ifmgd->state != IEEE80211_STA_MLME_ASSOCIATED)
138 return; 138 return;
139 139
140 if (sdata->local->sw_scanning || sdata->local->hw_scanning) 140 if (sdata->local->sw_scanning || sdata->local->hw_scanning)
@@ -143,7 +143,7 @@ void ieee80211_process_chanswitch(struct ieee80211_sub_if_data *sdata,
143 /* Disregard subsequent beacons if we are already running a timer 143 /* Disregard subsequent beacons if we are already running a timer
144 processing a CSA */ 144 processing a CSA */
145 145
146 if (ifsta->flags & IEEE80211_STA_CSA_RECEIVED) 146 if (ifmgd->flags & IEEE80211_STA_CSA_RECEIVED)
147 return; 147 return;
148 148
149 new_ch = ieee80211_get_channel(sdata->local->hw.wiphy, new_freq); 149 new_ch = ieee80211_get_channel(sdata->local->hw.wiphy, new_freq);
@@ -153,12 +153,12 @@ void ieee80211_process_chanswitch(struct ieee80211_sub_if_data *sdata,
153 sdata->local->csa_channel = new_ch; 153 sdata->local->csa_channel = new_ch;
154 154
155 if (sw_elem->count <= 1) { 155 if (sw_elem->count <= 1) {
156 queue_work(sdata->local->hw.workqueue, &ifsta->chswitch_work); 156 queue_work(sdata->local->hw.workqueue, &ifmgd->chswitch_work);
157 } else { 157 } else {
158 ieee80211_stop_queues_by_reason(&sdata->local->hw, 158 ieee80211_stop_queues_by_reason(&sdata->local->hw,
159 IEEE80211_QUEUE_STOP_REASON_CSA); 159 IEEE80211_QUEUE_STOP_REASON_CSA);
160 ifsta->flags |= IEEE80211_STA_CSA_RECEIVED; 160 ifmgd->flags |= IEEE80211_STA_CSA_RECEIVED;
161 mod_timer(&ifsta->chswitch_timer, 161 mod_timer(&ifmgd->chswitch_timer,
162 jiffies + 162 jiffies +
163 msecs_to_jiffies(sw_elem->count * 163 msecs_to_jiffies(sw_elem->count *
164 bss->cbss.beacon_interval)); 164 bss->cbss.beacon_interval));