Linux wireless drivers development
 help / color / mirror / Atom feed
* [PATCH 10/10] ath6kl: don't print an error for canceled packets
From: Kalle Valo @ 2011-10-27 15:49 UTC (permalink / raw)
  To: kvalo; +Cc: linux-wireless
In-Reply-To: <20111027154746.23519.39680.stgit@localhost6.localdomain6>

ath6kl_tx_complete() was printing an error when packet was canceled.
That causes unnecessary errors when hardware is powered off.

Also change the error to a warning and cleanup the message.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
---
 drivers/net/wireless/ath/ath6kl/txrx.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/ath/ath6kl/txrx.c b/drivers/net/wireless/ath/ath6kl/txrx.c
index ab9a5c1..9dfd7f5 100644
--- a/drivers/net/wireless/ath/ath6kl/txrx.c
+++ b/drivers/net/wireless/ath/ath6kl/txrx.c
@@ -606,8 +606,9 @@ void ath6kl_tx_complete(void *context, struct list_head *packet_queue)
 
 			vif->net_stats.tx_errors++;
 
-			if (status != -ENOSPC)
-				ath6kl_err("tx error, status: 0x%x\n", status);
+			if (status != -ENOSPC && status != -ECANCELED)
+				ath6kl_warn("tx complete error: %d\n", status);
+
 			ath6kl_dbg(ATH6KL_DBG_WLAN_TX,
 				   "%s: skb=0x%p data=0x%p len=0x%x eid=%d %s\n",
 				   __func__, skb, packet->buf, packet->act_len,


^ permalink raw reply related

* [PATCH] Fix missing copy of frame contents to local buffer
From: Aarthi Thiruvengadam @ 2011-10-27 16:35 UTC (permalink / raw)
  To: kvalo; +Cc: linux-wireless, Aarthi Thiruvengadam, Aarthi Thiruvengadam

The wpa_supplicant was receiving incorrect frame contents in the
callback function that indicates the status of the frame transmitted.
This patch fixes a missing copy of the frame contents to a local
buffer. The local buffer keeps track of the last sent management frame.

Signed-off-by: Aarthi Thiruvengadam <athiruve@qca.qualcomm.com>
---
 drivers/net/wireless/ath/ath6kl/wmi.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/net/wireless/ath/ath6kl/wmi.c b/drivers/net/wireless/ath/ath6kl/wmi.c
index e6b0960..6a1916a 100644
--- a/drivers/net/wireless/ath/ath6kl/wmi.c
+++ b/drivers/net/wireless/ath/ath6kl/wmi.c
@@ -2837,6 +2837,7 @@ int ath6kl_wmi_send_action_cmd(struct wmi *wmi, u8 if_idx, u32 id, u32 freq,
 	}
 
 	kfree(wmi->last_mgmt_tx_frame);
+	memcpy(buf, data, data_len);
 	wmi->last_mgmt_tx_frame = buf;
 	wmi->last_mgmt_tx_frame_len = data_len;
 
-- 
1.7.0.4


^ permalink raw reply related

* Compat-wireless release for 2011-10-27 is baked
From: Compat-wireless cronjob account @ 2011-10-27 19:02 UTC (permalink / raw)
  To: linux-wireless


compat-wireless code metrics

    814862 - Total upstream lines of code being pulled
      2431 - backport code changes
      2113 - backport code additions
       318 - backport code deletions
      8588 - backport from compat module
     11019 - total backport code
    1.3523 - % of code consists of backport work

^ permalink raw reply

* Re: [PATCHv2] mac80211: Allow noack flag overwrite for injected frames
From: Johannes Berg @ 2011-10-27 19:30 UTC (permalink / raw)
  To: Helmut Schaa; +Cc: linux-wireless, linville
In-Reply-To: <1317296545-4463-1-git-send-email-helmut.schaa@googlemail.com>

On Thu, 2011-09-29 at 13:42 +0200, Helmut Schaa wrote:
> Allow injected unicast frames to be sent without having to wait
> for an ACK.

Did you ever have a hostapd patch for this?

johannes


^ permalink raw reply

* [RFC v2 13/12] cfg80211/mac80211: allow management TX to not wait for ACK
From: Johannes Berg @ 2011-10-27 19:32 UTC (permalink / raw)
  To: linux-wireless
In-Reply-To: <20111021142322.229128720@sipsolutions.net>

From: Johannes Berg <johannes.berg@intel.com>

For probe responses it can be useful to not wait for ACK
to save airtime, so allow userspace to request not waiting
with a new nl80211 flag.

Since mac80211 needs to be updated for the new function
prototype anyway implement it right away -- it's just a
few lines of code.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
 drivers/net/wireless/ath/ath6kl/cfg80211.c |    3 +-
 include/linux/nl80211.h                    |    7 ++++
 include/net/cfg80211.h                     |    2 -
 net/mac80211/cfg.c                         |   11 +++++--
 net/wireless/core.h                        |    2 -
 net/wireless/mlme.c                        |    5 ++-
 net/wireless/nl80211.c                     |   43 +++++++++++++++++------------
 7 files changed, 48 insertions(+), 25 deletions(-)

--- a/include/linux/nl80211.h	2011-10-27 21:08:01.000000000 +0200
+++ b/include/linux/nl80211.h	2011-10-27 21:13:13.000000000 +0200
@@ -1147,6 +1147,11 @@ enum nl80211_commands {
  * @NL80211_ATTR_FEATURE_FLAGS: This u32 attribute contains flags from
  *	&enum nl80211_feature_flags and is advertised in wiphy information.
  *
+ * @NL80211_ATTR_DONT_WAIT_FOR_ACK: Used with %NL80211_CMD_FRAME, this tells
+ *	the driver to not wait for an acknowledgement. Note that due to this,
+ *	it will also not give a status callback nor return a cookie. This is
+ *	mostly useful for probe responses to save airtime.
+ *
  * @NL80211_ATTR_MAX: highest attribute number currently defined
  * @__NL80211_ATTR_AFTER_LAST: internal use
  */
@@ -1379,6 +1384,8 @@ enum nl80211_attrs {
 
 	NL80211_ATTR_FEATURE_FLAGS,
 
+	NL80211_ATTR_DONT_WAIT_FOR_ACK,
+
 	/* add attributes here, update the policy in nl80211.c */
 
 	__NL80211_ATTR_AFTER_LAST,
--- a/net/wireless/core.h	2011-10-27 21:08:01.000000000 +0200
+++ b/net/wireless/core.h	2011-10-27 21:12:23.000000000 +0200
@@ -378,7 +378,7 @@ int cfg80211_mlme_mgmt_tx(struct cfg8021
 			  enum nl80211_channel_type channel_type,
 			  bool channel_type_valid, unsigned int wait,
 			  const u8 *buf, size_t len, bool no_cck,
-			  u64 *cookie);
+			  bool dont_wait_for_ack, u64 *cookie);
 
 /* SME */
 int __cfg80211_connect(struct cfg80211_registered_device *rdev,
--- a/net/wireless/mlme.c	2011-10-27 21:08:01.000000000 +0200
+++ b/net/wireless/mlme.c	2011-10-27 21:13:52.000000000 +0200
@@ -904,7 +904,7 @@ int cfg80211_mlme_mgmt_tx(struct cfg8021
 			  enum nl80211_channel_type channel_type,
 			  bool channel_type_valid, unsigned int wait,
 			  const u8 *buf, size_t len, bool no_cck,
-			  u64 *cookie)
+			  bool dont_wait_for_ack, u64 *cookie)
 {
 	struct wireless_dev *wdev = dev->ieee80211_ptr;
 	const struct ieee80211_mgmt *mgmt;
@@ -995,7 +995,8 @@ int cfg80211_mlme_mgmt_tx(struct cfg8021
 	/* Transmit the Action frame as requested by user space */
 	return rdev->ops->mgmt_tx(&rdev->wiphy, dev, chan, offchan,
 				  channel_type, channel_type_valid,
-				  wait, buf, len, no_cck, cookie);
+				  wait, buf, len, no_cck, dont_wait_for_ack,
+				  cookie);
 }
 
 bool cfg80211_rx_mgmt(struct net_device *dev, int freq, const u8 *buf,
--- a/net/wireless/nl80211.c	2011-10-27 21:08:01.000000000 +0200
+++ b/net/wireless/nl80211.c	2011-10-27 21:14:45.000000000 +0200
@@ -197,6 +197,7 @@ static const struct nla_policy nl80211_p
 	[NL80211_ATTR_TDLS_OPERATION] = { .type = NLA_U8 },
 	[NL80211_ATTR_TDLS_SUPPORT] = { .type = NLA_FLAG },
 	[NL80211_ATTR_TDLS_EXTERNAL_SETUP] = { .type = NLA_FLAG },
+	[NL80211_ATTR_DONT_WAIT_FOR_ACK] = { .type = NLA_FLAG },
 };
 
 /* policy for the key attributes */
@@ -5279,10 +5280,11 @@ static int nl80211_tx_mgmt(struct sk_buf
 	int err;
 	void *hdr;
 	u64 cookie;
-	struct sk_buff *msg;
+	struct sk_buff *msg = NULL;
 	unsigned int wait = 0;
-	bool offchan;
-	bool no_cck;
+	bool offchan, no_cck, dont_wait_for_ack;
+
+	dont_wait_for_ack = info->attrs[NL80211_ATTR_DONT_WAIT_FOR_ACK];
 
 	if (!info->attrs[NL80211_ATTR_FRAME] ||
 	    !info->attrs[NL80211_ATTR_WIPHY_FREQ])
@@ -5326,29 +5328,36 @@ static int nl80211_tx_mgmt(struct sk_buf
 	if (chan == NULL)
 		return -EINVAL;
 
-	msg = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL);
-	if (!msg)
-		return -ENOMEM;
-
-	hdr = nl80211hdr_put(msg, info->snd_pid, info->snd_seq, 0,
-			     NL80211_CMD_FRAME);
-
-	if (IS_ERR(hdr)) {
-		err = PTR_ERR(hdr);
-		goto free_msg;
+	if (!dont_wait_for_ack) {
+		msg = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL);
+		if (!msg)
+			return -ENOMEM;
+
+		hdr = nl80211hdr_put(msg, info->snd_pid, info->snd_seq, 0,
+				     NL80211_CMD_FRAME);
+
+		if (IS_ERR(hdr)) {
+			err = PTR_ERR(hdr);
+			goto free_msg;
+		}
 	}
+
 	err = cfg80211_mlme_mgmt_tx(rdev, dev, chan, offchan, channel_type,
 				    channel_type_valid, wait,
 				    nla_data(info->attrs[NL80211_ATTR_FRAME]),
 				    nla_len(info->attrs[NL80211_ATTR_FRAME]),
-				    no_cck, &cookie);
+				    no_cck, dont_wait_for_ack, &cookie);
 	if (err)
 		goto free_msg;
 
-	NLA_PUT_U64(msg, NL80211_ATTR_COOKIE, cookie);
+	if (msg) {
+		NLA_PUT_U64(msg, NL80211_ATTR_COOKIE, cookie);
 
-	genlmsg_end(msg, hdr);
-	return genlmsg_reply(msg, info);
+		genlmsg_end(msg, hdr);
+		return genlmsg_reply(msg, info);
+	}
+
+	return 0;
 
  nla_put_failure:
 	err = -ENOBUFS;
--- a/include/net/cfg80211.h	2011-10-27 21:08:01.000000000 +0200
+++ b/include/net/cfg80211.h	2011-10-27 21:15:55.000000000 +0200
@@ -1584,7 +1584,7 @@ struct cfg80211_ops {
 			  enum nl80211_channel_type channel_type,
 			  bool channel_type_valid, unsigned int wait,
 			  const u8 *buf, size_t len, bool no_cck,
-			  u64 *cookie);
+			  bool dont_wait_for_ack, u64 *cookie);
 	int	(*mgmt_tx_cancel_wait)(struct wiphy *wiphy,
 				       struct net_device *dev,
 				       u64 cookie);
--- a/net/mac80211/cfg.c	2011-10-27 21:08:01.000000000 +0200
+++ b/net/mac80211/cfg.c	2011-10-27 21:23:44.000000000 +0200
@@ -1936,7 +1936,7 @@ static int ieee80211_mgmt_tx(struct wiph
 			     enum nl80211_channel_type channel_type,
 			     bool channel_type_valid, unsigned int wait,
 			     const u8 *buf, size_t len, bool no_cck,
-			     u64 *cookie)
+			     bool dont_wait_for_ack, u64 *cookie)
 {
 	struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
 	struct ieee80211_local *local = sdata->local;
@@ -1944,10 +1944,15 @@ static int ieee80211_mgmt_tx(struct wiph
 	struct sta_info *sta;
 	struct ieee80211_work *wk;
 	const struct ieee80211_mgmt *mgmt = (void *)buf;
-	u32 flags = IEEE80211_TX_INTFL_NL80211_FRAME_TX |
-		    IEEE80211_TX_CTL_REQ_TX_STATUS;
+	u32 flags;
 	bool is_offchan = false;
 
+	if (!dont_wait_for_ack)
+		flags = IEEE80211_TX_CTL_NO_ACK;
+	else
+		flags = IEEE80211_TX_INTFL_NL80211_FRAME_TX |
+			IEEE80211_TX_CTL_REQ_TX_STATUS;
+
 	/* Check that we are on the requested channel for transmission */
 	if (chan != local->tmp_channel &&
 	    chan != local->oper_channel)
--- a/drivers/net/wireless/ath/ath6kl/cfg80211.c	2011-10-12 19:22:47.000000000 +0200
+++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c	2011-10-27 21:21:11.000000000 +0200
@@ -1732,7 +1732,8 @@ static int ath6kl_mgmt_tx(struct wiphy *
 			  struct ieee80211_channel *chan, bool offchan,
 			  enum nl80211_channel_type channel_type,
 			  bool channel_type_valid, unsigned int wait,
-			  const u8 *buf, size_t len, bool no_cck, u64 *cookie)
+			  const u8 *buf, size_t len, bool no_cck,
+			  bool dont_wait_for_ack, u64 *cookie)
 {
 	struct ath6kl *ar = ath6kl_priv(dev);
 	u32 id;



^ permalink raw reply

* Re: Temporary(?) relocation of wireless git trees...
From: Ben Greear @ 2011-10-27 19:32 UTC (permalink / raw)
  To: John W. Linville, linux-wireless@vger.kernel.org
In-Reply-To: <20110912181351.GD2689@tuxdriver.com>

On 09/12/2011 11:13 AM, John W. Linville wrote:
> With no news on when the kernel.org trees will be accessible again
> (which could be 10 minutes from now for all I know), I have pushed
> my local copies to Infradead.  This should be equivalent to what was
> last pushed to kernel.org almost two weeks ago.

Is this still the current development tree for wireless?

I've some patches to clean up and post, but want to do it against
the right tree!

Thanks,
Ben

>
> The "current" wireless tree is here:
>
> 	git://git.infradead.org/users/linville/wireless.git
>
> The "next" wireless tree is here:
>
> 	git://git.infradead.org/users/linville/wireless-next.git
>
> The "testing" wireless tree is here:
>
> 	git://git.infradead.org/users/linville/wireless-testing.git
>
> I don't know how long these trees will be on Infradead or when (or
> if) they will return to kernel.org.  Such changes will be determined
> as conditions change.  Please be flexible.
>
> Thanks,
>
> John


-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com

^ permalink raw reply

* Re: Re: [PATCH 2/2] iw: show STA flags in station dump
From: Johannes Berg @ 2011-10-27 19:37 UTC (permalink / raw)
  To: Helmut Schaa; +Cc: Arik Nemtsov, linux-wireless
In-Reply-To: <4758903.33HQxio52G@helmutmobil.site>

On Tue, 2011-10-18 at 19:23 +0200, Helmut Schaa wrote:
> Am Dienstag, 18. Oktober 2011, 18:41:11 schrieb Arik Nemtsov:
> > On Tue, Oct 18, 2011 at 11:18, Helmut Schaa <helmut.schaa@googlemail.com> wrote:
> > >
> > > Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
> > > ---
> > >
> > > Couldn't come up with a nice/short wording for "Managment frame
> > > protection" and "Wireless Multimedia Extension" so I just used MFP
> > > and WME/WMM instead.
> > >
> > 
> > Printing the NL80211_STA_FLAG_TDLS_PEER flag would be nice as well.
> 
> Agreed, I somehow missed the (new) TDLS flag, also in the according
> nl80211/mac80211 patches :(

I'll apply this to iw fixed up but please send patches to the kernel.

johannes


^ permalink raw reply

* RE: [PATCH] cfg80211: annotate cfg80211_inform_bss
From: Bing Zhao @ 2011-10-27 19:40 UTC (permalink / raw)
  To: Johannes Berg, John Linville
  Cc: linux-wireless, Samuel Ortiz, Jussi Kivilinna, Dan Williams,
	Arend Van Spriel
In-Reply-To: <1319719502.3944.5.camel@jlt3.sipsolutions.net>

SGkgSm9oYW5uZXMsDQoNCj4gLS0tLS1PcmlnaW5hbCBNZXNzYWdlLS0tLS0NCj4gRnJvbTogbGlu
dXgtd2lyZWxlc3Mtb3duZXJAdmdlci5rZXJuZWwub3JnIFttYWlsdG86bGludXgtd2lyZWxlc3Mt
b3duZXJAdmdlci5rZXJuZWwub3JnXSBPbiBCZWhhbGYgT2YNCj4gSm9oYW5uZXMgQmVyZw0KPiBT
ZW50OiBUaHVyc2RheSwgT2N0b2JlciAyNywgMjAxMSA1OjQ1IEFNDQo+IFRvOiBKb2huIExpbnZp
bGxlDQo+IENjOiBsaW51eC13aXJlbGVzczsgU2FtdWVsIE9ydGl6OyBCaW5nIFpoYW87IEp1c3Np
IEtpdmlsaW5uYTsgRGFuIFdpbGxpYW1zOyBBcmVuZCBWYW4gU3ByaWVsDQo+IFN1YmplY3Q6IFtQ
QVRDSF0gY2ZnODAyMTE6IGFubm90YXRlIGNmZzgwMjExX2luZm9ybV9ic3MNCj4gDQo+IEZyb206
IEpvaGFubmVzIEJlcmcgPGpvaGFubmVzLmJlcmdAaW50ZWwuY29tPg0KPiANCj4gVGhpcyBmdW5j
dGlvbiByZXR1cm5zIGEgcmVmZXJlbmNlZCBCU1Mgc3RydWN0DQo+IChvciBOVUxMKSwgYW5ub3Rh
dGUgd2l0aCBfX211c3RfY2hlY2suIEl0IHNlZW1zDQo+IHRoYXQgYSBsb3Qgb2YgZHJpdmVycyBn
ZXQgdGhpcyBjb21wbGV0ZWx5IHdyb25nDQo+IGFuZCBsZWFrIGFsbCBCU1Mgc3RydWN0cyBhcyBh
IHJlc3VsdC4NCj4gDQo+IFJlcG9ydGVkLWJ5OiBBZGFtIE1pa3V0YSA8QWRhbS5NaWt1dGFAdGll
dG8uY29tPg0KPiBTaWduZWQtb2ZmLWJ5OiBKb2hhbm5lcyBCZXJnIDxqb2hhbm5lcy5iZXJnQGlu
dGVsLmNvbT4NCj4gLS0tDQo+IENDIGxvdHMgb2YgZHJpdmVyIG1haW50YWluZXJzIHdobyBuZWVk
IHRvIGZpeCB0aGlzIGJ1Zy4NCg0KSSB3aWxsIHdvcmsgb24gdGhlIG13aWZpZXggZHJpdmVyIHBh
cnQuDQoNClRoYW5rcywNCkJpbmcNCg0KPiANCj4gIGluY2x1ZGUvbmV0L2NmZzgwMjExLmggfCAg
ICA4ICsrKysrKy0tDQo+ICAxIGZpbGUgY2hhbmdlZCwgNiBpbnNlcnRpb25zKCspLCAyIGRlbGV0
aW9ucygtKQ0KPiANCj4gLS0tIGEvaW5jbHVkZS9uZXQvY2ZnODAyMTEuaAkyMDExLTEwLTI3IDE0
OjA1OjE3LjAwMDAwMDAwMCArMDIwMA0KPiArKysgYi9pbmNsdWRlL25ldC9jZmc4MDIxMS5oCTIw
MTEtMTAtMjcgMTQ6NDI6NTEuMDAwMDAwMDAwICswMjAwDQo+IEBAIC0yNjUxLDggKzI2NTEsMTAg
QEAgdm9pZCBjZmc4MDIxMV9zY2hlZF9zY2FuX3N0b3BwZWQoc3RydWN0DQo+ICAgKg0KPiAgICog
VGhpcyBpbmZvcm1zIGNmZzgwMjExIHRoYXQgQlNTIGluZm9ybWF0aW9uIHdhcyBmb3VuZCBhbmQN
Cj4gICAqIHRoZSBCU1Mgc2hvdWxkIGJlIHVwZGF0ZWQvYWRkZWQuDQo+ICsgKg0KPiArICogTk9U
RTogUmV0dXJucyBhIHJlZmVyZW5jZWQgc3RydWN0LCBtdXN0IGJlIHJlbGVhc2VkIHdpdGggY2Zn
ODAyMTFfcHV0X2JzcygpIQ0KPiAgICovDQo+IC1zdHJ1Y3QgY2ZnODAyMTFfYnNzKg0KPiArc3Ry
dWN0IGNmZzgwMjExX2JzcyAqIF9fbXVzdF9jaGVjaw0KPiAgY2ZnODAyMTFfaW5mb3JtX2Jzc19m
cmFtZShzdHJ1Y3Qgd2lwaHkgKndpcGh5LA0KPiAgCQkJICBzdHJ1Y3QgaWVlZTgwMjExX2NoYW5u
ZWwgKmNoYW5uZWwsDQo+ICAJCQkgIHN0cnVjdCBpZWVlODAyMTFfbWdtdCAqbWdtdCwgc2l6ZV90
IGxlbiwNCj4gQEAgLTI2NzQsOCArMjY3NiwxMCBAQCBjZmc4MDIxMV9pbmZvcm1fYnNzX2ZyYW1l
KHN0cnVjdCB3aXBoeSAqDQo+ICAgKg0KPiAgICogVGhpcyBpbmZvcm1zIGNmZzgwMjExIHRoYXQg
QlNTIGluZm9ybWF0aW9uIHdhcyBmb3VuZCBhbmQNCj4gICAqIHRoZSBCU1Mgc2hvdWxkIGJlIHVw
ZGF0ZWQvYWRkZWQuDQo+ICsgKg0KPiArICogTk9URTogUmV0dXJucyBhIHJlZmVyZW5jZWQgc3Ry
dWN0LCBtdXN0IGJlIHJlbGVhc2VkIHdpdGggY2ZnODAyMTFfcHV0X2JzcygpIQ0KPiAgICovDQo+
IC1zdHJ1Y3QgY2ZnODAyMTFfYnNzKg0KPiArc3RydWN0IGNmZzgwMjExX2JzcyAqIF9fbXVzdF9j
aGVjaw0KPiAgY2ZnODAyMTFfaW5mb3JtX2JzcyhzdHJ1Y3Qgd2lwaHkgKndpcGh5LA0KPiAgCQkg
ICAgc3RydWN0IGllZWU4MDIxMV9jaGFubmVsICpjaGFubmVsLA0KPiAgCQkgICAgY29uc3QgdTgg
KmJzc2lkLA0KPiANCj4gDQo+IC0tDQo+IFRvIHVuc3Vic2NyaWJlIGZyb20gdGhpcyBsaXN0OiBz
ZW5kIHRoZSBsaW5lICJ1bnN1YnNjcmliZSBsaW51eC13aXJlbGVzcyIgaW4NCj4gdGhlIGJvZHkg
b2YgYSBtZXNzYWdlIHRvIG1ham9yZG9tb0B2Z2VyLmtlcm5lbC5vcmcNCj4gTW9yZSBtYWpvcmRv
bW8gaW5mbyBhdCAgaHR0cDovL3ZnZXIua2VybmVsLm9yZy9tYWpvcmRvbW8taW5mby5odG1sDQo=

^ permalink raw reply

* Re: 3.1-rc9 and 3.1 wifi problem , problem continues with 3.1
From: David Rientjes @ 2011-10-27 20:12 UTC (permalink / raw)
  To: werner
  Cc: linux-kernel, linux-wireless, dave.taht, arend, toralf.foerster,
	wey-yi.w.guy, ilw, larry.finger
In-Reply-To: <web-634287632@zbackend1.aha.ru>

On Thu, 27 Oct 2011, werner wrote:

> With the patch sent by Guy, Wey-Yi W , now wifi works at that laptop.
> 

Could you send a pointer to the exact patch(es) that you applied so we can 
add your tested-by?

Thanks for testing!

^ permalink raw reply

* Re: 3.1-rc9 and 3.1 wifi problem , problem continues with 3.1
From: Guy, Wey-Yi @ 2011-10-27 19:30 UTC (permalink / raw)
  To: David Rientjes
  Cc: werner, linux-kernel@vger.kernel.org,
	linux-wireless@vger.kernel.org, dave.taht@gmail.com,
	arend@broadcom.com, toralf.foerster@gmx.de, ilw@linux.intel.com,
	larry.finger@gmail.com
In-Reply-To: <alpine.DEB.2.00.1110271312280.7639@chino.kir.corp.google.com>

On Thu, 2011-10-27 at 13:12 -0700, David Rientjes wrote:
> On Thu, 27 Oct 2011, werner wrote:
> 
> > With the patch sent by Guy, Wey-Yi W , now wifi works at that laptop.
> > 
> 
> Could you send a pointer to the exact patch(es) that you applied so we can 
> add your tested-by?
> 
> Thanks for testing!

I did not push the patch yet, I will have the Reported-by and Tested-by
and push it to wireless and CC to stable tree tomorrow

Thanks
Wey



^ permalink raw reply

* Re: RTL8188RU no injection?
From: Gábor Stefanik @ 2011-10-27 22:00 UTC (permalink / raw)
  To: Larry Finger; +Cc: Roman Proud, linux-wireless
In-Reply-To: <4EA97323.50004@lwfinger.net>

On Thu, Oct 27, 2011 at 5:05 PM, Larry Finger <Larry.Finger@lwfinger.net> wrote:
> On 10/27/2011 08:17 AM, Roman Proud wrote:
>>
>> Hi peops
>>
>> thx for all youre responses!
>>
>> Well i didnt really thought about g and n -.-
>>
>> Im using the latest 8192cu driver from Realtek now, it works just
>> fine. Also monitor mode works like a charm (yes if i use airmon-ng for
>> it). My Kernel is (now the default) Arch kernel, on Linux Version
>> 3.0.4
>>
>> My last problem is the Package injection. Im surprised you are
>> thinking it could work (ive found many resources that say something
>> different, but hey its an OpenSource driver ;)
>
> Well, I tested with Packetspammer and it worked. As in many cases, the
> resources that say otherwise are wrong.
>
>> Pls excuse my "stupidness" but im really not sure if i am using
>> "mac80211", i think so, its leaded in the System.
>
> The drivers for most devices without a hardware MAC use mac80211 and
> friends. In fact, it is a prerequisite for getting a driver included in the
> mainline drivers/net/wireless/ tree. If the driver implements its own MAC
> layer, then it resides in drivers/staging/. Yes, it is loaded on your
> system, and it handles a lot of things for the drivers that use it.
>
>> And yes its Aircrack im trying to work with, and its Aircrack which
>> tells me i cant use Packet Injection.
>> I will try Packetspammer as soon as i am at home. If this works i have
>> to contact Aircrack, am i right?
>
> If Aircrack adds the socket method used by Packetspammer, it will work with
> nearly every driver in the kernel that supports monitor mode. Whether they
> want to do that will be their decision, of course.

As a former Aircrack developer, I can definitely state that Aircrack
uses the same injection method as packetspammer.

However, Realtek's r8192cu driver will never support injection, and it
is not a mac80211 driver. Look for a driver whose module name begins
with "rtl" (not just "r"). AFAIK one is included in recent kernels.

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



-- 
Vista: [V]iruses, [I]ntruders, [S]pyware, [T]rojans and [A]dware. :-)

^ permalink raw reply

* Re: RTL8188RU no injection?
From: Larry Finger @ 2011-10-27 22:18 UTC (permalink / raw)
  To: Gábor Stefanik; +Cc: Roman Proud, linux-wireless
In-Reply-To: <CA+XFjipvGBsWCCWt5OvFfeCiOpsH28Txvui4A+d8sVCaACQ57Q@mail.gmail.com>

On 10/27/2011 05:00 PM, Gábor Stefanik wrote:
> On Thu, Oct 27, 2011 at 5:05 PM, Larry Finger<Larry.Finger@lwfinger.net>  wrote:
>> On 10/27/2011 08:17 AM, Roman Proud wrote:
>>>
>>> Hi peops
>>>
>>> thx for all youre responses!
>>>
>>> Well i didnt really thought about g and n -.-
>>>
>>> Im using the latest 8192cu driver from Realtek now, it works just
>>> fine. Also monitor mode works like a charm (yes if i use airmon-ng for
>>> it). My Kernel is (now the default) Arch kernel, on Linux Version
>>> 3.0.4
>>>
>>> My last problem is the Package injection. Im surprised you are
>>> thinking it could work (ive found many resources that say something
>>> different, but hey its an OpenSource driver ;)
>>
>> Well, I tested with Packetspammer and it worked. As in many cases, the
>> resources that say otherwise are wrong.
>>
>>> Pls excuse my "stupidness" but im really not sure if i am using
>>> "mac80211", i think so, its leaded in the System.
>>
>> The drivers for most devices without a hardware MAC use mac80211 and
>> friends. In fact, it is a prerequisite for getting a driver included in the
>> mainline drivers/net/wireless/ tree. If the driver implements its own MAC
>> layer, then it resides in drivers/staging/. Yes, it is loaded on your
>> system, and it handles a lot of things for the drivers that use it.
>>
>>> And yes its Aircrack im trying to work with, and its Aircrack which
>>> tells me i cant use Packet Injection.
>>> I will try Packetspammer as soon as i am at home. If this works i have
>>> to contact Aircrack, am i right?
>>
>> If Aircrack adds the socket method used by Packetspammer, it will work with
>> nearly every driver in the kernel that supports monitor mode. Whether they
>> want to do that will be their decision, of course.
>
> As a former Aircrack developer, I can definitely state that Aircrack
> uses the same injection method as packetspammer.
>
> However, Realtek's r8192cu driver will never support injection, and it
> is not a mac80211 driver. Look for a driver whose module name begins
> with "rtl" (not just "r"). AFAIK one is included in recent kernels.

I accepted his word that Aircrack does not work. He is using the mac80211 driver 
rtl8192cu, which was introduced in 2.6.39. The driver in 
drivers/staging/rtl8192u/ is for a different device.

Larry



^ permalink raw reply

* Re: RTL8188RU no injection?
From: Gábor Stefanik @ 2011-10-27 22:21 UTC (permalink / raw)
  To: Larry Finger; +Cc: Roman Proud, linux-wireless
In-Reply-To: <4EA9D8A5.9060104@lwfinger.net>

2011/10/28 Larry Finger <Larry.Finger@lwfinger.net>:
> On 10/27/2011 05:00 PM, Gábor Stefanik wrote:
>>
>> On Thu, Oct 27, 2011 at 5:05 PM, Larry Finger<Larry.Finger@lwfinger.net>
>>  wrote:
>>>
>>> On 10/27/2011 08:17 AM, Roman Proud wrote:
>>>>
>>>> Hi peops
>>>>
>>>> thx for all youre responses!
>>>>
>>>> Well i didnt really thought about g and n -.-
>>>>
>>>> Im using the latest 8192cu driver from Realtek now, it works just
>>>> fine. Also monitor mode works like a charm (yes if i use airmon-ng for
>>>> it). My Kernel is (now the default) Arch kernel, on Linux Version
>>>> 3.0.4
>>>>
>>>> My last problem is the Package injection. Im surprised you are
>>>> thinking it could work (ive found many resources that say something
>>>> different, but hey its an OpenSource driver ;)
>>>
>>> Well, I tested with Packetspammer and it worked. As in many cases, the
>>> resources that say otherwise are wrong.
>>>
>>>> Pls excuse my "stupidness" but im really not sure if i am using
>>>> "mac80211", i think so, its leaded in the System.
>>>
>>> The drivers for most devices without a hardware MAC use mac80211 and
>>> friends. In fact, it is a prerequisite for getting a driver included in
>>> the
>>> mainline drivers/net/wireless/ tree. If the driver implements its own MAC
>>> layer, then it resides in drivers/staging/. Yes, it is loaded on your
>>> system, and it handles a lot of things for the drivers that use it.
>>>
>>>> And yes its Aircrack im trying to work with, and its Aircrack which
>>>> tells me i cant use Packet Injection.
>>>> I will try Packetspammer as soon as i am at home. If this works i have
>>>> to contact Aircrack, am i right?
>>>
>>> If Aircrack adds the socket method used by Packetspammer, it will work
>>> with
>>> nearly every driver in the kernel that supports monitor mode. Whether
>>> they
>>> want to do that will be their decision, of course.
>>
>> As a former Aircrack developer, I can definitely state that Aircrack
>> uses the same injection method as packetspammer.
>>
>> However, Realtek's r8192cu driver will never support injection, and it
>> is not a mac80211 driver. Look for a driver whose module name begins
>> with "rtl" (not just "r"). AFAIK one is included in recent kernels.
>
> I accepted his word that Aircrack does not work. He is using the mac80211
> driver rtl8192cu, which was introduced in 2.6.39. The driver in
> drivers/staging/rtl8192u/ is for a different device.
>
> Larry

Didn't he say that he is using r8192cu downloaded from realtek.com.tw?

--Gábor

^ permalink raw reply

* cfg80211 events
From: Daniel Wolstenholme @ 2011-10-27 22:27 UTC (permalink / raw)
  To: linux-wireless

Hi all,

I'm working with the Broadcom brcmfmac driver, and I'm attempting to improve
event reporting, but I'm finding there's not that much documentation on
wireless events.  One big problem I'm having is that I'm using the cfg80211
interface, but when I run "iw event -t -f", I don't see the events showing
up.  Another question I have is: is there a way to send events with
arbitrary strings from the driver through to userspace?

Any pointers would be greatly appreciated.

Dan

^ permalink raw reply

* Re: RTL8188RU no injection?
From: Larry Finger @ 2011-10-27 22:40 UTC (permalink / raw)
  To: Gábor Stefanik; +Cc: Roman Proud, linux-wireless
In-Reply-To: <CA+XFjioowmub3Sg1v4FTfe8k+UwUYXC5uhumJGz+Ae1jgBGPSA@mail.gmail.com>

On 10/27/2011 05:21 PM, Gábor Stefanik wrote:
> Didn't he say that he is using r8192cu downloaded from realtek.com.tw?

Yes, I guess he did. Well, that is his fault. He was told to use compat-wireless.

Larry


^ permalink raw reply

* Re: [RFC v2 13/12] cfg80211/mac80211: allow management TX to not wait for ACK
From: Eliad Peller @ 2011-10-27 22:44 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless
In-Reply-To: <1319743973.32221.4.camel@jlt3.sipsolutions.net>

On Thu, Oct 27, 2011 at 9:32 PM, Johannes Berg
<johannes@sipsolutions.net> wrote:
> From: Johannes Berg <johannes.berg@intel.com>
>
> For probe responses it can be useful to not wait for ACK
> to save airtime, so allow userspace to request not waiting
> with a new nl80211 flag.
>
> Since mac80211 needs to be updated for the new function
> prototype anyway implement it right away -- it's just a
> few lines of code.
>
> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
> ---
[RFC v2 13/12] ? :)

