* Re: [PATCH 3/3] rt2x00: rt2800lib: turn on tertiary PAs/LNAs for 3T/3R devices
From: Helmut Schaa @ 2013-06-24 13:02 UTC (permalink / raw)
To: Gabor Juhos; +Cc: John Linville, linux-wireless, rt2x00 Users List
In-Reply-To: <1371915734-13966-4-git-send-email-juhosg@openwrt.org>
On Sat, Jun 22, 2013 at 5:42 PM, Gabor Juhos <juhosg@openwrt.org> wrote:
> Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Looks also good to me.
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
> ---
> drivers/net/wireless/rt2x00/rt2800lib.c | 14 ++++++++++++++
> 1 file changed, 14 insertions(+)
>
> diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c
> index f4cd3d8..664e9e1 100644
> --- a/drivers/net/wireless/rt2x00/rt2800lib.c
> +++ b/drivers/net/wireless/rt2x00/rt2800lib.c
> @@ -2684,12 +2684,26 @@ static void rt2800_config_channel(struct rt2x00_dev *rt2x00dev,
> rf->channel > 14);
> rt2x00_set_field32(&tx_pin, TX_PIN_CFG_PA_PE_G1_EN,
> rf->channel <= 14);
> +
> + if (rt2x00dev->default_ant.tx_chain_num > 2) {
> + /* Turn on tertiary PAs for 3T devices */
> + rt2x00_set_field32(&tx_pin, TX_PIN_CFG_PA_PE_A2_EN,
> + rf->channel > 14);
> + rt2x00_set_field32(&tx_pin, TX_PIN_CFG_PA_PE_G2_EN,
> + rf->channel <= 14);
> + }
> }
>
> if (rt2x00dev->default_ant.rx_chain_num > 1) {
> /* Turn on secondary LNAs for 2R and for 3R devices */
> rt2x00_set_field32(&tx_pin, TX_PIN_CFG_LNA_PE_A1_EN, 1);
> rt2x00_set_field32(&tx_pin, TX_PIN_CFG_LNA_PE_G1_EN, 1);
> +
> + if (rt2x00dev->default_ant.rx_chain_num > 2) {
> + /* Turn on tertiary LNAs for 3R devices */
> + rt2x00_set_field32(&tx_pin, TX_PIN_CFG_LNA_PE_A2_EN, 1);
> + rt2x00_set_field32(&tx_pin, TX_PIN_CFG_LNA_PE_G2_EN, 1);
> + }
> }
>
> rt2x00_set_field32(&tx_pin, TX_PIN_CFG_LNA_PE_A0_EN, 1);
> --
> 1.7.10
>
> --
> 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
* [PATCH 3.9 1/4] iwlwifi: mvm: adjust firmware D3 configuration API
From: Emmanuel Grumbach @ 2013-06-24 13:19 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: stable, linux-wireless, Johannes Berg
From: Johannes Berg <johannes.berg@intel.com>
commit dfcb4c3aacedee6838e436fb575b31e138505203 upstream.
The D3 firmware API changed to include a new field, adjust
the driver to it to avoid getting an NMI when configuring.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
drivers/net/wireless/iwlwifi/mvm/fw-api-d3.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/iwlwifi/mvm/fw-api-d3.h b/drivers/net/wireless/iwlwifi/mvm/fw-api-d3.h
index cf6f9a0..937665f 100644
--- a/drivers/net/wireless/iwlwifi/mvm/fw-api-d3.h
+++ b/drivers/net/wireless/iwlwifi/mvm/fw-api-d3.h
@@ -75,13 +75,15 @@ enum iwl_d3_wakeup_flags {
* struct iwl_d3_manager_config - D3 manager configuration command
* @min_sleep_time: minimum sleep time (in usec)
* @wakeup_flags: wakeup flags, see &enum iwl_d3_wakeup_flags
+ * @wakeup_host_timer: force wakeup after this many seconds
*
* The structure is used for the D3_CONFIG_CMD command.
*/
struct iwl_d3_manager_config {
__le32 min_sleep_time;
__le32 wakeup_flags;
-} __packed; /* D3_MANAGER_CONFIG_CMD_S_VER_3 */
+ __le32 wakeup_host_timer;
+} __packed; /* D3_MANAGER_CONFIG_CMD_S_VER_4 */
/* TODO: OFFLOADS_QUERY_API_S_VER_1 */
--
1.7.10.4
^ permalink raw reply related
* [PATCH 3.9 2/4] iwlwifi: mvm: don't use cts to self
From: Emmanuel Grumbach @ 2013-06-24 13:19 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: stable, linux-wireless, Dor Shaish, Johannes Berg
In-Reply-To: <1372079945-7445-1-git-send-email-emmanuel.grumbach@intel.com>
From: Dor Shaish <dor.shaish@intel.com>
commit cc7ee2bab3d90b0a09651dcfa2d0c9ec1a115bc8 upstream.
The current fw doesn't currently support cts to self. There
is a bug in the fw that prevents us from using cts to self.
Use full protection (including RTS) for now.
Signed-off-by: Dor Shaish <dor.shaish@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c b/drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c
index bf76b17..864cd6d 100644
--- a/drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c
+++ b/drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c
@@ -553,9 +553,9 @@ static void iwl_mvm_mac_ctxt_cmd_common(struct iwl_mvm *mvm,
if (vif->bss_conf.qos)
cmd->qos_flags |= cpu_to_le32(MAC_QOS_FLG_UPDATE_EDCA);
+ /* Don't use cts to self as the fw doesn't support it currently. */
if (vif->bss_conf.use_cts_prot)
- cmd->protection_flags |= cpu_to_le32(MAC_PROT_FLG_TGG_PROTECT |
- MAC_PROT_FLG_SELF_CTS_EN);
+ cmd->protection_flags |= cpu_to_le32(MAC_PROT_FLG_TGG_PROTECT);
/*
* I think that we should enable these 2 flags regardless the HT PROT
--
1.7.10.4
^ permalink raw reply related
* [PATCH 3.9 3/4] iwlwifi: bump required firmware API version
From: Emmanuel Grumbach @ 2013-06-24 13:19 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: stable, linux-wireless, Johannes Berg
In-Reply-To: <1372079945-7445-1-git-send-email-emmanuel.grumbach@intel.com>
From: Johannes Berg <johannes.berg@intel.com>
commit a2d0909a687b4d250cc2b7481072e361678745ba upstream.
As the firmware API has changed significantly and we don't
have support code for the old APIs, bump the version to be
able to release the version 7 API firmware. Unfortunately
this means that the driver in 3.9 and 3.10 can't work, but
that's still better than crashing the device/driver there.
3.9 note: this allows support for the new devices in 3.9.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
drivers/net/wireless/iwlwifi/pcie/7000.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/net/wireless/iwlwifi/pcie/7000.c b/drivers/net/wireless/iwlwifi/pcie/7000.c
index 6e35b2b..25c33b0 100644
--- a/drivers/net/wireless/iwlwifi/pcie/7000.c
+++ b/drivers/net/wireless/iwlwifi/pcie/7000.c
@@ -31,16 +31,16 @@
#include "cfg.h"
/* Highest firmware API version supported */
-#define IWL7260_UCODE_API_MAX 6
-#define IWL3160_UCODE_API_MAX 6
+#define IWL7260_UCODE_API_MAX 7
+#define IWL3160_UCODE_API_MAX 7
/* Oldest version we won't warn about */
-#define IWL7260_UCODE_API_OK 6
-#define IWL3160_UCODE_API_OK 6
+#define IWL7260_UCODE_API_OK 7
+#define IWL3160_UCODE_API_OK 7
/* Lowest firmware API version supported */
-#define IWL7260_UCODE_API_MIN 6
-#define IWL3160_UCODE_API_MIN 6
+#define IWL7260_UCODE_API_MIN 7
+#define IWL3160_UCODE_API_MIN 7
/* NVM versions */
#define IWL7260_NVM_VERSION 0x0a1d
--
1.7.10.4
^ permalink raw reply related
* [PATCH 3.9 4/4] iwlwifi: mvm: reduce the number of supported interfaces
From: Emmanuel Grumbach @ 2013-06-24 13:19 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: stable, linux-wireless, Emmanuel Grumbach
In-Reply-To: <1372079945-7445-1-git-send-email-emmanuel.grumbach@intel.com>
The driver in 3.9 can't support more than one interface
concurrently. The parameters given to cfg80211 were wrong.
Next versions are fixed by allowing concurrent interfaces.
This is why you won't see this patch upstream.
This patches fixes:
[ 76.711244] WARNING: at net/wireless/core.c:481 wiphy_register+0x646/0x710 [cfg80211]()
[ 76.711246] Hardware name: Latitude E6410
[ 76.711247] Modules linked in: iwlmvm(+) mac80211 iwlwifi cfg80211 i915 snd_hda_codec_hdmi binfmt_misc snd_hda_codec_idt snd_hda_intel snd_hda_codec snd_hwdep coretemp snd_pcm kvm_intel kvm snd_seq_midi drm_kms_helper joydev snd_rawmidi drm snd_seq_midi_event snd_seq ghash_clmulni_intel snd_timer aesni_intel snd_seq_device ablk_helper snd cryptd lrw aes_x86_64 xts psmouse gf128mul dell_laptop microcode dcdbas dell_wmi soundcore sparse_keymap serio_raw snd_page_alloc i2c_algo_bit lpc_ich video wmi firewire_ohci firewire_core sdhci_pci crc_itu_t sdhci e1000e ptp pps_core
[ 76.711303] Pid: 2533, comm: modprobe Not tainted 3.9.7+ #2
[ 76.711304] Call Trace:
[ 76.711310] [<ffffffff81060faf>] warn_slowpath_common+0x7f/0xc0
[ 76.711313] [<ffffffff8106100a>] warn_slowpath_null+0x1a/0x20
[ 76.711321] [<ffffffffa0460726>] wiphy_register+0x646/0x710 [cfg80211]
[ 76.711327] [<ffffffff811b9fb0>] ? __kmalloc+0x140/0x2c0
[ 76.711344] [<ffffffffa04f3505>] ? ieee80211_register_hw+0x1a5/0x840 [mac80211]
[ 76.711351] [<ffffffffa04f36eb>] ieee80211_register_hw+0x38b/0x840 [mac80211]
[ 76.711359] [<ffffffffa0402a55>] iwl_mvm_mac_setup_register+0x235/0x260 [iwlmvm]
[ 76.711365] [<ffffffffa0403bbc>] iwl_op_mode_mvm_start+0x3dc/0x4d0 [iwlmvm]
[ 76.711373] [<ffffffffa03ce11c>] iwl_opmode_register+0xcc/0xf0 [iwlwifi]
[ 76.711378] [<ffffffffa02cb000>] ? 0xffffffffa02cafff
[ 76.711383] [<ffffffffa02cb036>] iwl_mvm_init+0x36/0x1000 [iwlmvm]
[ 76.711388] [<ffffffff8100215a>] do_one_initcall+0x12a/0x180
[ 76.711393] [<ffffffff810e4c3b>] load_module+0x127b/0x1c50
[ 76.711397] [<ffffffff8139d110>] ? ddebug_proc_open+0xd0/0xd0
[ 76.711404] [<ffffffff81388e7e>] ? trace_hardirqs_on_thunk+0x3a/0x3f
[ 76.711407] [<ffffffff810e56e7>] sys_init_module+0xd7/0x120
[ 76.711413] [<ffffffff81759d19>] system_call_fastpath+0x16/0x1b
[ 76.711415] ---[ end trace e19789dfc0454b26 ]---
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
---
drivers/net/wireless/iwlwifi/mvm/mac80211.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/iwlwifi/mvm/mac80211.c
index 8572358..b048fd3 100644
--- a/drivers/net/wireless/iwlwifi/mvm/mac80211.c
+++ b/drivers/net/wireless/iwlwifi/mvm/mac80211.c
@@ -78,7 +78,7 @@
static const struct ieee80211_iface_limit iwl_mvm_limits[] = {
{
- .max = 1,
+ .max = 2,
.types = BIT(NL80211_IFTYPE_STATION) |
BIT(NL80211_IFTYPE_AP),
},
@@ -87,7 +87,7 @@ static const struct ieee80211_iface_limit iwl_mvm_limits[] = {
static const struct ieee80211_iface_combination iwl_mvm_iface_combinations[] = {
{
.num_different_channels = 1,
- .max_interfaces = 3,
+ .max_interfaces = 2,
.limits = iwl_mvm_limits,
.n_limits = ARRAY_SIZE(iwl_mvm_limits),
},
--
1.7.10.4
^ permalink raw reply related
* Re: [PATCH] iwlwifi: add firmware for 7260 / 3160 devices
From: Bjørn Mork @ 2013-06-24 13:20 UTC (permalink / raw)
To: Emmanuel Grumbach; +Cc: Ben Hutchings, linux-wireless, Johannes Berg
In-Reply-To: <1372075552-3253-1-git-send-email-emmanuel.grumbach@intel.com>
Emmanuel Grumbach <emmanuel.grumbach@intel.com> writes:
> Add new firmware for new devices: 7260 and 3160
> version:
> 22.0.7.0
Thanks. That was quick. Looking good so far:
nemi:/home/bjorn# dmesg|grep iwl
[ 4.687283] iwlwifi 0000:03:00.0: irq 45 for MSI/MSI-X
[ 5.195061] iwlwifi 0000:03:00.0: loaded firmware version 22.0.7.0 op_mode iwlmvm
[ 5.244709] iwlwifi 0000:03:00.0: Detected Intel(R) Dual Band Wireless AC 7260, REV=0x144
[ 5.244885] iwlwifi 0000:03:00.0: L1 Disabled; Enabling L0S
[ 5.245260] iwlwifi 0000:03:00.0: RF_KILL bit toggled to enable radio.
[ 5.245452] iwlwifi 0000:03:00.0: L1 Disabled; Enabling L0S
[ 5.488421] ieee80211 phy0: Selected rate control algorithm 'iwl-mvm-rs'
Bjørn
^ permalink raw reply
* Re: BCM4331 deauthenticates every five minutes
From: Chris Adams @ 2013-06-24 13:22 UTC (permalink / raw)
To: Rafał Miłecki, Larry Finger, b43-dev, linux-wireless
In-Reply-To: <20130620002838.GA8252@cmadams.net>
Once upon a time, Chris Adams <cma@cmadams.net> said:
> Once upon a time, Chris Adams <cma@cmadams.net> said:
> > The AP appears to be an Adtran (don't know the model).
>
> The issue appears to be specific to the Adtran AP combined with the b43
> device. I have a D-Link DIR-625 at home (running OpenWRT 12.09, using
> ath9k wireless driver), and the MacBook seems to stay connected to it
> okay.
I haven't had a chance to do more debugging, but I did find one more bit
of possibly-useful information: the "deauthenticating" bit only seems to
happen when there is no traffic. I used the wireless in a meeting for a
couple of hours, and it didn't deauthenticate once. I got back to my
desk, plugged into the wired network, and the wireless started
deauthenticating again every five minutes.
--
Chris Adams <cma@cmadams.net>
^ permalink raw reply
* RE: [PATCH] iwlwifi: add firmware for 7260 / 3160 devices
From: Grumbach, Emmanuel @ 2013-06-24 13:32 UTC (permalink / raw)
To: Bj?rn Mork; +Cc: Ben Hutchings, linux-wireless@vger.kernel.org, Berg, Johannes
In-Reply-To: <874ncny79n.fsf@nemi.mork.no>
PiANCj4gDQo+IFRoYW5rcy4gVGhhdCB3YXMgcXVpY2suIExvb2tpbmcgZ29vZCBzbyBmYXI6DQo+
IA0KPiBuZW1pOi9ob21lL2Jqb3JuIyBkbWVzZ3xncmVwIGl3bA0KPiBbICAgIDQuNjg3MjgzXSBp
d2x3aWZpIDAwMDA6MDM6MDAuMDogaXJxIDQ1IGZvciBNU0kvTVNJLVgNCj4gWyAgICA1LjE5NTA2
MV0gaXdsd2lmaSAwMDAwOjAzOjAwLjA6IGxvYWRlZCBmaXJtd2FyZSB2ZXJzaW9uIDIyLjAuNy4w
IG9wX21vZGUNCj4gaXdsbXZtDQo+IFsgICAgNS4yNDQ3MDldIGl3bHdpZmkgMDAwMDowMzowMC4w
OiBEZXRlY3RlZCBJbnRlbChSKSBEdWFsIEJhbmQgV2lyZWxlc3MgQUMNCj4gNzI2MCwgUkVWPTB4
MTQ0DQo+IFsgICAgNS4yNDQ4ODVdIGl3bHdpZmkgMDAwMDowMzowMC4wOiBMMSBEaXNhYmxlZDsg
RW5hYmxpbmcgTDBTDQo+IFsgICAgNS4yNDUyNjBdIGl3bHdpZmkgMDAwMDowMzowMC4wOiBSRl9L
SUxMIGJpdCB0b2dnbGVkIHRvIGVuYWJsZSByYWRpby4NCj4gWyAgICA1LjI0NTQ1Ml0gaXdsd2lm
aSAwMDAwOjAzOjAwLjA6IEwxIERpc2FibGVkOyBFbmFibGluZyBMMFMNCj4gWyAgICA1LjQ4ODQy
MV0gaWVlZTgwMjExIHBoeTA6IFNlbGVjdGVkIHJhdGUgY29udHJvbCBhbGdvcml0aG0gJ2l3bC1t
dm0tcnMnDQo+IA0KDQpXYWl0aW5nIGZvciB5b3VyIGZlZWRiYWNrIDotKQ0K
^ permalink raw reply
* Re: [PATCH] nl80211: fix mgmt tx status and testmode reporting for netns
From: Johannes Berg @ 2013-06-24 13:41 UTC (permalink / raw)
To: Michal Kazior; +Cc: linux-wireless
In-Reply-To: <1372074644-15280-1-git-send-email-michal.kazior@tieto.com>
On Mon, 2013-06-24 at 13:50 +0200, Michal Kazior wrote:
> These two events were sent to the default network
> namespace.
>
> This caused AP mode in a non-default netns to not
> work correctly. Mgmt tx status was multicasted to
> a different (default) netns instead of the one the
> AP was in.
Good catch.
> @@ -6593,7 +6593,10 @@ void cfg80211_testmode_event(struct sk_buff *skb, gfp_t gfp)
>
> nla_nest_end(skb, data);
> genlmsg_end(skb, hdr);
> - genlmsg_multicast(skb, 0, nl80211_testmode_mcgrp.id, gfp);
> +
> + rcu_read_lock();
> + genlmsg_multicast_allns(skb, 0, nl80211_testmode_mcgrp.id, GFP_ATOMIC);
> + rcu_read_unlock();
> }
> EXPORT_SYMBOL(cfg80211_testmode_event);
I think this one should get a wiphy parameter though, to put it into the
right netns.
johannes
^ permalink raw reply
* [PATCH] regulatory: add missing rtnl locking
From: Johannes Berg @ 2013-06-24 13:46 UTC (permalink / raw)
To: linux-wireless; +Cc: Johannes Berg
From: Johannes Berg <johannes.berg@intel.com>
restore_regulatory_settings() requires the RTNL to be held,
add the missing locking in reg_timeout_work().
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
net/wireless/reg.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index 5a24c98..5a950f3 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -2279,7 +2279,9 @@ void wiphy_regulatory_deregister(struct wiphy *wiphy)
static void reg_timeout_work(struct work_struct *work)
{
REG_DBG_PRINT("Timeout while waiting for CRDA to reply, restoring regulatory settings\n");
+ rtnl_lock();
restore_regulatory_settings(true);
+ rtnl_unlock();
}
int __init regulatory_init(void)
--
1.8.0
^ permalink raw reply related
* Re: [PATCH v10 1/2] cfg80211: add flags to cfg80211_rx_mgmt
From: Arend van Spriel @ 2013-06-24 13:46 UTC (permalink / raw)
To: Vladimir Kondratiev
Cc: Johannes Berg, linux-wireless, Luis R . Rodriguez,
John W . Linville, Jouni Malinen
In-Reply-To: <1372063757-24286-2-git-send-email-qca_vkondrat@qca.qualcomm.com>
On 06/24/2013 10:49 AM, Vladimir Kondratiev wrote:
> diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
> index 6a43c34..29e733c 100644
> --- a/include/net/cfg80211.h
> +++ b/include/net/cfg80211.h
> @@ -3856,6 +3856,8 @@ void cfg80211_conn_failed(struct net_device *dev, const u8 *mac_addr,
> * @sig_dbm: signal strength in mBm, or 0 if unknown
> * @buf: Management frame (header + body)
> * @len: length of the frame data
> + * @flags: various flags, see NL80211_RXMGMT_FLAG_xxx defined in
> + * enum nl80211_rxmgmt_flags
It seems sufficient to say:
@flags: flags as defined in enum nl80211_rxmgmt_flags
Regards,
Arend
> * @gfp: context flags
^ permalink raw reply
* Re: [PATCH] nl80211: use small state buffer for wiphy_dump
From: Johannes Berg @ 2013-06-24 13:47 UTC (permalink / raw)
To: linux-wireless
In-Reply-To: <1371632422-21760-1-git-send-email-johannes@sipsolutions.net>
On Wed, 2013-06-19 at 11:00 +0200, Johannes Berg wrote:
> From: Johannes Berg <johannes.berg@intel.com>
>
> Avoid parsing the original dump message again and again by
> allocating a small state struct that is used by the functions
> involved in the dump, storing this struct in cb->args[0].
> This reduces the memory allocation size as well.
Applied.
johannes
^ permalink raw reply
* Re: [PATCH 1/2] cfg80211: require passing BSS struct back to cfg80211_assoc_timeout
From: Johannes Berg @ 2013-06-24 13:48 UTC (permalink / raw)
To: linux-wireless
In-Reply-To: <1371650017-14293-1-git-send-email-johannes@sipsolutions.net>
On Wed, 2013-06-19 at 15:53 +0200, Johannes Berg wrote:
> From: Johannes Berg <johannes.berg@intel.com>
>
> Doing so will allow us to hold the BSS (not just ref it) over the
> association process, thus ensuring that it doesn't time out and
> gets invisible to the user (e.g. in 'iw wlan0 link'.)
>
> This also fixes a leak in mac80211 where it doesn't always release
> the BSS struct properly in all cases where calling this function.
> This leak was reported by Ben Greear.
Applied both.
johannes
^ permalink raw reply
* [PATCH] mac80211: add rate control table update driver method
From: Johannes Berg @ 2013-06-24 13:48 UTC (permalink / raw)
To: linux-wireless; +Cc: Johannes Berg
From: Johannes Berg <johannes.berg@intel.com>
Add an update method that to the driver for those drivers
that want to use the rate table directly, rather than doing
per packet lookups in it.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
include/net/mac80211.h | 6 ++++++
net/mac80211/driver-ops.h | 14 ++++++++++++++
net/mac80211/rate.c | 3 +++
net/mac80211/trace.h | 35 ++++++++++++++++-------------------
4 files changed, 39 insertions(+), 19 deletions(-)
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 5b7a3da..168e50e 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -2431,6 +2431,9 @@ enum ieee80211_roc_type {
* uses hardware rate control (%IEEE80211_HW_HAS_RATE_CONTROL) since
* otherwise the rate control algorithm is notified directly.
* Must be atomic.
+ * @sta_rate_tbl_update: Notifies the driver that the rate table changed. This
+ * is only used if the configured rate control algorithm actually uses
+ * the new rate table API, and is therefore optional. Must be atomic.
*
* @conf_tx: Configure TX queue parameters (EDCF (aifs, cw_min, cw_max),
* bursting) for a hardware TX queue.
@@ -2728,6 +2731,9 @@ struct ieee80211_ops {
struct ieee80211_vif *vif,
struct ieee80211_sta *sta,
u32 changed);
+ void (*sta_rate_tbl_update)(struct ieee80211_hw *hw,
+ struct ieee80211_vif *vif,
+ struct ieee80211_sta *sta);
int (*conf_tx)(struct ieee80211_hw *hw,
struct ieee80211_vif *vif, u16 ac,
const struct ieee80211_tx_queue_params *params);
diff --git a/net/mac80211/driver-ops.h b/net/mac80211/driver-ops.h
index b931c96..6f395d1 100644
--- a/net/mac80211/driver-ops.h
+++ b/net/mac80211/driver-ops.h
@@ -600,6 +600,20 @@ static inline void drv_sta_rc_update(struct ieee80211_local *local,
trace_drv_return_void(local);
}
+static inline void drv_sta_rate_tbl_update(struct ieee80211_local *local,
+ struct ieee80211_sub_if_data *sdata,
+ struct ieee80211_sta *sta)
+{
+ sdata = get_bss_sdata(sdata);
+ check_sdata_in_driver(sdata);
+
+ trace_drv_sta_rate_tbl_update(local, sdata, sta);
+ if (local->ops->sta_rate_tbl_update)
+ local->ops->sta_rate_tbl_update(&local->hw, &sdata->vif, sta);
+
+ trace_drv_return_void(local);
+}
+
static inline int drv_conf_tx(struct ieee80211_local *local,
struct ieee80211_sub_if_data *sdata, u16 ac,
const struct ieee80211_tx_queue_params *params)
diff --git a/net/mac80211/rate.c b/net/mac80211/rate.c
index 30d58d2..d93c857 100644
--- a/net/mac80211/rate.c
+++ b/net/mac80211/rate.c
@@ -694,6 +694,7 @@ int rate_control_set_rates(struct ieee80211_hw *hw,
struct ieee80211_sta *pubsta,
struct ieee80211_sta_rates *rates)
{
+ struct sta_info *sta = container_of(pubsta, struct sta_info, sta);
struct ieee80211_sta_rates *old;
/*
@@ -707,6 +708,8 @@ int rate_control_set_rates(struct ieee80211_hw *hw,
if (old)
kfree_rcu(old, rcu_head);
+ drv_sta_rate_tbl_update(hw_to_local(hw), sta->sdata, pubsta);
+
return 0;
}
EXPORT_SYMBOL(rate_control_set_rates);
diff --git a/net/mac80211/trace.h b/net/mac80211/trace.h
index c215fafd7..306c645 100644
--- a/net/mac80211/trace.h
+++ b/net/mac80211/trace.h
@@ -773,7 +773,7 @@ TRACE_EVENT(drv_sta_rc_update,
)
);
-TRACE_EVENT(drv_sta_add,
+DECLARE_EVENT_CLASS(local_sdata_sta_evt,
TP_PROTO(struct ieee80211_local *local,
struct ieee80211_sub_if_data *sdata,
struct ieee80211_sta *sta),
@@ -798,29 +798,26 @@ TRACE_EVENT(drv_sta_add,
)
);
-TRACE_EVENT(drv_sta_remove,
+
+DEFINE_EVENT(local_sdata_sta_evt, drv_sta_add,
TP_PROTO(struct ieee80211_local *local,
struct ieee80211_sub_if_data *sdata,
struct ieee80211_sta *sta),
+ TP_ARGS(local, sdata, sta)
+);
- TP_ARGS(local, sdata, sta),
-
- TP_STRUCT__entry(
- LOCAL_ENTRY
- VIF_ENTRY
- STA_ENTRY
- ),
-
- TP_fast_assign(
- LOCAL_ASSIGN;
- VIF_ASSIGN;
- STA_ASSIGN;
- ),
+DEFINE_EVENT(local_sdata_sta_evt, drv_sta_remove,
+ TP_PROTO(struct ieee80211_local *local,
+ struct ieee80211_sub_if_data *sdata,
+ struct ieee80211_sta *sta),
+ TP_ARGS(local, sdata, sta)
+);
- TP_printk(
- LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT,
- LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG
- )
+DEFINE_EVENT(local_sdata_sta_evt, drv_sta_rate_tbl_update,
+ TP_PROTO(struct ieee80211_local *local,
+ struct ieee80211_sub_if_data *sdata,
+ struct ieee80211_sta *sta),
+ TP_ARGS(local, sdata, sta)
);
TRACE_EVENT(drv_conf_tx,
--
1.8.0
^ permalink raw reply related
* Re: [PATCH-WN 1/3] wireless: Make sure __cfg80211_connect_result always puts bss.
From: Johannes Berg @ 2013-06-24 13:56 UTC (permalink / raw)
To: greearb; +Cc: linux-wireless
In-Reply-To: <1371675987-28732-1-git-send-email-greearb@candelatech.com>
On Wed, 2013-06-19 at 14:06 -0700, greearb@candelatech.com wrote:
> From: Ben Greear <greearb@candelatech.com>
>
> Otherwise, we can leak a bss reference.
Applied all 3, still trying to make up my mind about the debugfs one
patch :)
johannes
^ permalink raw reply
* Re: [PATCH] cfg80211: fix compilation warning for cfg80211_leave_all()
From: Johannes Berg @ 2013-06-24 13:58 UTC (permalink / raw)
To: Arend van Spriel; +Cc: linux-wireless
In-Reply-To: <1371984681-3384-1-git-send-email-arend@broadcom.com>
On Sun, 2013-06-23 at 12:51 +0200, Arend van Spriel wrote:
> The following compilation issue popped up moving from v3.10-rc1 to
> v3.10-rc6 after merging wireless-testing.
>
> net/wireless/sysfs.c:86:13: error: 'cfg80211_leave_all' defined
> but not used [-Werror=unused-function]
>
> The function is only called when CONFIG_PM is enabled. Moving the
> function under CONFIG_PM as well.
Applied.
johannes
^ permalink raw reply
* Re: [PATCH 1/2] mac80211: allow self-protected frame tx without sta
From: Johannes Berg @ 2013-06-24 14:00 UTC (permalink / raw)
To: Thomas Pedersen; +Cc: linux-wireless, open80211s, marco, Bob Copeland
In-Reply-To: <1371797459-16585-1-git-send-email-thomas@cozybit.com>
On Thu, 2013-06-20 at 23:50 -0700, Thomas Pedersen wrote:
> Useful for userspace mesh to authenticate and peer without
> a station entry, since both steps may fail anyway.
Both patches applied.
johannes
^ permalink raw reply
* Re: [PATCH v10 1/2] cfg80211: add flags to cfg80211_rx_mgmt
From: Johannes Berg @ 2013-06-24 14:08 UTC (permalink / raw)
To: Vladimir Kondratiev
Cc: linux-wireless, Luis R . Rodriguez, John W . Linville,
Jouni Malinen
In-Reply-To: <1372063757-24286-2-git-send-email-qca_vkondrat@qca.qualcomm.com>
On Mon, 2013-06-24 at 11:49 +0300, Vladimir Kondratiev wrote:
> +/**
> + * enum nl80211_rxmgmt_flags - flags for cfg80211_rx_mgmt
> + *
> + * Defined are bits, to be used in form like
> + * BIT(NL80211_RXMGMT_FLAG_xxx)
> + *
> + * @NL80211_RXMGMT_FLAG_REPLIED: frame was replied by device/driver.
> + */
> +enum nl80211_rxmgmt_flags {
> + NL80211_RXMGMT_FLAG_REPLIED,
> +};
I think you should define the bitmasks, i.e. use
NL80211_RXMGMT_FLAG_REPLIED = 1<<0,
I think that'd be clearer, and userspace doesn't even always have a
BIT() macro.
johannes
^ permalink raw reply
* Re: [PATCH-WN 1/3] wireless: Make sure __cfg80211_connect_result always puts bss.
From: Ben Greear @ 2013-06-24 14:46 UTC (permalink / raw)
To: Johannes Berg; +Cc: linux-wireless
In-Reply-To: <1372082182.8439.5.camel@jlt4.sipsolutions.net>
On 06/24/2013 06:56 AM, Johannes Berg wrote:
> On Wed, 2013-06-19 at 14:06 -0700, greearb@candelatech.com wrote:
>> From: Ben Greear <greearb@candelatech.com>
>>
>> Otherwise, we can leak a bss reference.
>
> Applied all 3, still trying to make up my mind about the debugfs one
> patch :)
With regard to that one, how about I allow it to be enabled based on
cfg80211 module option (and only when cfg80211 debugfs is enabled).
That way, no new kernel option, and no significant hit to any runtime
performance unless users specifically enable the feature.
Thanks for applying the other three.
Thanks,
Ben
>
> johannes
>
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
^ permalink raw reply
* Re: [PATCH 3.9 4/4] iwlwifi: mvm: reduce the number of supported interfaces
From: Greg Kroah-Hartman @ 2013-06-24 15:26 UTC (permalink / raw)
To: Emmanuel Grumbach; +Cc: stable, linux-wireless
In-Reply-To: <1372079945-7445-4-git-send-email-emmanuel.grumbach@intel.com>
On Mon, Jun 24, 2013 at 04:19:05PM +0300, Emmanuel Grumbach wrote:
> The driver in 3.9 can't support more than one interface
> concurrently. The parameters given to cfg80211 were wrong.
> Next versions are fixed by allowing concurrent interfaces.
> This is why you won't see this patch upstream.
So this isn't an issue in 3.10 at all?
thanks,
greg k-h
^ permalink raw reply
* Re: [rt2x00-users] [PATCH] rt2x00: read 5GHz TX power values from the correct offset
From: Stanislaw Gruszka @ 2013-06-24 15:47 UTC (permalink / raw)
To: Gabor Juhos; +Cc: John Linville, linux-wireless, users, stable
In-Reply-To: <1371899605-30513-1-git-send-email-juhosg@openwrt.org>
On Sat, Jun 22, 2013 at 01:13:25PM +0200, Gabor Juhos wrote:
> The current code uses the same index value both
> for the channel information array and for the TX
> power table. The index starts from 14, however the
> index of the TX power table must start from zero.
>
> Fix it, in order to get the correct TX power value
> for a given channel.
>
> The changes in rt61pci.c and rt73usb.c are compile
> tested only.
>
> Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
> Cc: stable@vger.kernel.org
Nice catch.
Acked-by: Stanislaw Gruszka <stf_xl@wp.pl>
^ permalink raw reply
* Re: [PATCH 3.9 4/4] iwlwifi: mvm: reduce the number of supported interfaces
From: Johannes Berg @ 2013-06-24 15:45 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: Emmanuel Grumbach, stable, linux-wireless
In-Reply-To: <20130624152631.GA13886@kroah.com>
On Mon, 2013-06-24 at 08:26 -0700, Greg Kroah-Hartman wrote:
> On Mon, Jun 24, 2013 at 04:19:05PM +0300, Emmanuel Grumbach wrote:
> > The driver in 3.9 can't support more than one interface
> > concurrently. The parameters given to cfg80211 were wrong.
> > Next versions are fixed by allowing concurrent interfaces.
> > This is why you won't see this patch upstream.
>
> So this isn't an issue in 3.10 at all?
The dangers of stable-only patches ... I think this was actually
introduced into 3.9 only in my commit
2e8a935b639356f8397d39b118ac914d99b55871 ("iwlwifi: mvm: remove
P2P_DEVICE support"). Sorry about that.
johannes
^ permalink raw reply
* Re: [rt2x00-users] [PATCH 1/2] rt2x00: rt2800pci: don't use TXWI_DESC_SIZE directly
From: Stanislaw Gruszka @ 2013-06-24 15:49 UTC (permalink / raw)
To: Gabor Juhos; +Cc: John Linville, linux-wireless, users
In-Reply-To: <1371911519-13135-1-git-send-email-juhosg@openwrt.org>
On Sat, Jun 22, 2013 at 04:31:58PM +0200, Gabor Juhos wrote:
> Different chipsets may use different TXWI descriptor
> size. Instead of using a hardcoded value, use the
> 'queue->winfo_size' which holds the correct value for
> a given device.
>
> Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Acked-by: Stanislaw Gruszka <stf_xl@wp.pl>
^ permalink raw reply
* Re: [rt2x00-users] [PATCH 2/2] rt2x00: rt2800: unify [RT]XWI_SIZE defines
From: Stanislaw Gruszka @ 2013-06-24 15:49 UTC (permalink / raw)
To: Gabor Juhos; +Cc: John Linville, linux-wireless, users
In-Reply-To: <1371911519-13135-2-git-send-email-juhosg@openwrt.org>
On Sat, Jun 22, 2013 at 04:31:59PM +0200, Gabor Juhos wrote:
> Use common names instead of chip specific ones.
> The patch contains no functional changes, but
> it makes it easier to add support for further
> descriptor sizes.
>
> Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Acked-by: Stanislaw Gruszka <stf_xl@wp.pl>
^ permalink raw reply
* Re: [rt2x00-users] [PATCH 0/3] rt2x00: rt2800: prepare for three-chain device support
From: Stanislaw Gruszka @ 2013-06-24 16:00 UTC (permalink / raw)
To: Gabor Juhos; +Cc: John Linville, linux-wireless, users
In-Reply-To: <1371915734-13966-1-git-send-email-juhosg@openwrt.org>
On Sat, Jun 22, 2013 at 05:42:11PM +0200, Gabor Juhos wrote:
> Gabor Juhos (3):
> rt2x00: rt2800: increase EEPROM_SIZE to 512 bytes
> rt2x00: rt2800lib: turn on secondary PAs/LNAs for 3T/3R devices
> rt2x00: rt2800lib: turn on tertiary PAs/LNAs for 3T/3R devices
>
> drivers/net/wireless/rt2x00/rt2800.h | 2 +-
> drivers/net/wireless/rt2x00/rt2800lib.c | 22 ++++++++++++++++++----
> 2 files changed, 19 insertions(+), 5 deletions(-)
This series also looks good to me.
Acked-by: Stanislaw Gruszka <stf_xl@wp.pl>
BTW: Do you plan to create more 3T/3R patches soon ? I plan to work on
adding support for RT3573 usb device (but stuck on other work so far
unfortunetly). Anyway I don't want to duplicate efforts, so would like
to know about your plans.
Thanks
Stanislaw
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox