* [RFC] mac80211: sets basic rate set parameter for IBSS creator
@ 2010-09-28 8:29 Mohammed Shafi Shajakhan
2010-09-28 9:02 ` Johannes Berg
0 siblings, 1 reply; 6+ messages in thread
From: Mohammed Shafi Shajakhan @ 2010-09-28 8:29 UTC (permalink / raw)
To: linux-wireless; +Cc: johannes, Mohammed Shafi Shajakhan
From: Mohammed Shafi Shajakhan <mshajakhan@atheros.com>
This fix sets the basic rate set parameter for IBSS creator when the
basic rates are not explicitly specified in the user space.
Signed-off-by: Mohammed Shafi Shajakhan <mshajakhan@atheros.com>
---
net/mac80211/ibss.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c
index 1a3aae5..e117155 100644
--- a/net/mac80211/ibss.c
+++ b/net/mac80211/ibss.c
@@ -541,6 +541,9 @@ static void ieee80211_sta_create_ibss(struct ieee80211_sub_if_data *sdata)
capability |= WLAN_CAPABILITY_PRIVACY;
else
sdata->drop_unencrypted = 0;
+ if (ifibss->basic_rates == 0)
+ ifibss->basic_rates = ieee80211_mandatory_rates(local,
+ local->hw.conf.channel->band);
__ieee80211_sta_join_ibss(sdata, bssid, sdata->vif.bss_conf.beacon_int,
ifibss->channel, ifibss->basic_rates,
--
1.7.0.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [RFC] mac80211: sets basic rate set parameter for IBSS creator
2010-09-28 8:29 [RFC] mac80211: sets basic rate set parameter for IBSS creator Mohammed Shafi Shajakhan
@ 2010-09-28 9:02 ` Johannes Berg
2010-09-28 9:31 ` Mohammed Shafi
0 siblings, 1 reply; 6+ messages in thread
From: Johannes Berg @ 2010-09-28 9:02 UTC (permalink / raw)
To: Mohammed Shafi Shajakhan; +Cc: linux-wireless
On Tue, 2010-09-28 at 13:59 +0530, Mohammed Shafi Shajakhan wrote:
> From: Mohammed Shafi Shajakhan <mshajakhan@atheros.com>
>
> This fix sets the basic rate set parameter for IBSS creator when the
> basic rates are not explicitly specified in the user space.
>
> Signed-off-by: Mohammed Shafi Shajakhan <mshajakhan@atheros.com>
> ---
> net/mac80211/ibss.c | 3 +++
> 1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c
> index 1a3aae5..e117155 100644
> --- a/net/mac80211/ibss.c
> +++ b/net/mac80211/ibss.c
> @@ -541,6 +541,9 @@ static void ieee80211_sta_create_ibss(struct ieee80211_sub_if_data *sdata)
> capability |= WLAN_CAPABILITY_PRIVACY;
> else
> sdata->drop_unencrypted = 0;
> + if (ifibss->basic_rates == 0)
> + ifibss->basic_rates = ieee80211_mandatory_rates(local,
> + local->hw.conf.channel->band);
Shouldn't cfg80211 do this?
johannes
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [RFC] mac80211: sets basic rate set parameter for IBSS creator
2010-09-28 9:02 ` Johannes Berg
@ 2010-09-28 9:31 ` Mohammed Shafi
2010-09-28 10:47 ` Johannes Berg
0 siblings, 1 reply; 6+ messages in thread
From: Mohammed Shafi @ 2010-09-28 9:31 UTC (permalink / raw)
To: Johannes Berg; +Cc: linux-wireless
On Tuesday 28 September 2010 02:32 PM, Johannes Berg wrote:
> On Tue, 2010-09-28 at 13:59 +0530, Mohammed Shafi Shajakhan wrote:
>
>> From: Mohammed Shafi Shajakhan<mshajakhan@atheros.com>
>>
>> This fix sets the basic rate set parameter for IBSS creator when the
>> basic rates are not explicitly specified in the user space.
>>
>> Signed-off-by: Mohammed Shafi Shajakhan<mshajakhan@atheros.com>
>> ---
>> net/mac80211/ibss.c | 3 +++
>> 1 files changed, 3 insertions(+), 0 deletions(-)
>>
>> diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c
>> index 1a3aae5..e117155 100644
>> --- a/net/mac80211/ibss.c
>> +++ b/net/mac80211/ibss.c
>> @@ -541,6 +541,9 @@ static void ieee80211_sta_create_ibss(struct ieee80211_sub_if_data *sdata)
>> capability |= WLAN_CAPABILITY_PRIVACY;
>> else
>> sdata->drop_unencrypted = 0;
>> + if (ifibss->basic_rates == 0)
>> + ifibss->basic_rates = ieee80211_mandatory_rates(local,
>> + local->hw.conf.channel->band);
>>
> Shouldn't cfg80211 do this?
>
> johannes
>
Hi Johannes ,
Thank you for your suggestion,just found out ,i
think its already there to configure basic rates (if the user had not
expicitly specified the basic rates in user space) in the
nl80211_join_ibss(nl80211.c) , but the basic rates does not seems to get
set there.I had checked its status in mac80211 in function
ieee80211_ibss_join function , its still zero and I thought of calling
it there itself , but the basic rate was not properly set for 2Ghz, so
called it here and I had tested it ,and everything working fine.
Pleas correct me if I am wrong .
with thanks,
shafi
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [RFC] mac80211: sets basic rate set parameter for IBSS creator
2010-09-28 9:31 ` Mohammed Shafi
@ 2010-09-28 10:47 ` Johannes Berg
2010-09-28 10:53 ` [PATCH] cfg80211: always set IBSS basic rates Johannes Berg
2010-09-28 11:00 ` [RFC] mac80211: sets basic rate set parameter for IBSS creator Mohammed Shafi
0 siblings, 2 replies; 6+ messages in thread
From: Johannes Berg @ 2010-09-28 10:47 UTC (permalink / raw)
To: Mohammed Shafi; +Cc: linux-wireless
On Tue, 2010-09-28 at 15:01 +0530, Mohammed Shafi wrote:
> >> + if (ifibss->basic_rates == 0)
> >> + ifibss->basic_rates = ieee80211_mandatory_rates(local,
> >> + local->hw.conf.channel->band);
> >>
> > Shouldn't cfg80211 do this?
> Thank you for your suggestion,just found out ,i
> think its already there to configure basic rates (if the user had not
> expicitly specified the basic rates in user space) in the
> nl80211_join_ibss(nl80211.c) , but the basic rates does not seems to get
> set there.I had checked its status in mac80211 in function
> ieee80211_ibss_join function , its still zero and I thought of calling
> it there itself , but the basic rate was not properly set for 2Ghz, so
> called it here and I had tested it ,and everything working fine.
> Pleas correct me if I am wrong .
Well, I still think cfg80211 should do this, and it looks like it will
except when you use iwconfig. So are you using iw or iwconfig? If
iwconfig latter, you need to fix the wext code in cfg80211, if the
former you need to figure out where the information gets lost.
johannes
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] cfg80211: always set IBSS basic rates
2010-09-28 10:47 ` Johannes Berg
@ 2010-09-28 10:53 ` Johannes Berg
2010-09-28 11:00 ` [RFC] mac80211: sets basic rate set parameter for IBSS creator Mohammed Shafi
1 sibling, 0 replies; 6+ messages in thread
From: Johannes Berg @ 2010-09-28 10:53 UTC (permalink / raw)
To: Mohammed Shafi; +Cc: linux-wireless, John W. Linville
From: Johannes Berg <johannes.berg@intel.com>
IBSS started from wireless extensions is currently
missing basic rate configuration, fix this by moving
the code to generate the default to the common code
that gets invoked for both nl80211 and wext.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
net/wireless/ibss.c | 19 +++++++++++++++++++
net/wireless/nl80211.c | 17 -----------------
2 files changed, 19 insertions(+), 17 deletions(-)
--- wireless-testing.orig/net/wireless/ibss.c 2010-09-28 12:49:14.000000000 +0200
+++ wireless-testing/net/wireless/ibss.c 2010-09-28 12:51:24.000000000 +0200
@@ -88,6 +88,25 @@ int __cfg80211_join_ibss(struct cfg80211
if (wdev->ssid_len)
return -EALREADY;
+ if (!params->basic_rates) {
+ /*
+ * If no rates were explicitly configured,
+ * use the mandatory rate set for 11b or
+ * 11a for maximum compatibility.
+ */
+ struct ieee80211_supported_band *sband =
+ rdev->wiphy.bands[params->channel->band];
+ int j;
+ u32 flag = params->channel->band == IEEE80211_BAND_5GHZ ?
+ IEEE80211_RATE_MANDATORY_A :
+ IEEE80211_RATE_MANDATORY_B;
+
+ for (j = 0; j < sband->n_bitrates; j++) {
+ if (sband->bitrates[j].flags & flag)
+ params->basic_rates |= BIT(j);
+ }
+ }
+
if (WARN_ON(wdev->connect_keys))
kfree(wdev->connect_keys);
wdev->connect_keys = connkeys;
--- wireless-testing.orig/net/wireless/nl80211.c 2010-09-28 12:49:14.000000000 +0200
+++ wireless-testing/net/wireless/nl80211.c 2010-09-28 12:50:32.000000000 +0200
@@ -4119,23 +4119,6 @@ static int nl80211_join_ibss(struct sk_b
goto out;
}
}
- } else {
- /*
- * If no rates were explicitly configured,
- * use the mandatory rate set for 11b or
- * 11a for maximum compatibility.
- */
- struct ieee80211_supported_band *sband =
- wiphy->bands[ibss.channel->band];
- int j;
- u32 flag = ibss.channel->band == IEEE80211_BAND_5GHZ ?
- IEEE80211_RATE_MANDATORY_A :
- IEEE80211_RATE_MANDATORY_B;
-
- for (j = 0; j < sband->n_bitrates; j++) {
- if (sband->bitrates[j].flags & flag)
- ibss.basic_rates |= BIT(j);
- }
}
err = cfg80211_join_ibss(rdev, dev, &ibss, connkeys);
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [RFC] mac80211: sets basic rate set parameter for IBSS creator
2010-09-28 10:47 ` Johannes Berg
2010-09-28 10:53 ` [PATCH] cfg80211: always set IBSS basic rates Johannes Berg
@ 2010-09-28 11:00 ` Mohammed Shafi
1 sibling, 0 replies; 6+ messages in thread
From: Mohammed Shafi @ 2010-09-28 11:00 UTC (permalink / raw)
To: Johannes Berg; +Cc: linux-wireless@vger.kernel.org
On Tuesday 28 September 2010 04:17 PM, Johannes Berg wrote:
> On Tue, 2010-09-28 at 15:01 +0530, Mohammed Shafi wrote:
>
>
>>>> + if (ifibss->basic_rates == 0)
>>>> + ifibss->basic_rates = ieee80211_mandatory_rates(local,
>>>> + local->hw.conf.channel->band);
>>>>
>>>>
>>> Shouldn't cfg80211 do this?
>>>
>
>> Thank you for your suggestion,just found out ,i
>> think its already there to configure basic rates (if the user had not
>> expicitly specified the basic rates in user space) in the
>> nl80211_join_ibss(nl80211.c) , but the basic rates does not seems to get
>> set there.I had checked its status in mac80211 in function
>> ieee80211_ibss_join function , its still zero and I thought of calling
>> it there itself , but the basic rate was not properly set for 2Ghz, so
>> called it here and I had tested it ,and everything working fine.
>> Pleas correct me if I am wrong .
>>
> Well, I still think cfg80211 should do this, and it looks like it will
> except when you use iwconfig. So are you using iw or iwconfig? If
> iwconfig latter, you need to fix the wext code in cfg80211, if the
> former you need to figure out where the information gets lost.
>
> johannes
>
Sorry , I was using iwconfig and thanks for fixing it.
with regards ,
shafi
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-09-28 11:00 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-28 8:29 [RFC] mac80211: sets basic rate set parameter for IBSS creator Mohammed Shafi Shajakhan
2010-09-28 9:02 ` Johannes Berg
2010-09-28 9:31 ` Mohammed Shafi
2010-09-28 10:47 ` Johannes Berg
2010-09-28 10:53 ` [PATCH] cfg80211: always set IBSS basic rates Johannes Berg
2010-09-28 11:00 ` [RFC] mac80211: sets basic rate set parameter for IBSS creator Mohammed Shafi
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).