[PATCH]Remove the PNO verion bit from the update scan param response to get the correcly response status

YanBo dreamfly281 at gmail.com
Thu May 23 12:32:59 EDT 2013


On Fri, May 24, 2013 at 12:21 AM, Eugene Krasnikov <k.eugene.e at gmail.com> wrote:
> now wcn36xx moved completely to sw_scan. So i suggest to remove this
> function completely until we implement hw_scan how about that?
>
I'd suggest we merge this into mainstream cause it is innocuous.and I
will confirm the detail of hw scan capability of WCN,
if it indeed not support the hw scan, I'll will submit another patch
which remove all hw_scan relative code clean. if we not merge this
patch, it will be lost cause I will sync my code with mainstream, and
it is hard to remember this when one day we need it.

BB /Yanbo

> 2013/5/23 YanBo <dreamfly281 at gmail.com>:
>> On Fri, May 24, 2013 at 12:06 AM, Eugene Krasnikov <k.eugene.e at gmail.com> wrote:
>>> Are we gonna remove PNO from any other response? I mean if we need to
>>> apply the same logic to any other responses except update_scan_params?
>>>
>> Currently only the update_scan_params has such special mark need check.
>>> By the way update_scan is not at all, do we need it? Dead code?:)
>>>
>> I have saw there is discussion about remove hw_scan function in the
>> previous mails, remove the hw_scan may lead to this as "dead code"
>> But I do believe the chip support hw_scan, but we just haven't find
>> the correctly way to enable this function at this moment,
>> when we get the correctly way to operate the hw_scan, it will be alive code  :)
>>
>> BR /Yanbo
>>
>>> 2013/5/23 YanBo <dreamfly281 at gmail.com>:
>>>> On Thu, May 23, 2013 at 11:51 PM, Eugene Krasnikov <k.eugene.e at gmail.com> wrote:
>>>>> Let's keep function naming the same. Let's use
>>>>> wcn36xx_smd_update_scan_params_rsp instead
>>>>> wcn36xx_smd_rsp_update_scan_param_status_check. What do you think?
>>>>
>>>> Thanks for quickly feedback, this function is just used for status
>>>> check which more like the function "wcn36xx_smd_rsp_status_check"
>>>> so name style is more like this one, that seems more consistent, what
>>>> your opinion?
>>>>
>>>> BR /Yanbo
>>>>>
>>>>> 2013/5/23 YanBo <dreamfly281 at gmail.com>:
>>>>>> The update scan param status always report error cause it contain the PNO mark,
>>>>>> remove it to get the correctly response status
>>>>>>
>>>>>> Signed-off-by: Yanbo Li <yanbol at qti.qualcomm.com>
>>>>>> ---
>>>>>>  smd.c |   35 ++++++++++++++++++++++-------------
>>>>>>  smd.h |    4 mu++-
>>>>>>  2 files changed, 25 insertions(+), 14 deletions(-)
>>>>>>
>>>>>> diff --git a/smd.c b/smd.c
>>>>>> index af38dcc..460b2da 100644
>>>>>> --- a/smd.c
>>>>>> +++ b/smd.c
>>>>>> @@ -74,6 +74,24 @@ static int wcn36xx_smd_rsp_status_check(void *buf,
>>>>>> size_t len)
>>>>>>         return 0;
>>>>>>  }
>>>>>>
>>>>>> +int wcn36xx_smd_rsp_update_scan_param_status_check(void *buf, size_t len)
>>>>>> +{
>>>>>> +       struct wcn36xx_fw_msg_status_rsp * rsp;
>>>>>> +       if (len < sizeof(struct wcn36xx_hal_msg_header) +
>>>>>> +               sizeof(struct wcn36xx_fw_msg_status_rsp))
>>>>>> +               return -EIO;
>>>>>> +       rsp = (struct wcn36xx_fw_msg_status_rsp *)
>>>>>> +               (buf + sizeof(struct wcn36xx_hal_msg_header));
>>>>>> +
>>>>>> +       /* Remove the PNO version bit */
>>>>>> +       rsp->status &= (~(WCN36XX_FW_MSG_PNO_VERSION_MASK));
>>>>>> +
>>>>>> +       if (WCN36XX_FW_MSG_RESULT_SUCCESS != rsp->status) {
>>>>>> +               return -EIO;
>>>>>> +       }
>>>>>> +       return 0;
>>>>>> +}
>>>>>> +
>>>>>>  int wcn36xx_smd_load_nv(struct wcn36xx *wcn)
>>>>>>  {
>>>>>>         struct nv_data *nv_d;
>>>>>> @@ -298,18 +316,6 @@ int wcn36xx_smd_update_scan_params(struct wcn36xx *wcn){
>>>>>>
>>>>>>         return wcn36xx_smd_send_and_wait(wcn, msg_body.header.len);
>>>>>>  }
>>>>>> -static int wcn36xx_smd_update_scan_params_rsp(void *buf, size_t len)
>>>>>> -{
>>>>>> -       struct  wcn36xx_hal_update_scan_params_resp * rsp;
>>>>>> -
>>>>>> -       rsp = (struct wcn36xx_hal_update_scan_params_resp *)buf;
>>>>>> -
>>>>>> -       wcn36xx_dbg(WCN36XX_DBG_HAL,
>>>>>> -                   "hal rsp update scan params status %d",
>>>>>> -                   rsp->status);
>>>>>> -
>>>>>> -       return 0;
>>>>>> -}
>>>>>>
>>>>>>  int wcn36xx_smd_add_sta_self(struct wcn36xx *wcn, u8 *addr, u32 status)
>>>>>>  {
>>>>>> @@ -901,7 +907,10 @@ static void wcn36xx_smd_rsp_process(struct
>>>>>> wcn36xx *wcn, void *buf, si
>>>>>>                                  ze_t len)
>>>>>>                 wcn36xx_smd_join_rsp(buf, len);
>>>>>>                 break;
>>>>>>         case WCN36XX_HAL_UPDATE_SCAN_PARAM_RSP:
>>>>>> -               wcn36xx_smd_update_scan_params_rsp(buf, len);
>>>>>> +               if(wcn36xx_smd_rsp_update_scan_param_status_check(buf, len)) {
>>>>>> +                       wcn36xx_warn("error response from hal request %d",
>>>>>> +                                    msg_header->msg_type);
>>>>>> +               }
>>>>>>                 break;
>>>>>>         case WCN36XX_HAL_CH_SWITCH_RSP:
>>>>>>                 wcn36xx_smd_switch_channel_rsp(buf,len);
>>>>>> diff --git a/smd.h b/smd.h
>>>>>> index 47a6645..9703e19 100644
>>>>>> --- a/smd.h
>>>>>> +++ b/smd.h
>>>>>> @@ -27,6 +27,9 @@
>>>>>>  #define SMD_MSG_TIMEOUT 200
>>>>>>  #define WCN36XX_SMSM_WLAN_TX_ENABLE                    0x00000400
>>>>>>  #define WCN36XX_SMSM_WLAN_TX_RINGS_EMPTY               0x00000200
>>>>>> +/* The PNO version info be contained in the rsp msg */
>>>>>> +#define WCN36XX_FW_MSG_PNO_VERSION_MASK                        0X8000
>>>>>> +
>>>>>>
>>>>>>  enum wcn36xx_fw_msg_result {
>>>>>>         WCN36XX_FW_MSG_RESULT_SUCCESS                   = 0,
>>>>>> @@ -54,7 +57,6 @@ int wcn36xx_smd_init_scan(struct wcn36xx *wcn);
>>>>>>  int wcn36xx_smd_start_scan(struct wcn36xx *wcn, int ch);
>>>>>>  int wcn36xx_smd_end_scan(struct wcn36xx *wcn, int ch);
>>>>>>  int wcn36xx_smd_finish_scan(struct wcn36xx *wcn);
>>>>>> -int wcn36xx_smd_update_scan_params(struct wcn36xx *wcn);
>>>>>>  int wcn36xx_smd_add_sta_self(struct wcn36xx *wcn, u8 *addr, u32 status);
>>>>>>  int wcn36xx_smd_delete_sta_self(struct wcn36xx *wcn, u8 *addr);
>>>>>>  int wcn36xx_smd_delete_sta(struct wcn36xx *wcn);
>>>>>> --
>>>>>> 1.7.9.5
>>>>>>
>>>>>> yanbo at buildingX:/var/tmp/output/drivers/net/wireless/ath/wcn36xx$
>>>>>> emacs 0001-Remove-the-PNO
>>>>>>
>>>>>> -verion-bit-from-the-update-scan-param.patch  -nw
>>>>>> [-] = =0001-Remove-the-PNO-verion-bit-from-the-update-scan-param.patch--------------------------------------------------------------------------------------------------
>>>>>>  int wcn36xx_smd_add_sta_self(struct wcn36xx *wcn, u8 *addr, u32 status)
>>>>>>  {
>>>>>> @@ -901,7 +907,10 @@ static void wcn36xx_smd_rsp_process(struct
>>>>>> wcn36xx *wcn, void *buf, size_t len)
>>>>>>                 wcn36xx_smd_join_rsp(buf, len);
>>>>>>                 break;
>>>>>>         case WCN36XX_HAL_UPDATE_SCAN_PARAM_RSP:
>>>>>> -               wcn36xx_smd_update_scan_params_rsp(buf, len);
>>>>>> +               if(wcn36xx_smd_rsp_update_scan_param_status_check(buf, len)) {
>>>>>> +                       wcn36xx_warn("error response from hal request %d",
>>>>>> +                                    msg_header->msg_type);
>>>>>> +               }
>>>>>>                 break;
>>>>>>         case WCN36XX_HAL_CH_SWITCH_RSP:
>>>>>>                 wcn36xx_smd_switch_channel_rsp(buf,len);
>>>>>> diff --git a/smd.h b/smd.h
>>>>>> index 47a6645..9703e19 100644
>>>>>> --- a/smd.h
>>>>>> +++ b/smd.h
>>>>>> @@ -27,6 +27,9 @@
>>>>>>  #define SMD_MSG_TIMEOUT 200
>>>>>>  #define WCN36XX_SMSM_WLAN_TX_ENABLE                    0x00000400
>>>>>>  #define WCN36XX_SMSM_WLAN_TX_RINGS_EMPTY               0x00000200
>>>>>> +/* The PNO version info be contained in the rsp msg */
>>>>>> +#define WCN36XX_FW_MSG_PNO_VERSION_MASK                        0X8000
>>>>>> +
>>>>>>
>>>>>>  enum wcn36xx_fw_msg_result {
>>>>>>         WCN36XX_FW_MSG_RESULT_SUCCESS                   = 0,
>>>>>> @@ -54,7 +57,6 @@ int wcn36xx_smd_init_scan(struct wcn36xx *wcn);
>>>>>>  int wcn36xx_smd_start_scan(struct wcn36xx *wcn, int ch);
>>>>>>  int wcn36xx_smd_end_scan(struct wcn36xx *wcn, int ch);
>>>>>>  int wcn36xx_smd_finish_scan(struct wcn36xx *wcn);
>>>>>> -int wcn36xx_smd_update_scan_params(struct wcn36xx *wcn);
>>>>>>  int wcn36xx_smd_add_sta_self(struct wcn36xx *wcn, u8 *addr, u32 status);
>>>>>>  int wcn36xx_smd_delete_sta_self(struct wcn36xx *wcn, u8 *addr);
>>>>>>  int wcn36xx_smd_delete_sta(struct wcn36xx *wcn);
>>>>>> --
>>>>>> 1.7.9.5
>>>>>>
>>>>>> _______________________________________________
>>>>>> wcn36xx mailing list
>>>>>> wcn36xx at lists.infradead.org
>>>>>> http://lists.infradead.org/mailman/listinfo/wcn36xx
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Best regards,
>>>>> Eugene
>>>
>>>
>>>
>>> --
>>> Best regards,
>>> Eugene
>
>
>
> --
> Best regards,
> Eugene



More information about the wcn36xx mailing list