Skip to contentSkip to conversation

ath9k patches

PATCH New Sujith Manoharan 1 participant 5 messages Aug 23, 2014 Qualcomm Atheros ATH9K wireless driver

lore
Share & tools
lore
#0 lore raw

cover ath9k patches

From: Sujith Manoharan <[email protected]>

Third series cleaning up the channel context code. Most of the code has been moved inside CONFIG_ATH9K_CHANNEL_CONTEXT. Since the normal path also makes use of certain channel context specific variables, they have been left unmodified - like 'cur_chan', 'cur_chandef' etc.

After this series, just 3 functions in channel.c are outside CONFIG_ATH9K_CHANNEL_CONTEXT.

All the pending patches are in:
http://msujith.org/dir/patches/wl/Aug-23-2014/

Sujith

Sujith Manoharan (4):
ath9k: Fix channel context variables in ath_softc
ath9k: Remove redundant ifdef
ath9k: Move ath9k_beacon_add_noa to channel.c
ath9k: Fix ath_chanctx_get()

 drivers/net/wireless/ath/ath9k/ath9k.h   | 29 ++++++++++++++----
 drivers/net/wireless/ath/ath9k/beacon.c  | 49 ------------------------------
 drivers/net/wireless/ath/ath9k/channel.c | 51 ++++++++++++++++++++++++++++++--
 3 files changed, 72 insertions(+), 57 deletions(-)
Signature · 1 line
2.0.4
#3 lore raw

PATCH 3/4 ath9k: Move ath9k_beacon_add_noa to channel.c

From: Sujith Manoharan <[email protected]>

---
 drivers/net/wireless/ath/ath9k/ath9k.h   |  7 +++++
 drivers/net/wireless/ath/ath9k/beacon.c  | 49 --------------------------------
 drivers/net/wireless/ath/ath9k/channel.c | 49 ++++++++++++++++++++++++++++++++
 3 files changed, 56 insertions(+), 49 deletions(-)
drivers/net/wireless/ath/ath9k/ath9k.h +7 -0
index a2f4fa7..9e61679 100644
@@ -31,6 +31,7 @@
 #include "spectral.h"
 
 struct ath_node;
+struct ath_vif;
 
 extern struct ieee80211_ops ath9k_ops;
 extern int ath9k_modparam_nohwcrypt;
