From: Michael Buesch <mb@bu3sch.de>
To: Jiri Benc <jbenc@suse.cz>
Cc: "John W. Linville" <linville@tuxdriver.com>,
"Jouni Malinen" <jkm@devicescape.com>,
netdev@vger.kernel.org, jkmaline@cc.hut.fi,
Michael Wu <flamingice@sourmilk.net>
Subject: Re: [PATCH wireless-dev] d80211: Don't discriminate against 802.11b drivers
Date: Thu, 11 May 2006 22:41:48 +0200 [thread overview]
Message-ID: <200605112241.48970.mb@bu3sch.de> (raw)
In-Reply-To: <20060511175426.72ae7744@griffin.suse.cz>
On Thursday 11 May 2006 17:54, you wrote:
> On Thu, 4 May 2006 22:32:35 -0400, Michael Wu wrote:
> > This makes the current hack used to prevent 802.11g cards from scanning with
> > 802.11b channels not break scanning in 802.11b drivers.
>
> I think this should be better:
>
> Signed-off-by: Jiri Benc <jbenc@suse.cz>
>
> ---
>
> net/d80211/ieee80211.c | 14 ++++++++++++++
> net/d80211/ieee80211_sta.c | 1 -
> 2 files changed, 14 insertions(+), 1 deletion(-)
>
> --- dscape.orig/net/d80211/ieee80211.c
> +++ dscape/net/d80211/ieee80211.c
> @@ -4014,6 +4014,19 @@ static void ieee80211_precalc_rates(stru
> }
> }
>
> +static inline void ieee80211_apply_modes(struct ieee80211_hw *hw,
> + struct ieee80211_local *local)
Just a minor nitpick, but please remove the "inline".
This is a candidate for binary bloat, if it is called later
on another place, too, and modern compilers will inline it anyway, if
only used once.
Additionally it is not a hotpath.
> +{
> + struct ieee80211_hw_modes *mode;
> + int i;
> +
> + local->scan_skip_11b = 0;
> + for (i = 0; i < hw->num_modes; i++) {
> + mode = &hw->modes[i];
> + if (mode->mode == MODE_IEEE80211G)
> + local->scan_skip_11b = 1;
> + }
> +}
>
> struct net_device *ieee80211_alloc_hw(size_t priv_data_len,
> void (*setup)(struct net_device *))
> @@ -4258,6 +4271,7 @@ int ieee80211_update_hw(struct net_devic
> return -1;
>
> ieee80211_precalc_rates(hw);
> + ieee80211_apply_modes(hw, local);
> local->conf.phymode = hw->modes[0].mode;
> local->curr_rates = hw->modes[0].rates;
> local->num_curr_rates = hw->modes[0].num_rates;
> --- dscape.orig/net/d80211/ieee80211_sta.c
> +++ dscape/net/d80211/ieee80211_sta.c
> @@ -2566,7 +2566,6 @@ int ieee80211_sta_req_scan(struct net_de
> memcpy(local->scan_ssid, ssid, ssid_len);
> } else
> local->scan_ssid_len = 0;
> - local->scan_skip_11b = 1; /* FIX: clear this is 11g is not supported */
> local->scan_state = SCAN_SET_CHANNEL;
> local->scan_hw_mode_idx = 0;
> local->scan_channel_idx = 0;
>
>
--
Greetings Michael.
prev parent reply other threads:[~2006-05-11 20:34 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-05 2:32 [PATCH wireless-dev] d80211: Don't discriminate against 802.11b drivers Michael Wu
2006-05-11 15:54 ` Jiri Benc
2006-05-10 17:31 ` Michael Wu
2006-05-12 10:47 ` Jiri Benc
2006-05-12 20:35 ` Michael Wu
2006-05-15 11:37 ` Jiri Benc
2006-05-15 12:04 ` Johannes Berg
2006-05-15 13:35 ` Jiri Benc
2006-05-15 14:01 ` Michael Buesch
2006-05-15 14:12 ` Jiri Benc
2006-05-15 17:19 ` Michael Wu
2006-05-19 18:06 ` John W. Linville
2006-05-19 19:03 ` Michael Wu
2006-05-19 19:22 ` John W. Linville
2006-05-11 20:41 ` Michael Buesch [this message]
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=200605112241.48970.mb@bu3sch.de \
--to=mb@bu3sch.de \
--cc=flamingice@sourmilk.net \
--cc=jbenc@suse.cz \
--cc=jkm@devicescape.com \
--cc=jkmaline@cc.hut.fi \
--cc=linville@tuxdriver.com \
--cc=netdev@vger.kernel.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 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).