linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Michal Kazior <michal.kazior@tieto.com>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [PATCH 2/3] mac80211: prepare ieee80211_sta_get_rates to per-vif
Date: Tue, 27 Mar 2012 17:07:01 +0200	[thread overview]
Message-ID: <1332860821.3501.6.camel@jlt3.sipsolutions.net> (raw)
In-Reply-To: <1332856558-5708-3-git-send-email-michal.kazior@tieto.com>

On Tue, 2012-03-27 at 15:55 +0200, Michal Kazior wrote:

> -u32 ieee80211_sta_get_rates(struct ieee80211_local *local,
> +u32 ieee80211_sta_get_rates(struct ieee80211_sub_if_data *sdata,
>  			    struct ieee802_11_elems *elems,
>  			    enum ieee80211_band band)
>  {
> +	struct ieee80211_local *local = sdata->local;
>  	struct ieee80211_supported_band *sband;
>  	struct ieee80211_rate *bitrates;
>  	size_t num_rates;

Ditto here, though I actually got confused even further ... we shouldn't
remove the local/sdata arguments, we should only remove the use of
local->hw.conf.channel! IOW simply something like this:

-       if (!sband) {
-               WARN_ON(1);
-               sband = local->hw.wiphy->bands[local->hw.conf.channel->band];
-       }
+       if (WARN_ON(!sband))
+               return 1;

should be sufficient instead of doing all the prototype changes?

johannes


  reply	other threads:[~2012-03-27 15:07 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-27 13:55 [PATCH 0/3] trivial changes preparing mac80211 for multi-channel Michal Kazior
2012-03-27 13:55 ` [PATCH 1/3] mac80211: prepare ieee80211_mandatory_rates to per-vif Michal Kazior
2012-03-27 15:04   ` Johannes Berg
2012-03-27 13:55 ` [PATCH 2/3] mac80211: prepare ieee80211_sta_get_rates " Michal Kazior
2012-03-27 15:07   ` Johannes Berg [this message]
2012-03-28  7:05     ` Michal Kazior
2012-03-27 13:55 ` [PATCH 3/3] mac80211: prepare ieee80211_*_duration " Michal Kazior
2012-03-27 14:53   ` brcmsmac not working well Naveen Goswamy
2012-03-27 15:08     ` 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=1332860821.3501.6.camel@jlt3.sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=michal.kazior@tieto.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 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).