@@ -434,6 +435,8 @@ void ath9k_p2p_remove_vif(struct ath_softc *sc,
 void ath9k_p2p_beacon_sync(struct ath_softc *sc);
 void ath9k_p2p_bss_info_changed(struct ath_softc *sc,
 				struct ieee80211_vif *vif);
+void ath9k_beacon_add_noa(struct ath_softc *sc, struct ath_vif *avp,
+			  struct sk_buff *skb);
 void ath9k_p2p_ps_timer(void *priv);
 void ath9k_chanctx_wake_queues(struct ath_softc *sc);
 void ath_chanctx_check_active(struct ath_softc *sc, struct ath_chanctx *ctx);
@@ -496,6 +499,10 @@ static inline void ath9k_p2p_bss_info_changed(struct ath_softc *sc,
 					      struct ieee80211_vif *vif)
 {
 }
+static inline void ath9k_beacon_add_noa(struct ath_softc *sc, struct ath_vif *avp,
+					struct sk_buff *skb)
+{
+}
 static inline void ath9k_p2p_ps_timer(struct ath_softc *sc)
 {
 }
drivers/net/wireless/ath/ath9k/beacon.c +0 -49

55 lines not on this page · raw message

drivers/net/wireless/ath/ath9k/channel.c +49 -0

55 lines not on this page · raw message

Signature · 1 line
2.0.4
#2 lore raw

PATCH 2/4 ath9k: Remove redundant ifdef

In reply to Sujith Manoharan

From: Sujith Manoharan <[email protected]>

This was introduced in an earlier patch to handle a compilation warning, but since the channel context code has been mostly isolated, this is not required now.

---
 drivers/net/wireless/ath/ath9k/channel.c | 2 --
 1 file changed, 2 deletions(-)
drivers/net/wireless/ath/ath9k/channel.c +0 -2
index 08bb14c..7aa9535 100644
@@ -257,9 +257,7 @@ static void ath_chanctx_setup_timer(struct ath_softc *sc, u32 tsf_time)
 {
 	struct ath_hw *ah = sc->sc_ah;
 
-#ifdef CONFIG_ATH9K_CHANNEL_CONTEXT
 	ath9k_hw_gen_timer_start(ah, sc->p2p_ps_timer, tsf_time, 1000000);
-#endif
 	tsf_time -= ath9k_hw_gettsf32(ah);
 	tsf_time = msecs_to_jiffies(tsf_time / 1000) + 1;
 	mod_timer(&sc->sched.timer, tsf_time);
Signature · 1 line
2.0.4
#1 lore raw

PATCH 1/4 ath9k: Fix channel context variables in ath_softc

In reply to Sujith Manoharan

From: Sujith Manoharan <[email protected]>

chanctx_work and next_chan are required only when
CONFIG_ATH9K_CHANNEL_CONTEXT is enabled.

---
 drivers/net/wireless/ath/ath9k/ath9k.h | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
drivers/net/wireless/ath/ath9k/ath9k.h +6 -2
index 02664b3..a2f4fa7 100644
@@ -324,6 +324,10 @@ struct ath_rx {
 	u32 ampdu_ref;
 };
 
+/*******************/
+/* Channel Context */
+/*******************/
+
 struct ath_chanctx {
 	struct cfg80211_chan_def chandef;
 	struct list_head vifs;
@@ -917,15 +921,16 @@ struct ath_softc {
 	struct mutex mutex;
 	struct work_struct paprd_work;
 	struct work_struct hw_reset_work;
-	struct work_struct chanctx_work;
 	struct completion paprd_complete;
 	wait_queue_head_t tx_wait;
 
 #ifdef CONFIG_ATH9K_CHANNEL_CONTEXT
+	struct work_struct chanctx_work;
 	struct ath_gen_timer *p2p_ps_timer;
 	struct ath_vif *p2p_ps_vif;
 	struct ath_chanctx_sched sched;
 	struct ath_offchannel offchannel;
+	struct ath_chanctx *next_chan;
 #endif
 
 	unsigned long driver_data;
@@ -947,7 +952,6 @@ struct ath_softc {
 	struct cfg80211_chan_def cur_chandef;
 	struct ath_chanctx chanctx[ATH9K_NUM_CHANCTX];
 	struct ath_chanctx *cur_chan;
-	struct ath_chanctx *next_chan;
 	spinlock_t chan_lock;
 
 #ifdef CONFIG_MAC80211_LEDS
Signature · 1 line
2.0.4
#4 lore raw

PATCH 4/4 ath9k: Fix ath_chanctx_get()

In reply to Sujith Manoharan

From: Sujith Manoharan <[email protected]>

Move it inside a CONFIG_ATH9K_CHANNEL_CONTEXT ifdef since it is not needed otherwise.

---
 drivers/net/wireless/ath/ath9k/ath9k.h | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)
drivers/net/wireless/ath/ath9k/ath9k.h +10 -4
index 9e61679..acbe2b7 100644
@@ -413,16 +413,19 @@ struct ath_offchannel {
 	     ctx <= &sc->chanctx[ARRAY_SIZE(sc->chanctx) - 1];      \
 	     ctx++)
 
+void ath_chanctx_init(struct ath_softc *sc);
+void ath_chanctx_set_channel(struct ath_softc *sc, struct ath_chanctx *ctx,
+			     struct cfg80211_chan_def *chandef);
+
+#ifdef CONFIG_ATH9K_CHANNEL_CONTEXT
+
 static inline struct ath_chanctx *
 ath_chanctx_get(struct ieee80211_chanctx_conf *ctx)
 {
 	struct ath_chanctx **ptr = (void *) ctx->drv_priv;
 	return *ptr;
 }
-void ath_chanctx_init(struct ath_softc *sc);
-void ath_chanctx_set_channel(struct ath_softc *sc, struct ath_chanctx *ctx,
-			     struct cfg80211_chan_def *chandef);
-#ifdef CONFIG_ATH9K_CHANNEL_CONTEXT
+
 bool ath9k_is_chanctx_enabled(void);
 void ath9k_fill_chanctx_ops(void);
 void ath9k_init_channel_context(struct ath_softc *sc);
@@ -451,7 +454,9 @@ void ath_chanctx_set_next(struct ath_softc *sc, bool force);
 void ath_offchannel_next(struct ath_softc *sc);
 void ath_scan_complete(struct ath_softc *sc, bool abort);
 void ath_roc_complete(struct ath_softc *sc, bool abort);
+
 #else
+
 static inline bool ath9k_is_chanctx_enabled(void)
 {
 	return false;
@@ -513,6 +518,7 @@ static inline void ath_chanctx_check_active(struct ath_softc *sc,
 					    struct ath_chanctx *ctx)
 {
 }
+
 #endif /* CONFIG_ATH9K_CHANNEL_CONTEXT */
 
 int ath_reset_internal(struct ath_softc *sc, struct ath9k_channel *hchan);
Signature · 1 line
2.0.4