2016-04-07 06:37:53

by Rajkumar Manoharan

[permalink] [raw]
Subject: [PATCH v2 1/3] ath10k: fix calibration init sequence of qca99x0

pre-calibration is meant for qca4019 which contains only caldata
whereas calibration file is used by ar9888 and qca99x0 that contains
both board data and caldata. So by definition both pre-cal-file and
cal-file can not coexist. Keeping them in shared memory (union), is
breaking boot sequence of qca99x0. Fix it by storing both binaries
in separate memories. This issue is reported in ipq8064 platform which
includes caldata in flash memory.

Fixes: 3d9195ea19e4 ("ath10k: incorporate qca4019 cal data download sequence")
Reported-by: Sebastian Gottschall <[email protected]>
Signed-off-by: Rajkumar Manoharan <[email protected]>
---
v2: added fixes commit

drivers/net/wireless/ath/ath10k/core.h | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/core.h b/drivers/net/wireless/ath/ath10k/core.h
index c23c37312ef7..d85b99164212 100644
--- a/drivers/net/wireless/ath/ath10k/core.h
+++ b/drivers/net/wireless/ath/ath10k/core.h
@@ -728,10 +728,8 @@ struct ath10k {
const void *firmware_data;
size_t firmware_len;

- union {
- const struct firmware *pre_cal_file;
- const struct firmware *cal_file;
- };
+ const struct firmware *pre_cal_file;
+ const struct firmware *cal_file;

struct {
const void *firmware_codeswap_data;
--
2.7.4



2016-04-07 06:38:37

by Rajkumar Manoharan

[permalink] [raw]
Subject: [PATCH v2 3/3] ath10k: fix unconditional num_mpdus_ready subtraction

Decrement num_mpdus_ready only when rx amsdu is processed successfully.
Not doing so, will result in leak and impact stabilty under low memory
cases. Also commit 3128b3d8a2b9 ("ath10k: speedup htt rx descriptor
processing for rx_ind") missed to removed unused skb list rx_q.

Fixes: 3128b3d8a2b9 ("ath10k: speedup htt rx descriptor processing for
rx_ind")
Signed-off-by: Rajkumar Manoharan <[email protected]>
---
v2: updated commit log

drivers/net/wireless/ath/ath10k/htt_rx.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/htt_rx.c b/drivers/net/wireless/ath/ath10k/htt_rx.c
index 41adf62d7555..9390897a00c6 100644
--- a/drivers/net/wireless/ath/ath10k/htt_rx.c
+++ b/drivers/net/wireless/ath/ath10k/htt_rx.c
@@ -2412,14 +2412,12 @@ static void ath10k_htt_txrx_compl_task(unsigned long ptr)
struct ath10k_htt *htt = (struct ath10k_htt *)ptr;
struct ath10k *ar = htt->ar;
struct htt_tx_done tx_done = {};
- struct sk_buff_head rx_q;
struct sk_buff_head rx_ind_q;
struct sk_buff_head tx_ind_q;
struct sk_buff *skb;
unsigned long flags;
int num_mpdus;

- __skb_queue_head_init(&rx_q);
__skb_queue_head_init(&rx_ind_q);
__skb_queue_head_init(&tx_ind_q);

@@ -2447,11 +2445,13 @@ static void ath10k_htt_txrx_compl_task(unsigned long ptr)
ath10k_mac_tx_push_pending(ar);

num_mpdus = atomic_read(&htt->num_mpdus_ready);
- atomic_sub(num_mpdus, &htt->num_mpdus_ready);

- while (num_mpdus--) {
+ while (num_mpdus) {
if (ath10k_htt_rx_handle_amsdu(htt))
break;
+
+ num_mpdus--;
+ atomic_dec(&htt->num_mpdus_ready);
}

while ((skb = __skb_dequeue(&rx_ind_q))) {
--
2.7.4


2016-04-07 06:38:20

by Rajkumar Manoharan

[permalink] [raw]
Subject: [PATCH v2 2/3] ath10k: remove unnecessary warning for probe response drops

qca99x0 and qca4019 solutions limit probe responses transmissions.
Logging warning message for each probe response drop is flooding
kernel log unnecessary with " failed to increase tx mgmt pending
count: -16, dropping". Hence reducing log level to debug.

Reported-by: Sebastian Gottschall <[email protected]>
Signed-off-by: Rajkumar Manoharan <[email protected]>
---
drivers/net/wireless/ath/ath10k/mac.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
index 20d72e29dfa1..b0e613bc10a5 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -3994,8 +3994,8 @@ static void ath10k_mac_op_tx(struct ieee80211_hw *hw,

ret = ath10k_htt_tx_mgmt_inc_pending(htt, is_mgmt, is_presp);
if (ret) {
- ath10k_warn(ar, "failed to increase tx mgmt pending count: %d, dropping\n",
- ret);
+ ath10k_dbg(ar, ATH10K_DBG_MAC, "failed to increase tx mgmt pending count: %d, dropping\n",
+ ret);
ath10k_htt_tx_dec_pending(htt);
spin_unlock_bh(&ar->htt.tx_lock);
ieee80211_free_txskb(ar->hw, skb);
--
2.7.4


2016-04-07 15:51:51

by Kalle Valo

[permalink] [raw]
Subject: Re: [PATCH v2 1/3] ath10k: fix calibration init sequence of qca99x0

Rajkumar Manoharan <[email protected]> writes:

> pre-calibration is meant for qca4019 which contains only caldata
> whereas calibration file is used by ar9888 and qca99x0 that contains
> both board data and caldata. So by definition both pre-cal-file and
> cal-file can not coexist. Keeping them in shared memory (union), is
> breaking boot sequence of qca99x0. Fix it by storing both binaries
> in separate memories. This issue is reported in ipq8064 platform which
> includes caldata in flash memory.
>
> Fixes: 3d9195ea19e4 ("ath10k: incorporate qca4019 cal data download sequence")
> Reported-by: Sebastian Gottschall <[email protected]>
> Signed-off-by: Rajkumar Manoharan <[email protected]>

All three applied, thanks.

--
Kalle Valo