>        struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
>        struct ieee80211_local *local = sdata->local;
> @@ -1944,10 +1944,15 @@ static int ieee80211_mgmt_tx(struct wiph
>        struct sta_info *sta;
>        struct ieee80211_work *wk;
>        const struct ieee80211_mgmt *mgmt = (void *)buf;
> -       u32 flags = IEEE80211_TX_INTFL_NL80211_FRAME_TX |
> -                   IEEE80211_TX_CTL_REQ_TX_STATUS;
> +       u32 flags;
>        bool is_offchan = false;
>
> +       if (!dont_wait_for_ack)
> +               flags = IEEE80211_TX_CTL_NO_ACK;
> +       else
> +               flags = IEEE80211_TX_INTFL_NL80211_FRAME_TX |
> +                       IEEE80211_TX_CTL_REQ_TX_STATUS;
> +

shouldn't it be the other way around? (i.e. set NO_ACK if dont_wait_for_ack)

Eliad.

^ permalink raw reply

* Re: cfg80211 events
From: Dan Williams @ 2011-10-27 23:09 UTC (permalink / raw)
  To: Daniel Wolstenholme; +Cc: linux-wireless
In-Reply-To: <CAB1eQC7cXz0GpGrX7d8_nL_8d8ZAgxSzXUxqDhR7PiSSJysOoQ@mail.gmail.com>

On Thu, 2011-10-27 at 15:27 -0700, Daniel Wolstenholme wrote:
> Hi all,
> 
> I'm working with the Broadcom brcmfmac driver, and I'm attempting to improve
> event reporting, but I'm finding there's not that much documentation on
> wireless events.  One big problem I'm having is that I'm using the cfg80211
> interface, but when I run "iw event -t -f", I don't see the events showing
> up.  Another question I have is: is there a way to send events with
> arbitrary strings from the driver through to userspace?

I'd be careful of that; we don't want a repeat of IWPRIV events, we'd
rather have stuff standardized.  Unless you're doing this for testing,
of course.

Dan

> Any pointers would be greatly appreciated.
> 
> Dan
> --
> 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: RTL8188RU no injection?
From: Larry Finger @ 2011-10-27 23:12 UTC (permalink / raw)
  To: Gábor Stefanik; +Cc: Roman Proud, linux-wireless
In-Reply-To: <CA+XFjipvGBsWCCWt5OvFfeCiOpsH28Txvui4A+d8sVCaACQ57Q@mail.gmail.com>

On 10/27/2011 05:00 PM, Gábor Stefanik wrote:

> As a former Aircrack developer, I can definitely state that Aircrack
> uses the same injection method as packetspammer.

I just built Aircrack and tested it with rtl8192cu on an ALFA AWUS036NHR, which 
has the RTL8188RU chip. It works just as you expected.

Larry



^ permalink raw reply

* [PATCH 3.1] iwlwifi: allow pci_enable_msi fail
From: Wey-Yi Guy @ 2011-10-28  0:19 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, Wey-Yi Guy

Continue the init process even fail to enable msi

Reported-by: werner <w.landgraf@ru.ru>
Tested-by: werner <w.landgraf@ru.ru>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
---
hese patches will be also available later from wireless branch on
 git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi.git once iwlwifi
account available

 drivers/net/wireless/iwlwifi/iwl-pci.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl-pci.c b/drivers/net/wireless/iwlwifi/iwl-pci.c
index 2fdbffa..718a722 100644
--- a/drivers/net/wireless/iwlwifi/iwl-pci.c
+++ b/drivers/net/wireless/iwlwifi/iwl-pci.c
@@ -442,10 +442,9 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 	pci_write_config_byte(pdev, PCI_CFG_RETRY_TIMEOUT, 0x00);
 
 	err = pci_enable_msi(pdev);
-	if (err) {
-		dev_printk(KERN_ERR, &pdev->dev, "pci_enable_msi failed");
-		goto out_iounmap;
-	}
+	if (err)
+		dev_printk(KERN_ERR, &pdev->dev,
+			"pci_enable_msi failed(0X%x)", err);
 
 	/* TODO: Move this away, not needed if not MSI */
 	/* enable rfkill interrupt: hw bug w/a */
-- 
1.7.0.4


^ permalink raw reply related

* [PATCH 3.1] iwlwifi: remove un-needed out_iounmap label
From: Wey-Yi Guy @ 2011-10-28  1:36 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, Wey-Yi Guy

out_iounmap is no longer used, remove it

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
---
apply this patch after "iwlwifi-allow-pci_enable_msi-fail.patch"

hese patches will be also available later from wireless branch on
 git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi.git once iwlwifi
account available

 drivers/net/wireless/iwlwifi/iwl-pci.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl-pci.c b/drivers/net/wireless/iwlwifi/iwl-pci.c
index 718a722..32d64e7 100644
--- a/drivers/net/wireless/iwlwifi/iwl-pci.c
+++ b/drivers/net/wireless/iwlwifi/iwl-pci.c
@@ -465,7 +465,6 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 
 out_disable_msi:
 	pci_disable_msi(pdev);
-out_iounmap:
 	pci_iounmap(pdev, pci_bus->hw_base);
 out_pci_release_regions:
 	pci_set_drvdata(pdev, NULL);
-- 
1.7.0.4


^ permalink raw reply related

* Re: [PATCHv2] mac80211: Allow noack flag overwrite for injected frames
From: Helmut Schaa @ 2011-10-28  3:46 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless, linville
In-Reply-To: <1319743813.32221.3.camel@jlt3.sipsolutions.net>

On Thu, Oct 27, 2011 at 9:30 PM, Johannes Berg
<johannes@sipsolutions.net> wrote:
> On Thu, 2011-09-29 at 13:42 +0200, Helmut Schaa wrote:
>> Allow injected unicast frames to be sent without having to wait
>> for an ACK.
>
> Did you ever have a hostapd patch for this?

Yes but I'm traveling right now. But is this still needed since you removed
the monitor interface requirement in hostapd? But at least a rebased
version to make use of your work makes sense ...

Helmut

^ permalink raw reply

* Re: Re: [PATCH 2/2] iw: show STA flags in station dump
From: Helmut Schaa @ 2011-10-28  3:48 UTC (permalink / raw)
  To: Johannes Berg; +Cc: Arik Nemtsov, linux-wireless
In-Reply-To: <1319744223.32221.5.camel@jlt3.sipsolutions.net>

On Thu, Oct 27, 2011 at 9:37 PM, Johannes Berg
<johannes@sipsolutions.net> wrote:
> On Tue, 2011-10-18 at 19:23 +0200, Helmut Schaa wrote:
>> Am Dienstag, 18. Oktober 2011, 18:41:11 schrieb Arik Nemtsov:
>> > On Tue, Oct 18, 2011 at 11:18, Helmut Schaa <helmut.schaa@googlemail.com> wrote:
>> > >
>> > > Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
>> > > ---
>> > >
>> > > Couldn't come up with a nice/short wording for "Managment frame
>> > > protection" and "Wireless Multimedia Extension" so I just used MFP
>> > > and WME/WMM instead.
>> > >
>> >
>> > Printing the NL80211_STA_FLAG_TDLS_PEER flag would be nice as well.
>>
>> Agreed, I somehow missed the (new) TDLS flag, also in the according
>> nl80211/mac80211 patches :(
>
> I'll apply this to iw fixed up but please send patches to the kernel.

Agreed, thanks.

And since we've got the flag mask iw will also work with a kernel that
doesn't provide the TDLS flags ;)

Helmut

^ permalink raw reply

* [PATCH] rndis_wlan: release BSS structures returned by cfg80211_inform_bss()
From: Jussi Kivilinna @ 2011-10-28  5:05 UTC (permalink / raw)
  To: linux-wireless; +Cc: Johannes Berg, John W. Linville
In-Reply-To: <1319719502.3944.5.camel@jlt3.sipsolutions.net>

Patch fixes rndis_wlan to release referenced BSS structure returned by
cfg80211_inform_bss().

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
---
 drivers/net/wireless/rndis_wlan.c |   14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/drivers/net/wireless/rndis_wlan.c b/drivers/net/wireless/rndis_wlan.c
index 15464d5..9cc4b8c 100644
--- a/drivers/net/wireless/rndis_wlan.c
+++ b/drivers/net/wireless/rndis_wlan.c
@@ -1972,11 +1972,12 @@ static int rndis_scan(struct wiphy *wiphy, struct net_device *dev,
 	return ret;
 }
 
-static struct cfg80211_bss *rndis_bss_info_update(struct usbnet *usbdev,
-					struct ndis_80211_bssid_ex *bssid)
+static bool rndis_bss_info_update(struct usbnet *usbdev,
+				  struct ndis_80211_bssid_ex *bssid)
 {
 	struct rndis_wlan_private *priv = get_rndis_wlan_priv(usbdev);
 	struct ieee80211_channel *channel;
+	struct cfg80211_bss *bss;
 	s32 signal;
 	u64 timestamp;
 	u16 capability;
@@ -2015,9 +2016,12 @@ static struct cfg80211_bss *rndis_bss_info_update(struct usbnet *usbdev,
 	capability = le16_to_cpu(fixed->capabilities);
 	beacon_interval = le16_to_cpu(fixed->beacon_interval);
 
-	return cfg80211_inform_bss(priv->wdev.wiphy, channel, bssid->mac,
+	bss = cfg80211_inform_bss(priv->wdev.wiphy, channel, bssid->mac,
 		timestamp, capability, beacon_interval, ie, ie_len, signal,
 		GFP_KERNEL);
+	cfg80211_put_bss(bss);
+
+	return (bss != NULL);
 }
 
 static struct ndis_80211_bssid_ex *next_bssid_list_item(
@@ -2641,6 +2645,7 @@ static void rndis_wlan_craft_connected_bss(struct usbnet *usbdev, u8 *bssid,
 	struct ieee80211_channel *channel;
 	struct ndis_80211_conf config;
 	struct ndis_80211_ssid ssid;
+	struct cfg80211_bss *bss;
 	s32 signal;
 	u64 timestamp;
 	u16 capability;
@@ -2714,9 +2719,10 @@ static void rndis_wlan_craft_connected_bss(struct usbnet *usbdev, u8 *bssid,
 		bssid, (u32)timestamp, capability, beacon_interval, ie_len,
 		ssid.essid, signal);
 
-	cfg80211_inform_bss(priv->wdev.wiphy, channel, bssid,
+	bss = cfg80211_inform_bss(priv->wdev.wiphy, channel, bssid,
 		timestamp, capability, beacon_interval, ie_buf, ie_len,
 		signal, GFP_KERNEL);
+	cfg80211_put_bss(bss);
 }
 
 /*


^ permalink raw reply related

* [wireless-next PATCH 1/5] mac80211: Support forcing station to disable 11n.
From: greearb @ 2011-10-28  5:11 UTC (permalink / raw)
  To: linux-wireless; +Cc: Ben Greear

From: Ben Greear <greearb@candelatech.com>

This allows a user to configure a wifi station interface
to disable 802.11n, even if the AP and NIC supports it.

The additional netlink bits is to allow this patch to work on 3.0
and should not be included in the final patch.

Signed-off-by: Ben Greear <greearb@candelatech.com>
---
:100644 100644 8049bf7... d9c2cdb... M	include/linux/nl80211.h
:100644 100644 92cf1c2... 1331a5b... M	include/net/cfg80211.h
:100644 100644 e253afa... 8221a3a... M	net/mac80211/cfg.c
:100644 100644 4c3d1f5... 72c6726... M	net/mac80211/ieee80211_i.h
:100644 100644 0e5d8da... 393b480... M	net/mac80211/mlme.c
:100644 100644 48260c2... cb2eb67... M	net/wireless/nl80211.c
 include/linux/nl80211.h    |    4 ++++
 include/net/cfg80211.h     |    4 +++-
 net/mac80211/cfg.c         |    3 +++
 net/mac80211/ieee80211_i.h |    2 ++
 net/mac80211/mlme.c        |    3 +++
 net/wireless/nl80211.c     |    7 +++++++
 6 files changed, 22 insertions(+), 1 deletions(-)

diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h
index 8049bf7..d9c2cdb 100644
--- a/include/linux/nl80211.h
+++ b/include/linux/nl80211.h
@@ -1109,6 +1109,9 @@ enum nl80211_commands {
  *	%NL80211_CMD_TDLS_MGMT. Otherwise %NL80211_CMD_TDLS_OPER should be
  *	used for asking the driver to perform a TDLS operation.
  *
+ * @NL80211_ATTR_DISABLE_80211N:  Force /n capable stations to instead
+ *      function as /a/b/g stations.
+ *
  * @NL80211_ATTR_MAX: highest attribute number currently defined
  * @__NL80211_ATTR_AFTER_LAST: internal use
  */
@@ -1337,6 +1340,7 @@ enum nl80211_attrs {
 	NL80211_ATTR_TDLS_SUPPORT,
 	NL80211_ATTR_TDLS_EXTERNAL_SETUP,
 
+	NL80211_ATTR_DISABLE_11N,
 	/* add attributes here, update the policy in nl80211.c */
 
 	__NL80211_ATTR_AFTER_LAST,
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 92cf1c2..1331a5b 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -254,9 +254,11 @@ struct ieee80211_supported_band {
 /**
  * struct vif_params - describes virtual interface parameters
  * @use_4addr: use 4-address frames
+ * @disable_11n:  Don't use 11n features (HT, etc)
  */
 struct vif_params {
-       int use_4addr;
+	int use_4addr;
+	int disable_11n;
 };
 
 /**
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index e253afa..8221a3a 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -57,6 +57,9 @@ static int ieee80211_change_iface(struct wiphy *wiphy,
 	struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
 	int ret;
 
+	if (params->disable_11n != -1)
+		sdata->cfg_disable_11n = params->disable_11n;
+
 	ret = ieee80211_if_change_type(sdata, type);
 	if (ret)
 		return ret;
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index 4c3d1f5..72c6726 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -595,6 +595,8 @@ struct ieee80211_sub_if_data {
 	/* to detect idle changes */
 	bool old_idle;
 
+	bool cfg_disable_11n; /* configured to disable 11n? */
+
 	/* Fragment table for host-based reassembly */
 	struct ieee80211_fragment_entry	fragments[IEEE80211_FRAGMENT_MAX];
 	unsigned int fragment_next;
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 0e5d8da..393b480 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -2597,6 +2597,9 @@ int ieee80211_mgd_assoc(struct ieee80211_sub_if_data *sdata,
 			ifmgd->flags |= IEEE80211_STA_DISABLE_11N;
 
 
+	if (sdata->cfg_disable_11n)
+		ifmgd->flags |= IEEE80211_STA_DISABLE_11N;
+
 	if (req->ie && req->ie_len) {
 		memcpy(wk->ie, req->ie, req->ie_len);
 		wk->ie_len = req->ie_len;
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 48260c2..cb2eb67 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -1641,6 +1641,13 @@ static int nl80211_set_interface(struct sk_buff *skb, struct genl_info *info)
 		change = true;
 	}
 
+	if (info->attrs[NL80211_ATTR_DISABLE_11N]) {
+		params.disable_11n = !!nla_get_u8(info->attrs[NL80211_ATTR_DISABLE_11N]);
+		change = true;
+	} else {
+		params.disable_11n = -1;
+	}
+
 	if (change)
 		err = cfg80211_change_iface(rdev, dev, ntype, flags, &params);
 	else
-- 
1.7.3.4


^ permalink raw reply related

* [wireless-next PATCH 2/5] wifi: Support disabling ht40.
From: greearb @ 2011-10-28  5:11 UTC (permalink / raw)
  To: linux-wireless; +Cc: Ben Greear
In-Reply-To: <1319778680-11405-1-git-send-email-greearb@candelatech.com>

From: Ben Greear <greearb@candelatech.com>

Allows users to forceably disable HT40 support in station
interfaces.

Signed-off-by: Ben Greear <greearb@candelatech.com>
---
:100644 100644 d9c2cdb... ae50ade... M	include/linux/nl80211.h
:100644 100644 1331a5b... 9d7a5e0... M	include/net/cfg80211.h
:100644 100644 8221a3a... c63d7f0... M	net/mac80211/cfg.c
:100644 100644 72c6726... f4a7618... M	net/mac80211/ieee80211_i.h
:100644 100644 393b480... 164cdb1... M	net/mac80211/mlme.c
:100644 100644 cb2eb67... 5696621... M	net/wireless/nl80211.c
 include/linux/nl80211.h    |    4 ++++
 include/net/cfg80211.h     |    2 ++
 net/mac80211/cfg.c         |    3 +++
 net/mac80211/ieee80211_i.h |    1 +
 net/mac80211/mlme.c        |    1 +
 net/wireless/nl80211.c     |    7 +++++++
 6 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h
index d9c2cdb..ae50ade 100644
--- a/include/linux/nl80211.h
+++ b/include/linux/nl80211.h
@@ -1111,6 +1111,8 @@ enum nl80211_commands {
  *
  * @NL80211_ATTR_DISABLE_80211N:  Force /n capable stations to instead
  *      function as /a/b/g stations.
+ * @NL80211_ATTR_DISABLE_HT40:  Disable HT-40 even if AP and hardware
+ *      support it.
  *
  * @NL80211_ATTR_MAX: highest attribute number currently defined
  * @__NL80211_ATTR_AFTER_LAST: internal use
@@ -1341,6 +1343,8 @@ enum nl80211_attrs {
 	NL80211_ATTR_TDLS_EXTERNAL_SETUP,
 
 	NL80211_ATTR_DISABLE_11N,
+	NL80211_ATTR_DISABLE_HT40,
+
 	/* add attributes here, update the policy in nl80211.c */
 
 	__NL80211_ATTR_AFTER_LAST,
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 1331a5b..9d7a5e0 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -255,10 +255,12 @@ struct ieee80211_supported_band {
  * struct vif_params - describes virtual interface parameters
  * @use_4addr: use 4-address frames
  * @disable_11n:  Don't use 11n features (HT, etc)
+ * @disable_ht40:  Don't use HT40, even if hardware & AP support it.
  */
 struct vif_params {
 	int use_4addr;
 	int disable_11n;
+	int disable_ht40;
 };
 
 /**
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 8221a3a..c63d7f0 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -60,6 +60,9 @@ static int ieee80211_change_iface(struct wiphy *wiphy,
 	if (params->disable_11n != -1)
 		sdata->cfg_disable_11n = params->disable_11n;
 
+	if (params->disable_ht40 != -1)
+		sdata->cfg_disable_ht40 = params->disable_ht40;
+
 	ret = ieee80211_if_change_type(sdata, type);
 	if (ret)
 		return ret;
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index 72c6726..f4a7618 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -596,6 +596,7 @@ struct ieee80211_sub_if_data {
 	bool old_idle;
 
 	bool cfg_disable_11n; /* configured to disable 11n? */
+	bool cfg_disable_ht40; /* configured to not use HT-40 */
 
 	/* Fragment table for host-based reassembly */
 	struct ieee80211_fragment_entry	fragments[IEEE80211_FRAGMENT_MAX];
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 393b480..164cdb1 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -207,6 +207,7 @@ static u32 ieee80211_enable_ht(struct ieee80211_sub_if_data *sdata,
 		channel_type = NL80211_CHAN_HT20;
 
 		if (!(ap_ht_cap_flags & IEEE80211_HT_CAP_40MHZ_INTOLERANT) &&
+		    !sdata->cfg_disable_ht40 &&
 		    (sband->ht_cap.cap & IEEE80211_HT_CAP_SUP_WIDTH_20_40) &&
 		    (hti->ht_param & IEEE80211_HT_PARAM_CHAN_WIDTH_ANY)) {
 			switch(hti->ht_param & IEEE80211_HT_PARAM_CHA_SEC_OFFSET) {
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index cb2eb67..5696621 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -1648,6 +1648,13 @@ static int nl80211_set_interface(struct sk_buff *skb, struct genl_info *info)
 		params.disable_11n = -1;
 	}
 
+	if (info->attrs[NL80211_ATTR_DISABLE_HT40]) {
+		params.disable_ht40 = !!nla_get_u8(info->attrs[NL80211_ATTR_DISABLE_HT40]);
+		change = true;
+	} else {
+		params.disable_ht40 = -1;
+	}
+
 	if (change)
 		err = cfg80211_change_iface(rdev, dev, ntype, flags, &params);
 	else
-- 
1.7.3.4


^ permalink raw reply related


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