Search Linux Wireless

[PATCH 23/23] wilc1000: introduce symbolic names for two tx-related control bits

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I wish these registers were documented so I wouldn't have to guess at
their meanings and make up my own names.

Signed-off-by: David Mosberger-Tang <davidm@xxxxxxxxxx>
---
 drivers/net/wireless/microchip/wilc1000/wlan.c | 6 +++---
 drivers/net/wireless/microchip/wilc1000/wlan.h | 2 ++
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/microchip/wilc1000/wlan.c b/drivers/net/wireless/microchip/wilc1000/wlan.c
index 4ec23b2b2da05..b7a792edea187 100644
--- a/drivers/net/wireless/microchip/wilc1000/wlan.c
+++ b/drivers/net/wireless/microchip/wilc1000/wlan.c
@@ -672,7 +672,7 @@ static int fill_vmm_table(const struct wilc *wilc,
 					goto out;
 				vmm_table[i] = vmm_sz / 4;
 				if (tx_cb->type == WILC_CFG_PKT)
-					vmm_table[i] |= BIT(10);
+					vmm_table[i] |= WILC_VMM_CFG_PKT;
 
 				cpu_to_le32s(&vmm_table[i]);
 				vmm_entries_ac[i] = ac;
@@ -715,7 +715,7 @@ static int send_vmm_table(struct wilc *wilc, int i, const u32 *vmm_table)
 		if (ret)
 			break;
 
-		if ((reg & 0x1) == 0) {
+		if ((reg & WILC_HOST_TX_CTRL_BUSY) == 0) {
 			ac_update_fw_ac_pkt_info(wilc, reg);
 			break;
 		}
@@ -763,7 +763,7 @@ static int send_vmm_table(struct wilc *wilc, int i, const u32 *vmm_table)
 			ret = func->hif_read_reg(wilc, WILC_HOST_TX_CTRL, &reg);
 			if (ret)
 				break;
-			reg &= ~BIT(0);
+			reg &= ~WILC_HOST_TX_CTRL_BUSY;
 			ret = func->hif_write_reg(wilc, WILC_HOST_TX_CTRL, reg);
 		} else {
 			ret = entries;
diff --git a/drivers/net/wireless/microchip/wilc1000/wlan.h b/drivers/net/wireless/microchip/wilc1000/wlan.h
index 10618327133ce..f5d32ec93fdb9 100644
--- a/drivers/net/wireless/microchip/wilc1000/wlan.h
+++ b/drivers/net/wireless/microchip/wilc1000/wlan.h
@@ -224,6 +224,7 @@
 #define BE_AC_ACM_STAT_FIELD		BIT(8)
 #define BK_AC_COUNT_FIELD		GENMASK(7, 3)
 #define BK_AC_ACM_STAT_FIELD		BIT(1)
+#define WILC_HOST_TX_CTRL_BUSY		BIT(0)
 
 #define WILC_PKT_HDR_CONFIG_FIELD	BIT(31)
 #define WILC_PKT_HDR_OFFSET_FIELD	GENMASK(30, 22)
@@ -233,6 +234,7 @@
 #define WILC_INTERRUPT_DATA_SIZE	GENMASK(14, 0)
 
 #define WILC_VMM_BUFFER_SIZE		GENMASK(9, 0)
+#define WILC_VMM_CFG_PKT		BIT(10)
 
 #define WILC_VMM_HDR_TYPE		BIT(31)
 #define WILC_VMM_HDR_MGMT_FIELD		BIT(30)
-- 
2.25.1




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux