Re: [PATCH] wcn36xx: pass correct BSS index when deleting BSS keys

2018-04-12 Thread Kalle Valo
Daniel Mack  writes:

>>> Yeah, sorry. I did that intentionally, but missed to mention it in the
>>> commit log.
>> 
>> I can add that to the commit log, just tell me what to add.
>
> I'll resend, hang on :)

Even better, thanks.

-- 
Kalle Valo


Re: [PATCH] wcn36xx: pass correct BSS index when deleting BSS keys

2018-04-12 Thread Daniel Mack
On Thursday, April 12, 2018 02:14 PM, Kalle Valo wrote:
> Daniel Mack  writes:
> 
>> On Thursday, April 12, 2018 01:46 PM, Loic Poulain wrote:
>>> Hi Daniel,
>>>
 @@ -564,10 +565,13 @@ static int wcn36xx_set_key(struct ieee80211_hw *hw, 
 enum set_key_cmd cmd,
 break;
 case DISABLE_KEY:
 if (!(IEEE80211_KEY_FLAG_PAIRWISE & key_conf->flags)) {
 +   if (vif_priv->bss_index != 
 WCN36XX_HAL_BSS_INVALID_IDX)
 +   wcn36xx_smd_remove_bsskey(wcn,
 +   vif_priv->encrypt_type,
 +   vif_priv->bss_index,
 +   key_conf->keyidx);
 +
 vif_priv->encrypt_type = WCN36XX_HAL_ED_NONE;
 -   wcn36xx_smd_remove_bsskey(wcn,
 -   vif_priv->encrypt_type,
 -   key_conf->keyidx);
>>>
>>> Note that moving vif_priv->encrypt_type = WCN36XX_HAL_ED_NONE after
>>> key removal also fixes an issue I observed in AP mode:
>>> wcn36xx: ERROR hal_remove_bsskey response failed err=6
>>
>> Yeah, sorry. I did that intentionally, but missed to mention it in the
>> commit log.
> 
> I can add that to the commit log, just tell me what to add.

I'll resend, hang on :)

Daniel


Re: [PATCH] wcn36xx: pass correct BSS index when deleting BSS keys

2018-04-12 Thread Kalle Valo
Daniel Mack  writes:

> On Thursday, April 12, 2018 01:46 PM, Loic Poulain wrote:
>> Hi Daniel,
>> 
>>> @@ -564,10 +565,13 @@ static int wcn36xx_set_key(struct ieee80211_hw *hw, 
>>> enum set_key_cmd cmd,
>>> break;
>>> case DISABLE_KEY:
>>> if (!(IEEE80211_KEY_FLAG_PAIRWISE & key_conf->flags)) {
>>> +   if (vif_priv->bss_index != 
>>> WCN36XX_HAL_BSS_INVALID_IDX)
>>> +   wcn36xx_smd_remove_bsskey(wcn,
>>> +   vif_priv->encrypt_type,
>>> +   vif_priv->bss_index,
>>> +   key_conf->keyidx);
>>> +
>>> vif_priv->encrypt_type = WCN36XX_HAL_ED_NONE;
>>> -   wcn36xx_smd_remove_bsskey(wcn,
>>> -   vif_priv->encrypt_type,
>>> -   key_conf->keyidx);
>> 
>> Note that moving vif_priv->encrypt_type = WCN36XX_HAL_ED_NONE after
>> key removal also fixes an issue I observed in AP mode:
>> wcn36xx: ERROR hal_remove_bsskey response failed err=6
>
> Yeah, sorry. I did that intentionally, but missed to mention it in the
> commit log.

I can add that to the commit log, just tell me what to add.

-- 
Kalle Valo


Re: [PATCH] wcn36xx: pass correct BSS index when deleting BSS keys

2018-04-12 Thread Daniel Mack
On Thursday, April 12, 2018 01:46 PM, Loic Poulain wrote:
> Hi Daniel,
> 
>> @@ -564,10 +565,13 @@ static int wcn36xx_set_key(struct ieee80211_hw *hw, 
>> enum set_key_cmd cmd,
>> break;
>> case DISABLE_KEY:
>> if (!(IEEE80211_KEY_FLAG_PAIRWISE & key_conf->flags)) {
>> +   if (vif_priv->bss_index != 
>> WCN36XX_HAL_BSS_INVALID_IDX)
>> +   wcn36xx_smd_remove_bsskey(wcn,
>> +   vif_priv->encrypt_type,
>> +   vif_priv->bss_index,
>> +   key_conf->keyidx);
>> +
>> vif_priv->encrypt_type = WCN36XX_HAL_ED_NONE;
>> -   wcn36xx_smd_remove_bsskey(wcn,
>> -   vif_priv->encrypt_type,
>> -   key_conf->keyidx);
> 
> Note that moving vif_priv->encrypt_type = WCN36XX_HAL_ED_NONE after
> key removal also fixes an issue I observed in AP mode:
> wcn36xx: ERROR hal_remove_bsskey response failed err=6

Yeah, sorry. I did that intentionally, but missed to mention it in the
commit log.


Thanks,
Daniel


Re: [PATCH] wcn36xx: pass correct BSS index when deleting BSS keys

2018-04-12 Thread Loic Poulain
Hi Daniel,

> @@ -564,10 +565,13 @@ static int wcn36xx_set_key(struct ieee80211_hw *hw, 
> enum set_key_cmd cmd,
> break;
> case DISABLE_KEY:
> if (!(IEEE80211_KEY_FLAG_PAIRWISE & key_conf->flags)) {
> +   if (vif_priv->bss_index != 
> WCN36XX_HAL_BSS_INVALID_IDX)
> +   wcn36xx_smd_remove_bsskey(wcn,
> +   vif_priv->encrypt_type,
> +   vif_priv->bss_index,
> +   key_conf->keyidx);
> +
> vif_priv->encrypt_type = WCN36XX_HAL_ED_NONE;
> -   wcn36xx_smd_remove_bsskey(wcn,
> -   vif_priv->encrypt_type,
> -   key_conf->keyidx);

Note that moving vif_priv->encrypt_type = WCN36XX_HAL_ED_NONE after
key removal also fixes an issue I observed in AP mode:
wcn36xx: ERROR hal_remove_bsskey response failed err=6

Indeed, trying to remove a key with non-matching encrypt type fails,
keeping the right encrypt_type for removal fixes the issue.

Patch looks good.

Regards,
Loic