From: Johannes Berg <johannes@sipsolutions.net>
To: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
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, 07 Dec 2011 14:46:44 +0100 [thread overview]
Message-ID: <1323265604.3404.37.camel@jlt3.sipsolutions.net> (raw)
In-Reply-To: <1323265359-1138-1-git-send-email-vthiagar@qca.qualcomm.com>
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?
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.
> +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.
johannes
next prev parent reply other threads:[~2011-12-07 13:46 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 [this message]
2011-12-07 13:58 ` Vasanthakumar Thiagarajan
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=1323265604.3404.37.camel@jlt3.sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=vthiagar@qca.qualcomm.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.