All of lore.kernel.org
 help / color / mirror / Atom feed
diff for duplicates of <53240683.1000305@rempel-privat.de>

diff --git a/a/1.txt b/N1/1.txt
index 324bd3d..fa22636 100644
--- a/a/1.txt
+++ b/N1/1.txt
@@ -22,29 +22,29 @@ Am 14.03.2014 20:22, schrieb John W. Linville:
 >                  from include/linux/etherdevice.h:25,
 >                  from drivers/net/wireless/ath/ath9k/ath9k.h:20,
 >                  from drivers/net/wireless/ath/ath9k/tx99.c:17:
-> drivers/net/wireless/ath/ath9k/tx99.c: In function ?ath9k_tx99_init?:
-> drivers/net/wireless/ath/ath9k/tx99.c:111:15: error: ?SC_OP_INVALID? undeclared (first use in this function)
+> drivers/net/wireless/ath/ath9k/tx99.c: In function ‘ath9k_tx99_init’:
+> drivers/net/wireless/ath/ath9k/tx99.c:111:15: error: ‘SC_OP_INVALID’ undeclared (first use in this function)
 >   if (test_bit(SC_OP_INVALID, &sc->sc_flags)) {
 >                ^
-> /home/linville/git/wireless-next/arch/x86/include/asm/bitops.h:338:25: note: in definition of macro ?test_bit?
+> /home/linville/git/wireless-next/arch/x86/include/asm/bitops.h:338:25: note: in definition of macro ‘test_bit’
 >   (__builtin_constant_p((nr))  \
 >                          ^
 > drivers/net/wireless/ath/ath9k/tx99.c:111:15: note: each undeclared identifier is reported only once for each function it appears in
 >   if (test_bit(SC_OP_INVALID, &sc->sc_flags)) {
 >                ^
-> /home/linville/git/wireless-next/arch/x86/include/asm/bitops.h:338:25: note: in definition of macro ?test_bit?
+> /home/linville/git/wireless-next/arch/x86/include/asm/bitops.h:338:25: note: in definition of macro ‘test_bit’
 >   (__builtin_constant_p((nr))  \
 >                          ^
-> drivers/net/wireless/ath/ath9k/tx99.c:111:33: error: ?struct ath_softc? has no member named ?sc_flags?
+> drivers/net/wireless/ath/ath9k/tx99.c:111:33: error: ‘struct ath_softc’ has no member named ‘sc_flags’
 >   if (test_bit(SC_OP_INVALID, &sc->sc_flags)) {
 >                                  ^
-> /home/linville/git/wireless-next/arch/x86/include/asm/bitops.h:339:30: note: in definition of macro ?test_bit?
+> /home/linville/git/wireless-next/arch/x86/include/asm/bitops.h:339:30: note: in definition of macro ‘test_bit’
 >    ? constant_test_bit((nr), (addr)) \
 >                               ^
-> drivers/net/wireless/ath/ath9k/tx99.c:111:33: error: ?struct ath_softc? has no member named ?sc_flags?
+> drivers/net/wireless/ath/ath9k/tx99.c:111:33: error: ‘struct ath_softc’ has no member named ‘sc_flags’
 >   if (test_bit(SC_OP_INVALID, &sc->sc_flags)) {
 >                                  ^
-> /home/linville/git/wireless-next/arch/x86/include/asm/bitops.h:340:30: note: in definition of macro ?test_bit?
+> /home/linville/git/wireless-next/arch/x86/include/asm/bitops.h:340:30: note: in definition of macro ‘test_bit’
 >    : variable_test_bit((nr), (addr)))
 >                               ^
 > make[3]: *** [drivers/net/wireless/ath/ath9k/tx99.o] Error 1
@@ -60,10 +60,3 @@ in attachment is second version of affected patch.
 -- 
 Regards,
 Oleksij
--------------- next part --------------
-A non-text attachment was scrubbed...
-Name: 0001-ath9k-move-sc_flags-to-ath_common.patch
-Type: text/x-patch
-Size: 20132 bytes
-Desc: not available
-Url : http://lists.ath9k.org/pipermail/ath9k-devel/attachments/20140315/18cd76cb/attachment-0001.bin
diff --git a/N1/2.hdr b/N1/2.hdr
new file mode 100644
index 0000000..9ed5c92
--- /dev/null
+++ b/N1/2.hdr
@@ -0,0 +1,5 @@
+Content-Type: text/x-patch;
+ name="0001-ath9k-move-sc_flags-to-ath_common.patch"
+Content-Transfer-Encoding: quoted-printable
+Content-Disposition: attachment;
+ filename="0001-ath9k-move-sc_flags-to-ath_common.patch"
diff --git a/N1/2.txt b/N1/2.txt
new file mode 100644
index 0000000..a9c9fa7
--- /dev/null
+++ b/N1/2.txt
@@ -0,0 +1,579 @@
+From 7b2ff07b8b01362ac5ab8395ce5000ae3cf81c57 Mon Sep 17 00:00:00 2001
+From: Oleksij Rempel <linux@rempel-privat.de>
+Date: Thu, 27 Feb 2014 11:40:46 +0100
+Subject: [PATCH 05/23 v2] ath9k: move sc_flags to ath_common
+
+we will need it for ath9k_htc, may be other drivers too
+
+Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
+---
+ drivers/net/wireless/ath/ath.h          | 10 ++++++++
+ drivers/net/wireless/ath/ath9k/ahb.c    |  7 ++---
+ drivers/net/wireless/ath/ath9k/ath9k.h  | 10 --------
+ drivers/net/wireless/ath/ath9k/beacon.c | 18 +++++++------
+ drivers/net/wireless/ath/ath9k/debug.c  |  2 +-
+ drivers/net/wireless/ath/ath9k/link.c   | 16 +++++++-----
+ drivers/net/wireless/ath/ath9k/main.c   | 45 ++++++++++++++++++---------------
+ drivers/net/wireless/ath/ath9k/mci.c    |  2 +-
+ drivers/net/wireless/ath/ath9k/pci.c    |  8 +++---
+ drivers/net/wireless/ath/ath9k/tx99.c   |  2 +-
+ drivers/net/wireless/ath/ath9k/wow.c    |  4 +--
+ drivers/net/wireless/ath/ath9k/xmit.c   |  9 ++++---
+ 12 files changed, 73 insertions(+), 60 deletions(-)
+
+diff --git a/drivers/net/wireless/ath/ath.h b/drivers/net/wireless/ath/ath.h
+index d239acc..a889fd6 100644
+--- a/drivers/net/wireless/ath/ath.h
++++ b/drivers/net/wireless/ath/ath.h
+@@ -56,6 +56,15 @@ enum ath_device_state {
+ 	ATH_HW_INITIALIZED,
+ };
+ 
++enum ath_op_flags {
++	ATH_OP_INVALID,
++	ATH_OP_BEACONS,
++	ATH_OP_ANI_RUN,
++	ATH_OP_PRIM_STA_VIF,
++	ATH_OP_HW_RESET,
++	ATH_OP_SCANNING,
++};
++
+ enum ath_bus_type {
+ 	ATH_PCI,
+ 	ATH_AHB,
+@@ -130,6 +139,7 @@ struct ath_common {
+ 	struct ieee80211_hw *hw;
+ 	int debug_mask;
+ 	enum ath_device_state state;
++	unsigned long op_flags;
+ 
+ 	struct ath_ani ani;
+ 
+diff --git a/drivers/net/wireless/ath/ath9k/ahb.c b/drivers/net/wireless/ath/ath9k/ahb.c
+index 2dff276..a5684c3 100644
+--- a/drivers/net/wireless/ath/ath9k/ahb.c
++++ b/drivers/net/wireless/ath/ath9k/ahb.c
+@@ -82,6 +82,7 @@ static int ath_ahb_probe(struct platform_device *pdev)
+ 	int irq;
+ 	int ret = 0;
+ 	struct ath_hw *ah;
++	struct ath_common *common;
+ 	char hw_name[64];
+ 
+ 	if (!dev_get_platdata(&pdev->dev)) {
+@@ -124,9 +125,6 @@ static int ath_ahb_probe(struct platform_device *pdev)
+ 	sc->mem = mem;
+ 	sc->irq = irq;
+ 
+-	/* Will be cleared in ath9k_start() */
+-	set_bit(SC_OP_INVALID, &sc->sc_flags);
+-
+ 	ret = request_irq(irq, ath_isr, IRQF_SHARED, "ath9k", sc);
+ 	if (ret) {
+ 		dev_err(&pdev->dev, "request_irq failed\n");
+@@ -144,6 +142,9 @@ static int ath_ahb_probe(struct platform_device *pdev)
+ 	wiphy_info(hw->wiphy, "%s mem=0x%lx, irq=%d\n",
+ 		   hw_name, (unsigned long)mem, irq);
+ 
++	common = ath9k_hw_common(sc->sc_ah);
++	/* Will be cleared in ath9k_start() */
++	set_bit(ATH_OP_INVALID, &common->op_flags);
+ 	return 0;
+ 
+  err_irq:
+diff --git a/drivers/net/wireless/ath/ath9k/ath9k.h b/drivers/net/wireless/ath/ath9k/ath9k.h
+index b54bcae..7f87f33 100644
+--- a/drivers/net/wireless/ath/ath9k/ath9k.h
++++ b/drivers/net/wireless/ath/ath9k/ath9k.h
+@@ -688,15 +688,6 @@ void ath_ant_comb_scan(struct ath_softc *sc, struct ath_rx_status *rs);
+ #define ATH_TXPOWER_MAX         100     /* .5 dBm units */
+ #define MAX_GTT_CNT             5
+ 
+-enum sc_op_flags {
+-	SC_OP_INVALID,
+-	SC_OP_BEACONS,
+-	SC_OP_ANI_RUN,
+-	SC_OP_PRIM_STA_VIF,
+-	SC_OP_HW_RESET,
+-	SC_OP_SCANNING,
+-};
+-
+ /* Powersave flags */
+ #define PS_WAIT_FOR_BEACON        BIT(0)
+ #define PS_WAIT_FOR_CAB           BIT(1)
+@@ -726,7 +717,6 @@ struct ath_softc {
+ 	struct completion paprd_complete;
+ 	wait_queue_head_t tx_wait;
+ 
+-	unsigned long sc_flags;
+ 	unsigned long driver_data;
+ 
+ 	u8 gtt_cnt;
+diff --git a/drivers/net/wireless/ath/ath9k/beacon.c b/drivers/net/wireless/ath/ath9k/beacon.c
+index 02eb4f1..6372671 100644
+--- a/drivers/net/wireless/ath/ath9k/beacon.c
++++ b/drivers/net/wireless/ath/ath9k/beacon.c
+@@ -328,7 +328,7 @@ void ath9k_beacon_tasklet(unsigned long data)
+ 	bool edma = !!(ah->caps.hw_caps & ATH9K_HW_CAP_EDMA);
+ 	int slot;
+ 
+-	if (test_bit(SC_OP_HW_RESET, &sc->sc_flags)) {
++	if (test_bit(ATH_OP_HW_RESET, &common->op_flags)) {
+ 		ath_dbg(common, RESET,
+ 			"reset work is pending, skip beaconing now\n");
+ 		return;
+@@ -524,7 +524,7 @@ static void ath9k_beacon_config_sta(struct ath_softc *sc,
+ 	u64 tsf;
+ 
+ 	/* No need to configure beacon if we are not associated */
+-	if (!test_bit(SC_OP_PRIM_STA_VIF, &sc->sc_flags)) {
++	if (!test_bit(ATH_OP_PRIM_STA_VIF, &common->op_flags)) {
+ 		ath_dbg(common, BEACON,
+ 			"STA is not yet associated..skipping beacon config\n");
+ 		return;
+@@ -629,7 +629,7 @@ static void ath9k_beacon_config_adhoc(struct ath_softc *sc,
+ 	 * joiner case in IBSS mode.
+ 	 */
+ 	if (!conf->ibss_creator && conf->enable_beacon)
+-		set_bit(SC_OP_BEACONS, &sc->sc_flags);
++		set_bit(ATH_OP_BEACONS, &common->op_flags);
+ }
+ 
+ static bool ath9k_allow_beacon_config(struct ath_softc *sc,
+@@ -649,7 +649,7 @@ static bool ath9k_allow_beacon_config(struct ath_softc *sc,
+ 
+ 	if (sc->sc_ah->opmode == NL80211_IFTYPE_STATION) {
+ 		if ((vif->type == NL80211_IFTYPE_STATION) &&
+-		    test_bit(SC_OP_BEACONS, &sc->sc_flags) &&
++		    test_bit(ATH_OP_BEACONS, &common->op_flags) &&
+ 		    !avp->primary_sta_vif) {
+ 			ath_dbg(common, CONFIG,
+ 				"Beacon already configured for a station interface\n");
+@@ -700,6 +700,8 @@ void ath9k_beacon_config(struct ath_softc *sc, struct ieee80211_vif *vif,
+ {
+ 	struct ieee80211_bss_conf *bss_conf = &vif->bss_conf;
+ 	struct ath_beacon_config *cur_conf = &sc->cur_beacon_conf;
++        struct ath_hw *ah = sc->sc_ah;
++        struct ath_common *common = ath9k_hw_common(ah);
+ 	unsigned long flags;
+ 	bool skip_beacon = false;
+ 
+@@ -712,7 +714,7 @@ void ath9k_beacon_config(struct ath_softc *sc, struct ieee80211_vif *vif,
+ 	if (sc->sc_ah->opmode == NL80211_IFTYPE_STATION) {
+ 		ath9k_cache_beacon_config(sc, bss_conf);
+ 		ath9k_set_beacon(sc);
+-		set_bit(SC_OP_BEACONS, &sc->sc_flags);
++		set_bit(ATH_OP_BEACONS, &common->op_flags);
+ 		return;
+ 	}
+ 
+@@ -751,13 +753,13 @@ void ath9k_beacon_config(struct ath_softc *sc, struct ieee80211_vif *vif,
+ 		}
+ 
+ 		/*
+-		 * Do not set the SC_OP_BEACONS flag for IBSS joiner mode
++		 * Do not set the ATH_OP_BEACONS flag for IBSS joiner mode
+ 		 * here, it is done in ath9k_beacon_config_adhoc().
+ 		 */
+ 		if (cur_conf->enable_beacon && !skip_beacon)
+-			set_bit(SC_OP_BEACONS, &sc->sc_flags);
++			set_bit(ATH_OP_BEACONS, &common->op_flags);
+ 		else
+-			clear_bit(SC_OP_BEACONS, &sc->sc_flags);
++			clear_bit(ATH_OP_BEACONS, &common->op_flags);
+ 	}
+ }
+ 
+diff --git a/drivers/net/wireless/ath/ath9k/debug.c b/drivers/net/wireless/ath/ath9k/debug.c
+index f8924ef..016a872 100644
+--- a/drivers/net/wireless/ath/ath9k/debug.c
++++ b/drivers/net/wireless/ath/ath9k/debug.c
+@@ -210,7 +210,7 @@ static ssize_t write_file_ani(struct file *file,
+ 	common->disable_ani = !ani;
+ 
+ 	if (common->disable_ani) {
+-		clear_bit(SC_OP_ANI_RUN, &sc->sc_flags);
++		clear_bit(ATH_OP_ANI_RUN, &common->op_flags);
+ 		ath_stop_ani(sc);
+ 	} else {
+ 		ath_check_ani(sc);
+diff --git a/drivers/net/wireless/ath/ath9k/link.c b/drivers/net/wireless/ath/ath9k/link.c
+index 30dcef5..72a715f 100644
+--- a/drivers/net/wireless/ath/ath9k/link.c
++++ b/drivers/net/wireless/ath/ath9k/link.c
+@@ -115,13 +115,14 @@ void ath_hw_pll_work(struct work_struct *work)
+ 	u32 pll_sqsum;
+ 	struct ath_softc *sc = container_of(work, struct ath_softc,
+ 					    hw_pll_work.work);
++	struct ath_common *common = ath9k_hw_common(sc->sc_ah);
+ 	/*
+ 	 * ensure that the PLL WAR is executed only
+ 	 * after the STA is associated (or) if the
+ 	 * beaconing had started in interfaces that
+ 	 * uses beacons.
+ 	 */
+-	if (!test_bit(SC_OP_BEACONS, &sc->sc_flags))
++	if (!test_bit(ATH_OP_BEACONS, &common->op_flags))
+ 		return;
+ 
+ 	if (sc->tx99_state)
+@@ -414,7 +415,7 @@ void ath_start_ani(struct ath_softc *sc)
+ 	unsigned long timestamp = jiffies_to_msecs(jiffies);
+ 
+ 	if (common->disable_ani ||
+-	    !test_bit(SC_OP_ANI_RUN, &sc->sc_flags) ||
++	    !test_bit(ATH_OP_ANI_RUN, &common->op_flags) ||
+ 	    (sc->hw->conf.flags & IEEE80211_CONF_OFFCHANNEL))
+ 		return;
+ 
+@@ -438,6 +439,7 @@ void ath_stop_ani(struct ath_softc *sc)
+ void ath_check_ani(struct ath_softc *sc)
+ {
+ 	struct ath_hw *ah = sc->sc_ah;
++	struct ath_common *common = ath9k_hw_common(sc->sc_ah);
+ 	struct ath_beacon_config *cur_conf = &sc->cur_beacon_conf;
+ 
+ 	/*
+@@ -453,23 +455,23 @@ void ath_check_ani(struct ath_softc *sc)
+ 			 * Disable ANI only when there are no
+ 			 * associated stations.
+ 			 */
+-			if (!test_bit(SC_OP_PRIM_STA_VIF, &sc->sc_flags))
++			if (!test_bit(ATH_OP_PRIM_STA_VIF, &common->op_flags))
+ 				goto stop_ani;
+ 		}
+ 	} else if (ah->opmode == NL80211_IFTYPE_STATION) {
+-		if (!test_bit(SC_OP_PRIM_STA_VIF, &sc->sc_flags))
++		if (!test_bit(ATH_OP_PRIM_STA_VIF, &common->op_flags))
+ 			goto stop_ani;
+ 	}
+ 
+-	if (!test_bit(SC_OP_ANI_RUN, &sc->sc_flags)) {
+-		set_bit(SC_OP_ANI_RUN, &sc->sc_flags);
++	if (!test_bit(ATH_OP_ANI_RUN, &common->op_flags)) {
++		set_bit(ATH_OP_ANI_RUN, &common->op_flags);
+ 		ath_start_ani(sc);
+ 	}
+ 
+ 	return;
+ 
+ stop_ani:
+-	clear_bit(SC_OP_ANI_RUN, &sc->sc_flags);
++	clear_bit(ATH_OP_ANI_RUN, &common->op_flags);
+ 	ath_stop_ani(sc);
+ }
+ 
+diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
+index 42a1803..d69853b 100644
+--- a/drivers/net/wireless/ath/ath9k/main.c
++++ b/drivers/net/wireless/ath/ath9k/main.c
+@@ -229,16 +229,16 @@ static bool ath_complete_reset(struct ath_softc *sc, bool start)
+ 	ath9k_cmn_update_txpow(ah, sc->curtxpow,
+ 			       sc->config.txpowlimit, &sc->curtxpow);
+ 
+-	clear_bit(SC_OP_HW_RESET, &sc->sc_flags);
++	clear_bit(ATH_OP_HW_RESET, &common->op_flags);
+ 	ath9k_hw_set_interrupts(ah);
+ 	ath9k_hw_enable_interrupts(ah);
+ 
+ 	if (!(sc->hw->conf.flags & IEEE80211_CONF_OFFCHANNEL) && start) {
+-		if (!test_bit(SC_OP_BEACONS, &sc->sc_flags))
++		if (!test_bit(ATH_OP_BEACONS, &common->op_flags))
+ 			goto work;
+ 
+ 		if (ah->opmode == NL80211_IFTYPE_STATION &&
+-		    test_bit(SC_OP_PRIM_STA_VIF, &sc->sc_flags)) {
++		    test_bit(ATH_OP_PRIM_STA_VIF, &common->op_flags)) {
+ 			spin_lock_irqsave(&sc->sc_pm_lock, flags);
+ 			sc->ps_flags |= PS_BEACON_SYNC | PS_WAIT_FOR_BEACON;
+ 			spin_unlock_irqrestore(&sc->sc_pm_lock, flags);
+@@ -336,7 +336,7 @@ static int ath_set_channel(struct ath_softc *sc, struct cfg80211_chan_def *chand
+ 	int old_pos = -1;
+ 	int r;
+ 
+-	if (test_bit(SC_OP_INVALID, &sc->sc_flags))
++	if (test_bit(ATH_OP_INVALID, &common->op_flags))
+ 		return -EIO;
+ 
+ 	offchannel = !!(hw->conf.flags & IEEE80211_CONF_OFFCHANNEL);
+@@ -402,7 +402,7 @@ static int ath_set_channel(struct ath_softc *sc, struct cfg80211_chan_def *chand
+ 			chan->center_freq);
+ 	} else {
+ 		/* perform spectral scan if requested. */
+-		if (test_bit(SC_OP_SCANNING, &sc->sc_flags) &&
++		if (test_bit(ATH_OP_SCANNING, &common->op_flags) &&
+ 			sc->spectral_mode == SPECTRAL_CHANSCAN)
+ 			ath9k_spectral_scan_trigger(hw);
+ 	}
+@@ -566,6 +566,7 @@ irqreturn_t ath_isr(int irq, void *dev)
+ 
+ 	struct ath_softc *sc = dev;
+ 	struct ath_hw *ah = sc->sc_ah;
++	struct ath_common *common = ath9k_hw_common(ah);
+ 	enum ath9k_int status;
+ 	u32 sync_cause = 0;
+ 	bool sched = false;
+@@ -575,7 +576,7 @@ irqreturn_t ath_isr(int irq, void *dev)
+ 	 * touch anything. Note this can happen early
+ 	 * on if the IRQ is shared.
+ 	 */
+-	if (test_bit(SC_OP_INVALID, &sc->sc_flags))
++	if (test_bit(ATH_OP_INVALID, &common->op_flags))
+ 		return IRQ_NONE;
+ 
+ 	/* shared irq, not for us */
+@@ -583,7 +584,7 @@ irqreturn_t ath_isr(int irq, void *dev)
+ 	if (!ath9k_hw_intrpend(ah))
+ 		return IRQ_NONE;
+ 
+-	if (test_bit(SC_OP_HW_RESET, &sc->sc_flags)) {
++	if (test_bit(ATH_OP_HW_RESET, &common->op_flags)) {
+ 		ath9k_hw_kill_interrupts(ah);
+ 		return IRQ_HANDLED;
+ 	}
+@@ -684,10 +685,11 @@ int ath_reset(struct ath_softc *sc)
+ 
+ void ath9k_queue_reset(struct ath_softc *sc, enum ath_reset_type type)
+ {
++	struct ath_common *common = ath9k_hw_common(sc->sc_ah);
+ #ifdef CONFIG_ATH9K_DEBUGFS
+ 	RESET_STAT_INC(sc, type);
+ #endif
+-	set_bit(SC_OP_HW_RESET, &sc->sc_flags);
++	set_bit(ATH_OP_HW_RESET, &common->op_flags);
+ 	ieee80211_queue_work(sc->hw, &sc->hw_reset_work);
+ }
+ 
+@@ -768,7 +770,7 @@ static int ath9k_start(struct ieee80211_hw *hw)
+ 
+ 	ath_mci_enable(sc);
+ 
+-	clear_bit(SC_OP_INVALID, &sc->sc_flags);
++	clear_bit(ATH_OP_INVALID, &common->op_flags);
+ 	sc->sc_ah->is_monitoring = false;
+ 
+ 	if (!ath_complete_reset(sc, false))
+@@ -885,7 +887,7 @@ static void ath9k_stop(struct ieee80211_hw *hw)
+ 
+ 	ath_cancel_work(sc);
+ 
+-	if (test_bit(SC_OP_INVALID, &sc->sc_flags)) {
++	if (test_bit(ATH_OP_INVALID, &common->op_flags)) {
+ 		ath_dbg(common, ANY, "Device not present\n");
+ 		mutex_unlock(&sc->mutex);
+ 		return;
+@@ -940,7 +942,7 @@ static void ath9k_stop(struct ieee80211_hw *hw)
+ 
+ 	ath9k_ps_restore(sc);
+ 
+-	set_bit(SC_OP_INVALID, &sc->sc_flags);
++	set_bit(ATH_OP_INVALID, &common->op_flags);
+ 	sc->ps_idle = prev_idle;
+ 
+ 	mutex_unlock(&sc->mutex);
+@@ -1081,7 +1083,7 @@ static void ath9k_calculate_summary_state(struct ieee80211_hw *hw,
+ 	 */
+ 	if (ah->opmode == NL80211_IFTYPE_STATION &&
+ 	    old_opmode == NL80211_IFTYPE_AP &&
+-	    test_bit(SC_OP_PRIM_STA_VIF, &sc->sc_flags)) {
++	    test_bit(ATH_OP_PRIM_STA_VIF, &common->op_flags)) {
+ 		ieee80211_iterate_active_interfaces_atomic(
+ 			sc->hw, IEEE80211_IFACE_ITER_RESUME_ALL,
+ 			ath9k_sta_vif_iter, sc);
+@@ -1590,7 +1592,7 @@ static void ath9k_set_assoc_state(struct ath_softc *sc,
+ 	struct ieee80211_bss_conf *bss_conf = &vif->bss_conf;
+ 	unsigned long flags;
+ 
+-	set_bit(SC_OP_PRIM_STA_VIF, &sc->sc_flags);
++	set_bit(ATH_OP_PRIM_STA_VIF, &common->op_flags);
+ 	avp->primary_sta_vif = true;
+ 
+ 	/*
+@@ -1625,8 +1627,9 @@ static void ath9k_bss_assoc_iter(void *data, u8 *mac, struct ieee80211_vif *vif)
+ {
+ 	struct ath_softc *sc = data;
+ 	struct ieee80211_bss_conf *bss_conf = &vif->bss_conf;
++	struct ath_common *common = ath9k_hw_common(sc->sc_ah);
+ 
+-	if (test_bit(SC_OP_PRIM_STA_VIF, &sc->sc_flags))
++	if (test_bit(ATH_OP_PRIM_STA_VIF, &common->op_flags))
+ 		return;
+ 
+ 	if (bss_conf->assoc)
+@@ -1657,18 +1660,18 @@ static void ath9k_bss_info_changed(struct ieee80211_hw *hw,
+ 			bss_conf->bssid, bss_conf->assoc);
+ 
+ 		if (avp->primary_sta_vif && !bss_conf->assoc) {
+-			clear_bit(SC_OP_PRIM_STA_VIF, &sc->sc_flags);
++			clear_bit(ATH_OP_PRIM_STA_VIF, &common->op_flags);
+ 			avp->primary_sta_vif = false;
+ 
+ 			if (ah->opmode == NL80211_IFTYPE_STATION)
+-				clear_bit(SC_OP_BEACONS, &sc->sc_flags);
++				clear_bit(ATH_OP_BEACONS, &common->op_flags);
+ 		}
+ 
+ 		ieee80211_iterate_active_interfaces_atomic(
+ 			sc->hw, IEEE80211_IFACE_ITER_RESUME_ALL,
+ 			ath9k_bss_assoc_iter, sc);
+ 
+-		if (!test_bit(SC_OP_PRIM_STA_VIF, &sc->sc_flags) &&
++		if (!test_bit(ATH_OP_PRIM_STA_VIF, &common->op_flags) &&
+ 		    ah->opmode == NL80211_IFTYPE_STATION) {
+ 			memset(common->curbssid, 0, ETH_ALEN);
+ 			common->curaid = 0;
+@@ -1897,7 +1900,7 @@ static void ath9k_flush(struct ieee80211_hw *hw, u32 queues, bool drop)
+ 		return;
+ 	}
+ 
+-	if (test_bit(SC_OP_INVALID, &sc->sc_flags)) {
++	if (test_bit(ATH_OP_INVALID, &common->op_flags)) {
+ 		ath_dbg(common, ANY, "Device not present\n");
+ 		mutex_unlock(&sc->mutex);
+ 		return;
+@@ -2070,13 +2073,15 @@ static int ath9k_get_antenna(struct ieee80211_hw *hw, u32 *tx_ant, u32 *rx_ant)
+ static void ath9k_sw_scan_start(struct ieee80211_hw *hw)
+ {
+ 	struct ath_softc *sc = hw->priv;
+-	set_bit(SC_OP_SCANNING, &sc->sc_flags);
++	struct ath_common *common = ath9k_hw_common(sc->sc_ah);
++	set_bit(ATH_OP_SCANNING, &common->op_flags);
+ }
+ 
+ static void ath9k_sw_scan_complete(struct ieee80211_hw *hw)
+ {
+ 	struct ath_softc *sc = hw->priv;
+-	clear_bit(SC_OP_SCANNING, &sc->sc_flags);
++	struct ath_common *common = ath9k_hw_common(sc->sc_ah);
++	clear_bit(ATH_OP_SCANNING, &common->op_flags);
+ }
+ 
+ static void ath9k_channel_switch_beacon(struct ieee80211_hw *hw,
+diff --git a/drivers/net/wireless/ath/ath9k/mci.c b/drivers/net/wireless/ath/ath9k/mci.c
+index 71799fc..a0dbcc4 100644
+--- a/drivers/net/wireless/ath/ath9k/mci.c
++++ b/drivers/net/wireless/ath/ath9k/mci.c
+@@ -555,7 +555,7 @@ void ath_mci_intr(struct ath_softc *sc)
+ 		mci_int_rxmsg &= ~AR_MCI_INTERRUPT_RX_MSG_GPM;
+ 
+ 		while (more_data == MCI_GPM_MORE) {
+-			if (test_bit(SC_OP_HW_RESET, &sc->sc_flags))
++			if (test_bit(ATH_OP_HW_RESET, &common->op_flags))
+ 				return;
+ 
+ 			pgpm = mci->gpm_buf.bf_addr;
+diff --git a/drivers/net/wireless/ath/ath9k/pci.c b/drivers/net/wireless/ath/ath9k/pci.c
+index 55724b0..25304ad 100644
+--- a/drivers/net/wireless/ath/ath9k/pci.c
++++ b/drivers/net/wireless/ath/ath9k/pci.c
+@@ -784,6 +784,7 @@ static int ath_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
+ {
+ 	struct ath_softc *sc;
+ 	struct ieee80211_hw *hw;
++	struct ath_common *common;
+ 	u8 csz;
+ 	u32 val;
+ 	int ret = 0;
+@@ -858,9 +859,6 @@ static int ath_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
+ 	sc->mem = pcim_iomap_table(pdev)[0];
+ 	sc->driver_data = id->driver_data;
+ 
+-	/* Will be cleared in ath9k_start() */
+-	set_bit(SC_OP_INVALID, &sc->sc_flags);
+-
+ 	ret = request_irq(pdev->irq, ath_isr, IRQF_SHARED, "ath9k", sc);
+ 	if (ret) {
+ 		dev_err(&pdev->dev, "request_irq failed\n");
+@@ -879,6 +877,10 @@ static int ath_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
+ 	wiphy_info(hw->wiphy, "%s mem=0x%lx, irq=%d\n",
+ 		   hw_name, (unsigned long)sc->mem, pdev->irq);
+ 
++	/* Will be cleared in ath9k_start() */
++	common = ath9k_hw_common(sc->sc_ah);
++	set_bit(ATH_OP_INVALID, &common->op_flags);
++
+ 	return 0;
+ 
+ err_init:
+diff --git a/drivers/net/wireless/ath/ath9k/tx99.c b/drivers/net/wireless/ath/ath9k/tx99.c
+index b686a74..a65cfb9 100644
+--- a/drivers/net/wireless/ath/ath9k/tx99.c
++++ b/drivers/net/wireless/ath/ath9k/tx99.c
+@@ -108,7 +108,7 @@ static int ath9k_tx99_init(struct ath_softc *sc)
+ 	struct ath_tx_control txctl;
+ 	int r;
+ 
+-	if (test_bit(SC_OP_INVALID, &sc->sc_flags)) {
++	if (test_bit(ATH_OP_INVALID, &common->op_flags)) {
+ 		ath_err(common,
+ 			"driver is in invalid state unable to use TX99");
+ 		return -EINVAL;
+diff --git a/drivers/net/wireless/ath/ath9k/wow.c b/drivers/net/wireless/ath/ath9k/wow.c
+index 1b3230f..2879887 100644
+--- a/drivers/net/wireless/ath/ath9k/wow.c
++++ b/drivers/net/wireless/ath/ath9k/wow.c
+@@ -198,7 +198,7 @@ int ath9k_suspend(struct ieee80211_hw *hw,
+ 	ath_cancel_work(sc);
+ 	ath_stop_ani(sc);
+ 
+-	if (test_bit(SC_OP_INVALID, &sc->sc_flags)) {
++	if (test_bit(ATH_OP_INVALID, &common->op_flags)) {
+ 		ath_dbg(common, ANY, "Device not present\n");
+ 		ret = -EINVAL;
+ 		goto fail_wow;
+@@ -224,7 +224,7 @@ int ath9k_suspend(struct ieee80211_hw *hw,
+ 	 * STA.
+ 	 */
+ 
+-	if (!test_bit(SC_OP_PRIM_STA_VIF, &sc->sc_flags)) {
++	if (!test_bit(ATH_OP_PRIM_STA_VIF, &common->op_flags)) {
+ 		ath_dbg(common, WOW, "None of the STA vifs are associated\n");
+ 		ret = 1;
+ 		goto fail_wow;
+diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c
+index 550e4d2b..81d8a70 100644
+--- a/drivers/net/wireless/ath/ath9k/xmit.c
++++ b/drivers/net/wireless/ath/ath9k/xmit.c
+@@ -1769,7 +1769,7 @@ bool ath_drain_all_txq(struct ath_softc *sc)
+ 	int i;
+ 	u32 npend = 0;
+ 
+-	if (test_bit(SC_OP_INVALID, &sc->sc_flags))
++	if (test_bit(ATH_OP_INVALID, &common->op_flags))
+ 		return true;
+ 
+ 	ath9k_hw_abort_tx_dma(ah);
+@@ -1817,11 +1817,12 @@ void ath_tx_cleanupq(struct ath_softc *sc, struct ath_txq *txq)
+  */
+ void ath_txq_schedule(struct ath_softc *sc, struct ath_txq *txq)
+ {
++	struct ath_common *common = ath9k_hw_common(sc->sc_ah);
+ 	struct ath_atx_ac *ac, *last_ac;
+ 	struct ath_atx_tid *tid, *last_tid;
+ 	bool sent = false;
+ 
+-	if (test_bit(SC_OP_HW_RESET, &sc->sc_flags) ||
++	if (test_bit(ATH_OP_HW_RESET, &common->op_flags) ||
+ 	    list_empty(&txq->axq_acq))
+ 		return;
+ 
+@@ -2471,7 +2472,7 @@ static void ath_tx_processq(struct ath_softc *sc, struct ath_txq *txq)
+ 
+ 	ath_txq_lock(sc, txq);
+ 	for (;;) {
+-		if (test_bit(SC_OP_HW_RESET, &sc->sc_flags))
++		if (test_bit(ATH_OP_HW_RESET, &common->op_flags))
+ 			break;
+ 
+ 		if (list_empty(&txq->axq_q)) {
+@@ -2554,7 +2555,7 @@ void ath_tx_edma_tasklet(struct ath_softc *sc)
+ 	int status;
+ 
+ 	for (;;) {
+-		if (test_bit(SC_OP_HW_RESET, &sc->sc_flags))
++		if (test_bit(ATH_OP_HW_RESET, &common->op_flags))
+ 			break;
+ 
+ 		status = ath9k_hw_txprocdesc(ah, NULL, (void *)&ts);
+-- 
+1.9.0
diff --git a/a/content_digest b/N1/content_digest
index ee32c06..a62e35d 100644
--- a/a/content_digest
+++ b/N1/content_digest
@@ -8,10 +8,13 @@
  "ref\0531DD589.1090109@rempel-privat.de\0"
  "ref\020140314192212.GD20339@tuxdriver.com\0"
  "From\0Oleksij Rempel <linux@rempel-privat.de>\0"
- "Subject\0[ath9k-devel] [PATCH 00/23] ath9k|ath9k_htc: move dups to common-beacon\0"
+ "Subject\0Re: [PATCH 00/23] ath9k|ath9k_htc: move dups to common-beacon\0"
  "Date\0Sat, 15 Mar 2014 08:51:31 +0100\0"
- "To\0ath9k-devel@lists.ath9k.org\0"
- "\00:1\0"
+ "To\0John W. Linville <linville@tuxdriver.com>\0"
+ "Cc\0Sujith Manoharan <sujith@msujith.org>"
+  linux-wireless@vger.kernel.org
+ " ath9k-devel@lists.ath9k.org <ath9k-devel@venema.h4ckr.net>\0"
+ "\01:1\0"
  "b\0"
  "Am 14.03.2014 20:22, schrieb John W. Linville:\n"
  "> On Mon, Mar 10, 2014 at 04:08:57PM +0100, Oleksij Rempel wrote:\n"
@@ -37,29 +40,29 @@
  ">                  from include/linux/etherdevice.h:25,\n"
  ">                  from drivers/net/wireless/ath/ath9k/ath9k.h:20,\n"
  ">                  from drivers/net/wireless/ath/ath9k/tx99.c:17:\n"
- "> drivers/net/wireless/ath/ath9k/tx99.c: In function ?ath9k_tx99_init?:\n"
- "> drivers/net/wireless/ath/ath9k/tx99.c:111:15: error: ?SC_OP_INVALID? undeclared (first use in this function)\n"
+ "> drivers/net/wireless/ath/ath9k/tx99.c: In function \342\200\230ath9k_tx99_init\342\200\231:\n"
+ "> drivers/net/wireless/ath/ath9k/tx99.c:111:15: error: \342\200\230SC_OP_INVALID\342\200\231 undeclared (first use in this function)\n"
  ">   if (test_bit(SC_OP_INVALID, &sc->sc_flags)) {\n"
  ">                ^\n"
- "> /home/linville/git/wireless-next/arch/x86/include/asm/bitops.h:338:25: note: in definition of macro ?test_bit?\n"
+ "> /home/linville/git/wireless-next/arch/x86/include/asm/bitops.h:338:25: note: in definition of macro \342\200\230test_bit\342\200\231\n"
  ">   (__builtin_constant_p((nr))  \\\n"
  ">                          ^\n"
  "> drivers/net/wireless/ath/ath9k/tx99.c:111:15: note: each undeclared identifier is reported only once for each function it appears in\n"
  ">   if (test_bit(SC_OP_INVALID, &sc->sc_flags)) {\n"
  ">                ^\n"
- "> /home/linville/git/wireless-next/arch/x86/include/asm/bitops.h:338:25: note: in definition of macro ?test_bit?\n"
+ "> /home/linville/git/wireless-next/arch/x86/include/asm/bitops.h:338:25: note: in definition of macro \342\200\230test_bit\342\200\231\n"
  ">   (__builtin_constant_p((nr))  \\\n"
  ">                          ^\n"
- "> drivers/net/wireless/ath/ath9k/tx99.c:111:33: error: ?struct ath_softc? has no member named ?sc_flags?\n"
+ "> drivers/net/wireless/ath/ath9k/tx99.c:111:33: error: \342\200\230struct ath_softc\342\200\231 has no member named \342\200\230sc_flags\342\200\231\n"
  ">   if (test_bit(SC_OP_INVALID, &sc->sc_flags)) {\n"
  ">                                  ^\n"
- "> /home/linville/git/wireless-next/arch/x86/include/asm/bitops.h:339:30: note: in definition of macro ?test_bit?\n"
+ "> /home/linville/git/wireless-next/arch/x86/include/asm/bitops.h:339:30: note: in definition of macro \342\200\230test_bit\342\200\231\n"
  ">    ? constant_test_bit((nr), (addr)) \\\n"
  ">                               ^\n"
- "> drivers/net/wireless/ath/ath9k/tx99.c:111:33: error: ?struct ath_softc? has no member named ?sc_flags?\n"
+ "> drivers/net/wireless/ath/ath9k/tx99.c:111:33: error: \342\200\230struct ath_softc\342\200\231 has no member named \342\200\230sc_flags\342\200\231\n"
  ">   if (test_bit(SC_OP_INVALID, &sc->sc_flags)) {\n"
  ">                                  ^\n"
- "> /home/linville/git/wireless-next/arch/x86/include/asm/bitops.h:340:30: note: in definition of macro ?test_bit?\n"
+ "> /home/linville/git/wireless-next/arch/x86/include/asm/bitops.h:340:30: note: in definition of macro \342\200\230test_bit\342\200\231\n"
  ">    : variable_test_bit((nr), (addr)))\n"
  ">                               ^\n"
  "> make[3]: *** [drivers/net/wireless/ath/ath9k/tx99.o] Error 1\n"
@@ -74,13 +77,588 @@
  "\n"
  "-- \n"
  "Regards,\n"
- "Oleksij\n"
- "-------------- next part --------------\n"
- "A non-text attachment was scrubbed...\n"
- "Name: 0001-ath9k-move-sc_flags-to-ath_common.patch\n"
- "Type: text/x-patch\n"
- "Size: 20132 bytes\n"
- "Desc: not available\n"
- Url : http://lists.ath9k.org/pipermail/ath9k-devel/attachments/20140315/18cd76cb/attachment-0001.bin
+ Oleksij
+ "\01:2\0"
+ "fn\00001-ath9k-move-sc_flags-to-ath_common.patch\0"
+ "b\0"
+ "From 7b2ff07b8b01362ac5ab8395ce5000ae3cf81c57 Mon Sep 17 00:00:00 2001\n"
+ "From: Oleksij Rempel <linux@rempel-privat.de>\n"
+ "Date: Thu, 27 Feb 2014 11:40:46 +0100\n"
+ "Subject: [PATCH 05/23 v2] ath9k: move sc_flags to ath_common\n"
+ "\n"
+ "we will need it for ath9k_htc, may be other drivers too\n"
+ "\n"
+ "Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>\n"
+ "---\n"
+ " drivers/net/wireless/ath/ath.h          | 10 ++++++++\n"
+ " drivers/net/wireless/ath/ath9k/ahb.c    |  7 ++---\n"
+ " drivers/net/wireless/ath/ath9k/ath9k.h  | 10 --------\n"
+ " drivers/net/wireless/ath/ath9k/beacon.c | 18 +++++++------\n"
+ " drivers/net/wireless/ath/ath9k/debug.c  |  2 +-\n"
+ " drivers/net/wireless/ath/ath9k/link.c   | 16 +++++++-----\n"
+ " drivers/net/wireless/ath/ath9k/main.c   | 45 ++++++++++++++++++---------------\n"
+ " drivers/net/wireless/ath/ath9k/mci.c    |  2 +-\n"
+ " drivers/net/wireless/ath/ath9k/pci.c    |  8 +++---\n"
+ " drivers/net/wireless/ath/ath9k/tx99.c   |  2 +-\n"
+ " drivers/net/wireless/ath/ath9k/wow.c    |  4 +--\n"
+ " drivers/net/wireless/ath/ath9k/xmit.c   |  9 ++++---\n"
+ " 12 files changed, 73 insertions(+), 60 deletions(-)\n"
+ "\n"
+ "diff --git a/drivers/net/wireless/ath/ath.h b/drivers/net/wireless/ath/ath.h\n"
+ "index d239acc..a889fd6 100644\n"
+ "--- a/drivers/net/wireless/ath/ath.h\n"
+ "+++ b/drivers/net/wireless/ath/ath.h\n"
+ "@@ -56,6 +56,15 @@ enum ath_device_state {\n"
+ " \tATH_HW_INITIALIZED,\n"
+ " };\n"
+ " \n"
+ "+enum ath_op_flags {\n"
+ "+\tATH_OP_INVALID,\n"
+ "+\tATH_OP_BEACONS,\n"
+ "+\tATH_OP_ANI_RUN,\n"
+ "+\tATH_OP_PRIM_STA_VIF,\n"
+ "+\tATH_OP_HW_RESET,\n"
+ "+\tATH_OP_SCANNING,\n"
+ "+};\n"
+ "+\n"
+ " enum ath_bus_type {\n"
+ " \tATH_PCI,\n"
+ " \tATH_AHB,\n"
+ "@@ -130,6 +139,7 @@ struct ath_common {\n"
+ " \tstruct ieee80211_hw *hw;\n"
+ " \tint debug_mask;\n"
+ " \tenum ath_device_state state;\n"
+ "+\tunsigned long op_flags;\n"
+ " \n"
+ " \tstruct ath_ani ani;\n"
+ " \n"
+ "diff --git a/drivers/net/wireless/ath/ath9k/ahb.c b/drivers/net/wireless/ath/ath9k/ahb.c\n"
+ "index 2dff276..a5684c3 100644\n"
+ "--- a/drivers/net/wireless/ath/ath9k/ahb.c\n"
+ "+++ b/drivers/net/wireless/ath/ath9k/ahb.c\n"
+ "@@ -82,6 +82,7 @@ static int ath_ahb_probe(struct platform_device *pdev)\n"
+ " \tint irq;\n"
+ " \tint ret = 0;\n"
+ " \tstruct ath_hw *ah;\n"
+ "+\tstruct ath_common *common;\n"
+ " \tchar hw_name[64];\n"
+ " \n"
+ " \tif (!dev_get_platdata(&pdev->dev)) {\n"
+ "@@ -124,9 +125,6 @@ static int ath_ahb_probe(struct platform_device *pdev)\n"
+ " \tsc->mem = mem;\n"
+ " \tsc->irq = irq;\n"
+ " \n"
+ "-\t/* Will be cleared in ath9k_start() */\n"
+ "-\tset_bit(SC_OP_INVALID, &sc->sc_flags);\n"
+ "-\n"
+ " \tret = request_irq(irq, ath_isr, IRQF_SHARED, \"ath9k\", sc);\n"
+ " \tif (ret) {\n"
+ " \t\tdev_err(&pdev->dev, \"request_irq failed\\n\");\n"
+ "@@ -144,6 +142,9 @@ static int ath_ahb_probe(struct platform_device *pdev)\n"
+ " \twiphy_info(hw->wiphy, \"%s mem=0x%lx, irq=%d\\n\",\n"
+ " \t\t   hw_name, (unsigned long)mem, irq);\n"
+ " \n"
+ "+\tcommon = ath9k_hw_common(sc->sc_ah);\n"
+ "+\t/* Will be cleared in ath9k_start() */\n"
+ "+\tset_bit(ATH_OP_INVALID, &common->op_flags);\n"
+ " \treturn 0;\n"
+ " \n"
+ "  err_irq:\n"
+ "diff --git a/drivers/net/wireless/ath/ath9k/ath9k.h b/drivers/net/wireless/ath/ath9k/ath9k.h\n"
+ "index b54bcae..7f87f33 100644\n"
+ "--- a/drivers/net/wireless/ath/ath9k/ath9k.h\n"
+ "+++ b/drivers/net/wireless/ath/ath9k/ath9k.h\n"
+ "@@ -688,15 +688,6 @@ void ath_ant_comb_scan(struct ath_softc *sc, struct ath_rx_status *rs);\n"
+ " #define ATH_TXPOWER_MAX         100     /* .5 dBm units */\n"
+ " #define MAX_GTT_CNT             5\n"
+ " \n"
+ "-enum sc_op_flags {\n"
+ "-\tSC_OP_INVALID,\n"
+ "-\tSC_OP_BEACONS,\n"
+ "-\tSC_OP_ANI_RUN,\n"
+ "-\tSC_OP_PRIM_STA_VIF,\n"
+ "-\tSC_OP_HW_RESET,\n"
+ "-\tSC_OP_SCANNING,\n"
+ "-};\n"
+ "-\n"
+ " /* Powersave flags */\n"
+ " #define PS_WAIT_FOR_BEACON        BIT(0)\n"
+ " #define PS_WAIT_FOR_CAB           BIT(1)\n"
+ "@@ -726,7 +717,6 @@ struct ath_softc {\n"
+ " \tstruct completion paprd_complete;\n"
+ " \twait_queue_head_t tx_wait;\n"
+ " \n"
+ "-\tunsigned long sc_flags;\n"
+ " \tunsigned long driver_data;\n"
+ " \n"
+ " \tu8 gtt_cnt;\n"
+ "diff --git a/drivers/net/wireless/ath/ath9k/beacon.c b/drivers/net/wireless/ath/ath9k/beacon.c\n"
+ "index 02eb4f1..6372671 100644\n"
+ "--- a/drivers/net/wireless/ath/ath9k/beacon.c\n"
+ "+++ b/drivers/net/wireless/ath/ath9k/beacon.c\n"
+ "@@ -328,7 +328,7 @@ void ath9k_beacon_tasklet(unsigned long data)\n"
+ " \tbool edma = !!(ah->caps.hw_caps & ATH9K_HW_CAP_EDMA);\n"
+ " \tint slot;\n"
+ " \n"
+ "-\tif (test_bit(SC_OP_HW_RESET, &sc->sc_flags)) {\n"
+ "+\tif (test_bit(ATH_OP_HW_RESET, &common->op_flags)) {\n"
+ " \t\tath_dbg(common, RESET,\n"
+ " \t\t\t\"reset work is pending, skip beaconing now\\n\");\n"
+ " \t\treturn;\n"
+ "@@ -524,7 +524,7 @@ static void ath9k_beacon_config_sta(struct ath_softc *sc,\n"
+ " \tu64 tsf;\n"
+ " \n"
+ " \t/* No need to configure beacon if we are not associated */\n"
+ "-\tif (!test_bit(SC_OP_PRIM_STA_VIF, &sc->sc_flags)) {\n"
+ "+\tif (!test_bit(ATH_OP_PRIM_STA_VIF, &common->op_flags)) {\n"
+ " \t\tath_dbg(common, BEACON,\n"
+ " \t\t\t\"STA is not yet associated..skipping beacon config\\n\");\n"
+ " \t\treturn;\n"
+ "@@ -629,7 +629,7 @@ static void ath9k_beacon_config_adhoc(struct ath_softc *sc,\n"
+ " \t * joiner case in IBSS mode.\n"
+ " \t */\n"
+ " \tif (!conf->ibss_creator && conf->enable_beacon)\n"
+ "-\t\tset_bit(SC_OP_BEACONS, &sc->sc_flags);\n"
+ "+\t\tset_bit(ATH_OP_BEACONS, &common->op_flags);\n"
+ " }\n"
+ " \n"
+ " static bool ath9k_allow_beacon_config(struct ath_softc *sc,\n"
+ "@@ -649,7 +649,7 @@ static bool ath9k_allow_beacon_config(struct ath_softc *sc,\n"
+ " \n"
+ " \tif (sc->sc_ah->opmode == NL80211_IFTYPE_STATION) {\n"
+ " \t\tif ((vif->type == NL80211_IFTYPE_STATION) &&\n"
+ "-\t\t    test_bit(SC_OP_BEACONS, &sc->sc_flags) &&\n"
+ "+\t\t    test_bit(ATH_OP_BEACONS, &common->op_flags) &&\n"
+ " \t\t    !avp->primary_sta_vif) {\n"
+ " \t\t\tath_dbg(common, CONFIG,\n"
+ " \t\t\t\t\"Beacon already configured for a station interface\\n\");\n"
+ "@@ -700,6 +700,8 @@ void ath9k_beacon_config(struct ath_softc *sc, struct ieee80211_vif *vif,\n"
+ " {\n"
+ " \tstruct ieee80211_bss_conf *bss_conf = &vif->bss_conf;\n"
+ " \tstruct ath_beacon_config *cur_conf = &sc->cur_beacon_conf;\n"
+ "+        struct ath_hw *ah = sc->sc_ah;\n"
+ "+        struct ath_common *common = ath9k_hw_common(ah);\n"
+ " \tunsigned long flags;\n"
+ " \tbool skip_beacon = false;\n"
+ " \n"
+ "@@ -712,7 +714,7 @@ void ath9k_beacon_config(struct ath_softc *sc, struct ieee80211_vif *vif,\n"
+ " \tif (sc->sc_ah->opmode == NL80211_IFTYPE_STATION) {\n"
+ " \t\tath9k_cache_beacon_config(sc, bss_conf);\n"
+ " \t\tath9k_set_beacon(sc);\n"
+ "-\t\tset_bit(SC_OP_BEACONS, &sc->sc_flags);\n"
+ "+\t\tset_bit(ATH_OP_BEACONS, &common->op_flags);\n"
+ " \t\treturn;\n"
+ " \t}\n"
+ " \n"
+ "@@ -751,13 +753,13 @@ void ath9k_beacon_config(struct ath_softc *sc, struct ieee80211_vif *vif,\n"
+ " \t\t}\n"
+ " \n"
+ " \t\t/*\n"
+ "-\t\t * Do not set the SC_OP_BEACONS flag for IBSS joiner mode\n"
+ "+\t\t * Do not set the ATH_OP_BEACONS flag for IBSS joiner mode\n"
+ " \t\t * here, it is done in ath9k_beacon_config_adhoc().\n"
+ " \t\t */\n"
+ " \t\tif (cur_conf->enable_beacon && !skip_beacon)\n"
+ "-\t\t\tset_bit(SC_OP_BEACONS, &sc->sc_flags);\n"
+ "+\t\t\tset_bit(ATH_OP_BEACONS, &common->op_flags);\n"
+ " \t\telse\n"
+ "-\t\t\tclear_bit(SC_OP_BEACONS, &sc->sc_flags);\n"
+ "+\t\t\tclear_bit(ATH_OP_BEACONS, &common->op_flags);\n"
+ " \t}\n"
+ " }\n"
+ " \n"
+ "diff --git a/drivers/net/wireless/ath/ath9k/debug.c b/drivers/net/wireless/ath/ath9k/debug.c\n"
+ "index f8924ef..016a872 100644\n"
+ "--- a/drivers/net/wireless/ath/ath9k/debug.c\n"
+ "+++ b/drivers/net/wireless/ath/ath9k/debug.c\n"
+ "@@ -210,7 +210,7 @@ static ssize_t write_file_ani(struct file *file,\n"
+ " \tcommon->disable_ani = !ani;\n"
+ " \n"
+ " \tif (common->disable_ani) {\n"
+ "-\t\tclear_bit(SC_OP_ANI_RUN, &sc->sc_flags);\n"
+ "+\t\tclear_bit(ATH_OP_ANI_RUN, &common->op_flags);\n"
+ " \t\tath_stop_ani(sc);\n"
+ " \t} else {\n"
+ " \t\tath_check_ani(sc);\n"
+ "diff --git a/drivers/net/wireless/ath/ath9k/link.c b/drivers/net/wireless/ath/ath9k/link.c\n"
+ "index 30dcef5..72a715f 100644\n"
+ "--- a/drivers/net/wireless/ath/ath9k/link.c\n"
+ "+++ b/drivers/net/wireless/ath/ath9k/link.c\n"
+ "@@ -115,13 +115,14 @@ void ath_hw_pll_work(struct work_struct *work)\n"
+ " \tu32 pll_sqsum;\n"
+ " \tstruct ath_softc *sc = container_of(work, struct ath_softc,\n"
+ " \t\t\t\t\t    hw_pll_work.work);\n"
+ "+\tstruct ath_common *common = ath9k_hw_common(sc->sc_ah);\n"
+ " \t/*\n"
+ " \t * ensure that the PLL WAR is executed only\n"
+ " \t * after the STA is associated (or) if the\n"
+ " \t * beaconing had started in interfaces that\n"
+ " \t * uses beacons.\n"
+ " \t */\n"
+ "-\tif (!test_bit(SC_OP_BEACONS, &sc->sc_flags))\n"
+ "+\tif (!test_bit(ATH_OP_BEACONS, &common->op_flags))\n"
+ " \t\treturn;\n"
+ " \n"
+ " \tif (sc->tx99_state)\n"
+ "@@ -414,7 +415,7 @@ void ath_start_ani(struct ath_softc *sc)\n"
+ " \tunsigned long timestamp = jiffies_to_msecs(jiffies);\n"
+ " \n"
+ " \tif (common->disable_ani ||\n"
+ "-\t    !test_bit(SC_OP_ANI_RUN, &sc->sc_flags) ||\n"
+ "+\t    !test_bit(ATH_OP_ANI_RUN, &common->op_flags) ||\n"
+ " \t    (sc->hw->conf.flags & IEEE80211_CONF_OFFCHANNEL))\n"
+ " \t\treturn;\n"
+ " \n"
+ "@@ -438,6 +439,7 @@ void ath_stop_ani(struct ath_softc *sc)\n"
+ " void ath_check_ani(struct ath_softc *sc)\n"
+ " {\n"
+ " \tstruct ath_hw *ah = sc->sc_ah;\n"
+ "+\tstruct ath_common *common = ath9k_hw_common(sc->sc_ah);\n"
+ " \tstruct ath_beacon_config *cur_conf = &sc->cur_beacon_conf;\n"
+ " \n"
+ " \t/*\n"
+ "@@ -453,23 +455,23 @@ void ath_check_ani(struct ath_softc *sc)\n"
+ " \t\t\t * Disable ANI only when there are no\n"
+ " \t\t\t * associated stations.\n"
+ " \t\t\t */\n"
+ "-\t\t\tif (!test_bit(SC_OP_PRIM_STA_VIF, &sc->sc_flags))\n"
+ "+\t\t\tif (!test_bit(ATH_OP_PRIM_STA_VIF, &common->op_flags))\n"
+ " \t\t\t\tgoto stop_ani;\n"
+ " \t\t}\n"
+ " \t} else if (ah->opmode == NL80211_IFTYPE_STATION) {\n"
+ "-\t\tif (!test_bit(SC_OP_PRIM_STA_VIF, &sc->sc_flags))\n"
+ "+\t\tif (!test_bit(ATH_OP_PRIM_STA_VIF, &common->op_flags))\n"
+ " \t\t\tgoto stop_ani;\n"
+ " \t}\n"
+ " \n"
+ "-\tif (!test_bit(SC_OP_ANI_RUN, &sc->sc_flags)) {\n"
+ "-\t\tset_bit(SC_OP_ANI_RUN, &sc->sc_flags);\n"
+ "+\tif (!test_bit(ATH_OP_ANI_RUN, &common->op_flags)) {\n"
+ "+\t\tset_bit(ATH_OP_ANI_RUN, &common->op_flags);\n"
+ " \t\tath_start_ani(sc);\n"
+ " \t}\n"
+ " \n"
+ " \treturn;\n"
+ " \n"
+ " stop_ani:\n"
+ "-\tclear_bit(SC_OP_ANI_RUN, &sc->sc_flags);\n"
+ "+\tclear_bit(ATH_OP_ANI_RUN, &common->op_flags);\n"
+ " \tath_stop_ani(sc);\n"
+ " }\n"
+ " \n"
+ "diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c\n"
+ "index 42a1803..d69853b 100644\n"
+ "--- a/drivers/net/wireless/ath/ath9k/main.c\n"
+ "+++ b/drivers/net/wireless/ath/ath9k/main.c\n"
+ "@@ -229,16 +229,16 @@ static bool ath_complete_reset(struct ath_softc *sc, bool start)\n"
+ " \tath9k_cmn_update_txpow(ah, sc->curtxpow,\n"
+ " \t\t\t       sc->config.txpowlimit, &sc->curtxpow);\n"
+ " \n"
+ "-\tclear_bit(SC_OP_HW_RESET, &sc->sc_flags);\n"
+ "+\tclear_bit(ATH_OP_HW_RESET, &common->op_flags);\n"
+ " \tath9k_hw_set_interrupts(ah);\n"
+ " \tath9k_hw_enable_interrupts(ah);\n"
+ " \n"
+ " \tif (!(sc->hw->conf.flags & IEEE80211_CONF_OFFCHANNEL) && start) {\n"
+ "-\t\tif (!test_bit(SC_OP_BEACONS, &sc->sc_flags))\n"
+ "+\t\tif (!test_bit(ATH_OP_BEACONS, &common->op_flags))\n"
+ " \t\t\tgoto work;\n"
+ " \n"
+ " \t\tif (ah->opmode == NL80211_IFTYPE_STATION &&\n"
+ "-\t\t    test_bit(SC_OP_PRIM_STA_VIF, &sc->sc_flags)) {\n"
+ "+\t\t    test_bit(ATH_OP_PRIM_STA_VIF, &common->op_flags)) {\n"
+ " \t\t\tspin_lock_irqsave(&sc->sc_pm_lock, flags);\n"
+ " \t\t\tsc->ps_flags |= PS_BEACON_SYNC | PS_WAIT_FOR_BEACON;\n"
+ " \t\t\tspin_unlock_irqrestore(&sc->sc_pm_lock, flags);\n"
+ "@@ -336,7 +336,7 @@ static int ath_set_channel(struct ath_softc *sc, struct cfg80211_chan_def *chand\n"
+ " \tint old_pos = -1;\n"
+ " \tint r;\n"
+ " \n"
+ "-\tif (test_bit(SC_OP_INVALID, &sc->sc_flags))\n"
+ "+\tif (test_bit(ATH_OP_INVALID, &common->op_flags))\n"
+ " \t\treturn -EIO;\n"
+ " \n"
+ " \toffchannel = !!(hw->conf.flags & IEEE80211_CONF_OFFCHANNEL);\n"
+ "@@ -402,7 +402,7 @@ static int ath_set_channel(struct ath_softc *sc, struct cfg80211_chan_def *chand\n"
+ " \t\t\tchan->center_freq);\n"
+ " \t} else {\n"
+ " \t\t/* perform spectral scan if requested. */\n"
+ "-\t\tif (test_bit(SC_OP_SCANNING, &sc->sc_flags) &&\n"
+ "+\t\tif (test_bit(ATH_OP_SCANNING, &common->op_flags) &&\n"
+ " \t\t\tsc->spectral_mode == SPECTRAL_CHANSCAN)\n"
+ " \t\t\tath9k_spectral_scan_trigger(hw);\n"
+ " \t}\n"
+ "@@ -566,6 +566,7 @@ irqreturn_t ath_isr(int irq, void *dev)\n"
+ " \n"
+ " \tstruct ath_softc *sc = dev;\n"
+ " \tstruct ath_hw *ah = sc->sc_ah;\n"
+ "+\tstruct ath_common *common = ath9k_hw_common(ah);\n"
+ " \tenum ath9k_int status;\n"
+ " \tu32 sync_cause = 0;\n"
+ " \tbool sched = false;\n"
+ "@@ -575,7 +576,7 @@ irqreturn_t ath_isr(int irq, void *dev)\n"
+ " \t * touch anything. Note this can happen early\n"
+ " \t * on if the IRQ is shared.\n"
+ " \t */\n"
+ "-\tif (test_bit(SC_OP_INVALID, &sc->sc_flags))\n"
+ "+\tif (test_bit(ATH_OP_INVALID, &common->op_flags))\n"
+ " \t\treturn IRQ_NONE;\n"
+ " \n"
+ " \t/* shared irq, not for us */\n"
+ "@@ -583,7 +584,7 @@ irqreturn_t ath_isr(int irq, void *dev)\n"
+ " \tif (!ath9k_hw_intrpend(ah))\n"
+ " \t\treturn IRQ_NONE;\n"
+ " \n"
+ "-\tif (test_bit(SC_OP_HW_RESET, &sc->sc_flags)) {\n"
+ "+\tif (test_bit(ATH_OP_HW_RESET, &common->op_flags)) {\n"
+ " \t\tath9k_hw_kill_interrupts(ah);\n"
+ " \t\treturn IRQ_HANDLED;\n"
+ " \t}\n"
+ "@@ -684,10 +685,11 @@ int ath_reset(struct ath_softc *sc)\n"
+ " \n"
+ " void ath9k_queue_reset(struct ath_softc *sc, enum ath_reset_type type)\n"
+ " {\n"
+ "+\tstruct ath_common *common = ath9k_hw_common(sc->sc_ah);\n"
+ " #ifdef CONFIG_ATH9K_DEBUGFS\n"
+ " \tRESET_STAT_INC(sc, type);\n"
+ " #endif\n"
+ "-\tset_bit(SC_OP_HW_RESET, &sc->sc_flags);\n"
+ "+\tset_bit(ATH_OP_HW_RESET, &common->op_flags);\n"
+ " \tieee80211_queue_work(sc->hw, &sc->hw_reset_work);\n"
+ " }\n"
+ " \n"
+ "@@ -768,7 +770,7 @@ static int ath9k_start(struct ieee80211_hw *hw)\n"
+ " \n"
+ " \tath_mci_enable(sc);\n"
+ " \n"
+ "-\tclear_bit(SC_OP_INVALID, &sc->sc_flags);\n"
+ "+\tclear_bit(ATH_OP_INVALID, &common->op_flags);\n"
+ " \tsc->sc_ah->is_monitoring = false;\n"
+ " \n"
+ " \tif (!ath_complete_reset(sc, false))\n"
+ "@@ -885,7 +887,7 @@ static void ath9k_stop(struct ieee80211_hw *hw)\n"
+ " \n"
+ " \tath_cancel_work(sc);\n"
+ " \n"
+ "-\tif (test_bit(SC_OP_INVALID, &sc->sc_flags)) {\n"
+ "+\tif (test_bit(ATH_OP_INVALID, &common->op_flags)) {\n"
+ " \t\tath_dbg(common, ANY, \"Device not present\\n\");\n"
+ " \t\tmutex_unlock(&sc->mutex);\n"
+ " \t\treturn;\n"
+ "@@ -940,7 +942,7 @@ static void ath9k_stop(struct ieee80211_hw *hw)\n"
+ " \n"
+ " \tath9k_ps_restore(sc);\n"
+ " \n"
+ "-\tset_bit(SC_OP_INVALID, &sc->sc_flags);\n"
+ "+\tset_bit(ATH_OP_INVALID, &common->op_flags);\n"
+ " \tsc->ps_idle = prev_idle;\n"
+ " \n"
+ " \tmutex_unlock(&sc->mutex);\n"
+ "@@ -1081,7 +1083,7 @@ static void ath9k_calculate_summary_state(struct ieee80211_hw *hw,\n"
+ " \t */\n"
+ " \tif (ah->opmode == NL80211_IFTYPE_STATION &&\n"
+ " \t    old_opmode == NL80211_IFTYPE_AP &&\n"
+ "-\t    test_bit(SC_OP_PRIM_STA_VIF, &sc->sc_flags)) {\n"
+ "+\t    test_bit(ATH_OP_PRIM_STA_VIF, &common->op_flags)) {\n"
+ " \t\tieee80211_iterate_active_interfaces_atomic(\n"
+ " \t\t\tsc->hw, IEEE80211_IFACE_ITER_RESUME_ALL,\n"
+ " \t\t\tath9k_sta_vif_iter, sc);\n"
+ "@@ -1590,7 +1592,7 @@ static void ath9k_set_assoc_state(struct ath_softc *sc,\n"
+ " \tstruct ieee80211_bss_conf *bss_conf = &vif->bss_conf;\n"
+ " \tunsigned long flags;\n"
+ " \n"
+ "-\tset_bit(SC_OP_PRIM_STA_VIF, &sc->sc_flags);\n"
+ "+\tset_bit(ATH_OP_PRIM_STA_VIF, &common->op_flags);\n"
+ " \tavp->primary_sta_vif = true;\n"
+ " \n"
+ " \t/*\n"
+ "@@ -1625,8 +1627,9 @@ static void ath9k_bss_assoc_iter(void *data, u8 *mac, struct ieee80211_vif *vif)\n"
+ " {\n"
+ " \tstruct ath_softc *sc = data;\n"
+ " \tstruct ieee80211_bss_conf *bss_conf = &vif->bss_conf;\n"
+ "+\tstruct ath_common *common = ath9k_hw_common(sc->sc_ah);\n"
+ " \n"
+ "-\tif (test_bit(SC_OP_PRIM_STA_VIF, &sc->sc_flags))\n"
+ "+\tif (test_bit(ATH_OP_PRIM_STA_VIF, &common->op_flags))\n"
+ " \t\treturn;\n"
+ " \n"
+ " \tif (bss_conf->assoc)\n"
+ "@@ -1657,18 +1660,18 @@ static void ath9k_bss_info_changed(struct ieee80211_hw *hw,\n"
+ " \t\t\tbss_conf->bssid, bss_conf->assoc);\n"
+ " \n"
+ " \t\tif (avp->primary_sta_vif && !bss_conf->assoc) {\n"
+ "-\t\t\tclear_bit(SC_OP_PRIM_STA_VIF, &sc->sc_flags);\n"
+ "+\t\t\tclear_bit(ATH_OP_PRIM_STA_VIF, &common->op_flags);\n"
+ " \t\t\tavp->primary_sta_vif = false;\n"
+ " \n"
+ " \t\t\tif (ah->opmode == NL80211_IFTYPE_STATION)\n"
+ "-\t\t\t\tclear_bit(SC_OP_BEACONS, &sc->sc_flags);\n"
+ "+\t\t\t\tclear_bit(ATH_OP_BEACONS, &common->op_flags);\n"
+ " \t\t}\n"
+ " \n"
+ " \t\tieee80211_iterate_active_interfaces_atomic(\n"
+ " \t\t\tsc->hw, IEEE80211_IFACE_ITER_RESUME_ALL,\n"
+ " \t\t\tath9k_bss_assoc_iter, sc);\n"
+ " \n"
+ "-\t\tif (!test_bit(SC_OP_PRIM_STA_VIF, &sc->sc_flags) &&\n"
+ "+\t\tif (!test_bit(ATH_OP_PRIM_STA_VIF, &common->op_flags) &&\n"
+ " \t\t    ah->opmode == NL80211_IFTYPE_STATION) {\n"
+ " \t\t\tmemset(common->curbssid, 0, ETH_ALEN);\n"
+ " \t\t\tcommon->curaid = 0;\n"
+ "@@ -1897,7 +1900,7 @@ static void ath9k_flush(struct ieee80211_hw *hw, u32 queues, bool drop)\n"
+ " \t\treturn;\n"
+ " \t}\n"
+ " \n"
+ "-\tif (test_bit(SC_OP_INVALID, &sc->sc_flags)) {\n"
+ "+\tif (test_bit(ATH_OP_INVALID, &common->op_flags)) {\n"
+ " \t\tath_dbg(common, ANY, \"Device not present\\n\");\n"
+ " \t\tmutex_unlock(&sc->mutex);\n"
+ " \t\treturn;\n"
+ "@@ -2070,13 +2073,15 @@ static int ath9k_get_antenna(struct ieee80211_hw *hw, u32 *tx_ant, u32 *rx_ant)\n"
+ " static void ath9k_sw_scan_start(struct ieee80211_hw *hw)\n"
+ " {\n"
+ " \tstruct ath_softc *sc = hw->priv;\n"
+ "-\tset_bit(SC_OP_SCANNING, &sc->sc_flags);\n"
+ "+\tstruct ath_common *common = ath9k_hw_common(sc->sc_ah);\n"
+ "+\tset_bit(ATH_OP_SCANNING, &common->op_flags);\n"
+ " }\n"
+ " \n"
+ " static void ath9k_sw_scan_complete(struct ieee80211_hw *hw)\n"
+ " {\n"
+ " \tstruct ath_softc *sc = hw->priv;\n"
+ "-\tclear_bit(SC_OP_SCANNING, &sc->sc_flags);\n"
+ "+\tstruct ath_common *common = ath9k_hw_common(sc->sc_ah);\n"
+ "+\tclear_bit(ATH_OP_SCANNING, &common->op_flags);\n"
+ " }\n"
+ " \n"
+ " static void ath9k_channel_switch_beacon(struct ieee80211_hw *hw,\n"
+ "diff --git a/drivers/net/wireless/ath/ath9k/mci.c b/drivers/net/wireless/ath/ath9k/mci.c\n"
+ "index 71799fc..a0dbcc4 100644\n"
+ "--- a/drivers/net/wireless/ath/ath9k/mci.c\n"
+ "+++ b/drivers/net/wireless/ath/ath9k/mci.c\n"
+ "@@ -555,7 +555,7 @@ void ath_mci_intr(struct ath_softc *sc)\n"
+ " \t\tmci_int_rxmsg &= ~AR_MCI_INTERRUPT_RX_MSG_GPM;\n"
+ " \n"
+ " \t\twhile (more_data == MCI_GPM_MORE) {\n"
+ "-\t\t\tif (test_bit(SC_OP_HW_RESET, &sc->sc_flags))\n"
+ "+\t\t\tif (test_bit(ATH_OP_HW_RESET, &common->op_flags))\n"
+ " \t\t\t\treturn;\n"
+ " \n"
+ " \t\t\tpgpm = mci->gpm_buf.bf_addr;\n"
+ "diff --git a/drivers/net/wireless/ath/ath9k/pci.c b/drivers/net/wireless/ath/ath9k/pci.c\n"
+ "index 55724b0..25304ad 100644\n"
+ "--- a/drivers/net/wireless/ath/ath9k/pci.c\n"
+ "+++ b/drivers/net/wireless/ath/ath9k/pci.c\n"
+ "@@ -784,6 +784,7 @@ static int ath_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)\n"
+ " {\n"
+ " \tstruct ath_softc *sc;\n"
+ " \tstruct ieee80211_hw *hw;\n"
+ "+\tstruct ath_common *common;\n"
+ " \tu8 csz;\n"
+ " \tu32 val;\n"
+ " \tint ret = 0;\n"
+ "@@ -858,9 +859,6 @@ static int ath_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)\n"
+ " \tsc->mem = pcim_iomap_table(pdev)[0];\n"
+ " \tsc->driver_data = id->driver_data;\n"
+ " \n"
+ "-\t/* Will be cleared in ath9k_start() */\n"
+ "-\tset_bit(SC_OP_INVALID, &sc->sc_flags);\n"
+ "-\n"
+ " \tret = request_irq(pdev->irq, ath_isr, IRQF_SHARED, \"ath9k\", sc);\n"
+ " \tif (ret) {\n"
+ " \t\tdev_err(&pdev->dev, \"request_irq failed\\n\");\n"
+ "@@ -879,6 +877,10 @@ static int ath_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)\n"
+ " \twiphy_info(hw->wiphy, \"%s mem=0x%lx, irq=%d\\n\",\n"
+ " \t\t   hw_name, (unsigned long)sc->mem, pdev->irq);\n"
+ " \n"
+ "+\t/* Will be cleared in ath9k_start() */\n"
+ "+\tcommon = ath9k_hw_common(sc->sc_ah);\n"
+ "+\tset_bit(ATH_OP_INVALID, &common->op_flags);\n"
+ "+\n"
+ " \treturn 0;\n"
+ " \n"
+ " err_init:\n"
+ "diff --git a/drivers/net/wireless/ath/ath9k/tx99.c b/drivers/net/wireless/ath/ath9k/tx99.c\n"
+ "index b686a74..a65cfb9 100644\n"
+ "--- a/drivers/net/wireless/ath/ath9k/tx99.c\n"
+ "+++ b/drivers/net/wireless/ath/ath9k/tx99.c\n"
+ "@@ -108,7 +108,7 @@ static int ath9k_tx99_init(struct ath_softc *sc)\n"
+ " \tstruct ath_tx_control txctl;\n"
+ " \tint r;\n"
+ " \n"
+ "-\tif (test_bit(SC_OP_INVALID, &sc->sc_flags)) {\n"
+ "+\tif (test_bit(ATH_OP_INVALID, &common->op_flags)) {\n"
+ " \t\tath_err(common,\n"
+ " \t\t\t\"driver is in invalid state unable to use TX99\");\n"
+ " \t\treturn -EINVAL;\n"
+ "diff --git a/drivers/net/wireless/ath/ath9k/wow.c b/drivers/net/wireless/ath/ath9k/wow.c\n"
+ "index 1b3230f..2879887 100644\n"
+ "--- a/drivers/net/wireless/ath/ath9k/wow.c\n"
+ "+++ b/drivers/net/wireless/ath/ath9k/wow.c\n"
+ "@@ -198,7 +198,7 @@ int ath9k_suspend(struct ieee80211_hw *hw,\n"
+ " \tath_cancel_work(sc);\n"
+ " \tath_stop_ani(sc);\n"
+ " \n"
+ "-\tif (test_bit(SC_OP_INVALID, &sc->sc_flags)) {\n"
+ "+\tif (test_bit(ATH_OP_INVALID, &common->op_flags)) {\n"
+ " \t\tath_dbg(common, ANY, \"Device not present\\n\");\n"
+ " \t\tret = -EINVAL;\n"
+ " \t\tgoto fail_wow;\n"
+ "@@ -224,7 +224,7 @@ int ath9k_suspend(struct ieee80211_hw *hw,\n"
+ " \t * STA.\n"
+ " \t */\n"
+ " \n"
+ "-\tif (!test_bit(SC_OP_PRIM_STA_VIF, &sc->sc_flags)) {\n"
+ "+\tif (!test_bit(ATH_OP_PRIM_STA_VIF, &common->op_flags)) {\n"
+ " \t\tath_dbg(common, WOW, \"None of the STA vifs are associated\\n\");\n"
+ " \t\tret = 1;\n"
+ " \t\tgoto fail_wow;\n"
+ "diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c\n"
+ "index 550e4d2b..81d8a70 100644\n"
+ "--- a/drivers/net/wireless/ath/ath9k/xmit.c\n"
+ "+++ b/drivers/net/wireless/ath/ath9k/xmit.c\n"
+ "@@ -1769,7 +1769,7 @@ bool ath_drain_all_txq(struct ath_softc *sc)\n"
+ " \tint i;\n"
+ " \tu32 npend = 0;\n"
+ " \n"
+ "-\tif (test_bit(SC_OP_INVALID, &sc->sc_flags))\n"
+ "+\tif (test_bit(ATH_OP_INVALID, &common->op_flags))\n"
+ " \t\treturn true;\n"
+ " \n"
+ " \tath9k_hw_abort_tx_dma(ah);\n"
+ "@@ -1817,11 +1817,12 @@ void ath_tx_cleanupq(struct ath_softc *sc, struct ath_txq *txq)\n"
+ "  */\n"
+ " void ath_txq_schedule(struct ath_softc *sc, struct ath_txq *txq)\n"
+ " {\n"
+ "+\tstruct ath_common *common = ath9k_hw_common(sc->sc_ah);\n"
+ " \tstruct ath_atx_ac *ac, *last_ac;\n"
+ " \tstruct ath_atx_tid *tid, *last_tid;\n"
+ " \tbool sent = false;\n"
+ " \n"
+ "-\tif (test_bit(SC_OP_HW_RESET, &sc->sc_flags) ||\n"
+ "+\tif (test_bit(ATH_OP_HW_RESET, &common->op_flags) ||\n"
+ " \t    list_empty(&txq->axq_acq))\n"
+ " \t\treturn;\n"
+ " \n"
+ "@@ -2471,7 +2472,7 @@ static void ath_tx_processq(struct ath_softc *sc, struct ath_txq *txq)\n"
+ " \n"
+ " \tath_txq_lock(sc, txq);\n"
+ " \tfor (;;) {\n"
+ "-\t\tif (test_bit(SC_OP_HW_RESET, &sc->sc_flags))\n"
+ "+\t\tif (test_bit(ATH_OP_HW_RESET, &common->op_flags))\n"
+ " \t\t\tbreak;\n"
+ " \n"
+ " \t\tif (list_empty(&txq->axq_q)) {\n"
+ "@@ -2554,7 +2555,7 @@ void ath_tx_edma_tasklet(struct ath_softc *sc)\n"
+ " \tint status;\n"
+ " \n"
+ " \tfor (;;) {\n"
+ "-\t\tif (test_bit(SC_OP_HW_RESET, &sc->sc_flags))\n"
+ "+\t\tif (test_bit(ATH_OP_HW_RESET, &common->op_flags))\n"
+ " \t\t\tbreak;\n"
+ " \n"
+ " \t\tstatus = ath9k_hw_txprocdesc(ah, NULL, (void *)&ts);\n"
+ "-- \n"
+ 1.9.0
 
-6aee91f436f028016ac37c680888cef8d539541aa0790b28c776c7651e612c21
+6225ff6cbc65e4a3e354efed5f5a8fe5be5663d0b4d98e81e9cb0e5a5a38c36a

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.