2012-06-18 01:26:36 +00:00
|
|
|
--- a/net/mac80211/agg-rx.c
|
|
|
|
+++ b/net/mac80211/agg-rx.c
|
2012-07-10 00:21:25 +00:00
|
|
|
@@ -203,6 +203,8 @@ static void ieee80211_send_addba_resp(st
|
2011-05-31 23:07:29 +00:00
|
|
|
memcpy(mgmt->bssid, sdata->u.mgd.bssid, ETH_ALEN);
|
2012-02-07 11:28:11 +00:00
|
|
|
else if (sdata->vif.type == NL80211_IFTYPE_ADHOC)
|
|
|
|
memcpy(mgmt->bssid, sdata->u.ibss.bssid, ETH_ALEN);
|
2011-12-05 14:20:17 +00:00
|
|
|
+ else if (sdata->vif.type == NL80211_IFTYPE_WDS)
|
|
|
|
+ memcpy(mgmt->bssid, da, ETH_ALEN);
|
2011-05-31 23:07:29 +00:00
|
|
|
|
|
|
|
mgmt->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT |
|
|
|
|
IEEE80211_STYPE_ACTION);
|
|
|
|
--- a/net/mac80211/agg-tx.c
|
|
|
|
+++ b/net/mac80211/agg-tx.c
|
2012-02-07 11:28:11 +00:00
|
|
|
@@ -81,7 +81,8 @@ static void ieee80211_send_addba_request
|
2011-05-31 23:07:29 +00:00
|
|
|
memcpy(mgmt->sa, sdata->vif.addr, ETH_ALEN);
|
|
|
|
if (sdata->vif.type == NL80211_IFTYPE_AP ||
|
2011-11-18 11:27:19 +00:00
|
|
|
sdata->vif.type == NL80211_IFTYPE_AP_VLAN ||
|
|
|
|
- sdata->vif.type == NL80211_IFTYPE_MESH_POINT)
|
|
|
|
+ sdata->vif.type == NL80211_IFTYPE_MESH_POINT ||
|
2011-05-31 23:07:29 +00:00
|
|
|
+ sdata->vif.type == NL80211_IFTYPE_WDS)
|
|
|
|
memcpy(mgmt->bssid, sdata->vif.addr, ETH_ALEN);
|
|
|
|
else if (sdata->vif.type == NL80211_IFTYPE_STATION)
|
|
|
|
memcpy(mgmt->bssid, sdata->u.mgd.bssid, ETH_ALEN);
|
2013-01-09 12:45:28 +00:00
|
|
|
@@ -520,6 +521,7 @@ int ieee80211_start_tx_ba_session(struct
|
2011-11-18 11:27:19 +00:00
|
|
|
sdata->vif.type != NL80211_IFTYPE_MESH_POINT &&
|
2011-05-31 23:07:29 +00:00
|
|
|
sdata->vif.type != NL80211_IFTYPE_AP_VLAN &&
|
2012-02-07 11:28:11 +00:00
|
|
|
sdata->vif.type != NL80211_IFTYPE_AP &&
|
2011-12-05 14:20:17 +00:00
|
|
|
+ sdata->vif.type != NL80211_IFTYPE_WDS &&
|
2012-02-07 11:28:11 +00:00
|
|
|
sdata->vif.type != NL80211_IFTYPE_ADHOC)
|
2011-12-05 14:20:17 +00:00
|
|
|
return -EINVAL;
|
|
|
|
|
2011-05-31 23:07:29 +00:00
|
|
|
--- a/net/mac80211/debugfs_sta.c
|
|
|
|
+++ b/net/mac80211/debugfs_sta.c
|
2012-12-07 16:46:04 +00:00
|
|
|
@@ -65,11 +65,11 @@ static ssize_t sta_flags_read(struct fil
|
2011-10-09 15:48:03 +00:00
|
|
|
test_sta_flag(sta, WLAN_STA_##flg) ? #flg "\n" : ""
|
|
|
|
|
|
|
|
int res = scnprintf(buf, sizeof(buf),
|
2012-04-16 21:08:41 +00:00
|
|
|
- "%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s",
|
|
|
|
+ "%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s",
|
2011-10-09 15:48:03 +00:00
|
|
|
TEST(AUTH), TEST(ASSOC), TEST(PS_STA),
|
|
|
|
TEST(PS_DRIVER), TEST(AUTHORIZED),
|
2011-12-05 14:20:17 +00:00
|
|
|
TEST(SHORT_PREAMBLE),
|
2011-10-09 15:48:03 +00:00
|
|
|
- TEST(WME), TEST(WDS), TEST(CLEAR_PS_FILT),
|
|
|
|
+ TEST(WME), TEST(CLEAR_PS_FILT),
|
|
|
|
TEST(MFP), TEST(BLOCK_BA), TEST(PSPOLL),
|
|
|
|
TEST(UAPSD), TEST(SP), TEST(TDLS_PEER),
|
2012-02-07 11:28:11 +00:00
|
|
|
TEST(TDLS_PEER_AUTH), TEST(4ADDR_EVENT),
|
2011-05-31 23:07:29 +00:00
|
|
|
--- a/net/mac80211/iface.c
|
|
|
|
+++ b/net/mac80211/iface.c
|
2013-01-09 12:45:28 +00:00
|
|
|
@@ -501,7 +501,6 @@ int ieee80211_do_open(struct wireless_de
|
2012-09-08 11:10:54 +00:00
|
|
|
struct ieee80211_sub_if_data *sdata = IEEE80211_WDEV_TO_SUB_IF(wdev);
|
|
|
|
struct net_device *dev = wdev->netdev;
|
2011-05-31 23:07:29 +00:00
|
|
|
struct ieee80211_local *local = sdata->local;
|
|
|
|
- struct sta_info *sta;
|
|
|
|
u32 changed = 0;
|
|
|
|
int res;
|
|
|
|
u32 hw_reconf_flags = 0;
|
2013-01-09 12:45:28 +00:00
|
|
|
@@ -658,30 +657,8 @@ int ieee80211_do_open(struct wireless_de
|
2011-05-31 23:07:29 +00:00
|
|
|
|
|
|
|
set_bit(SDATA_STATE_RUNNING, &sdata->state);
|
|
|
|
|
|
|
|
- if (sdata->vif.type == NL80211_IFTYPE_WDS) {
|
|
|
|
- /* Create STA entry for the WDS peer */
|
|
|
|
- sta = sta_info_alloc(sdata, sdata->u.wds.remote_addr,
|
|
|
|
- GFP_KERNEL);
|
|
|
|
- if (!sta) {
|
|
|
|
- res = -ENOMEM;
|
|
|
|
- goto err_del_interface;
|
|
|
|
- }
|
|
|
|
-
|
2012-02-07 11:28:11 +00:00
|
|
|
- sta_info_pre_move_state(sta, IEEE80211_STA_AUTH);
|
|
|
|
- sta_info_pre_move_state(sta, IEEE80211_STA_ASSOC);
|
|
|
|
- sta_info_pre_move_state(sta, IEEE80211_STA_AUTHORIZED);
|
2011-05-31 23:07:29 +00:00
|
|
|
-
|
|
|
|
- res = sta_info_insert(sta);
|
|
|
|
- if (res) {
|
|
|
|
- /* STA has been freed */
|
|
|
|
- goto err_del_interface;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- rate_control_rate_init(sta);
|
2012-09-08 11:10:54 +00:00
|
|
|
- netif_carrier_on(dev);
|
|
|
|
- } else if (sdata->vif.type == NL80211_IFTYPE_P2P_DEVICE) {
|
|
|
|
+ if (sdata->vif.type == NL80211_IFTYPE_P2P_DEVICE)
|
|
|
|
rcu_assign_pointer(local->p2p_sdata, sdata);
|
2011-05-31 23:07:29 +00:00
|
|
|
- }
|
2012-09-08 11:10:54 +00:00
|
|
|
|
2011-05-31 23:07:29 +00:00
|
|
|
/*
|
|
|
|
* set_multicast_list will be invoked by the networking core
|
2013-01-09 12:45:28 +00:00
|
|
|
@@ -1066,6 +1043,72 @@ static void ieee80211_if_setup(struct ne
|
2011-05-31 23:07:29 +00:00
|
|
|
dev->destructor = free_netdev;
|
|
|
|
}
|
|
|
|
|
|
|
|
+static void ieee80211_wds_rx_queued_mgmt(struct ieee80211_sub_if_data *sdata,
|
|
|
|
+ struct sk_buff *skb)
|
|
|
|
+{
|
|
|
|
+ struct ieee80211_local *local = sdata->local;
|
|
|
|
+ struct ieee80211_rx_status *rx_status;
|
|
|
|
+ struct ieee802_11_elems elems;
|
|
|
|
+ struct ieee80211_mgmt *mgmt;
|
|
|
|
+ struct sta_info *sta;
|
|
|
|
+ size_t baselen;
|
|
|
|
+ u32 rates = 0;
|
|
|
|
+ u16 stype;
|
|
|
|
+ bool new = false;
|
|
|
|
+ enum ieee80211_band band = local->hw.conf.channel->band;
|
|
|
|
+ struct ieee80211_supported_band *sband = local->hw.wiphy->bands[band];
|
|
|
|
+
|
|
|
|
+ rx_status = IEEE80211_SKB_RXCB(skb);
|
|
|
|
+ mgmt = (struct ieee80211_mgmt *) skb->data;
|
|
|
|
+ stype = le16_to_cpu(mgmt->frame_control) & IEEE80211_FCTL_STYPE;
|
|
|
|
+
|
|
|
|
+ if (stype != IEEE80211_STYPE_BEACON)
|
|
|
|
+ return;
|
|
|
|
+
|
|
|
|
+ baselen = (u8 *) mgmt->u.probe_resp.variable - (u8 *) mgmt;
|
|
|
|
+ if (baselen > skb->len)
|
|
|
|
+ return;
|
|
|
|
+
|
|
|
|
+ ieee802_11_parse_elems(mgmt->u.probe_resp.variable,
|
|
|
|
+ skb->len - baselen, &elems);
|
|
|
|
+
|
2012-04-16 21:08:41 +00:00
|
|
|
+ rates = ieee80211_sta_get_rates(local, &elems, band, NULL);
|
2011-05-31 23:07:29 +00:00
|
|
|
+
|
|
|
|
+ rcu_read_lock();
|
|
|
|
+
|
|
|
|
+ sta = sta_info_get(sdata, sdata->u.wds.remote_addr);
|
|
|
|
+
|
|
|
|
+ if (!sta) {
|
|
|
|
+ rcu_read_unlock();
|
|
|
|
+ sta = sta_info_alloc(sdata, sdata->u.wds.remote_addr,
|
|
|
|
+ GFP_KERNEL);
|
|
|
|
+ if (!sta)
|
|
|
|
+ return;
|
|
|
|
+
|
|
|
|
+ new = true;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ sta->last_rx = jiffies;
|
|
|
|
+ sta->sta.supp_rates[local->hw.conf.channel->band] = rates;
|
|
|
|
+
|
|
|
|
+ if (elems.ht_cap_elem)
|
2011-12-05 14:20:17 +00:00
|
|
|
+ ieee80211_ht_cap_ie_to_sta_ht_cap(sdata, sband,
|
2011-05-31 23:07:29 +00:00
|
|
|
+ elems.ht_cap_elem, &sta->sta.ht_cap);
|
|
|
|
+
|
|
|
|
+ if (elems.wmm_param)
|
2011-10-09 15:48:03 +00:00
|
|
|
+ set_sta_flag(sta, WLAN_STA_WME);
|
2011-05-31 23:07:29 +00:00
|
|
|
+
|
|
|
|
+ if (new) {
|
2012-04-19 18:32:39 +00:00
|
|
|
+ sta_info_pre_move_state(sta, IEEE80211_STA_AUTH);
|
|
|
|
+ sta_info_pre_move_state(sta, IEEE80211_STA_ASSOC);
|
|
|
|
+ sta_info_pre_move_state(sta, IEEE80211_STA_AUTHORIZED);
|
2011-05-31 23:07:29 +00:00
|
|
|
+ rate_control_rate_init(sta);
|
|
|
|
+ sta_info_insert_rcu(sta);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ rcu_read_unlock();
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
static void ieee80211_iface_work(struct work_struct *work)
|
|
|
|
{
|
|
|
|
struct ieee80211_sub_if_data *sdata =
|
2013-01-09 12:45:28 +00:00
|
|
|
@@ -1170,6 +1213,9 @@ static void ieee80211_iface_work(struct
|
2011-05-31 23:07:29 +00:00
|
|
|
break;
|
|
|
|
ieee80211_mesh_rx_queued_mgmt(sdata, skb);
|
|
|
|
break;
|
|
|
|
+ case NL80211_IFTYPE_WDS:
|
|
|
|
+ ieee80211_wds_rx_queued_mgmt(sdata, skb);
|
|
|
|
+ break;
|
|
|
|
default:
|
|
|
|
WARN(1, "frame for unexpected interface type");
|
|
|
|
break;
|
|
|
|
--- a/net/mac80211/rx.c
|
|
|
|
+++ b/net/mac80211/rx.c
|
2013-01-09 12:45:28 +00:00
|
|
|
@@ -2350,6 +2350,7 @@ ieee80211_rx_h_action(struct ieee80211_r
|
2011-11-18 11:27:19 +00:00
|
|
|
sdata->vif.type != NL80211_IFTYPE_MESH_POINT &&
|
2011-05-31 23:07:29 +00:00
|
|
|
sdata->vif.type != NL80211_IFTYPE_AP_VLAN &&
|
2012-02-07 11:28:11 +00:00
|
|
|
sdata->vif.type != NL80211_IFTYPE_AP &&
|
2011-12-05 14:20:17 +00:00
|
|
|
+ sdata->vif.type != NL80211_IFTYPE_WDS &&
|
2012-02-07 11:28:11 +00:00
|
|
|
sdata->vif.type != NL80211_IFTYPE_ADHOC)
|
2011-05-31 23:07:29 +00:00
|
|
|
break;
|
|
|
|
|
2013-01-09 12:45:28 +00:00
|
|
|
@@ -2655,14 +2656,15 @@ ieee80211_rx_h_mgmt(struct ieee80211_rx_
|
2011-05-31 23:07:29 +00:00
|
|
|
|
|
|
|
if (!ieee80211_vif_is_mesh(&sdata->vif) &&
|
|
|
|
sdata->vif.type != NL80211_IFTYPE_ADHOC &&
|
|
|
|
- sdata->vif.type != NL80211_IFTYPE_STATION)
|
|
|
|
+ sdata->vif.type != NL80211_IFTYPE_STATION &&
|
|
|
|
+ sdata->vif.type != NL80211_IFTYPE_WDS)
|
|
|
|
return RX_DROP_MONITOR;
|
|
|
|
|
|
|
|
switch (stype) {
|
2012-02-07 11:28:11 +00:00
|
|
|
case cpu_to_le16(IEEE80211_STYPE_AUTH):
|
2011-05-31 23:07:29 +00:00
|
|
|
case cpu_to_le16(IEEE80211_STYPE_BEACON):
|
|
|
|
case cpu_to_le16(IEEE80211_STYPE_PROBE_RESP):
|
|
|
|
- /* process for all: mesh, mlme, ibss */
|
|
|
|
+ /* process for all: mesh, mlme, ibss, wds */
|
|
|
|
break;
|
2012-02-07 11:28:11 +00:00
|
|
|
case cpu_to_le16(IEEE80211_STYPE_ASSOC_RESP):
|
|
|
|
case cpu_to_le16(IEEE80211_STYPE_REASSOC_RESP):
|
2013-01-09 12:45:28 +00:00
|
|
|
@@ -2987,10 +2989,16 @@ static int prepare_for_handlers(struct i
|
2011-05-31 23:07:29 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
case NL80211_IFTYPE_WDS:
|
|
|
|
- if (bssid || !ieee80211_is_data(hdr->frame_control))
|
|
|
|
- return 0;
|
2012-06-18 01:26:36 +00:00
|
|
|
if (!ether_addr_equal(sdata->u.wds.remote_addr, hdr->addr2))
|
2011-05-31 23:07:29 +00:00
|
|
|
return 0;
|
|
|
|
+
|
|
|
|
+ if (ieee80211_is_data(hdr->frame_control) ||
|
|
|
|
+ ieee80211_is_action(hdr->frame_control)) {
|
|
|
|
+ if (compare_ether_addr(sdata->vif.addr, hdr->addr1))
|
|
|
|
+ return 0;
|
|
|
|
+ } else if (!ieee80211_is_beacon(hdr->frame_control))
|
|
|
|
+ return 0;
|
|
|
|
+
|
|
|
|
break;
|
2012-09-08 11:10:54 +00:00
|
|
|
case NL80211_IFTYPE_P2P_DEVICE:
|
|
|
|
if (!ieee80211_is_public_action(hdr, skb->len) &&
|
2012-02-27 22:56:05 +00:00
|
|
|
--- a/net/mac80211/sta_info.h
|
|
|
|
+++ b/net/mac80211/sta_info.h
|
2012-04-16 21:08:41 +00:00
|
|
|
@@ -32,7 +32,6 @@
|
2012-02-27 22:56:05 +00:00
|
|
|
* @WLAN_STA_SHORT_PREAMBLE: Station is capable of receiving short-preamble
|
|
|
|
* frames.
|
|
|
|
* @WLAN_STA_WME: Station is a QoS-STA.
|
|
|
|
- * @WLAN_STA_WDS: Station is one of our WDS peers.
|
|
|
|
* @WLAN_STA_CLEAR_PS_FILT: Clear PS filter in hardware (using the
|
|
|
|
* IEEE80211_TX_CTL_CLEAR_PS_FILT control flag) when the next
|
|
|
|
* frame to this station is transmitted.
|
2012-04-16 21:08:41 +00:00
|
|
|
@@ -64,7 +63,6 @@ enum ieee80211_sta_info_flags {
|
2012-02-27 22:56:05 +00:00
|
|
|
WLAN_STA_AUTHORIZED,
|
|
|
|
WLAN_STA_SHORT_PREAMBLE,
|
|
|
|
WLAN_STA_WME,
|
|
|
|
- WLAN_STA_WDS,
|
|
|
|
WLAN_STA_CLEAR_PS_FILT,
|
|
|
|
WLAN_STA_MFP,
|
|
|
|
WLAN_STA_BLOCK_BA,
|
2013-01-09 12:45:28 +00:00
|
|
|
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
|
|
|
|
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
|
|
|
|
@@ -324,7 +324,6 @@ struct ath_rx {
|
|
|
|
|
|
|
|
int ath_startrecv(struct ath_softc *sc);
|
|
|
|
bool ath_stoprecv(struct ath_softc *sc);
|
|
|
|
-void ath_flushrecv(struct ath_softc *sc);
|
|
|
|
u32 ath_calcrxfilter(struct ath_softc *sc);
|
|
|
|
int ath_rx_init(struct ath_softc *sc, int nbufs);
|
|
|
|
void ath_rx_cleanup(struct ath_softc *sc);
|
|
|
|
@@ -641,7 +640,6 @@ void ath_ant_comb_update(struct ath_soft
|
|
|
|
enum sc_op_flags {
|
|
|
|
SC_OP_INVALID,
|
|
|
|
SC_OP_BEACONS,
|
|
|
|
- SC_OP_RXFLUSH,
|
|
|
|
SC_OP_ANI_RUN,
|
|
|
|
SC_OP_PRIM_STA_VIF,
|
|
|
|
SC_OP_HW_RESET,
|
|
|
|
--- a/drivers/net/wireless/ath/ath9k/beacon.c
|
|
|
|
+++ b/drivers/net/wireless/ath/ath9k/beacon.c
|
|
|
|
@@ -147,6 +147,7 @@ static struct ath_buf *ath9k_beacon_gene
|
|
|
|
skb->len, DMA_TO_DEVICE);
|
|
|
|
dev_kfree_skb_any(skb);
|
|
|
|
bf->bf_buf_addr = 0;
|
|
|
|
+ bf->bf_mpdu = NULL;
|
|
|
|
}
|
2012-11-10 02:47:33 +00:00
|
|
|
|
2013-01-09 12:45:28 +00:00
|
|
|
skb = ieee80211_beacon_get(hw, vif);
|
|
|
|
@@ -359,7 +360,6 @@ void ath9k_beacon_tasklet(unsigned long
|
|
|
|
return;
|
2012-12-07 16:46:04 +00:00
|
|
|
|
2013-01-09 12:45:28 +00:00
|
|
|
bf = ath9k_beacon_generate(sc->hw, vif);
|
|
|
|
- WARN_ON(!bf);
|
|
|
|
|
|
|
|
if (sc->beacon.bmisscnt != 0) {
|
|
|
|
ath_dbg(common, BSTUCK, "resume beacon xmit after %u misses\n",
|
|
|
|
--- a/drivers/net/wireless/ath/ath9k/debug.c
|
|
|
|
+++ b/drivers/net/wireless/ath/ath9k/debug.c
|
|
|
|
@@ -861,7 +861,6 @@ static ssize_t read_file_recv(struct fil
|
|
|
|
RXS_ERR("RX-LENGTH-ERR", rx_len_err);
|
|
|
|
RXS_ERR("RX-OOM-ERR", rx_oom_err);
|
|
|
|
RXS_ERR("RX-RATE-ERR", rx_rate_err);
|
|
|
|
- RXS_ERR("RX-DROP-RXFLUSH", rx_drop_rxflush);
|
|
|
|
RXS_ERR("RX-TOO-MANY-FRAGS", rx_too_many_frags_err);
|
|
|
|
|
|
|
|
PHY_ERR("UNDERRUN ERR", ATH9K_PHYERR_UNDERRUN);
|
2012-12-07 16:46:04 +00:00
|
|
|
--- a/drivers/net/wireless/ath/ath9k/debug.h
|
|
|
|
+++ b/drivers/net/wireless/ath/ath9k/debug.h
|
2013-01-09 12:45:28 +00:00
|
|
|
@@ -216,7 +216,6 @@ struct ath_tx_stats {
|
|
|
|
* @rx_oom_err: No. of frames dropped due to OOM issues.
|
|
|
|
* @rx_rate_err: No. of frames dropped due to rate errors.
|
|
|
|
* @rx_too_many_frags_err: Frames dropped due to too-many-frags received.
|
|
|
|
- * @rx_drop_rxflush: No. of frames dropped due to RX-FLUSH.
|
|
|
|
* @rx_beacons: No. of beacons received.
|
|
|
|
* @rx_frags: No. of rx-fragements received.
|
|
|
|
*/
|
|
|
|
@@ -235,7 +234,6 @@ struct ath_rx_stats {
|
|
|
|
u32 rx_oom_err;
|
|
|
|
u32 rx_rate_err;
|
|
|
|
u32 rx_too_many_frags_err;
|
|
|
|
- u32 rx_drop_rxflush;
|
|
|
|
u32 rx_beacons;
|
|
|
|
u32 rx_frags;
|
|
|
|
};
|
|
|
|
--- a/drivers/net/wireless/ath/ath9k/main.c
|
|
|
|
+++ b/drivers/net/wireless/ath/ath9k/main.c
|
|
|
|
@@ -182,7 +182,7 @@ static void ath_restart_work(struct ath_
|
|
|
|
ath_start_ani(sc);
|
2012-12-10 13:50:54 +00:00
|
|
|
}
|
2012-12-10 13:51:02 +00:00
|
|
|
|
2013-01-09 12:45:28 +00:00
|
|
|
-static bool ath_prepare_reset(struct ath_softc *sc, bool retry_tx, bool flush)
|
|
|
|
+static bool ath_prepare_reset(struct ath_softc *sc, bool retry_tx)
|
|
|
|
{
|
|
|
|
struct ath_hw *ah = sc->sc_ah;
|
|
|
|
bool ret = true;
|
|
|
|
@@ -196,19 +196,15 @@ static bool ath_prepare_reset(struct ath
|
|
|
|
ath9k_debug_samp_bb_mac(sc);
|
|
|
|
ath9k_hw_disable_interrupts(ah);
|
2012-12-10 13:51:02 +00:00
|
|
|
|
2013-01-09 12:45:28 +00:00
|
|
|
+ tasklet_disable(&sc->intr_tq);
|
2012-12-10 13:51:02 +00:00
|
|
|
+
|
2013-01-09 12:45:28 +00:00
|
|
|
if (!ath_stoprecv(sc))
|
|
|
|
ret = false;
|
|
|
|
|
|
|
|
if (!ath_drain_all_txq(sc, retry_tx))
|
|
|
|
ret = false;
|
|
|
|
|
|
|
|
- if (!flush) {
|
|
|
|
- if (ah->caps.hw_caps & ATH9K_HW_CAP_EDMA)
|
|
|
|
- ath_rx_tasklet(sc, 1, true);
|
|
|
|
- ath_rx_tasklet(sc, 1, false);
|
|
|
|
- } else {
|
|
|
|
- ath_flushrecv(sc);
|
|
|
|
- }
|
|
|
|
+ tasklet_enable(&sc->intr_tq);
|
2012-12-10 15:42:34 +00:00
|
|
|
|
2013-01-09 12:45:28 +00:00
|
|
|
return ret;
|
2012-12-10 16:43:01 +00:00
|
|
|
}
|
2013-01-09 12:45:28 +00:00
|
|
|
@@ -262,7 +258,6 @@ static int ath_reset_internal(struct ath
|
|
|
|
struct ath_common *common = ath9k_hw_common(ah);
|
|
|
|
struct ath9k_hw_cal_data *caldata = NULL;
|
|
|
|
bool fastcc = true;
|
|
|
|
- bool flush = false;
|
|
|
|
int r;
|
|
|
|
|
|
|
|
__ath_cancel_work(sc);
|
|
|
|
@@ -276,11 +271,10 @@ static int ath_reset_internal(struct ath
|
|
|
|
|
|
|
|
if (!hchan) {
|
|
|
|
fastcc = false;
|
|
|
|
- flush = true;
|
|
|
|
hchan = ah->curchan;
|
2012-12-10 16:43:01 +00:00
|
|
|
}
|
|
|
|
|
2013-01-09 12:45:28 +00:00
|
|
|
- if (!ath_prepare_reset(sc, retry_tx, flush))
|
|
|
|
+ if (!ath_prepare_reset(sc, retry_tx))
|
|
|
|
fastcc = false;
|
2012-12-10 16:43:01 +00:00
|
|
|
|
2013-01-09 12:45:28 +00:00
|
|
|
ath_dbg(common, CONFIG, "Reset to %u MHz, HT40: %d fastcc: %d\n",
|
|
|
|
@@ -804,7 +798,7 @@ static void ath9k_stop(struct ieee80211_
|
|
|
|
ath9k_hw_cfg_gpio_input(ah, ah->led_pin);
|
2012-12-10 16:43:01 +00:00
|
|
|
}
|
2012-12-10 18:29:17 +00:00
|
|
|
|
2013-01-09 12:45:28 +00:00
|
|
|
- ath_prepare_reset(sc, false, true);
|
|
|
|
+ ath_prepare_reset(sc, false);
|
2012-12-10 18:29:17 +00:00
|
|
|
|
2013-01-09 12:45:28 +00:00
|
|
|
if (sc->rx.frag) {
|
|
|
|
dev_kfree_skb_any(sc->rx.frag);
|
|
|
|
--- a/drivers/net/wireless/ath/ath9k/recv.c
|
|
|
|
+++ b/drivers/net/wireless/ath/ath9k/recv.c
|
|
|
|
@@ -280,7 +280,6 @@ int ath_rx_init(struct ath_softc *sc, in
|
2012-12-10 18:29:17 +00:00
|
|
|
|
2013-01-09 12:45:28 +00:00
|
|
|
spin_lock_init(&sc->sc_pcu_lock);
|
|
|
|
spin_lock_init(&sc->rx.rxbuflock);
|
|
|
|
- clear_bit(SC_OP_RXFLUSH, &sc->sc_flags);
|
2012-12-10 18:29:17 +00:00
|
|
|
|
2013-01-09 12:45:28 +00:00
|
|
|
common->rx_bufsize = IEEE80211_MAX_MPDU_LEN / 2 +
|
|
|
|
sc->sc_ah->caps.rx_status_len;
|
|
|
|
@@ -464,6 +463,13 @@ start_recv:
|
2012-12-10 18:29:17 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2013-01-09 12:45:28 +00:00
|
|
|
+static void ath_flushrecv(struct ath_softc *sc)
|
2012-12-10 18:29:17 +00:00
|
|
|
+{
|
2013-01-09 12:45:28 +00:00
|
|
|
+ if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_EDMA)
|
|
|
|
+ ath_rx_tasklet(sc, 1, true);
|
|
|
|
+ ath_rx_tasklet(sc, 1, false);
|
2012-12-10 18:29:17 +00:00
|
|
|
+}
|
|
|
|
+
|
2013-01-09 12:45:28 +00:00
|
|
|
bool ath_stoprecv(struct ath_softc *sc)
|
|
|
|
{
|
|
|
|
struct ath_hw *ah = sc->sc_ah;
|
|
|
|
@@ -474,6 +480,8 @@ bool ath_stoprecv(struct ath_softc *sc)
|
|
|
|
ath9k_hw_setrxfilter(ah, 0);
|
|
|
|
stopped = ath9k_hw_stopdmarecv(ah, &reset);
|
2012-12-28 21:05:49 +00:00
|
|
|
|
2013-01-09 12:45:28 +00:00
|
|
|
+ ath_flushrecv(sc);
|
|
|
|
+
|
|
|
|
if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_EDMA)
|
|
|
|
ath_edma_stop_recv(sc);
|
|
|
|
else
|
|
|
|
@@ -490,15 +498,6 @@ bool ath_stoprecv(struct ath_softc *sc)
|
|
|
|
return stopped && !reset;
|
|
|
|
}
|
2012-12-28 21:05:49 +00:00
|
|
|
|
2013-01-09 12:45:28 +00:00
|
|
|
-void ath_flushrecv(struct ath_softc *sc)
|
|
|
|
-{
|
|
|
|
- set_bit(SC_OP_RXFLUSH, &sc->sc_flags);
|
|
|
|
- if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_EDMA)
|
|
|
|
- ath_rx_tasklet(sc, 1, true);
|
|
|
|
- ath_rx_tasklet(sc, 1, false);
|
|
|
|
- clear_bit(SC_OP_RXFLUSH, &sc->sc_flags);
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
static bool ath_beacon_dtim_pending_cab(struct sk_buff *skb)
|
|
|
|
{
|
|
|
|
/* Check whether the Beacon frame has DTIM indicating buffered bc/mc */
|
|
|
|
@@ -735,6 +734,7 @@ static struct ath_buf *ath_get_next_rx_b
|
|
|
|
return NULL;
|
|
|
|
}
|
2012-12-28 21:05:49 +00:00
|
|
|
|
2013-01-09 12:45:28 +00:00
|
|
|
+ list_del(&bf->list);
|
|
|
|
if (!bf->bf_mpdu)
|
|
|
|
return bf;
|
2012-12-28 21:05:49 +00:00
|
|
|
|
2013-01-09 12:45:28 +00:00
|
|
|
@@ -1057,9 +1057,6 @@ int ath_rx_tasklet(struct ath_softc *sc,
|
2012-12-28 21:05:49 +00:00
|
|
|
|
2013-01-09 12:45:28 +00:00
|
|
|
do {
|
|
|
|
bool decrypt_error = false;
|
|
|
|
- /* If handling rx interrupt and flush is in progress => exit */
|
|
|
|
- if (test_bit(SC_OP_RXFLUSH, &sc->sc_flags) && (flush == 0))
|
|
|
|
- break;
|
2012-12-28 21:05:49 +00:00
|
|
|
|
2013-01-09 12:45:28 +00:00
|
|
|
memset(&rs, 0, sizeof(rs));
|
|
|
|
if (edma)
|
|
|
|
@@ -1102,15 +1099,6 @@ int ath_rx_tasklet(struct ath_softc *sc,
|
2012-12-28 21:05:49 +00:00
|
|
|
|
2013-01-09 12:45:28 +00:00
|
|
|
ath_debug_stat_rx(sc, &rs);
|
2012-12-28 21:05:49 +00:00
|
|
|
|
2013-01-09 12:45:28 +00:00
|
|
|
- /*
|
|
|
|
- * If we're asked to flush receive queue, directly
|
|
|
|
- * chain it back at the queue without processing it.
|
|
|
|
- */
|
|
|
|
- if (test_bit(SC_OP_RXFLUSH, &sc->sc_flags)) {
|
|
|
|
- RX_STAT_INC(rx_drop_rxflush);
|
|
|
|
- goto requeue_drop_frag;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
memset(rxs, 0, sizeof(struct ieee80211_rx_status));
|
2013-01-02 17:37:30 +00:00
|
|
|
|
2013-01-09 12:45:28 +00:00
|
|
|
rxs->mactime = (tsf & ~0xffffffffULL) | rs.rs_tstamp;
|
|
|
|
@@ -1245,14 +1233,15 @@ requeue_drop_frag:
|
|
|
|
sc->rx.frag = NULL;
|
|
|
|
}
|
|
|
|
requeue:
|
|
|
|
+ list_add_tail(&bf->list, &sc->rx.rxbuf);
|
|
|
|
+ if (!flush)
|
|
|
|
+ continue;
|
|
|
|
+
|
|
|
|
if (edma) {
|
|
|
|
- list_add_tail(&bf->list, &sc->rx.rxbuf);
|
|
|
|
ath_rx_edma_buf_link(sc, qtype);
|
|
|
|
} else {
|
|
|
|
- list_move_tail(&bf->list, &sc->rx.rxbuf);
|
|
|
|
ath_rx_buf_link(sc, bf);
|
|
|
|
- if (!flush)
|
|
|
|
- ath9k_hw_rxena(ah);
|
|
|
|
+ ath9k_hw_rxena(ah);
|
|
|
|
}
|
|
|
|
} while (1);
|
2013-01-02 17:37:30 +00:00
|
|
|
|