[PATCH 3/4] Do not encrypt EAPOL keys
Eugene Krasnikov
k.eugene.e at gmail.com
Fri Jul 5 05:28:45 EDT 2013
Agree. Will send a patch that will blow your mind shortly:)
2013/7/5 Olof Johansson <dev at skyshaper.net>:
> Something about this patch looks very odd.
>
> Won't this mean that if a station joins and then exits, disable key
> will be executed and then all data packets will be send with the
> no_encryption flag set to true?
>
> --
> Olof
>
> On Fri, Jul 5, 2013 at 8:45 AM, Eugene Krasnikov <k.eugene.e at gmail.com> wrote:
>> Keys are coming in data frames. So do not encrypt
>> data packets until key exchange is finished.
>>
>> Signed-off-by: Eugene Krasnikov <k.eugene.e at gmail.com>
>> ---
>> main.c | 2 ++
>> txrx.c | 3 ++-
>> wcn36xx.h | 1 +
>> 3 files changed, 5 insertions(+), 1 deletion(-)
>>
>> diff --git a/main.c b/main.c
>> index be094db..f3a6fb9 100644
>> --- a/main.c
>> +++ b/main.c
>> @@ -394,6 +394,7 @@ static int wcn36xx_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
>> }
>>
>> if (IEEE80211_KEY_FLAG_PAIRWISE & key_conf->flags) {
>> + wcn->is_data_encrypted = true;
>> /* Reconfigure bss with encrypt_type */
>> wcn36xx_smd_config_bss(wcn,
>> NL80211_IFTYPE_STATION,
>> @@ -420,6 +421,7 @@ static int wcn36xx_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
>> wcn->encrypt_type,
>> key_conf->keyidx);
>> } else {
>> + wcn->is_data_encrypted = false;
>> /* do not remove key if disassociated */
>> if (wcn->aid)
>> wcn36xx_smd_remove_stakey(wcn,
>> diff --git a/txrx.c b/txrx.c
>> index 12209bc..4f6246f 100644
>> --- a/txrx.c
>> +++ b/txrx.c
>> @@ -123,7 +123,8 @@ void wcn36xx_fill_tx_bd(struct wcn36xx *wcn, struct wcn36xx_tx_bd *bd,
>> bd->queue_id = 0;
>> bd->sta_index = wcn->current_vif->sta_index;
>> bd->dpu_desc_idx = wcn->current_vif->dpu_desc_index;
>> - if (ieee80211_is_nullfunc(hdr->frame_control))
>> + if (ieee80211_is_nullfunc(hdr->frame_control) ||
>> + !wcn->is_data_encrypted)
>> bd->dpu_ne = 1;
>>
>> } else {
>> diff --git a/wcn36xx.h b/wcn36xx.h
>> index 2c72349..fd591ba 100644
>> --- a/wcn36xx.h
>> +++ b/wcn36xx.h
>> @@ -129,6 +129,7 @@ struct wcn36xx {
>> u8 wlan_version[WCN36XX_HAL_VERSION_LENGTH + 1];
>>
>> bool beacon_enable;
>> + bool is_data_encrypted;
>> /* IRQs */
>> int tx_irq;
>> int rx_irq;
>> --
>> 1.7.11.3
>>
>>
>> _______________________________________________
>> wcn36xx mailing list
>> wcn36xx at lists.infradead.org
>> http://lists.infradead.org/mailman/listinfo/wcn36xx
--
Best regards,
Eugene
More information about the wcn36xx
mailing list