Linux wireless drivers development
 help / color / mirror / Atom feed
* [PATCH 1/2] compat: backport dma_set_coherent_mask
From: Hauke Mehrtens @ 2010-06-13 19:56 UTC (permalink / raw)
  To: lrodriguez; +Cc: linux-wireless, mcgrof, Hauke Mehrtens


Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 include/linux/compat-2.6.34.h |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/include/linux/compat-2.6.34.h b/include/linux/compat-2.6.34.h
index b1c15a7..336c61b 100644
--- a/include/linux/compat-2.6.34.h
+++ b/include/linux/compat-2.6.34.h
@@ -216,6 +216,14 @@ do {							\
 #define dma_unmap_len_set(PTR, LEN_NAME, VAL)    do { } while (0)
 #endif
 
+static inline int dma_set_coherent_mask(struct device *dev, u64 mask)
+{
+	if (!dma_supported(dev, mask))
+		return -EIO;
+	dev->coherent_dma_mask = mask;
+	return 0;
+}
+
 #endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,34)) */
 
 #endif /* LINUX_26_34_COMPAT_H */
-- 
1.7.0.4


^ permalink raw reply related

* [PATCH 2/2] compat: backport sdio_writeb_readb
From: Hauke Mehrtens @ 2010-06-13 19:56 UTC (permalink / raw)
  To: lrodriguez; +Cc: linux-wireless, mcgrof, Hauke Mehrtens
In-Reply-To: <1276459009-17168-1-git-send-email-hauke@hauke-m.de>

This is needed by wl1251_sdio.c
Use sdio_readb instead of sdio_writeb_readb as long as sdio_writeb_readb was not realy backported.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 include/linux/compat-2.6.35.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/include/linux/compat-2.6.35.h b/include/linux/compat-2.6.35.h
index 886815d..c6e7136 100644
--- a/include/linux/compat-2.6.35.h
+++ b/include/linux/compat-2.6.35.h
@@ -23,6 +23,8 @@ static inline wait_queue_head_t *sk_sleep(struct sock *sk)
 	return sk->sk_sleep;
 }
 
+#define sdio_writeb_readb(func, write_byte, addr, err_ret) sdio_readb(func, addr, err_ret)
+
 #endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,35)) */
 
 #endif /* LINUX_26_35_COMPAT_H */
-- 
1.7.0.4


^ permalink raw reply related

* Re: DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 19
From: Luis R. Rodriguez @ 2010-06-13 20:16 UTC (permalink / raw)
  To: sundar mahadevan; +Cc: linux-wireless, John W. Linville
In-Reply-To: <AANLkTincbrPV9DTY0qIM1iBZ6byvsSV1t84OVoFNZ2Bq@mail.gmail.com>

On Sun, Jun 13, 2010 at 10:08 AM, sundar mahadevan
<sundarmahadevan82@gmail.com> wrote:
> Hi All,
> Greetings. I am on Oracle Enterprise Linux (OEL 5.5 x86_64) same as
> Redhat 5.5. I must use OEL5.5 because of my software installation
> requirements. NetworkManager detects my ssid but its just not getting
> ip from my router assigned. I use a Belkin 54g router with WPA/WPA2
> encryption. The other options available on my router are WPA2 only,
> WEP and Disabled. I have spent more than 20 hours trying to get wifi
> working but no luck. Your help is highly appreciated.
>
> [root@localhost ~]$uname -a
> Linux localhost.localdomain 2.6.18-194.el5 #1 SMP Mon Mar 29 22:10:29
> EDT 2010 x86_64 x86_64 x86_64 GNU/Linux
>
> [root@localhost /etc/wpa_supplicant]$lspci | grep -i ath
> 04:00.0 Network controller: Atheros Communications Inc. AR928X
> Wireless Network Adapter (PCI-Express) (rev 01)

Please see:

http://wireless.kernel.org/en/users/Drivers/ath9k/RHEL5#Known_issues

Seems like the same issue.

  Luis

^ permalink raw reply

* Re: [PATCH] zd1211rw: ignore unknown regulatory domain.
From: Luis R. Rodriguez @ 2010-06-13 20:23 UTC (permalink / raw)
  To: Kouhei Sutou, Stephen Chen, David Quan; +Cc: linux-wireless, Michael Green
In-Reply-To: <20100613.145200.1459063883179763823.kou@clear-code.com>

Note: this e-mail is on a public mailing list!

On Sat, Jun 12, 2010 at 10:52 PM, Kouhei Sutou <kou@clear-code.com> wrote:
> Hi,
>
> I'm using PLANEX GW-US54GXS (2019:5303) and it works with
> the attached patch. Could you consider to merge the attached
> patch?
>
> Problem: GW-US54GXS uses zd1211rw but zd1211rw doesn't have
> a regulatory domain reported by GW-US54GXS (0x49).
>
> Solutions:
>
>  (1) add a new regulatory domain (0x49). Here is a patch to
>      use the approach:

Stephen, David, does 0x49 map to JP for zd1211 ? Are there other ones?
Here is our list so far:

#define ZD_REGDOMAIN_FCC        0x10
#define ZD_REGDOMAIN_IC         0x20
#define ZD_REGDOMAIN_ETSI       0x30
#define ZD_REGDOMAIN_SPAIN      0x31
#define ZD_REGDOMAIN_FRANCE     0x32
#define ZD_REGDOMAIN_JAPAN_ADD  0x40
#define ZD_REGDOMAIN_JAPAN      0x41

This is what they map to:

static struct zd_reg_alpha2_map reg_alpha2_map[] = {
        { ZD_REGDOMAIN_FCC, "US" },
        { ZD_REGDOMAIN_IC, "CA" },
        { ZD_REGDOMAIN_ETSI, "DE" }, /* Generic ETSI, use most restrictive */
        { ZD_REGDOMAIN_JAPAN, "JP" },
        { ZD_REGDOMAIN_JAPAN_ADD, "JP" },
        { ZD_REGDOMAIN_SPAIN, "ES" },
        { ZD_REGDOMAIN_FRANCE, "FR" },
};

Kouhei, if no regulatory domain is found, instead we should world
roam, we cannot allow letting the user change regulatory domains at
their whim. We can, however let them choose one to help compliance,
but you can only help compliance once you know your actual regulatory
domain.

  Luis

