From: Marcel Holtmann <marcel@holtmann.org>
To: David Kilroy <kilroyd@googlemail.com>
Cc: linux-wireless@vger.kernel.org, orinoco-devel@lists.sourceforge.net
Subject: Re: [RFC v2 04/23] cfg80211: set WE encoding size based on available ciphers
Date: Sat, 30 May 2009 21:57:48 +0200 [thread overview]
Message-ID: <1243713468.3523.32.camel@localhost.localdomain> (raw)
In-Reply-To: <1243705017-8784-5-git-send-email-kilroyd@googlemail.com>
Hi David,
> Only set the sizes for WEP40 and WEP104.
>
> Signed-off-by: David Kilroy <kilroyd@googlemail.com>
> ---
> I'm not sure of the intent of the encoding_size field, and whether it
> should contain entries for TKIP and CCMP ciphers. However since these
> aren't currently advertised, I've left this alone.
> ---
> net/wireless/wext-compat.c | 9 ++++++---
> 1 files changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/net/wireless/wext-compat.c b/net/wireless/wext-compat.c
> index 9ec9fc5..e5385f0 100644
> --- a/net/wireless/wext-compat.c
> +++ b/net/wireless/wext-compat.c
> @@ -173,9 +173,6 @@ int cfg80211_wext_giwrange(struct net_device *dev,
> range->min_frag = 256;
> range->max_frag = 2346;
>
> - range->encoding_size[0] = 5;
> - range->encoding_size[1] = 13;
> - range->num_encoding_sizes = 2;
> range->max_encoding_tokens = 4;
>
> range->max_qual.updated = IW_QUAL_NOISE_INVALID;
> @@ -213,6 +210,12 @@ int cfg80211_wext_giwrange(struct net_device *dev,
> range->enc_capa |= IW_ENC_CAPA_CIPHER_TKIP;
> else if (suite == WLAN_CIPHER_SUITE_CCMP)
> range->enc_capa |= IW_ENC_CAPA_CIPHER_CCMP;
> + else if (suite == WLAN_CIPHER_SUITE_WEP40)
> + range->encoding_size[range->num_encoding_sizes++] =
> + WLAN_KEY_LEN_WEP40;
> + else if (suite == WLAN_CIPHER_SUITE_WEP104)
> + range->encoding_size[range->num_encoding_sizes++] =
> + WLAN_KEY_LEN_WEP104;
especially since you are now extending this list, please use a switch
statement. The code becomes hard to read.
Regards
Marcel
next prev parent reply other threads:[~2009-05-30 19:59 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-30 17:36 [RFC v2 00/23] orinoco: initiate conversion to cfg80211 David Kilroy
2009-05-30 17:36 ` [RFC v2 01/23] cfg80211: add wrapper function to get wiphy from priv pointer David Kilroy
2009-05-30 17:36 ` [RFC v2 02/23] cfg80211: Advertise ciphers via WE according to driver capability David Kilroy
2009-05-30 19:54 ` Marcel Holtmann
2009-05-30 17:36 ` [RFC v2 03/23] cfg80211: allow drivers that can't scan for specific ssids David Kilroy
2009-05-30 17:36 ` [RFC v2 04/23] cfg80211: set WE encoding size based on available ciphers David Kilroy
2009-05-30 19:57 ` Marcel Holtmann [this message]
2009-05-30 20:08 ` Dave
2009-05-30 17:36 ` [RFC v2 05/23] cfg80211: infer WPA and WPA2 support from TKIP and CCMP David Kilroy
2009-05-30 19:13 ` Johannes Berg
2009-05-30 17:36 ` [RFC v2 06/23] orinoco: Move firmware capability determination into hw.c David Kilroy
2009-05-30 17:36 ` [RFC v2 07/23] orinoco: Move card reading code " David Kilroy
2009-05-30 17:36 ` [RFC v2 08/23] orinoco: Move FID allocation to hw.c David Kilroy
2009-05-30 17:36 ` [RFC v2 09/23] orinoco: use dev_err in early initialisation routines David Kilroy
2009-05-30 17:36 ` [RFC v2 10/23] orinoco: firmware helpers should use dev_err and friends David Kilroy
2009-05-30 17:36 ` [RFC v2 11/23] orinoco: Replace net_device with orinoco_private in driver interfaces David Kilroy
2009-05-30 17:36 ` [RFC v2 12/23] orinoco: initialise independently of netdev David Kilroy
2009-05-30 17:36 ` [RFC v2 13/23] orinoco: Change set_tkip to use orinoco_private instead of hermes_t David Kilroy
2009-05-30 17:36 ` [RFC v2 14/23] orinoco: initiate cfg80211 conversion David Kilroy
2009-05-30 17:36 ` [RFC v2 15/23] orinoco: make firmware download less verbose David Kilroy
2009-05-30 17:36 ` [RFC v2 16/23] orinoco: move netdev interface creation to main driver David Kilroy
2009-05-30 17:36 ` [RFC v2 17/23] airport: store irq in card private structure David Kilroy
2009-05-30 17:36 ` [RFC v2 18/23] orinoco: Handle suspend/restore in core driver David Kilroy
2009-05-30 17:36 ` [RFC v2 19/23] orinoco: provide generic commit function David Kilroy
2009-05-30 17:36 ` [RFC v2 20/23] orinoco: convert mode setting to cfg80211 David Kilroy
2009-05-30 17:36 ` [RFC v2 21/23] orinoco: convert scanning " David Kilroy
2009-05-30 17:36 ` [RFC v2 22/23] orinoco: convert giwrange " David Kilroy
2009-05-30 17:36 ` [RFC v2 23/23] orinoco: remove WE nickname support David Kilroy
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=1243713468.3523.32.camel@localhost.localdomain \
--to=marcel@holtmann.org \
--cc=kilroyd@googlemail.com \
--cc=linux-wireless@vger.kernel.org \
--cc=orinoco-devel@lists.sourceforge.net \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).