From: Michael Buesch <mb@bu3sch.de>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: John Linville <linville@tuxdriver.com>,
linux-wireless <linux-wireless@vger.kernel.org>,
Ivo van Doorn <ivdoorn@gmail.com>
Subject: Re: [PATCH] mac80211: make retry limits part of hw config
Date: Sat, 11 Oct 2008 15:41:14 +0200 [thread overview]
Message-ID: <200810111541.14983.mb@bu3sch.de> (raw)
In-Reply-To: <1223682835.29811.10.camel@johannes.berg>
On Saturday 11 October 2008 01:53:55 Johannes Berg wrote:
> static int b43_op_config(struct ieee80211_hw *hw, u32 changed)
> {
> struct b43_wl *wl = hw_to_b43_wl(hw);
> @@ -3333,6 +3349,20 @@ static int b43_op_config(struct ieee8021
>
> mutex_lock(&wl->mutex);
>
> + if (changed & IEEE80211_CONF_CHANGE_RETRY_LIMITS) {
> + dev = wl->current_dev;
> + if (unlikely(!dev || (b43_status(dev) < B43_STAT_INITIALIZED))) {
> + err = -ENODEV;
> + goto out_unlock_mutex;
> + }
> + b43_set_retry_limits(dev, conf->short_frame_max_tx_count,
> + conf->long_frame_max_tx_count);
> + changed &= ~IEEE80211_CONF_CHANGE_RETRY_LIMITS;
> + }
> +
> + if (!changed)
> + goto out_unlock_mutex;
> +
> /* Switch the band (if necessary). This might change the active core. */
> err = b43_switch_band(wl, conf->channel);
> if (err)
This must be done _after_ bandswitch. (You also have a valid dev pointer there.
Just do it after the checks done there).
> @@ -2570,10 +2584,27 @@ static int b43legacy_op_dev_config(struc
> int err = 0;
> u32 savedirqs;
>
> + mutex_lock(&wl->mutex);
> + dev = wl->current_dev;
> +
> + if (changed & IEEE80211_CONF_CHANGE_RETRY_LIMITS) {
> + if (unlikely(!dev ||
> + (b43legacy_status(dev) < B43legacy_STAT_INITIALIZED))) {
> + err = -ENODEV;
> + goto out_unlock_mutex;
> + }
> + b43legacy_set_retry_limits(dev,
> + conf->short_frame_max_tx_count,
> + conf->long_frame_max_tx_count);
> + changed &= ~IEEE80211_CONF_CHANGE_RETRY_LIMITS;
> + }
> +
> + if (!changed)
> + goto out_unlock_mutex;
> +
> antenna_tx = B43legacy_ANTENNA_DEFAULT;
> antenna_rx = B43legacy_ANTENNA_DEFAULT;
>
> - mutex_lock(&wl->mutex);
> dev = wl->current_dev;
This also is a bit fishy.
> phy = &dev->phy;
>
> @@ -2989,20 +3020,6 @@ static void b43legacy_imcfglo_timeouts_w
> #endif /* CONFIG_SSB_DRIVER_PCICORE */
> }
>
--
Greetings Michael.
next prev parent reply other threads:[~2008-10-11 13:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-10 23:53 [PATCH] mac80211: make retry limits part of hw config Johannes Berg
2008-10-11 13:40 ` Ivo van Doorn
2008-10-11 13:46 ` Johannes Berg
2008-10-11 13:41 ` Michael Buesch [this message]
2008-10-11 13:48 ` Johannes Berg
2008-10-14 17:17 ` [PATCH v2] " Johannes Berg
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=200810111541.14983.mb@bu3sch.de \
--to=mb@bu3sch.de \
--cc=ivdoorn@gmail.com \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
/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.