^ permalink raw reply

* Re: [PATCH 2/2] compat: backport sdio_writeb_readb
From: Luis R. Rodriguez @ 2010-06-13 20:25 UTC (permalink / raw)
  To: Hauke Mehrtens; +Cc: linux-wireless, mcgrof
In-Reply-To: <1276459009-17168-2-git-send-email-hauke@hauke-m.de>

On Sun, Jun 13, 2010 at 12:56 PM, Hauke Mehrtens <hauke@hauke-m.de> wrote:
> This is needed by wl1251_sdio.c
> Use sdio_readb instead of sdio_writeb_readb as long as sdio_writeb_readb was not realy backported.
>
> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>

Thanks, applied both!

  Luis

^ permalink raw reply

* wireless button problem with atheros on hp machines
From: Leonardo @ 2010-06-13 20:49 UTC (permalink / raw)
  To: linux-wireless

hello all, i don't know if this is the correct channel to report, but
from Slackware 13.0 (2.6.29.6) to 13.1 (2.6.33.4) the wireless button
stopped to work properly.

it is happening on 2 different hp machines: hp dv5-1220br (AR5001) and
hp dv4-2140us (AR9285).

basically i can't touch the wireless button, if i do that i will not
be able to recover the net, also the button color will not back to
blue, will remain orange.

also if i touch the button not even restarting the machine or removing
the battery the bluetooth subsystem come back.

on dv5 i have only linux, but on dv4 if i give up and enter on windows
just to restart bluetooth;

as i related before, at least on dv5 one it worked like a charm on older one.

please if anyone can help, tell me what can i do to help to track such
bug (what kind of output to send, maybe a downgrade, etc)

thanks in advance.

^ permalink raw reply

* Re: wireless button problem with atheros on hp machines
From: Luis R. Rodriguez @ 2010-06-13 20:55 UTC (permalink / raw)
  To: Leonardo; +Cc: linux-wireless
In-Reply-To: <AANLkTim4kDJZnEdNy-C4xhOigWiTWQZhVJAs36LOUbjQ@mail.gmail.com>

On Sun, Jun 13, 2010 at 1:49 PM, Leonardo <sombriks@gmail.com> wrote:
> hello all, i don't know if this is the correct channel to report, but
> from Slackware 13.0 (2.6.29.6) to 13.1 (2.6.33.4) the wireless button
> stopped to work properly.

Try 2.6.30, 2.6.31, and 2.6.32 and see if you see the issue on one of
those. If so then you can use git bisect to find the culprit. I
realize this can be quite cumbersome, but without more information I'm
afraid this is as good as it gets. Instead of using Linus' tree you'll
want to use the linux-2.6-allstable.git tree since that will have the
extra version kernel revisions.

git://git.kernel.org/pub/scm/linux/kernel/git/hpa/linux-2.6-allstable.git

  Luis

^ permalink raw reply

* Re: 2.6.35-rc3: Reported regressions 2.6.33 -> 2.6.34
From: Luis R. Rodriguez @ 2010-06-13 21:02 UTC (permalink / raw)
  To: linux-wireless, linux-bluetooth
  Cc: Rafael J. Wysocki, Aeolus Yang, David Quan
In-Reply-To: <g77CuMUl7QI.A.5wF.V5OFMB@chimera>

For your convenience in reading the regression report here's the
802.11 and Bluetooth ones. There's one PCMCIA one which I left in as I
think these patches now go through John (?) The other ones are 1
Bluetooth regression, 1 hostap_pci, 1 iwl3945 and 1 iwlagn regression.

  Luis

On Sun, Jun 13, 2010 at 7:45 AM, Rafael J. Wysocki <rjw@sisk.pl> wrote:
> Unresolved regressions
> ----------------------

> Bug-Entry       : http://bugzilla.kernel.org/show_bug.cgi?id=16111
> Subject         : hostap_pci: infinite registered netdevice wifi0
> Submitter       : Petr Pisar <petr.pisar@atlas.cz>
> Date            : 2010-06-02 20:55 (12 days old)

> Bug-Entry       : http://bugzilla.kernel.org/show_bug.cgi?id=16084
> Subject         : iwl3945 bug in 2.6.34
> Submitter       : Satish Eerpini <eerpini@gmail.com>
> Date            : 2010-05-23 6:37 (22 days old)
> Message-ID      : <AANLkTik_7rxDBc0TKlAfoYyM5S6Cf_Hyxbr4W5ORnTsq@mail.gmail.com>
> References      : http://marc.info/?l=linux-kernel&m=127459596015626&w=2

> Bug-Entry       : http://bugzilla.kernel.org/show_bug.cgi?id=15862
> Subject         : 2.6.34-rc4/5: iwlagn unusable until reload
> Submitter       : Nico Schottelius <nico-linux-20100427@schottelius.org>
> Date            : 2010-04-27 7:49 (48 days old)
> Message-ID      : <20100427074934.GB3261@ikn.schottelius.org>
> References      : http://marc.info/?l=linux-kernel&m=127235784004839&w=2

> Bug-Entry       : http://bugzilla.kernel.org/show_bug.cgi?id=15717
> Subject         : bluetooth oops
> Submitter       : Pavel Machek <pavel@ucw.cz>
> Date            : 2010-03-14 20:14 (92 days old)
> Message-ID      : <20100314201434.GE22059@elf.ucw.cz>
> References      : http://marc.info/?l=linux-kernel&m=126859771528426&w=4
> Handled-By      : Marcel Holtmann <marcel@holtmann.org>

> Regressions with patches
> ------------------------

> Bug-Entry       : http://bugzilla.kernel.org/show_bug.cgi?id=16138
> Subject         : PCMCIA regression
> Submitter       : Mikulas Patocka <mpatocka@redhat.com>
> Date            : 2010-05-25 20:25 (20 days old)
> Message-ID      : <Pine.LNX.4.64.1005251619020.12278@hs20-bc2-1.build.redhat.com>
> References      : http://marc.info/?l=linux-kernel&m=127481913909672&w=2
> Handled-By      : Dominik Brodowski <linux@brodo.de>
> Patch           : https://bugzilla.kernel.org/attachment.cgi?id=26685

^ permalink raw reply

