2015-11-10 07:24:56

by yfw

[permalink] [raw]
Subject: [PATCH v2 0/5] wcn36xx: add some new firmware functionalities support

Hi,
This patchset are from Andy Green. Which support some functionalities of
latest wcn36xx firmware.

Changelog since v1
- decouple the connection of wcn36xx_smd_rsp_status_check_v2 with 3620.
This also fix the build error.
- Remove additional "From" introduced in v1.

Andy Green (5):
wcn36xx: introduce WCN36XX_HAL_AVOID_FREQ_RANGE_IND
wcn36xx: swallow two wcn3620 IND messages
wcn36xx: handle new hal response format
wcn3620: use new response format for wcn3620 trigger_ba
wcn3620: use new response format for wcn3620 remove_bsskey

drivers/net/wireless/ath/wcn36xx/hal.h | 2 ++
drivers/net/wireless/ath/wcn36xx/smd.c | 27 +++++++++++++++++++++++++--
drivers/net/wireless/ath/wcn36xx/smd.h | 9 +++++++++
3 files changed, 36 insertions(+), 2 deletions(-)

--
2.1.4



2015-11-10 07:25:17

by yfw

[permalink] [raw]
Subject: [PATCH v2 5/5] wcn3620: use new response format for wcn3620 remove_bsskey

From: Andy Green <[email protected]>

On wcn3620, firmware response to remove_bsskey uses the new, larger
"v2" format

Signed-off-by: Andy Green <[email protected]>
---
drivers/net/wireless/ath/wcn36xx/smd.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c
index dae5e1a..74f56a8 100644
--- a/drivers/net/wireless/ath/wcn36xx/smd.c
+++ b/drivers/net/wireless/ath/wcn36xx/smd.c
@@ -1598,7 +1598,8 @@ int wcn36xx_smd_remove_bsskey(struct wcn36xx *wcn,
wcn36xx_err("Sending hal_remove_bsskey failed\n");
goto out;
}
- ret = wcn36xx_smd_rsp_status_check(wcn->hal_buf, wcn->hal_rsp_len);
+ ret = wcn36xx_smd_rsp_status_check_v2(wcn, wcn->hal_buf,
+ wcn->hal_rsp_len);
if (ret) {
wcn36xx_err("hal_remove_bsskey response failed err=%d\n", ret);
goto out;
--
2.1.4


2015-11-23 06:54:45

by yfw

[permalink] [raw]
Subject: Re: [PATCH v2 0/5] wcn36xx: add some new firmware functionalities support

On 2015年11月23日 04:03, Eugene Krasnikov wrote:
> All 5 patches looks good to me.

Thanks a lot.

Regards
Yin, Fengwei

>
> 2015-11-20 2:12 GMT+00:00 fengwei.yin <[email protected]>:
>> Hi Eugene,
>>
>> On 2015/11/10 16:25, Yin, Fengwei wrote:
>>>
>>> Hi,
>>> This patchset are from Andy Green. Which support some functionalities of
>>> latest wcn36xx firmware.
>>>
>>> Changelog since v1
>>> - decouple the connection of wcn36xx_smd_rsp_status_check_v2 with 3620.
>>> This also fix the build error.
>>> - Remove additional "From" introduced in v1.
>>>
>>> Andy Green (5):
>>> wcn36xx: introduce WCN36XX_HAL_AVOID_FREQ_RANGE_IND
>>> wcn36xx: swallow two wcn3620 IND messages
>>> wcn36xx: handle new hal response format
>>> wcn3620: use new response format for wcn3620 trigger_ba
>>> wcn3620: use new response format for wcn3620 remove_bsskey
>>>
>>> drivers/net/wireless/ath/wcn36xx/hal.h | 2 ++
>>> drivers/net/wireless/ath/wcn36xx/smd.c | 27 +++++++++++++++++++++++++--
>>> drivers/net/wireless/ath/wcn36xx/smd.h | 9 +++++++++
>>> 3 files changed, 36 insertions(+), 2 deletions(-)
>>>
>>
>> What do you think about these patches? If they are OK, can you ack them?
>> Thanks.
>>
>>
>> Regards
>> Yin, Fengwei
>
>
>

2015-11-10 07:25:05

by yfw

[permalink] [raw]
Subject: [PATCH v2 3/5] wcn36xx: handle new hal response format

From: Andy Green <[email protected]>

wcn3620 has a new message structure for the reply to some hal
commands. This patch adds the struct and helper routine that
uses it if the chip is wcn3620, or falls back to the old
helper routine.

We don't know what to do with the candidate list he sends back,
but we can at least accept and ignore it nicely instead of dying.

Signed-off-by: Andy Green <[email protected]>
---
drivers/net/wireless/ath/wcn36xx/smd.c | 16 ++++++++++++++++
drivers/net/wireless/ath/wcn36xx/smd.h | 9 +++++++++
2 files changed, 25 insertions(+)

diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c
index be317f4..b7e61a0 100644
--- a/drivers/net/wireless/ath/wcn36xx/smd.c
+++ b/drivers/net/wireless/ath/wcn36xx/smd.c
@@ -302,6 +302,22 @@ static int wcn36xx_smd_rsp_status_check(void *buf, size_t len)
return 0;
}

