All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@qca.qualcomm.com>
To: Sujith Manoharan <sujith@msujith.org>
Cc: <ath10k@lists.infradead.org>, <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH 1/3] ath10k: Fix shared WEP
Date: Tue, 25 Nov 2014 07:53:12 +0200	[thread overview]
Message-ID: <87y4qz3jxz.fsf@kamboji.qca.qualcomm.com> (raw)
In-Reply-To: <21620.5017.657509.251220@gargle.gargle.HOWL> (Sujith Manoharan's message of "Tue, 25 Nov 2014 10:58:57 +0530")

Sujith Manoharan <sujith@msujith.org> writes:

> Kalle Valo wrote:
>> No magic numbers, please. I didn't find anything for IV internals from
>> ieee80211.h, not sure if we should add them there or just use ath10k
>> internal defines.
>
> We are just retrieving the keyidx from the IV - not sure adding a couple
> of macros for "6" and "3" will make any difference.

It won't make a difference for you but it will for someone else reading
that part of code.

keyidx = skb->data[hdrlen + WEP_HDR_IV_LEN] >> WEP_HDR_KEY_ID_LSB;

versus:

keyidx = skb->data[hdrlen + 3] >> 6;

(I didn't check the standard so tha names can be totally wrong.)

-- 
Kalle Valo

WARNING: multiple messages have this Message-ID (diff)
From: Kalle Valo <kvalo@qca.qualcomm.com>
To: Sujith Manoharan <sujith@msujith.org>
Cc: linux-wireless@vger.kernel.org, ath10k@lists.infradead.org
Subject: Re: [PATCH 1/3] ath10k: Fix shared WEP
Date: Tue, 25 Nov 2014 07:53:12 +0200	[thread overview]
Message-ID: <87y4qz3jxz.fsf@kamboji.qca.qualcomm.com> (raw)
In-Reply-To: <21620.5017.657509.251220@gargle.gargle.HOWL> (Sujith Manoharan's message of "Tue, 25 Nov 2014 10:58:57 +0530")

Sujith Manoharan <sujith@msujith.org> writes:

> Kalle Valo wrote:
>> No magic numbers, please. I didn't find anything for IV internals from
>> ieee80211.h, not sure if we should add them there or just use ath10k
>> internal defines.
>
> We are just retrieving the keyidx from the IV - not sure adding a couple
> of macros for "6" and "3" will make any difference.

It won't make a difference for you but it will for someone else reading
that part of code.

keyidx = skb->data[hdrlen + WEP_HDR_IV_LEN] >> WEP_HDR_KEY_ID_LSB;

versus:

keyidx = skb->data[hdrlen + 3] >> 6;

(I didn't check the standard so tha names can be totally wrong.)

-- 
Kalle Valo

_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

  reply	other threads:[~2014-11-25  5:53 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-24  2:37 [PATCH 0/3] ath10k patches Sujith Manoharan
2014-11-24  2:37 ` Sujith Manoharan
2014-11-24  2:37 ` [PATCH 1/3] ath10k: Fix shared WEP Sujith Manoharan
2014-11-24  2:37   ` Sujith Manoharan
2014-11-24 15:12   ` Kalle Valo
2014-11-24 15:12     ` Kalle Valo
2014-11-25  5:28     ` Sujith Manoharan
2014-11-25  5:28       ` Sujith Manoharan
2014-11-25  5:53       ` Kalle Valo [this message]
2014-11-25  5:53         ` Kalle Valo
2014-11-24  2:37 ` [PATCH 2/3] ath10k: Fix locking for WEP keys Sujith Manoharan
2014-11-24  2:37   ` Sujith Manoharan
2014-11-24 15:15   ` Kalle Valo
2014-11-24 15:15     ` Kalle Valo
2014-11-24  2:37 ` [PATCH 3/3] ath10k: Fix bug reported by lockdep Sujith Manoharan
2014-11-24  2:37   ` Sujith Manoharan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y4qz3jxz.fsf@kamboji.qca.qualcomm.com \
    --to=kvalo@qca.qualcomm.com \
    --cc=ath10k@lists.infradead.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=sujith@msujith.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.