linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bruno Randolf <br1@einfach.org>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: linville@tuxdriver.com, linux-wireless@vger.kernel.org
Subject: Re: [PATCH] mac80211: Add WME information element for IBSS
Date: Fri, 1 Oct 2010 14:15:33 +0900	[thread overview]
Message-ID: <201010011415.33117.br1@einfach.org> (raw)
In-Reply-To: <1284629853.3731.0.camel@jlt3.sipsolutions.net>

On Thu September 16 2010 18:37:33 Johannes Berg wrote:
> On Thu, 2010-09-16 at 17:34 +0900, Bruno Randolf wrote:
> > Enable WME QoS in IBSS mode by adding a WME information element to
> > beacons and probe respones and by checking for it and marking stations
> > as WME capable if it is present.
> > 
> >  			rcu_read_unlock();
> > 
> > -			ieee80211_ibss_add_sta(sdata, mgmt->bssid, mgmt->sa,
> > -					       supp_rates, GFP_KERNEL);
> > +
> > +			sta = ieee80211_ibss_add_sta(sdata, mgmt->bssid,
> > +					mgmt->sa, supp_rates, GFP_KERNEL);
> > 
> >  		}
> > 
> > +		if (sta && elems->wmm_info)
> > +			set_sta_flags(sta, WLAN_STA_WME);
> 
> NACK, this is obviously racy.

sorry for the late reply.

better like this?

@@ -291,11 +304,16 @@ static void ieee80211_rx_bss_info(struct 
ieee80211_sub_if_data *sdata,
 #endif
                                rate_control_rate_init(sta);
                        }
+                       if (elems->wmm_info)
+                               set_sta_flags(sta, WLAN_STA_WME);
                        rcu_read_unlock();
                } else {
                        rcu_read_unlock();
-                       ieee80211_ibss_add_sta(sdata, mgmt->bssid, mgmt->sa,
-                                              supp_rates, GFP_KERNEL);
+
+                       sta = ieee80211_ibss_add_sta(sdata, mgmt->bssid,
+                                       mgmt->sa, supp_rates, GFP_KERNEL);
+                       if (sta && elems->wmm_info)
+                               set_sta_flags(sta, WLAN_STA_WME);
                }
        }

if not, i don't get it... could you explain how it should be done properly?

thanks,
bruno

  reply	other threads:[~2010-10-01  5:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-16  8:34 [PATCH] mac80211: Add WME information element for IBSS Bruno Randolf
2010-09-16  9:37 ` Johannes Berg
2010-10-01  5:15   ` Bruno Randolf [this message]
2010-10-01  8:13     ` 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=201010011415.33117.br1@einfach.org \
    --to=br1@einfach.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).