+static int wcn36xx_smd_rsp_status_check_v2(struct wcn36xx *wcn, void *buf,
+ size_t len)
+{
+ struct wcn36xx_fw_msg_status_rsp_v2 *rsp;
+
+ if (len < sizeof(struct wcn36xx_hal_msg_header) + sizeof(*rsp))
+ return wcn36xx_smd_rsp_status_check(buf, len);
+
+ rsp = buf + sizeof(struct wcn36xx_hal_msg_header);
+
+ if (WCN36XX_FW_MSG_RESULT_SUCCESS != rsp->status)
+ return rsp->status;
+
+ return 0;
+}
+
int wcn36xx_smd_load_nv(struct wcn36xx *wcn)
{
struct nv_data *nv_d;
diff --git a/drivers/net/wireless/ath/wcn36xx/smd.h b/drivers/net/wireless/ath/wcn36xx/smd.h
index 008d034..8361f9e 100644
--- a/drivers/net/wireless/ath/wcn36xx/smd.h
+++ b/drivers/net/wireless/ath/wcn36xx/smd.h
@@ -44,6 +44,15 @@ struct wcn36xx_fw_msg_status_rsp {
u32 status;
} __packed;

+/* wcn3620 returns this for tigger_ba */
+
+struct wcn36xx_fw_msg_status_rsp_v2 {
+ u8 bss_id[6];
+ u32 status __packed;
+ u16 count_following_candidates __packed;
+ /* candidate list follows */
+};
+
struct wcn36xx_hal_ind_msg {
struct list_head list;
u8 *msg;
--
2.1.4


2015-11-30 12:44:11

by Kalle Valo

[permalink] [raw]
Subject: Re: [v2,1/5] wcn36xx: introduce WCN36XX_HAL_AVOID_FREQ_RANGE_IND


> From: Andy Green <[email protected]>
>
> WCN3620 firmware introduces a new async indication, we need to
> add it as a known message type so we can accept it
>
> Signed-off-by: Andy Green <[email protected]>

Thanks, 5 patches applied to wireless-drivers-next.git:

9193adebc4d1 wcn36xx: introduce WCN36XX_HAL_AVOID_FREQ_RANGE_IND
df0d4364766f wcn36xx: swallow two wcn3620 IND messages
40ac77c8117b wcn36xx: handle new hal response format
69f66b688e93 wcn36xx: use new response format for wcn3620 trigger_ba
1d14c6f480f4 wcn36xx: use new response format for wcn3620 remove_bsskey

Kalle Valo

2015-11-30 12:46:19

by Kalle Valo

[permalink] [raw]
Subject: Re: [PATCH v2 4/5] wcn3620: use new response format for wcn3620 trigger_ba

"Yin, Fengwei" <[email protected]> writes:

> From: Andy Green <[email protected]>
>
> On wcn3620, firmware response to trigger_ba uses the new, larger
> "v2" format
>
> Signed-off-by: Andy Green <[email protected]>

Please prefix the patch title with the name of driver, in this case that
would be "wcn36xx: ". This time I fixed it before I applied the patches.

--
Kalle Valo

2015-11-10 07:25:02

by yfw

[permalink] [raw]
Subject: [PATCH v2 2/5] wcn36xx: swallow two wcn3620 IND messages

From: Andy Green <[email protected]>

WCN3620 can asynchronously send two new kinds of indication message,
since we can't handle them just accept them quietly.

Signed-off-by: Andy Green <[email protected]>
---

v2: used one break for both in the second stanza

drivers/net/wireless/ath/wcn36xx/smd.c | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c
index c9263e1..be317f4 100644
--- a/drivers/net/wireless/ath/wcn36xx/smd.c
+++ b/drivers/net/wireless/ath/wcn36xx/smd.c
@@ -2128,6 +2128,8 @@ static void wcn36xx_smd_rsp_process(struct wcn36xx *wcn, void *buf, size_t len)
complete(&wcn->hal_rsp_compl);
break;

+ case WCN36XX_HAL_COEX_IND:
+ case WCN36XX_HAL_AVOID_FREQ_RANGE_IND:
case WCN36XX_HAL_OTA_TX_COMPL_IND:
case WCN36XX_HAL_MISSED_BEACON_IND:
case WCN36XX_HAL_DELETE_STA_CONTEXT_IND:
@@ -2174,6 +2176,9 @@ static void wcn36xx_ind_smd_work(struct work_struct *work)
msg_header = (struct wcn36xx_hal_msg_header *)hal_ind_msg->msg;

switch (msg_header->msg_type) {
+ case WCN36XX_HAL_COEX_IND:
+ case WCN36XX_HAL_AVOID_FREQ_RANGE_IND:
+ break;
case WCN36XX_HAL_OTA_TX_COMPL_IND:
wcn36xx_smd_tx_compl_ind(wcn,
hal_ind_msg->msg,
--
2.1.4


2015-11-30 11:02:43

by Kalle Valo

[permalink] [raw]
Subject: Re: [PATCH v2 0/5] wcn36xx: add some new firmware functionalities support

"fengwei.yin" <[email protected]> writes:

> On 2015/11/23 4:03, Eugene Krasnikov wrote:
>> All 5 patches looks good to me.
>
> Is it OK to take these patches? Thanks.

They are on my queue and I'll get to them soon. But from a quick look
they seem to be ok.

--
Kalle Valo

2015-11-26 00:05:03

by yfw

[permalink] [raw]
Subject: Re: [PATCH v2 0/5] wcn36xx: add some new firmware functionalities support

Hi Kalle,

On 2015/11/23 4:03, Eugene Krasnikov wrote:
> All 5 patches looks good to me.
>
Is it OK to take these patches? Thanks.

Regards
Yin, Fengwei

> 2015-11-20 2:12 GMT+00:00 fengwei.yin <[email protected]>:
>> Hi Eugene,
>>
>> On 2015/11/10 16:25, Yin, Fengwei wrote:
>>>
>>> Hi,
>>> This patchset are from Andy Green. Which support some functionalities of
>>> latest wcn36xx firmware.
>>>
>>> Changelog since v1
>>> - decouple the connection of wcn36xx_smd_rsp_status_check_v2 with 3620.
>>> This also fix the build error.
>>> - Remove additional "From" introduced in v1.
>>>
>>> Andy Green (5):
>>> wcn36xx: introduce WCN36XX_HAL_AVOID_FREQ_RANGE_IND
>>> wcn36xx: swallow two wcn3620 IND messages
>>> wcn36xx: handle new hal response format
>>> wcn3620: use new response format for wcn3620 trigger_ba
>>> wcn3620: use new response format for wcn3620 remove_bsskey
>>>
>>> drivers/net/wireless/ath/wcn36xx/hal.h | 2 ++
>>> drivers/net/wireless/ath/wcn36xx/smd.c | 27 +++++++++++++++++++++++++--
>>> drivers/net/wireless/ath/wcn36xx/smd.h | 9 +++++++++
>>> 3 files changed, 36 insertions(+), 2 deletions(-)
>>>
>>
>> What do you think about these patches? If they are OK, can you ack them?
>> Thanks.
>>
>>
>> Regards
>> Yin, Fengwei
>
>
>

2015-11-20 02:12:43

by yfw

[permalink] [raw]
Subject: Re: [PATCH v2 0/5] wcn36xx: add some new firmware functionalities support

Hi Eugene,

On 2015/11/10 16:25, Yin, Fengwei wrote:
> Hi,
> This patchset are from Andy Green. Which support some functionalities of
> latest wcn36xx firmware.
>
> Changelog since v1
> - decouple the connection of wcn36xx_smd_rsp_status_check_v2 with 3620.
> This also fix the build error.
> - Remove additional "From" introduced in v1.
>
> Andy Green (5):
> wcn36xx: introduce WCN36XX_HAL_AVOID_FREQ_RANGE_IND
> wcn36xx: swallow two wcn3620 IND messages
> wcn36xx: handle new hal response format
> wcn3620: use new response format for wcn3620 trigger_ba
> wcn3620: use new response format for wcn3620 remove_bsskey
>
> drivers/net/wireless/ath/wcn36xx/hal.h | 2 ++
> drivers/net/wireless/ath/wcn36xx/smd.c | 27 +++++++++++++++++++++++++--
> drivers/net/wireless/ath/wcn36xx/smd.h | 9 +++++++++
> 3 files changed, 36 insertions(+), 2 deletions(-)
>

What do you think about these patches? If they are OK, can you ack them?
Thanks.


Regards
Yin, Fengwei

2015-11-10 07:25:11

by yfw

[permalink] [raw]
Subject: [PATCH v2 4/5] wcn3620: use new response format for wcn3620 trigger_ba

From: Andy Green <[email protected]>

On wcn3620, firmware response to trigger_ba uses the new, larger
"v2" format

Signed-off-by: Andy Green <[email protected]>
---
drivers/net/wireless/ath/wcn36xx/smd.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c
index b7e61a0..dae5e1a 100644
--- a/drivers/net/wireless/ath/wcn36xx/smd.c
+++ b/drivers/net/wireless/ath/wcn36xx/smd.c
@@ -1967,7 +1967,8 @@ int wcn36xx_smd_trigger_ba(struct wcn36xx *wcn, u8 sta_index)
wcn36xx_err("Sending hal_trigger_ba failed\n");
goto out;
}
- ret = wcn36xx_smd_rsp_status_check(wcn->hal_buf, wcn->hal_rsp_len);
+ ret = wcn36xx_smd_rsp_status_check_v2(wcn, wcn->hal_buf,
+ wcn->hal_rsp_len);
if (ret) {
wcn36xx_err("hal_trigger_ba response failed err=%d\n", ret);
goto out;
--
2.1.4


2015-11-30 11:35:35

by yfw

[permalink] [raw]
Subject: Re: [PATCH v2 0/5] wcn36xx: add some new firmware functionalities support



On 2015/11/30 19:02, Kalle Valo wrote:
> "fengwei.yin" <[email protected]> writes:
>
>> On 2015/11/23 4:03, Eugene Krasnikov wrote:
>>> All 5 patches looks good to me.
>>
>> Is it OK to take these patches? Thanks.
>
> They are on my queue and I'll get to them soon. But from a quick look
> they seem to be ok.
>

Thanks a lot.

Regards
Yin, Fengwei

2015-11-22 20:03:53

by Eugene Krasnikov

[permalink] [raw]
Subject: Re: [PATCH v2 0/5] wcn36xx: add some new firmware functionalities support

All 5 patches looks good to me.

2015-11-20 2:12 GMT+00:00 fengwei.yin <[email protected]>:
> Hi Eugene,
>
> On 2015/11/10 16:25, Yin, Fengwei wrote:
>>
>> Hi,
>> This patchset are from Andy Green. Which support some functionalities of
>> latest wcn36xx firmware.
>>
>> Changelog since v1
>> - decouple the connection of wcn36xx_smd_rsp_status_check_v2 with 3620.
>> This also fix the build error.
>> - Remove additional "From" introduced in v1.
>>
>> Andy Green (5):
>> wcn36xx: introduce WCN36XX_HAL_AVOID_FREQ_RANGE_IND
>> wcn36xx: swallow two wcn3620 IND messages
>> wcn36xx: handle new hal response format
>> wcn3620: use new response format for wcn3620 trigger_ba
>> wcn3620: use new response format for wcn3620 remove_bsskey
>>
>> drivers/net/wireless/ath/wcn36xx/hal.h | 2 ++
>> drivers/net/wireless/ath/wcn36xx/smd.c | 27 +++++++++++++++++++++++++--
>> drivers/net/wireless/ath/wcn36xx/smd.h | 9 +++++++++
>> 3 files changed, 36 insertions(+), 2 deletions(-)
>>
>
> What do you think about these patches? If they are OK, can you ack them?
> Thanks.
>
>
> Regards
> Yin, Fengwei



--
Best regards,
Eugene

2015-11-10 07:24:59

by yfw

[permalink] [raw]
Subject: [PATCH v2 1/5] wcn36xx: introduce WCN36XX_HAL_AVOID_FREQ_RANGE_IND

From: Andy Green <[email protected]>

WCN3620 firmware introduces a new async indication, we need to
add it as a known message type so we can accept it

Signed-off-by: Andy Green <[email protected]>
---
drivers/net/wireless/ath/wcn36xx/hal.h | 2 ++
1 file changed, 2 insertions(+)

diff --git a/drivers/net/wireless/ath/wcn36xx/hal.h b/drivers/net/wireless/ath/wcn36xx/hal.h
index a1f1127..b947de0 100644
--- a/drivers/net/wireless/ath/wcn36xx/hal.h
+++ b/drivers/net/wireless/ath/wcn36xx/hal.h
@@ -345,6 +345,8 @@ enum wcn36xx_hal_host_msg_type {
WCN36XX_HAL_DHCP_START_IND = 189,
WCN36XX_HAL_DHCP_STOP_IND = 190,

+ WCN36XX_HAL_AVOID_FREQ_RANGE_IND = 233,
+
WCN36XX_HAL_MSG_MAX = WCN36XX_HAL_MSG_TYPE_MAX_ENUM_SIZE
};

--
2.1.4