---- a/drivers/net/wireless/ath/ath9k/main.c
-+++ b/drivers/net/wireless/ath/ath9k/main.c
-@@ -324,7 +324,6 @@ static void ath_paprd_activate(struct at
- if (!caldata || !caldata->paprd_done)
- return;
-
-- ath9k_ps_wakeup(sc);
- ar9003_paprd_enable(ah, false);
- for (chain = 0; chain < AR9300_MAX_CHAINS; chain++) {
- if (!(common->tx_chainmask & BIT(chain)))
-@@ -334,7 +333,6 @@ static void ath_paprd_activate(struct at
- }
-
- ar9003_paprd_enable(ah, true);
-- ath9k_ps_restore(sc);
- }
-
- static bool ath_paprd_send_frame(struct ath_softc *sc, struct sk_buff *skb, int chain)
-@@ -554,8 +552,11 @@ set_timer:
- if ((sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_PAPRD) && ah->caldata) {
- if (!ah->caldata->paprd_done)
- ieee80211_queue_work(sc->hw, &sc->paprd_work);
-- else if (!ah->paprd_table_write_done)
-+ else if (!ah->paprd_table_write_done) {
-+ ath9k_ps_wakeup(sc);
- ath_paprd_activate(sc);
-+ ath9k_ps_restore(sc);
-+ }
- }
- }
-
-@@ -1376,7 +1377,6 @@ static void ath9k_calculate_summary_stat
-
- ath9k_calculate_iter_data(hw, vif, &iter_data);
-
-- ath9k_ps_wakeup(sc);
- /* Set BSSID mask. */
- memcpy(common->bssidmask, iter_data.mask, ETH_ALEN);
- ath_hw_setbssidmask(common);
-@@ -1411,7 +1411,6 @@ static void ath9k_calculate_summary_stat
- }
-
- ath9k_hw_set_interrupts(ah, ah->imask);
-- ath9k_ps_restore(sc);
-
- /* Set up ANI */
- if ((iter_data.naps + iter_data.nadhocs) > 0) {
-@@ -1457,6 +1456,7 @@ static int ath9k_add_interface(struct ie
- struct ath_vif *avp = (void *)vif->drv_priv;
- int ret = 0;
-
-+ ath9k_ps_wakeup(sc);
- mutex_lock(&sc->mutex);
-
- switch (vif->type) {
-@@ -1503,6 +1503,7 @@ static int ath9k_add_interface(struct ie
- ath9k_do_vif_add_setup(hw, vif);
- out:
- mutex_unlock(&sc->mutex);
-+ ath9k_ps_restore(sc);
- return ret;
- }
-
-@@ -1517,6 +1518,7 @@ static int ath9k_change_interface(struct
-
- ath_dbg(common, ATH_DBG_CONFIG, "Change Interface\n");
- mutex_lock(&sc->mutex);
-+ ath9k_ps_wakeup(sc);
-
- /* See if new interface type is valid. */
- if ((new_type == NL80211_IFTYPE_ADHOC) &&
-@@ -1546,6 +1548,7 @@ static int ath9k_change_interface(struct
-
- ath9k_do_vif_add_setup(hw, vif);
- out:
-+ ath9k_ps_restore(sc);
- mutex_unlock(&sc->mutex);
- return ret;
- }
-@@ -1558,6 +1561,7 @@ static void ath9k_remove_interface(struc
-
- ath_dbg(common, ATH_DBG_CONFIG, "Detach Interface\n");
-
-+ ath9k_ps_wakeup(sc);
- mutex_lock(&sc->mutex);
-
- sc->nvifs--;
-@@ -1569,6 +1573,7 @@ static void ath9k_remove_interface(struc
- ath9k_calculate_summary_state(hw, NULL);
-
- mutex_unlock(&sc->mutex);
-+ ath9k_ps_restore(sc);
- }
-
- static void ath9k_enable_ps(struct ath_softc *sc)
-@@ -1809,6 +1814,7 @@ static int ath9k_conf_tx(struct ieee8021
-
- txq = sc->tx.txq_map[queue];
-
-+ ath9k_ps_wakeup(sc);
- mutex_lock(&sc->mutex);
-
- memset(&qi, 0, sizeof(struct ath9k_tx_queue_info));
-@@ -1832,6 +1838,7 @@ static int ath9k_conf_tx(struct ieee8021
- ath_beaconq_config(sc);
-
- mutex_unlock(&sc->mutex);
-+ ath9k_ps_restore(sc);
-
- return ret;
- }
-@@ -1908,6 +1915,7 @@ static void ath9k_bss_info_changed(struc
- int slottime;
- int error;
-
-+ ath9k_ps_wakeup(sc);
- mutex_lock(&sc->mutex);
-
- if (changed & BSS_CHANGED_BSSID) {
-@@ -2008,6 +2016,7 @@ static void ath9k_bss_info_changed(struc
- }
-
- mutex_unlock(&sc->mutex);
-+ ath9k_ps_restore(sc);
+--- a/net/mac80211/agg-rx.c
++++ b/net/mac80211/agg-rx.c
+@@ -176,6 +176,8 @@ static void ieee80211_send_addba_resp(st
+ 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);
++ else if (sdata->vif.type == NL80211_IFTYPE_WDS)
++ memcpy(mgmt->bssid, da, ETH_ALEN);
+
+ mgmt->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT |
+ IEEE80211_STYPE_ACTION);
+--- a/net/mac80211/agg-tx.c
++++ b/net/mac80211/agg-tx.c
+@@ -79,7 +79,8 @@ static void ieee80211_send_addba_request
+ memcpy(mgmt->da, da, ETH_ALEN);
+ memcpy(mgmt->sa, sdata->vif.addr, ETH_ALEN);
+ if (sdata->vif.type == NL80211_IFTYPE_AP ||
+- sdata->vif.type == NL80211_IFTYPE_AP_VLAN)
++ sdata->vif.type == NL80211_IFTYPE_AP_VLAN ||
++ 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);
+@@ -398,7 +399,8 @@ int ieee80211_start_tx_ba_session(struct
+ */
+ if (sdata->vif.type != NL80211_IFTYPE_STATION &&
+ sdata->vif.type != NL80211_IFTYPE_AP_VLAN &&
+- sdata->vif.type != NL80211_IFTYPE_AP)
++ sdata->vif.type != NL80211_IFTYPE_AP &&
++ sdata->vif.type != NL80211_IFTYPE_WDS)
+ return -EINVAL;
+
+ if (test_sta_flags(sta, WLAN_STA_BLOCK_BA)) {
+--- a/net/mac80211/debugfs_sta.c
++++ b/net/mac80211/debugfs_sta.c
+@@ -59,7 +59,7 @@ static ssize_t sta_flags_read(struct fil
+ char buf[100];
+ struct sta_info *sta = file->private_data;
+ u32 staflags = get_sta_flags(sta);
+- int res = scnprintf(buf, sizeof(buf), "%s%s%s%s%s%s%s%s%s",
++ int res = scnprintf(buf, sizeof(buf), "%s%s%s%s%s%s%s%s",
+ staflags & WLAN_STA_AUTH ? "AUTH\n" : "",
+ staflags & WLAN_STA_ASSOC ? "ASSOC\n" : "",
+ staflags & WLAN_STA_PS_STA ? "PS (sta)\n" : "",
+@@ -67,7 +67,6 @@ static ssize_t sta_flags_read(struct fil
+ staflags & WLAN_STA_AUTHORIZED ? "AUTHORIZED\n" : "",
+ staflags & WLAN_STA_SHORT_PREAMBLE ? "SHORT PREAMBLE\n" : "",
+ staflags & WLAN_STA_WME ? "WME\n" : "",
+- staflags & WLAN_STA_WDS ? "WDS\n" : "",
+ staflags & WLAN_STA_MFP ? "MFP\n" : "");
+ return simple_read_from_buffer(userbuf, count, ppos, buf, res);