From: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: <linville@tuxdriver.com>, <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH V2 1/2] cfg80211: Define a wrapper function for reporting roaming
Date: Wed, 7 Dec 2011 19:28:24 +0530 [thread overview]
Message-ID: <20111207135822.GA12398@chvasanth-lnx> (raw)
In-Reply-To: <1323265604.3404.37.camel@jlt3.sipsolutions.net>
On Wed, Dec 07, 2011 at 02:46:44PM +0100, Johannes Berg wrote:
> On Wed, 2011-12-07 at 19:12 +0530, Vasanthakumar Thiagarajan wrote:
>
> > /**
> > + * cfg80211_roamed_bss - notify cfg80211 of roaming
> > + *
> > + * @dev: network device
> > + * @bss: entry of bss to which STA got roamed (may be %NULL)
>
> I think you should check that it isn't, that's an implementation thing
> of __cfg80211_roamed() I think? Semantically, I don't think this should
> happen here?
This is because cfg80211_roamed() can call it with NULL as bss,
but I agree this should have been stated.
>
> It would also be good to note that the reference to the bss is given to
> the function and it will be released by it.
Ok.
>
> > +void cfg80211_roamed_bss(struct net_device *dev, struct cfg80211_bss *bss,
> > + struct ieee80211_channel *channel,
> > + const u8 *bssid, const u8 *req_ie, size_t req_ie_len,
> > + const u8 *resp_ie, size_t resp_ie_len, gfp_t gfp)
> > +{
> > struct wireless_dev *wdev = dev->ieee80211_ptr;
> > struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy);
> > struct cfg80211_event *ev;
>
>
> Hmm, now that I think about it more, I think the calling convention is
> really strange. Why pass the channel and bssid when the BSS struct is
> already known?
>
> Why not make cfg80211_roamed() do the BSS lookup (which would also
> reduce the race for drivers that don't use _bss()) based on the info,
> and then call a cfg80211_roamed_bss() that doesn't get channel/bssid.
Sure, i'll change it. This looks better.
Thanks!
Vasanth
next prev parent reply other threads:[~2011-12-07 13:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-07 13:42 [PATCH V2 1/2] cfg80211: Define a wrapper function for reporting roaming Vasanthakumar Thiagarajan
2011-12-07 13:46 ` Johannes Berg
2011-12-07 13:58 ` Vasanthakumar Thiagarajan [this message]
2011-12-07 15:05 ` Vasanthakumar Thiagarajan
2011-12-14 18:54 ` John W. Linville
2011-12-15 4:39 ` Vasanthakumar Thiagarajan
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=20111207135822.GA12398@chvasanth-lnx \
--to=vthiagar@qca.qualcomm.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 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).