From: Will Hawkins <hawkinsw@opentechinstitute.org>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: linux-wireless@vger.kernel.org, linville@tuxdriver.com
Subject: Re: [PATCH 1/3] mac80211: Track auth frame registrations on IBSS ifaces
Date: Wed, 20 Jun 2012 10:40:26 -0400 [thread overview]
Message-ID: <4FE1E0DA.8010406@opentechinstitute.org> (raw)
In-Reply-To: <1340170374.4655.1.camel@jlt3.sipsolutions.net>
On 06/20/2012 01:32 AM, Johannes Berg wrote:
> On Tue, 2012-06-19 at 17:59 -0400, Will Hawkins wrote:
>> Track userspace registrations for authentication
>> frames received on an IBSS interface. This field
>> will be used to decide whether or not to send
>> "open system" authentication frames when a new
>> station joins an adhoc network.
>>
>> Signed-off-by: Will Hawkins <hawkinsw@opentechinstitute.org>
>> ---
>> net/mac80211/cfg.c | 10 ++++++++++
>> net/mac80211/ieee80211_i.h | 1 +
>> 2 files changed, 11 insertions(+)
>>
>> diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
>> index 498c94e..e00a696 100644
>> --- a/net/mac80211/cfg.c
>> +++ b/net/mac80211/cfg.c
>> @@ -2486,6 +2486,16 @@ static void ieee80211_mgmt_frame_register(struct wiphy *wiphy,
>> u16 frame_type, bool reg)
>> {
>> struct ieee80211_local *local = wiphy_priv(wiphy);
>> + struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
>> +
>> + if (sdata->vif.type == NL80211_IFTYPE_ADHOC &&
>> + (frame_type == (IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_AUTH))) {
>> + struct ieee80211_if_ibss *ifibss = &sdata->u.ibss;
>> + if (reg)
>> + ifibss->auth_frame_registrations++;
>> + else if (reg > 0)
>> + ifibss->auth_frame_registrations--;
>
> The "if (reg > 0)" here doesn't seem to make sense?
Just trying to make sure that it doesn't go negative. I am protecting
against unmatched unregisters.
Will
>
> johannes
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
next prev parent reply other threads:[~2012-06-20 14:40 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-19 21:59 [PATCH 0/3 v4] mac80211: add support for userspace to handle auth frames on adhoc ifaces Will Hawkins
2012-06-19 21:59 ` [PATCH 1/3] mac80211: Track auth frame registrations on IBSS ifaces Will Hawkins
2012-06-20 5:32 ` Johannes Berg
2012-06-20 14:40 ` Will Hawkins [this message]
2012-06-20 14:43 ` Johannes Berg
2012-06-20 15:00 ` Will Hawkins
2012-06-20 15:12 ` Johannes Berg
2012-06-19 21:59 ` [PATCH 2/3] mac80211: Check auth frame registration count Will Hawkins
2012-06-19 21:59 ` [PATCH 3/3] mac80211: Allow userspace application to register for authentication frames Will Hawkins
2012-06-20 15:51 ` [PATCH 1/3 v5] mac80211: Track auth frame registrations on IBSS ifaces Will Hawkins
2012-06-20 18:02 ` [PATCH 0/3 v4] mac80211: add support for userspace to handle auth frames on adhoc ifaces 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=4FE1E0DA.8010406@opentechinstitute.org \
--to=hawkinsw@opentechinstitute.org \
--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).