diff mbox series

[1/4] ath10k: sdio: set hi_acs_flags

Message ID 1550766118-31703-2-git-send-email-kvalo@codeaurora.org (mailing list archive)
State New, archived
Headers show
Series ath10k: small fixes for SDIO support | expand

Commit Message

Kalle Valo Feb. 21, 2019, 4:21 p.m. UTC
From: Alagu Sankar <alagusankar@silex-india.com>

The SDIO firmware does not allow transmitting packets with the
reduced tx completion HI_ACS option. SDIO firmware uses 1544 as
alternate credit size, which is not big enough for the maximum sized
mac80211 frames. Disable both these HI_ACS flags for SDIO.

Co-developed-by: Wen Gong <wgong@codeaurora.org>
Signed-off-by: Alagu Sankar <alagusankar@silex-india.com>
Signed-off-by: Wen Gong <wgong@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
---
 drivers/net/wireless/ath/ath10k/core.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

Comments

Kalle Valo Feb. 26, 2019, 1:02 p.m. UTC | #1
Kalle Valo <kvalo@codeaurora.org> wrote:

> The SDIO firmware does not allow transmitting packets with the
> reduced tx completion HI_ACS option. SDIO firmware uses 1544 as
> alternate credit size, which is not big enough for the maximum sized
> mac80211 frames. Disable both these HI_ACS flags for SDIO.
> 
> Co-developed-by: Wen Gong <wgong@codeaurora.org>
> Signed-off-by: Alagu Sankar <alagusankar@silex-india.com>
> Signed-off-by: Wen Gong <wgong@codeaurora.org>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>

4 patches applied to ath-next branch of ath.git, thanks.

bf1f0a1a4da1 ath10k: sdio: set hi_acs_flags
6cd70c65647b ath10k: sdio: disable fwlog prints
55545b087012 ath10k: sdio: reset chip on power_down()
7d4445223031 ath10k: don't report unset rssi values to mac80211
diff mbox series

Patch

diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c
index ac2cf3f1c7b4..0c62a61b5eac 100644
--- a/drivers/net/wireless/ath/ath10k/core.c
+++ b/drivers/net/wireless/ath/ath10k/core.c
@@ -637,10 +637,16 @@  static void ath10k_init_sdio(struct ath10k *ar)
 	ath10k_bmi_write32(ar, hi_mbox_isr_yield_limit, 99);
 	ath10k_bmi_read32(ar, hi_acs_flags, &param);
 
-	param |= (HI_ACS_FLAGS_SDIO_SWAP_MAILBOX_SET |
-		  HI_ACS_FLAGS_SDIO_REDUCE_TX_COMPL_SET |
-		  HI_ACS_FLAGS_ALT_DATA_CREDIT_SIZE);
+	/* Data transfer is not initiated, when reduced Tx completion
+	 * is used for SDIO. disable it until fixed
+	 */
+	param &= ~HI_ACS_FLAGS_SDIO_REDUCE_TX_COMPL_SET;
 
+	/* Alternate credit size of 1544 as used by SDIO firmware is
+	 * not big enough for mac80211 / native wifi frames. disable it
+	 */
+	param &= ~HI_ACS_FLAGS_ALT_DATA_CREDIT_SIZE;
+	param |= HI_ACS_FLAGS_SDIO_SWAP_MAILBOX_SET;
 	ath10k_bmi_write32(ar, hi_acs_flags, param);
 }