From: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
To: Dan Williams <dcbw@redhat.com>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [PATCH] mac80211 : Fixes the status message for iwconfig
Date: Fri, 23 May 2008 10:44:00 -0700 [thread overview]
Message-ID: <1211564640.15162.1.camel@abhi-desktop> (raw)
In-Reply-To: <1211564362.31559.45.camel@localhost.localdomain>
On Fri, 2008-23-05 at 13:39 -0400, Dan Williams wrote:
> On Fri, 2008-05-23 at 10:15 -0700, Abhijeet Kolekar wrote:
> > iwconfig was showing incorrect status messages when disassociated.
> > Patch fixes this by always checking for association status in
> > ioctl calls for getting ap address.
> >
> > Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
>
> I may not remember correctly, but I think you need to also report the
> BSSID being associated with during assoc & auth stages with WEXT. So
> the right check here is to return nothing if _disassocated_, but
> otherwise return the BSSID that's currently pending or associated with.
>
> Dan
One question though, Do we need to report similar things with essid or
WEXT will always return the essid regardless of the state.
>
> > ---
> > net/mac80211/wext.c | 11 ++++++++---
> > 1 files changed, 8 insertions(+), 3 deletions(-)
> >
> > diff --git a/net/mac80211/wext.c b/net/mac80211/wext.c
> > index c2e2378..1a35562 100644
> > --- a/net/mac80211/wext.c
> > +++ b/net/mac80211/wext.c
> > @@ -501,9 +501,14 @@ static int ieee80211_ioctl_giwap(struct net_device *dev,
> > sdata = IEEE80211_DEV_TO_SUB_IF(dev);
> > if (sdata->vif.type == IEEE80211_IF_TYPE_STA ||
> > sdata->vif.type == IEEE80211_IF_TYPE_IBSS) {
> > - ap_addr->sa_family = ARPHRD_ETHER;
> > - memcpy(&ap_addr->sa_data, sdata->u.sta.bssid, ETH_ALEN);
> > - return 0;
> > + if (sdata->u.sta.state == IEEE80211_ASSOCIATED) {
> > + ap_addr->sa_family = ARPHRD_ETHER;
> > + memcpy(&ap_addr->sa_data, sdata->u.sta.bssid, ETH_ALEN);
> > + return 0;
> > + } else {
> > + memset(&ap_addr->sa_data, 0, ETH_ALEN);
> > + return 0;
> > + }
> > } else if (sdata->vif.type == IEEE80211_IF_TYPE_WDS) {
> > ap_addr->sa_family = ARPHRD_ETHER;
> > memcpy(&ap_addr->sa_data, sdata->u.wds.remote_addr, ETH_ALEN);
>
next prev parent reply other threads:[~2008-05-23 17:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-23 17:15 [PATCH] mac80211 : Fixes the status message for iwconfig Abhijeet Kolekar
2008-05-23 17:39 ` Dan Williams
2008-05-23 17:44 ` Abhijeet Kolekar [this message]
2008-05-23 18:11 ` Dan Williams
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=1211564640.15162.1.camel@abhi-desktop \
--to=abhijeet.kolekar@intel.com \
--cc=dcbw@redhat.com \
--cc=linux-wireless@vger.kernel.org \
/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