+ const u8 *tpn;
++ u64 pn;
+ char buf[20];
+ int len;
+ struct ieee80211_key *key = file->private_data;
+@@ -94,9 +95,10 @@ static ssize_t key_tx_spec_read(struct f
+ key->u.tkip.tx.iv16);
+ break;
+ case WLAN_CIPHER_SUITE_CCMP:
+- tpn = key->u.ccmp.tx_pn;
++ pn = atomic64_read(&key->u.ccmp.tx_pn);
+ len = scnprintf(buf, sizeof(buf), "%02x%02x%02x%02x%02x%02x\n",
+- tpn[0], tpn[1], tpn[2], tpn[3], tpn[4], tpn[5]);
++ (u8)(pn >> 40), (u8)(pn >> 32), (u8)(pn >> 24),
++ (u8)(pn >> 16), (u8)(pn >> 8), (u8)pn);
+ break;
+ case WLAN_CIPHER_SUITE_AES_CMAC:
+ tpn = key->u.aes_cmac.tx_pn;
+--- a/drivers/net/wireless/ath/ath9k/ar9003_2p2_initvals.h
++++ b/drivers/net/wireless/ath/ath9k/ar9003_2p2_initvals.h
+@@ -653,8 +653,8 @@ static const u32 ar9300_2p2_baseband_pos
+ {0x0000a288, 0x00000110, 0x00000110, 0x00000110, 0x00000110},
+ {0x0000a28c, 0x00022222, 0x00022222, 0x00022222, 0x00022222},
+ {0x0000a2c4, 0x00158d18, 0x00158d18, 0x00158d18, 0x00158d18},
+- {0x0000a2d0, 0x00071981, 0x00071981, 0x00071981, 0x00071982},
+- {0x0000a2d8, 0x7999a83a, 0x7999a83a, 0x7999a83a, 0x7999a83a},
++ {0x0000a2d0, 0x00041981, 0x00041981, 0x00041981, 0x00041982},
++ {0x0000a2d8, 0x7999a83b, 0x7999a83b, 0x7999a83b, 0x7999a83b},
+ {0x0000a358, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
+ {0x0000a830, 0x0000019c, 0x0000019c, 0x0000019c, 0x0000019c},
+ {0x0000ae04, 0x001c0000, 0x001c0000, 0x001c0000, 0x001c0000},
+@@ -761,7 +761,7 @@ static const u32 ar9300_2p2_baseband_cor
+ {0x0000a3ec, 0x20202020},
+ {0x0000a3f0, 0x00000000},
+ {0x0000a3f4, 0x00000246},
+- {0x0000a3f8, 0x0cdbd380},
++ {0x0000a3f8, 0x0c9bd380},
+ {0x0000a3fc, 0x000f0f01},
+ {0x0000a400, 0x8fa91f01},
+ {0x0000a404, 0x00000000},
+@@ -780,7 +780,7 @@ static const u32 ar9300_2p2_baseband_cor
+ {0x0000a43c, 0x00100000},
+ {0x0000a440, 0x00000000},
+ {0x0000a444, 0x00000000},
+- {0x0000a448, 0x06000080},
++ {0x0000a448, 0x05000080},
+ {0x0000a44c, 0x00000001},
+ {0x0000a450, 0x00010000},
+ {0x0000a458, 0x00000000},
+@@ -1500,8 +1500,6 @@ static const u32 ar9300_2p2_mac_core[][2
+ {0x0000816c, 0x00000000},
+ {0x000081c0, 0x00000000},
+ {0x000081c4, 0x33332210},
+- {0x000081c8, 0x00000000},
+- {0x000081cc, 0x00000000},
+ {0x000081ec, 0x00000000},
+ {0x000081f0, 0x00000000},
+ {0x000081f4, 0x00000000},
+--- a/net/mac80211/work.c
++++ b/net/mac80211/work.c
+@@ -1075,14 +1075,13 @@ static void ieee80211_work_work(struct w
+ continue;
+ if (wk->chan != local->tmp_channel)
+ continue;
+- if (ieee80211_work_ct_coexists(wk->chan_type,
+- local->tmp_channel_type))
++ if (!ieee80211_work_ct_coexists(wk->chan_type,
++ local->tmp_channel_type))
+ continue;
+ remain_off_channel = true;
+ }
+
+ if (!remain_off_channel && local->tmp_channel) {
+- bool on_oper_chan = ieee80211_cfg_on_oper_channel(local);
+ local->tmp_channel = NULL;
+ /* If tmp_channel wasn't operating channel, then
+ * we need to go back on-channel.
+@@ -1092,7 +1091,7 @@ static void ieee80211_work_work(struct w
+ * we still need to do a hardware config. Currently,
+ * we cannot be here while scanning, however.
+ */
+- if (ieee80211_cfg_on_oper_channel(local) && !on_oper_chan)
++ if (!ieee80211_cfg_on_oper_channel(local))
+ ieee80211_hw_config(local, 0);
+
+ /* At the least, we need to disable offchannel_ps,
+--- a/drivers/net/wireless/ath/ath9k/ar5008_phy.c
++++ b/drivers/net/wireless/ath/ath9k/ar5008_phy.c
+@@ -627,6 +627,11 @@ static void ar5008_hw_init_bb(struct ath
+ else
+ synthDelay /= 10;
+
++ if (IS_CHAN_HALF_RATE(chan))
++ synthDelay *= 2;
++ else if (IS_CHAN_QUARTER_RATE(chan))
++ synthDelay *= 4;
++
+ REG_WRITE(ah, AR_PHY_ACTIVE, AR_PHY_ACTIVE_EN);
+
+ udelay(synthDelay + BASE_ACTIVATE_DELAY);
+--- a/drivers/net/wireless/ath/ath9k/ar9002_hw.c
++++ b/drivers/net/wireless/ath/ath9k/ar9002_hw.c
+@@ -499,45 +499,6 @@ void ar9002_hw_enable_async_fifo(struct