Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bea843c7 authored by Sujith Manoharan's avatar Sujith Manoharan Committed by John W. Linville
Browse files

ath9k/ath9k_htc: Remove WME macros



Use the macros provided by mac80211 and remove redundant
declarations inside the drivers.

Signed-off-by: default avatarSujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 06729387
Loading
Loading
Loading
Loading
+8 −8
Original line number Diff line number Diff line
@@ -129,10 +129,10 @@ void ath_descdma_cleanup(struct ath_softc *sc, struct ath_descdma *dd,
#define ATH_TXMAXTRY            13

#define TID_TO_WME_AC(_tid)				\
	((((_tid) == 0) || ((_tid) == 3)) ? WME_AC_BE :	\
	 (((_tid) == 1) || ((_tid) == 2)) ? WME_AC_BK :	\
	 (((_tid) == 4) || ((_tid) == 5)) ? WME_AC_VI :	\
	 WME_AC_VO)
	((((_tid) == 0) || ((_tid) == 3)) ? IEEE80211_AC_BE :	\
	 (((_tid) == 1) || ((_tid) == 2)) ? IEEE80211_AC_BK :	\
	 (((_tid) == 4) || ((_tid) == 5)) ? IEEE80211_AC_VI :	\
	 IEEE80211_AC_VO)

#define ATH_AGGR_DELIM_SZ          4
#define ATH_AGGR_MINPLEN           256 /* in bytes, minimum packet length */
@@ -265,7 +265,7 @@ struct ath_node {
	struct ieee80211_sta *sta; /* station struct we're part of */
	struct ieee80211_vif *vif; /* interface with which we're associated */
	struct ath_atx_tid tid[WME_NUM_TID];
	struct ath_atx_ac ac[WME_NUM_AC];
	struct ath_atx_ac ac[IEEE80211_NUM_ACS];
	int ps_key;

	u16 maxampdu;
@@ -299,9 +299,9 @@ struct ath_tx {
	struct list_head txbuf;
	struct ath_txq txq[ATH9K_NUM_TX_QUEUES];
	struct ath_descdma txdma;
	struct ath_txq *txq_map[WME_NUM_AC];
	u32 txq_max_pending[WME_NUM_AC];
	u16 max_aggr_framelen[WME_NUM_AC][4][32];
	struct ath_txq *txq_map[IEEE80211_NUM_ACS];
	u32 txq_max_pending[IEEE80211_NUM_ACS];
	u16 max_aggr_framelen[IEEE80211_NUM_ACS][4][32];
};

struct ath_rx_edma {
+1 −1
Original line number Diff line number Diff line
@@ -46,7 +46,7 @@ static void ath9k_beaconq_config(struct ath_softc *sc)
		qi.tqi_cwmax = 0;
	} else {
		/* Adhoc mode; important thing is to use 2x cwmin. */
		txq = sc->tx.txq_map[WME_AC_BE];
		txq = sc->tx.txq_map[IEEE80211_AC_BE];
		ath9k_hw_get_txq_props(ah, txq->axq_qnum, &qi_be);
		qi.tqi_aifs = qi_be.tqi_aifs;
		if (ah->slottime == ATH9K_SLOT_TIME_20)
+0 −7
Original line number Diff line number Diff line
@@ -28,13 +28,6 @@
#define WME_MAX_BA              WME_BA_BMP_SIZE
#define ATH_TID_MAX_BUFS        (2 * WME_MAX_BA)

/* These must match mac80211 skb queue mapping numbers */
#define WME_AC_VO   0
#define WME_AC_VI   1
#define WME_AC_BE   2
#define WME_AC_BK   3
#define WME_NUM_AC  4

#define ATH_RSSI_DUMMY_MARKER   0x127
#define ATH_RSSI_LPF_LEN 		10
#define RSSI_LPF_THRESHOLD		-20
+22 −22
Original line number Diff line number Diff line
@@ -517,10 +517,10 @@ static const struct file_operations fops_interrupt = {
	do {								\
		len += snprintf(buf + len, size - len,			\
				"%s%13u%11u%10u%10u\n", str,		\
		sc->debug.stats.txstats[PR_QNUM(WME_AC_BE)].elem, \
		sc->debug.stats.txstats[PR_QNUM(WME_AC_BK)].elem, \
		sc->debug.stats.txstats[PR_QNUM(WME_AC_VI)].elem, \
		sc->debug.stats.txstats[PR_QNUM(WME_AC_VO)].elem); \
		sc->debug.stats.txstats[PR_QNUM(IEEE80211_AC_BE)].elem, \
		sc->debug.stats.txstats[PR_QNUM(IEEE80211_AC_BK)].elem, \
		sc->debug.stats.txstats[PR_QNUM(IEEE80211_AC_VI)].elem, \
		sc->debug.stats.txstats[PR_QNUM(IEEE80211_AC_VO)].elem); \
		if (len >= size)			  \
			goto done;			  \
} while(0)
@@ -529,10 +529,10 @@ static const struct file_operations fops_interrupt = {
do {									\
	len += snprintf(buf + len, size - len,				\
			"%s%13u%11u%10u%10u\n", str,			\
			(unsigned int)(sc->tx.txq_map[WME_AC_BE]->elem),	\
			(unsigned int)(sc->tx.txq_map[WME_AC_BK]->elem),	\
			(unsigned int)(sc->tx.txq_map[WME_AC_VI]->elem),	\
			(unsigned int)(sc->tx.txq_map[WME_AC_VO]->elem));	\
			(unsigned int)(sc->tx.txq_map[IEEE80211_AC_BE]->elem),	\
			(unsigned int)(sc->tx.txq_map[IEEE80211_AC_BK]->elem),	\
			(unsigned int)(sc->tx.txq_map[IEEE80211_AC_VI]->elem),	\
			(unsigned int)(sc->tx.txq_map[IEEE80211_AC_VO]->elem));	\
	if (len >= size)						\
		goto done;						\
} while(0)
@@ -541,10 +541,10 @@ do { \
do {									\
	len += snprintf(buf + len, size - len,				\
			"%s%13i%11i%10i%10i\n", str,			\
			list_empty(&sc->tx.txq_map[WME_AC_BE]->elem),	\
			list_empty(&sc->tx.txq_map[WME_AC_BK]->elem),	\
			list_empty(&sc->tx.txq_map[WME_AC_VI]->elem),	\
			list_empty(&sc->tx.txq_map[WME_AC_VO]->elem));	\
			list_empty(&sc->tx.txq_map[IEEE80211_AC_BE]->elem),	\
			list_empty(&sc->tx.txq_map[IEEE80211_AC_BK]->elem),	\
			list_empty(&sc->tx.txq_map[IEEE80211_AC_VI]->elem),	\
			list_empty(&sc->tx.txq_map[IEEE80211_AC_VO]->elem));	\
	if (len >= size)						\
		goto done;						\
} while (0)
@@ -593,10 +593,10 @@ static ssize_t read_file_xmit(struct file *file, char __user *user_buf,
	PR("TX-Failed:       ", txfailed);
	len += snprintf(buf + len, size - len,
			"%s%11p%11p%10p%10p\n", "txq-memory-address:",
			sc->tx.txq_map[WME_AC_BE],
			sc->tx.txq_map[WME_AC_BK],
			sc->tx.txq_map[WME_AC_VI],
			sc->tx.txq_map[WME_AC_VO]);
			sc->tx.txq_map[IEEE80211_AC_BE],
			sc->tx.txq_map[IEEE80211_AC_BK],
			sc->tx.txq_map[IEEE80211_AC_VI],
			sc->tx.txq_map[IEEE80211_AC_VO]);
	if (len >= size)
		goto done;

@@ -617,7 +617,7 @@ static ssize_t read_file_xmit(struct file *file, char __user *user_buf,
	}

	/* Print out more detailed queue-info */
	for (i = 0; i <= WME_AC_BK; i++) {
	for (i = 0; i <= IEEE80211_AC_BK; i++) {
		struct ath_txq *txq = &(sc->tx.txq[i]);
		struct ath_atx_ac *ac;
		struct ath_atx_tid *tid;
@@ -695,7 +695,7 @@ static ssize_t read_file_stations(struct file *file, char __user *user_buf,
				goto done;
		}

		for (q = 0; q < WME_NUM_AC; q++) {
		for (q = 0; q < IEEE80211_NUM_ACS; q++) {
			struct ath_atx_ac *ac = &(an->ac[q]);
			len += snprintf(buf + len, size - len,
					" ac: %p %s %i %p\n",
@@ -1648,13 +1648,13 @@ int ath9k_init_debug(struct ath_hw *ah)
	debugfs_create_file("xmit", S_IRUSR, sc->debug.debugfs_phy, sc,
			    &fops_xmit);
	debugfs_create_u32("qlen_bk", S_IRUSR | S_IWUSR, sc->debug.debugfs_phy,
			   &sc->tx.txq_max_pending[WME_AC_BK]);
			   &sc->tx.txq_max_pending[IEEE80211_AC_BK]);
	debugfs_create_u32("qlen_be", S_IRUSR | S_IWUSR, sc->debug.debugfs_phy,
			   &sc->tx.txq_max_pending[WME_AC_BE]);
			   &sc->tx.txq_max_pending[IEEE80211_AC_BE]);
	debugfs_create_u32("qlen_vi", S_IRUSR | S_IWUSR, sc->debug.debugfs_phy,
			   &sc->tx.txq_max_pending[WME_AC_VI]);
			   &sc->tx.txq_max_pending[IEEE80211_AC_VI]);
	debugfs_create_u32("qlen_vo", S_IRUSR | S_IWUSR, sc->debug.debugfs_phy,
			   &sc->tx.txq_max_pending[WME_AC_VO]);
			   &sc->tx.txq_max_pending[IEEE80211_AC_VO]);
	debugfs_create_file("stations", S_IRUSR, sc->debug.debugfs_phy, sc,
			    &fops_stations);
	debugfs_create_file("misc", S_IRUSR, sc->debug.debugfs_phy, sc,
+1 −1
Original line number Diff line number Diff line
@@ -474,7 +474,7 @@ int ath9k_init_btcoex(struct ath_softc *sc)
		r = ath_init_btcoex_timer(sc);
		if (r)
			return -1;
		txq = sc->tx.txq_map[WME_AC_BE];
		txq = sc->tx.txq_map[IEEE80211_AC_BE];
		ath9k_hw_init_btcoex_hw(sc->sc_ah, txq->axq_qnum);
		sc->btcoex.bt_stomp_type = ATH_BTCOEX_STOMP_LOW;
		if (ath9k_hw_mci_is_enabled(ah)) {
Loading