* Re: [ath5k-devel] [PATCH] ath5k: disable all tasklets while resetting
From: Bruno Randolf @ 2010-06-14  1:50 UTC (permalink / raw)
  To: Bob Copeland; +Cc: Johannes Berg, ath5k-devel, linux-wireless, linville
In-Reply-To: <AANLkTik0Q2JM_DNaiLxc33Nn6dpI6uT52uG7b8-F4QjW@mail.gmail.com>

On Friday 11 June 2010 23:38:15 Bob Copeland wrote:
> On Fri, Jun 11, 2010 at 10:21 AM, Bob Copeland <me@bobcopeland.com> wrote:
> > On Fri, Jun 11, 2010 at 6:41 AM, Johannes Berg
> > 
> > <johannes@sipsolutions.net> wrote:
> >> I have no idea how long a reset can take, but this means that all these
> >> tasklets will spin while your reset is running if they were scheduled.
> > 
> > It looks to me like tasklet_action() will bail out when the tasklet has a
> > positive t->count (which disable elevates) rather than spin.  What did I
> > miss?
> 
> As Johannes pointed out on irc, I missed that it re-raises the softirq. 
> doh!

well, what else can we do? we have to make sure the tasklets don't run 
concurrently to a reset to keep rx and tx buffers consistent.

we disable interrupts right after disabling the tasklets, so they should not 
be scheduled again, right? actually, we should disable interrupts first, and 
then disable tasklets... but then it should be safe, no?

bruno

^ permalink raw reply

* [PATCH]compat: trivial fix for typo in config.mk
From: Richard Farina @ 2010-06-14  4:44 UTC (permalink / raw)
  To: linux-wireless, Luis R. Rodriguez

commit e96ac45542ab5f02d2b13981df3a9c34d990afbf
Author: Rick Farina <sidhayn@gmail.com>
Date:   Mon Jun 14 00:40:03 2010 -0400

    [PATCH]compat: trivial fix for typo in config.mk
    
    In config.mk we find "# CONFIG_RT2X00_LIB_DEBUGFS" which clearly
    should have an "=y" at the end like ever other config line.
    
    Signed-off-by: Rick Farina <sidhayn@gmail.com>

diff --git a/config.mk b/config.mk
index 0001a7d..adebbbf 100644
--- a/config.mk
+++ b/config.mk
@@ -453,7 +453,7 @@ CONFIG_RT2X00_LIB_FIRMWARE=y
 CONFIG_RT2X00_LIB_CRYPTO=y
 CONFIG_RT2X00_LIB_LEDS=y
 # CONFIG_RT2X00_DEBUG=y
-# CONFIG_RT2X00_LIB_DEBUGFS
+# CONFIG_RT2X00_LIB_DEBUGFS=y
 endif
 
 ifeq ($(NEED_RT2X00_FIRMWARE),y)


^ permalink raw reply related

* [PATCH 0/3] mac80211: Add support for configuring ibss basic rates
From: Teemu Paasikivi @ 2010-06-14  6:15 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, Teemu Paasikivi

This patch set implements support for configuring basic rates for ibss network when joining/creating one. First two patches are basically patch proposed by Johannes Berg on linux-wireless posting list split in two. These implement interface to nl80211 to do actual configuration from user space. Last patch impelents removal of the BSS information from the cfg80211 when leaving the IBSS and there is no other active STA's.

Teemu Paasikivi (3):
  mac80211: Set basic rates while joining ibss network
  mac80211: Set changed basic rates flag
  mac80211: remove BSS from cfg80211 list when leaving IBSS

 include/net/cfg80211.h     |    2 +
 net/mac80211/ibss.c        |   38 +++++++++++++++++++++++++++++++++-
 net/mac80211/ieee80211_i.h |    2 +
 net/wireless/nl80211.c     |   49 ++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 90 insertions(+), 1 deletions(-)


^ permalink raw reply

* [PATCH 3/3] mac80211: remove BSS from cfg80211 list when leaving IBSS
From: Teemu Paasikivi @ 2010-06-14  6:15 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, Teemu Paasikivi
In-Reply-To: <1276496145-5623-3-git-send-email-ext-teemu.3.paasikivi@nokia.com>

Remove BSS from cfg80211 BSS list if we are only member in IBSS when
leaving it.

Signed-off-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
---
 net/mac80211/ibss.c |   33 +++++++++++++++++++++++++++++++++
 1 files changed, 33 insertions(+), 0 deletions(-)

diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c
index ff91265..6d5489b 100644
--- a/net/mac80211/ibss.c
+++ b/net/mac80211/ibss.c
@@ -969,6 +969,39 @@ int ieee80211_ibss_leave(struct ieee80211_sub_if_data *sdata)
 {
 	struct sk_buff *skb;
 
+	struct ieee80211_if_ibss *ifibss = &sdata->u.ibss;
+	struct ieee80211_local *local = sdata->local;
+	struct cfg80211_bss *cbss;
+	struct ieee80211_channel *chan = NULL;
+	const u8 *bssid = NULL;
+	u16 capability;
+	int active_ibss = 0;
+
+
+	active_ibss = ieee80211_sta_active_ibss(sdata);
+
+	if (!active_ibss) {
+		capability = WLAN_CAPABILITY_IBSS;
+		if (ifibss->privacy)
+			capability |= WLAN_CAPABILITY_PRIVACY;
+		if (ifibss->fixed_bssid)
+			bssid = ifibss->bssid;
+		if (ifibss->fixed_channel)
+			chan = ifibss->channel;
+		if (!is_zero_ether_addr(ifibss->bssid))
+			bssid = ifibss->bssid;
+		cbss = cfg80211_get_bss(local->hw.wiphy, chan, bssid,
+					ifibss->ssid, ifibss->ssid_len,
+					WLAN_CAPABILITY_IBSS |
+					WLAN_CAPABILITY_PRIVACY,
+					capability);
+
+		if (cbss) {
+			cfg80211_unlink_bss(local->hw.wiphy, cbss);
+			cfg80211_put_bss(cbss);
+		}
+	}
+
 	del_timer_sync(&sdata->u.ibss.timer);
 	clear_bit(IEEE80211_IBSS_REQ_RUN, &sdata->u.ibss.request);
 	cancel_work_sync(&sdata->u.ibss.work);
-- 
1.5.6.3


^ permalink raw reply related

* [PATCH 2/3] mac80211: Set changed basic rates flag
From: Teemu Paasikivi @ 2010-06-14  6:15 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, Teemu Paasikivi
In-Reply-To: <1276496145-5623-2-git-send-email-ext-teemu.3.paasikivi@nokia.com>

Add changed basic rates flag to bss_changed while joinig ibss network.

This patch is split from the patch containing support for setting basic
rates when creating ibss network. Original patch was posted by Johannes
Berg on the linux-wireless posting list.

Signed-off-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
---
 net/mac80211/ibss.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c
index 8be5a96..ff91265 100644
--- a/net/mac80211/ibss.c
+++ b/net/mac80211/ibss.c
@@ -178,6 +178,7 @@ static void __ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata,
 	bss_change |= BSS_CHANGED_BSSID;
 	bss_change |= BSS_CHANGED_BEACON;
 	bss_change |= BSS_CHANGED_BEACON_ENABLED;
+	bss_change |= BSS_CHANGED_BASIC_RATES;
 	bss_change |= BSS_CHANGED_IBSS;
 	sdata->vif.bss_conf.ibss_joined = true;
 	ieee80211_bss_info_change_notify(sdata, bss_change);
-- 
1.5.6.3


^ permalink raw reply related

* [PATCH 1/3] mac80211: Set basic rates while joining ibss network
From: Teemu Paasikivi @ 2010-06-14  6:15 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, Teemu Paasikivi
In-Reply-To: <1276496145-5623-1-git-send-email-ext-teemu.3.paasikivi@nokia.com>

This patch adds support to nl80211 and mac80211 to set basic rates when
joining/creating ibss network.

Original patch was posted by Johannes Berg on the linux-wireless posting list.

Signed-off-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
---
 include/net/cfg80211.h     |    2 +
 net/mac80211/ibss.c        |    4 ++-
 net/mac80211/ieee80211_i.h |    2 +
 net/wireless/nl80211.c     |   49 ++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 56 insertions(+), 1 deletions(-)

diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 22ab9d8..64374f4 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -810,6 +810,7 @@ struct cfg80211_disassoc_request {
  * @beacon_interval: beacon interval to use
  * @privacy: this is a protected network, keys will be configured
  *	after joining
+ * @basic_rates: bitmap of basic rates to use when creating the IBSS
  */
 struct cfg80211_ibss_params {
 	u8 *ssid;
@@ -818,6 +819,7 @@ struct cfg80211_ibss_params {
 	u8 *ie;
 	u8 ssid_len, ie_len;
 	u16 beacon_interval;
+	u32 basic_rates;
 	bool channel_fixed;
 	bool privacy;
 };
diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c
index d7a96ce..8be5a96 100644
--- a/net/mac80211/ibss.c
+++ b/net/mac80211/ibss.c
@@ -172,6 +172,7 @@ static void __ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata,
 	rcu_assign_pointer(ifibss->presp, skb);
 
 	sdata->vif.bss_conf.beacon_int = beacon_int;
+	sdata->vif.bss_conf.basic_rates = basic_rates;
 	bss_change = BSS_CHANGED_BEACON_INT;
 	bss_change |= ieee80211_reset_erp_info(sdata);
 	bss_change |= BSS_CHANGED_BSSID;
@@ -529,7 +530,7 @@ static void ieee80211_sta_create_ibss(struct ieee80211_sub_if_data *sdata)
 		sdata->drop_unencrypted = 0;
 
 	__ieee80211_sta_join_ibss(sdata, bssid, sdata->vif.bss_conf.beacon_int,
-				  ifibss->channel, 3, /* first two are basic */
+				  ifibss->channel, ifibss->basic_rates,
 				  capability, 0);
 }
 
@@ -910,6 +911,7 @@ int ieee80211_ibss_join(struct ieee80211_sub_if_data *sdata,
 		sdata->u.ibss.fixed_bssid = false;
 
 	sdata->u.ibss.privacy = params->privacy;
+	sdata->u.ibss.basic_rates = params->basic_rates;
 
 	sdata->vif.bss_conf.beacon_int = params->beacon_interval;
 
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index 4d3883e..fde058b 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -393,6 +393,8 @@ struct ieee80211_if_ibss {
 	unsigned long request;
 	unsigned long last_scan_completed;
 
+	u32 basic_rates;
+
 	bool timer_running;
 
 	bool fixed_bssid;
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 90ab3c8..324b4a5 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -3955,6 +3955,55 @@ static int nl80211_join_ibss(struct sk_buff *skb, struct genl_info *info)
 		}
 	}
 
+	if (info->attrs[NL80211_ATTR_BSS_BASIC_RATES]) {
+		u8 *rates =
+			nla_data(info->attrs[NL80211_ATTR_BSS_BASIC_RATES]);
+		int n_rates =
+			nla_len(info->attrs[NL80211_ATTR_BSS_BASIC_RATES]);
+		struct ieee80211_supported_band *sband =
+			wiphy->bands[ibss.channel->band];
+		int i, j;
+
+		if (n_rates == 0) {
+			err = -EINVAL;
+			goto out;
+		}
+
+		for (i = 0; i < n_rates; i++) {
+			int rate = (rates[i] & 0x7f) * 5;
+			bool found = false;
+
+			for (j = 0; j < sband->n_bitrates; j++) {
+				if (sband->bitrates[j].bitrate == rate) {
+					found = true;
+					ibss.basic_rates |= BIT(j);
+					break;
+				}
+			}
+			if (!found) {
+				err = -EINVAL;
+				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);
 
 out:
-- 
1.5.6.3


^ permalink raw reply related

* Re: [PATCH 1/3] mac80211: Set basic rates while joining ibss network
From: Johannes Berg @ 2010-06-14  6:30 UTC (permalink / raw)
  To: Teemu Paasikivi; +Cc: linville, linux-wireless
In-Reply-To: <1276496145-5623-2-git-send-email-ext-teemu.3.paasikivi@nokia.com>

On Mon, 2010-06-14 at 09:15 +0300, Teemu Paasikivi wrote:
> This patch adds support to nl80211 and mac80211 to set basic rates when
> joining/creating ibss network.
> 
> Original patch was posted by Johannes Berg on the linux-wireless posting list.

Did you actually change it at all? (Ok I see you did make a bugfix, good
catch)

I personally don't care at all, but I guess generally you should
attribute it to the person who actually did (most of) the work.

In any case, John will need this:

Signed-off-by: Johannes Berg <johannes.berg@intel.com>


> Signed-off-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
> ---
>  include/net/cfg80211.h     |    2 +
>  net/mac80211/ibss.c        |    4 ++-
>  net/mac80211/ieee80211_i.h |    2 +
>  net/wireless/nl80211.c     |   49 ++++++++++++++++++++++++++++++++++++++++++++
>  4 files changed, 56 insertions(+), 1 deletions(-)
> 
> diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
> index 22ab9d8..64374f4 100644
> --- a/include/net/cfg80211.h
> +++ b/include/net/cfg80211.h
> @@ -810,6 +810,7 @@ struct cfg80211_disassoc_request {
>   * @beacon_interval: beacon interval to use
>   * @privacy: this is a protected network, keys will be configured
>   *	after joining
> + * @basic_rates: bitmap of basic rates to use when creating the IBSS
>   */
>  struct cfg80211_ibss_params {
>  	u8 *ssid;
> @@ -818,6 +819,7 @@ struct cfg80211_ibss_params {
>  	u8 *ie;
>  	u8 ssid_len, ie_len;
>  	u16 beacon_interval;
> +	u32 basic_rates;
>  	bool channel_fixed;
>  	bool privacy;
>  };
> diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c
> index d7a96ce..8be5a96 100644
> --- a/net/mac80211/ibss.c
> +++ b/net/mac80211/ibss.c
> @@ -172,6 +172,7 @@ static void __ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata,
>  	rcu_assign_pointer(ifibss->presp, skb);
>  
>  	sdata->vif.bss_conf.beacon_int = beacon_int;
> +	sdata->vif.bss_conf.basic_rates = basic_rates;
>  	bss_change = BSS_CHANGED_BEACON_INT;
>  	bss_change |= ieee80211_reset_erp_info(sdata);
>  	bss_change |= BSS_CHANGED_BSSID;
> @@ -529,7 +530,7 @@ static void ieee80211_sta_create_ibss(struct ieee80211_sub_if_data *sdata)
>  		sdata->drop_unencrypted = 0;
>  
>  	__ieee80211_sta_join_ibss(sdata, bssid, sdata->vif.bss_conf.beacon_int,
> -				  ifibss->channel, 3, /* first two are basic */
> +				  ifibss->channel, ifibss->basic_rates,
>  				  capability, 0);
>  }
>  
> @@ -910,6 +911,7 @@ int ieee80211_ibss_join(struct ieee80211_sub_if_data *sdata,
>  		sdata->u.ibss.fixed_bssid = false;
>  
>  	sdata->u.ibss.privacy = params->privacy;
> +	sdata->u.ibss.basic_rates = params->basic_rates;
>  
>  	sdata->vif.bss_conf.beacon_int = params->beacon_interval;
>  
> diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
> index 4d3883e..fde058b 100644
> --- a/net/mac80211/ieee80211_i.h
> +++ b/net/mac80211/ieee80211_i.h
> @@ -393,6 +393,8 @@ struct ieee80211_if_ibss {
>  	unsigned long request;
>  	unsigned long last_scan_completed;
>  
> +	u32 basic_rates;
> +
>  	bool timer_running;
>  
>  	bool fixed_bssid;
> diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
> index 90ab3c8..324b4a5 100644
> --- a/net/wireless/nl80211.c
> +++ b/net/wireless/nl80211.c
> @@ -3955,6 +3955,55 @@ static int nl80211_join_ibss(struct sk_buff *skb, struct genl_info *info)
>  		}
>  	}
>  
> +	if (info->attrs[NL80211_ATTR_BSS_BASIC_RATES]) {
> +		u8 *rates =
> +			nla_data(info->attrs[NL80211_ATTR_BSS_BASIC_RATES]);
> +		int n_rates =
> +			nla_len(info->attrs[NL80211_ATTR_BSS_BASIC_RATES]);
> +		struct ieee80211_supported_band *sband =
> +			wiphy->bands[ibss.channel->band];
> +		int i, j;
> +
> +		if (n_rates == 0) {
> +			err = -EINVAL;
> +			goto out;
> +		}
> +
> +		for (i = 0; i < n_rates; i++) {
> +			int rate = (rates[i] & 0x7f) * 5;
> +			bool found = false;
> +
> +			for (j = 0; j < sband->n_bitrates; j++) {
> +				if (sband->bitrates[j].bitrate == rate) {
> +					found = true;
> +					ibss.basic_rates |= BIT(j);
> +					break;
> +				}
> +			}
> +			if (!found) {
> +				err = -EINVAL;
> +				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);
>  
>  out:
> -- 
> 1.5.6.3
> 
> --
> 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
> 



^ permalink raw reply

* Re: [PATCH 2/3] mac80211: Set changed basic rates flag
From: Johannes Berg @ 2010-06-14  6:30 UTC (permalink / raw)
  To: Teemu Paasikivi; +Cc: linville, linux-wireless
In-Reply-To: <1276496145-5623-3-git-send-email-ext-teemu.3.paasikivi@nokia.com>

On Mon, 2010-06-14 at 09:15 +0300, Teemu Paasikivi wrote:
> Add changed basic rates flag to bss_changed while joinig ibss network.
> 
> This patch is split from the patch containing support for setting basic
> rates when creating ibss network. Original patch was posted by Johannes
> Berg on the linux-wireless posting list.
> 

Signed-off-by: Johannes Berg <johannes.berg@intel.com>

> Signed-off-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
> ---
>  net/mac80211/ibss.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c
> index 8be5a96..ff91265 100644
> --- a/net/mac80211/ibss.c
> +++ b/net/mac80211/ibss.c
> @@ -178,6 +178,7 @@ static void __ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata,
>  	bss_change |= BSS_CHANGED_BSSID;
>  	bss_change |= BSS_CHANGED_BEACON;
>  	bss_change |= BSS_CHANGED_BEACON_ENABLED;
> +	bss_change |= BSS_CHANGED_BASIC_RATES;
>  	bss_change |= BSS_CHANGED_IBSS;
>  	sdata->vif.bss_conf.ibss_joined = true;
>  	ieee80211_bss_info_change_notify(sdata, bss_change);



^ permalink raw reply

* Re: [PATCH 3/3] mac80211: remove BSS from cfg80211 list when leaving IBSS
From: Johannes Berg @ 2010-06-14  6:33 UTC (permalink / raw)
  To: Teemu Paasikivi; +Cc: linville, linux-wireless
In-Reply-To: <1276496145-5623-4-git-send-email-ext-teemu.3.paasikivi@nokia.com>

On Mon, 2010-06-14 at 09:15 +0300, Teemu Paasikivi wrote:
> Remove BSS from cfg80211 BSS list if we are only member in IBSS when
> leaving it.
> 
> Signed-off-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
> ---
>  net/mac80211/ibss.c |   33 +++++++++++++++++++++++++++++++++
>  1 files changed, 33 insertions(+), 0 deletions(-)
> 
> diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c
> index ff91265..6d5489b 100644
> --- a/net/mac80211/ibss.c
> +++ b/net/mac80211/ibss.c
> @@ -969,6 +969,39 @@ int ieee80211_ibss_leave(struct ieee80211_sub_if_data *sdata)
>  {
>  	struct sk_buff *skb;
>  
> +	struct ieee80211_if_ibss *ifibss = &sdata->u.ibss;

remove that empty live please

> +	struct ieee80211_local *local = sdata->local;
> +	struct cfg80211_bss *cbss;
> +	struct ieee80211_channel *chan = NULL;
> +	const u8 *bssid = NULL;
> +	u16 capability;
> +	int active_ibss = 0;
> +
> +
> +	active_ibss = ieee80211_sta_active_ibss(sdata);
> +
> +	if (!active_ibss) {
> +		capability = WLAN_CAPABILITY_IBSS;
> +		if (ifibss->privacy)
> +			capability |= WLAN_CAPABILITY_PRIVACY;
> +		if (ifibss->fixed_bssid)
> +			bssid = ifibss->bssid;

Don't we update ifibss->bssid even if it's not fixed?

> +		if (ifibss->fixed_channel)
> +			chan = ifibss->channel;

> +		if (!is_zero_ether_addr(ifibss->bssid))
> +			bssid = ifibss->bssid;

I guess we do, but can it really ever be zeroed? Or does that happen
when we haven't even joined yet? But in that case you'd pass a NULL
bssid into get_bss() which would return a random one ... shouldn't you
rather not do anything in that case? Like making the first condition

if (!active_ibss && !is_zero_ether_addr(ifibss->bssid)) {


and then never worry about the bssid again?

johannes


^ permalink raw reply

* Re: [PATCH 1/3] mac80211: Set basic rates while joining ibss network
From: Teemu Paasikivi @ 2010-06-14  6:48 UTC (permalink / raw)
  To: ext Johannes Berg; +Cc: linville@tuxdriver.com, linux-wireless@vger.kernel.org
In-Reply-To: <1276497001.3926.4.camel@jlt3.sipsolutions.net>

Hi,

On Mon, 2010-06-14 at 08:30 +0200, ext Johannes Berg wrote:
> On Mon, 2010-06-14 at 09:15 +0300, Teemu Paasikivi wrote:
> > This patch adds support to nl80211 and mac80211 to set basic rates when
> > joining/creating ibss network.
> > 
> > Original patch was posted by Johannes Berg on the linux-wireless posting list.
> 
> Did you actually change it at all? (Ok I see you did make a bugfix, good
> catch)
> 

You're right, I only made that bugfix.


> I personally don't care at all, but I guess generally you should
> attribute it to the person who actually did (most of) the work.
> 
> In any case, John will need this:
> 
> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
> 

I'm very sorry about forgetting that. I'll send new versions of patches
with appropriate Signed-off-by's.


> > 
> > --
> > 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
> > 
> 
> 


Teemu



^ permalink raw reply

* Re: [PATCH 3/3] mac80211: remove BSS from cfg80211 list when leaving IBSS
From: Teemu Paasikivi @ 2010-06-14  7:16 UTC (permalink / raw)
  To: ext Johannes Berg; +Cc: linville@tuxdriver.com, linux-wireless@vger.kernel.org
In-Reply-To: <1276497207.3926.9.camel@jlt3.sipsolutions.net>

On Mon, 2010-06-14 at 08:33 +0200, ext Johannes Berg wrote:
> On Mon, 2010-06-14 at 09:15 +0300, Teemu Paasikivi wrote:
> > Remove BSS from cfg80211 BSS list if we are only member in IBSS when
> > leaving it.
> > 
> > Signed-off-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
> > ---
> >  net/mac80211/ibss.c |   33 +++++++++++++++++++++++++++++++++
> >  1 files changed, 33 insertions(+), 0 deletions(-)
> > 
> > diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c
> > index ff91265..6d5489b 100644
> > --- a/net/mac80211/ibss.c
> > +++ b/net/mac80211/ibss.c
> > @@ -969,6 +969,39 @@ int ieee80211_ibss_leave(struct ieee80211_sub_if_data *sdata)
> >  {
> >  	struct sk_buff *skb;
> >  
> > +	struct ieee80211_if_ibss *ifibss = &sdata->u.ibss;
> 
> remove that empty live please
> 
> > +	struct ieee80211_local *local = sdata->local;
> > +	struct cfg80211_bss *cbss;
> > +	struct ieee80211_channel *chan = NULL;
> > +	const u8 *bssid = NULL;
> > +	u16 capability;
> > +	int active_ibss = 0;
> > +
> > +
> > +	active_ibss = ieee80211_sta_active_ibss(sdata);
> > +
> > +	if (!active_ibss) {
> > +		capability = WLAN_CAPABILITY_IBSS;
> > +		if (ifibss->privacy)
> > +			capability |= WLAN_CAPABILITY_PRIVACY;
> > +		if (ifibss->fixed_bssid)
> > +			bssid = ifibss->bssid;
> 
> Don't we update ifibss->bssid even if it's not fixed?
> 
> > +		if (ifibss->fixed_channel)
> > +			chan = ifibss->channel;
> 
> > +		if (!is_zero_ether_addr(ifibss->bssid))
> > +			bssid = ifibss->bssid;
> 
> I guess we do, but can it really ever be zeroed? Or does that happen
> when we haven't even joined yet? But in that case you'd pass a NULL
> bssid into get_bss() which would return a random one ... shouldn't you
> rather not do anything in that case? Like making the first condition
> 
> if (!active_ibss && !is_zero_ether_addr(ifibss->bssid)) {
> 
> 
> and then never worry about the bssid again?
> 
> johannes
> 

Valid points. Back to the drawing board. I'll rework this a little bit.


Teemu



^ permalink raw reply

* [PATCH v2 3/3] mac80211: remove BSS from cfg80211 list when leaving IBSS
From: Teemu Paasikivi @ 2010-06-14  9:55 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, Teemu Paasikivi
In-Reply-To: <1276509333-19023-3-git-send-email-ext-teemu.3.paasikivi@nokia.com>

Remove BSS from cfg80211 BSS list if we are only member in IBSS when
leaving it.

Signed-off-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
---
 net/mac80211/ibss.c |   25 +++++++++++++++++++++++++
 1 files changed, 25 insertions(+), 0 deletions(-)

diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c
index ff91265..59e46ee 100644
--- a/net/mac80211/ibss.c
+++ b/net/mac80211/ibss.c
@@ -968,6 +968,31 @@ int ieee80211_ibss_join(struct ieee80211_sub_if_data *sdata,
 int ieee80211_ibss_leave(struct ieee80211_sub_if_data *sdata)
 {
 	struct sk_buff *skb;
+	struct ieee80211_if_ibss *ifibss = &sdata->u.ibss;
+	struct ieee80211_local *local = sdata->local;
+	struct cfg80211_bss *cbss;
+	u16 capability;
+	int active_ibss = 0;
+
+	active_ibss = ieee80211_sta_active_ibss(sdata);
+
+	if (!active_ibss && !is_zero_ether_addr(ifibss->bssid)) {
+		capability = WLAN_CAPABILITY_IBSS;
+
+		if (ifibss->privacy)
+			capability |= WLAN_CAPABILITY_PRIVACY;
+
+		cbss = cfg80211_get_bss(local->hw.wiphy, ifibss->channel,
+					ifibss->bssid, ifibss->ssid,
+					ifibss->ssid_len, WLAN_CAPABILITY_IBSS |
+					WLAN_CAPABILITY_PRIVACY,
+					capability);
+
+		if (cbss) {
+			cfg80211_unlink_bss(local->hw.wiphy, cbss);
+			cfg80211_put_bss(cbss);
+		}
+	}
 
 	del_timer_sync(&sdata->u.ibss.timer);
 	clear_bit(IEEE80211_IBSS_REQ_RUN, &sdata->u.ibss.request);
-- 
1.5.6.3


^ permalink raw reply related

* [PATCH v2 1/3] mac80211: Set basic rates while joining ibss network
From: Teemu Paasikivi @ 2010-06-14  9:55 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, Teemu Paasikivi, Johannes Berg
In-Reply-To: <1276509333-19023-1-git-send-email-ext-teemu.3.paasikivi@nokia.com>

This patch adds support to nl80211 and mac80211 to set basic rates when
joining/creating ibss network.

Original patch was posted by Johannes Berg on the linux-wireless posting list.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
---
 include/net/cfg80211.h     |    2 +
 net/mac80211/ibss.c        |    4 ++-
 net/mac80211/ieee80211_i.h |    2 +
 net/wireless/nl80211.c     |   49 ++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 56 insertions(+), 1 deletions(-)

diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 22ab9d8..64374f4 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -810,6 +810,7 @@ struct cfg80211_disassoc_request {
  * @beacon_interval: beacon interval to use
  * @privacy: this is a protected network, keys will be configured
  *	after joining
+ * @basic_rates: bitmap of basic rates to use when creating the IBSS
  */
 struct cfg80211_ibss_params {
 	u8 *ssid;
@@ -818,6 +819,7 @@ struct cfg80211_ibss_params {
 	u8 *ie;
 	u8 ssid_len, ie_len;
 	u16 beacon_interval;
+	u32 basic_rates;
 	bool channel_fixed;
 	bool privacy;
 };
diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c
index d7a96ce..8be5a96 100644
--- a/net/mac80211/ibss.c
+++ b/net/mac80211/ibss.c
@@ -172,6 +172,7 @@ static void __ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata,
 	rcu_assign_pointer(ifibss->presp, skb);
 
 	sdata->vif.bss_conf.beacon_int = beacon_int;
+	sdata->vif.bss_conf.basic_rates = basic_rates;
 	bss_change = BSS_CHANGED_BEACON_INT;
 	bss_change |= ieee80211_reset_erp_info(sdata);
 	bss_change |= BSS_CHANGED_BSSID;
@@ -529,7 +530,7 @@ static void ieee80211_sta_create_ibss(struct ieee80211_sub_if_data *sdata)
 		sdata->drop_unencrypted = 0;
 
 	__ieee80211_sta_join_ibss(sdata, bssid, sdata->vif.bss_conf.beacon_int,
-				  ifibss->channel, 3, /* first two are basic */
+				  ifibss->channel, ifibss->basic_rates,
 				  capability, 0);
 }
 
@@ -910,6 +911,7 @@ int ieee80211_ibss_join(struct ieee80211_sub_if_data *sdata,
 		sdata->u.ibss.fixed_bssid = false;
 
 	sdata->u.ibss.privacy = params->privacy;
+	sdata->u.ibss.basic_rates = params->basic_rates;
 
 	sdata->vif.bss_conf.beacon_int = params->beacon_interval;
 
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index 4d3883e..fde058b 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -393,6 +393,8 @@ struct ieee80211_if_ibss {
 	unsigned long request;
 	unsigned long last_scan_completed;
 
+	u32 basic_rates;
+
 	bool timer_running;
 
 	bool fixed_bssid;
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 90ab3c8..324b4a5 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -3955,6 +3955,55 @@ static int nl80211_join_ibss(struct sk_buff *skb, struct genl_info *info)
 		}
 	}
 
+	if (info->attrs[NL80211_ATTR_BSS_BASIC_RATES]) {
+		u8 *rates =
+			nla_data(info->attrs[NL80211_ATTR_BSS_BASIC_RATES]);
+		int n_rates =
+			nla_len(info->attrs[NL80211_ATTR_BSS_BASIC_RATES]);
+		struct ieee80211_supported_band *sband =
+			wiphy->bands[ibss.channel->band];
+		int i, j;
+
+		if (n_rates == 0) {
+			err = -EINVAL;
+			goto out;
+		}
+
+		for (i = 0; i < n_rates; i++) {
+			int rate = (rates[i] & 0x7f) * 5;
+			bool found = false;
+
+			for (j = 0; j < sband->n_bitrates; j++) {
+				if (sband->bitrates[j].bitrate == rate) {
+					found = true;
+					ibss.basic_rates |= BIT(j);
+					break;
+				}
+			}
+			if (!found) {
+				err = -EINVAL;
+				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);
 
 out:
-- 
1.5.6.3


^ permalink raw reply related

* [PATCH v2 2/3] mac80211: Set changed basic rates flag
From: Teemu Paasikivi @ 2010-06-14  9:55 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, Teemu Paasikivi, Johannes Berg
In-Reply-To: <1276509333-19023-2-git-send-email-ext-teemu.3.paasikivi@nokia.com>

Add changed basic rates flag to bss_changed while joinig ibss network.

This patch is split from the patch containing support for setting basic
rates when creating ibss network. Original patch was posted by Johannes
Berg on the linux-wireless posting list.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
---
 net/mac80211/ibss.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c
index 8be5a96..ff91265 100644
--- a/net/mac80211/ibss.c
+++ b/net/mac80211/ibss.c
@@ -178,6 +178,7 @@ static void __ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata,
 	bss_change |= BSS_CHANGED_BSSID;
 	bss_change |= BSS_CHANGED_BEACON;
 	bss_change |= BSS_CHANGED_BEACON_ENABLED;
+	bss_change |= BSS_CHANGED_BASIC_RATES;
 	bss_change |= BSS_CHANGED_IBSS;
 	sdata->vif.bss_conf.ibss_joined = true;
 	ieee80211_bss_info_change_notify(sdata, bss_change);
-- 
1.5.6.3


^ permalink raw reply related

* [PATCH v2 0/3] mac80211: Add support for configuring ibss basic rates
From: Teemu Paasikivi @ 2010-06-14  9:55 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, Teemu Paasikivi

This patch set implements support for configuring basic rates for ibss network when joining/creating one. First two patches are basically patch proposed by Johannes Berg on linux-wireless posting list split in two. These implement interface to nl80211 to do actual configuration from user space. Last patch impelents removal of the BSS information from the cfg80211 when leaving the IBSS and there is no other active STA's.

Teemu Paasikivi (3):
  mac80211: Set basic rates while joining ibss network
  mac80211: Set changed basic rates flag
  mac80211: remove BSS from cfg80211 list when leaving IBSS

 include/net/cfg80211.h     |    2 +
 net/mac80211/ibss.c        |   30 ++++++++++++++++++++++++++-
 net/mac80211/ieee80211_i.h |    2 +
 net/wireless/nl80211.c     |   49 ++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 82 insertions(+), 1 deletions(-)


^ permalink raw reply

* Re: [PATCH v2 3/3] mac80211: remove BSS from cfg80211 list when leaving IBSS
From: Johannes Berg @ 2010-06-14  9:58 UTC (permalink / raw)
  To: Teemu Paasikivi; +Cc: linville, linux-wireless
In-Reply-To: <1276509333-19023-4-git-send-email-ext-teemu.3.paasikivi@nokia.com>

On Mon, 2010-06-14 at 12:55 +0300, Teemu Paasikivi wrote:
> Remove BSS from cfg80211 BSS list if we are only member in IBSS when
> leaving it.

Thanks, looks good.

Acked-by: Johannes Berg <johannes@sipsolutions.net>



^ permalink raw reply

* [PATCH 0/3] Libertas : cfg80211, 11d support (rebased)
From: Kiran Divekar @ 2010-06-14 16:31 UTC (permalink / raw)
  To: linux-wireless

I resolved the issue with my MTA, please see if it applies.

The top commit log in libertas is 77c2061d10a408d0220c2b0e7faefe52d9c41008. 

Top commit in wireless testing is a5fdbcad0a3f461d43f7b801f8fc176cd2840704.

Add cfg80211 support to Libertas based on initial work from Holger Shurig.
Add 11d support to Libertas.

Kiran Divekar (3):
  Libertas: cfg80211 support
  Libertas: fix WARN_ON issues in cfg80211 support
  Libertas: Added 11d support using cfg80211

 drivers/net/wireless/libertas/Makefile  |    3 -
 drivers/net/wireless/libertas/assoc.c   | 2264 -----------------------------
 drivers/net/wireless/libertas/assoc.h   |  155 --
 drivers/net/wireless/libertas/cfg.c     | 2038 ++++++++++++++++++++++++++-
 drivers/net/wireless/libertas/cfg.h     |   21 +-
 drivers/net/wireless/libertas/cmd.c     |   87 +-
 drivers/net/wireless/libertas/cmdresp.c |   83 +-
 drivers/net/wireless/libertas/debugfs.c |   54 +-
 drivers/net/wireless/libertas/decl.h    |    8 +
 drivers/net/wireless/libertas/dev.h     |   62 +-
 drivers/net/wireless/libertas/ethtool.c |    5 -
 drivers/net/wireless/libertas/host.h    |   28 +-
 drivers/net/wireless/libertas/main.c    |  226 +---
 drivers/net/wireless/libertas/rx.c      |  121 +--
 drivers/net/wireless/libertas/scan.c    | 1354 ------------------
 drivers/net/wireless/libertas/scan.h    |   63 -
 drivers/net/wireless/libertas/tx.c      |   12 +-
 drivers/net/wireless/libertas/wext.c    | 2353 -------------------------------
 drivers/net/wireless/libertas/wext.h    |   17 -
 19 files changed, 2237 insertions(+), 6717 deletions(-)
 delete mode 100644 drivers/net/wireless/libertas/assoc.c
 delete mode 100644 drivers/net/wireless/libertas/assoc.h
 delete mode 100644 drivers/net/wireless/libertas/scan.c
 delete mode 100644 drivers/net/wireless/libertas/scan.h
 delete mode 100644 drivers/net/wireless/libertas/wext.c
 delete mode 100644 drivers/net/wireless/libertas/wext.h




^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox