aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/ieee80211_i.h2
-rw-r--r--net/mac80211/mlme.c2
-rw-r--r--net/mac80211/offchannel.c21
-rw-r--r--net/mac80211/rx.c20
-rw-r--r--net/mac80211/scan.c2
-rw-r--r--net/mac80211/sta_info.c5
-rw-r--r--net/mac80211/util.c19
7 files changed, 19 insertions, 52 deletions
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index c3f3e431a573..2f0642d9e154 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -1221,8 +1221,6 @@ int ieee80211_request_sched_scan_stop(struct ieee80211_sub_if_data *sdata);
1221void ieee80211_sched_scan_stopped_work(struct work_struct *work); 1221void ieee80211_sched_scan_stopped_work(struct work_struct *work);
1222 1222
1223/* off-channel helpers */ 1223/* off-channel helpers */
1224void ieee80211_offchannel_enable_all_ps(struct ieee80211_local *local,
1225 bool tell_ap);
1226void ieee80211_offchannel_stop_vifs(struct ieee80211_local *local, 1224void ieee80211_offchannel_stop_vifs(struct ieee80211_local *local,
1227 bool offchannel_ps_enable); 1225 bool offchannel_ps_enable);
1228void ieee80211_offchannel_return(struct ieee80211_local *local, 1226void ieee80211_offchannel_return(struct ieee80211_local *local,
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 57989a046fca..ecb4c84c1bb3 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -1385,9 +1385,11 @@ void ieee80211_beacon_connection_loss_work(struct work_struct *work)
1385 struct sta_info *sta; 1385 struct sta_info *sta;
1386 1386
1387 if (ifmgd->associated) { 1387 if (ifmgd->associated) {
1388 rcu_read_lock();
1388 sta = sta_info_get(sdata, ifmgd->bssid); 1389 sta = sta_info_get(sdata, ifmgd->bssid);
1389 if (sta) 1390 if (sta)
1390 sta->beacon_loss_count++; 1391 sta->beacon_loss_count++;
1392 rcu_read_unlock();
1391 } 1393 }
1392 1394
1393 if (sdata->local->hw.flags & IEEE80211_HW_CONNECTION_MONITOR) 1395 if (sdata->local->hw.flags & IEEE80211_HW_CONNECTION_MONITOR)
diff --git a/net/mac80211/offchannel.c b/net/mac80211/offchannel.c
index e4330d843575..f054e94901a2 100644
--- a/net/mac80211/offchannel.c
+++ b/net/mac80211/offchannel.c
@@ -138,23 +138,6 @@ void ieee80211_offchannel_stop_vifs(struct ieee80211_local *local,
138 mutex_unlock(&local->iflist_mtx); 138 mutex_unlock(&local->iflist_mtx);
139} 139}
140 140
141void ieee80211_offchannel_enable_all_ps(struct ieee80211_local *local,
142 bool tell_ap)
143{
144 struct ieee80211_sub_if_data *sdata;
145
146 mutex_lock(&local->iflist_mtx);
147 list_for_each_entry(sdata, &local->interfaces, list) {
148 if (!ieee80211_sdata_running(sdata))
149 continue;
150
151 if (sdata->vif.type == NL80211_IFTYPE_STATION &&
152 sdata->u.mgd.associated)
153 ieee80211_offchannel_ps_enable(sdata, tell_ap);
154 }
155 mutex_unlock(&local->iflist_mtx);
156}
157
158void ieee80211_offchannel_return(struct ieee80211_local *local, 141void ieee80211_offchannel_return(struct ieee80211_local *local,
159 bool offchannel_ps_disable) 142 bool offchannel_ps_disable)
160{ 143{
@@ -162,6 +145,9 @@ void ieee80211_offchannel_return(struct ieee80211_local *local,
162 145
163 mutex_lock(&local->iflist_mtx); 146 mutex_lock(&local->iflist_mtx);
164 list_for_each_entry(sdata, &local->interfaces, list) { 147 list_for_each_entry(sdata, &local->interfaces, list) {
148 if (sdata->vif.type != NL80211_IFTYPE_MONITOR)
149 clear_bit(SDATA_STATE_OFFCHANNEL, &sdata->state);
150
165 if (!ieee80211_sdata_running(sdata)) 151 if (!ieee80211_sdata_running(sdata))
166 continue; 152 continue;
167 153
@@ -173,7 +159,6 @@ void ieee80211_offchannel_return(struct ieee80211_local *local,
173 } 159 }
174 160
175 if (sdata->vif.type != NL80211_IFTYPE_MONITOR) { 161 if (sdata->vif.type != NL80211_IFTYPE_MONITOR) {
176 clear_bit(SDATA_STATE_OFFCHANNEL, &sdata->state);
177 /* 162 /*
178 * This may wake up queues even though the driver 163 * This may wake up queues even though the driver
179 * currently has them stopped. This is not very 164 * currently has them stopped. This is not very
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index 59f124c58333..f407427c642f 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -1576,25 +1576,6 @@ ieee80211_rx_h_defragment(struct ieee80211_rx_data *rx)
1576 return RX_CONTINUE; 1576 return RX_CONTINUE;
1577} 1577}
1578 1578
1579static ieee80211_rx_result debug_noinline
1580ieee80211_rx_h_remove_qos_control(struct ieee80211_rx_data *rx)
1581{
1582 u8 *data = rx->skb->data;
1583 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)data;
1584
1585 if (!ieee80211_is_data_qos(hdr->frame_control))
1586 return RX_CONTINUE;
1587
1588 /* remove the qos control field, update frame type and meta-data */
1589 memmove(data + IEEE80211_QOS_CTL_LEN, data,
1590 ieee80211_hdrlen(hdr->frame_control) - IEEE80211_QOS_CTL_LEN);
1591 hdr = (struct ieee80211_hdr *)skb_pull(rx->skb, IEEE80211_QOS_CTL_LEN);
1592 /* change frame type to non QOS */
1593 hdr->frame_control &= ~cpu_to_le16(IEEE80211_STYPE_QOS_DATA);
1594
1595 return RX_CONTINUE;
1596}
1597
1598static int 1579static int
1599ieee80211_802_1x_port_control(struct ieee80211_rx_data *rx) 1580ieee80211_802_1x_port_control(struct ieee80211_rx_data *rx)
1600{ 1581{
@@ -2718,7 +2699,6 @@ static void ieee80211_rx_handlers(struct ieee80211_rx_data *rx)
2718 if (ieee80211_vif_is_mesh(&rx->sdata->vif)) 2699 if (ieee80211_vif_is_mesh(&rx->sdata->vif))
2719 CALL_RXH(ieee80211_rx_h_mesh_fwding); 2700 CALL_RXH(ieee80211_rx_h_mesh_fwding);
2720#endif 2701#endif
2721 CALL_RXH(ieee80211_rx_h_remove_qos_control)
2722 CALL_RXH(ieee80211_rx_h_amsdu) 2702 CALL_RXH(ieee80211_rx_h_amsdu)
2723 CALL_RXH(ieee80211_rx_h_data) 2703 CALL_RXH(ieee80211_rx_h_data)
2724 CALL_RXH(ieee80211_rx_h_ctrl); 2704 CALL_RXH(ieee80211_rx_h_ctrl);
diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c
index 2c9b493af249..9270771702fe 100644
--- a/net/mac80211/scan.c
+++ b/net/mac80211/scan.c
@@ -625,7 +625,7 @@ static void ieee80211_scan_state_resume(struct ieee80211_local *local,
625 local->leave_oper_channel_time = jiffies; 625 local->leave_oper_channel_time = jiffies;
626 626
627 /* advance to the next channel to be scanned */ 627 /* advance to the next channel to be scanned */
628 local->next_scan_state = SCAN_DECISION; 628 local->next_scan_state = SCAN_SET_CHANNEL;
629} 629}
630 630
631void ieee80211_scan_work(struct work_struct *work) 631void ieee80211_scan_work(struct work_struct *work)
diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c
index f0d3b483dabd..b197136aea2c 100644
--- a/net/mac80211/sta_info.c
+++ b/net/mac80211/sta_info.c
@@ -945,7 +945,8 @@ void ieee80211_sta_expire(struct ieee80211_sub_if_data *sdata,
945 struct sta_info *sta, *tmp; 945 struct sta_info *sta, *tmp;
946 946
947 mutex_lock(&local->sta_mtx); 947 mutex_lock(&local->sta_mtx);
948 list_for_each_entry_safe(sta, tmp, &local->sta_list, list) 948
949 list_for_each_entry_safe(sta, tmp, &local->sta_list, list) {
949 if (sdata != sta->sdata) 950 if (sdata != sta->sdata)
950 continue; 951 continue;
951 952
@@ -956,6 +957,8 @@ void ieee80211_sta_expire(struct ieee80211_sub_if_data *sdata,
956#endif 957#endif
957 WARN_ON(__sta_info_destroy(sta)); 958 WARN_ON(__sta_info_destroy(sta));
958 } 959 }
960 }
961
959 mutex_unlock(&local->sta_mtx); 962 mutex_unlock(&local->sta_mtx);
960} 963}
961 964
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index eb1a5f737a9c..9919892575f4 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -1142,16 +1142,6 @@ int ieee80211_reconfig(struct ieee80211_local *local)
1142 */ 1142 */
1143 } 1143 }
1144#endif 1144#endif
1145
1146 /* setup fragmentation threshold */
1147 drv_set_frag_threshold(local, hw->wiphy->frag_threshold);
1148
1149 /* setup RTS threshold */
1150 drv_set_rts_threshold(local, hw->wiphy->rts_threshold);
1151
1152 /* reset coverage class */
1153 drv_set_coverage_class(local, hw->wiphy->coverage_class);
1154
1155 /* everything else happens only if HW was up & running */ 1145 /* everything else happens only if HW was up & running */
1156 if (!local->open_count) 1146 if (!local->open_count)
1157 goto wake_up; 1147 goto wake_up;
@@ -1170,6 +1160,15 @@ int ieee80211_reconfig(struct ieee80211_local *local)
1170 return res; 1160 return res;
1171 } 1161 }
1172 1162
1163 /* setup fragmentation threshold */
1164 drv_set_frag_threshold(local, hw->wiphy->frag_threshold);
1165
1166 /* setup RTS threshold */
1167 drv_set_rts_threshold(local, hw->wiphy->rts_threshold);
1168
1169 /* reset coverage class */
1170 drv_set_coverage_class(local, hw->wiphy->coverage_class);
1171
1173 ieee80211_led_radio(local, true); 1172 ieee80211_led_radio(local, true);
1174 ieee80211_mod_tpt_led_trig(local, 1173 ieee80211_mod_tpt_led_trig(local,
1175 IEEE80211_TPT_LEDTRIG_FL_RADIO, 0); 1174 IEEE80211_TPT_LEDTRIG_FL_RADIO, 0);