* Re: [PATCH] Documentation: dt: bindings: TI WiLink modules
From: Luciano Coelho @ 2013-06-25 19:35 UTC (permalink / raw)
To: grant.likely, linux-doc, linux-kernel, linux-wireless,
rob.herring, devicetree-discuss
Cc: tony, tony, linux-omap, linux-arm-kernel
In-Reply-To: <1372149330-24335-1-git-send-email-coelho@ti.com>
(fixed the ARM mailing list address)
On Tue, 2013-06-25 at 11:35 +0300, Luciano Coelho wrote:
> Add device tree bindings documentation for the TI WiLink modules.
> Currently only the WLAN part of the WiLink6, WiLink7 and WiLink8
> modules is supported.
>
> Signed-off-by: Luciano Coelho <coelho@ti.com>
> ---
>
> I created a new directory under net to contain wireless bindings documentation.
>
> The actual implementation in the driver will follow separately.
>
> .../devicetree/bindings/net/wireless/ti-wilink.txt | 46 ++++++++++++++++++++
> 1 file changed, 46 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/net/wireless/ti-wilink.txt
>
> diff --git a/Documentation/devicetree/bindings/net/wireless/ti-wilink.txt b/Documentation/devicetree/bindings/net/wireless/ti-wilink.txt
> new file mode 100644
> index 0000000..d8e8bfbb
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/net/wireless/ti-wilink.txt
> @@ -0,0 +1,46 @@
> +TI WiLink Wireless Modules Device Tree Bindings
> +===============================================
> +
> +The WiLink modules provide wireless connectivity, such as WLAN,
> +Bluetooth, FM and NFC.
> +
> +There are several different modules available, which can be grouped by
> +their generation: WiLink6, WiLink7 and WiLink8. WiLink4 is not
> +currently supported with device tree.
> +
> +Currently, only the WLAN portion of the modules is supported with
> +device tree.
> +
> +Required properties:
> +--------------------
> +
> +- compatible: should be "ti,wilink6", "ti,wilink7" or "ti,wilink8"
> +- interrupt-parent: the interrupt controller
> +- interrupts: out-of-band WLAN interrupt
> + See the interrupt controller's bindings documentation for
> + detailed definition.
> +
> +Optional properties:
> +--------------------
> +
> +- refclock: the internal WLAN reference clock frequency (required for
> + WiLink6 and WiLink7; not used for WiLink8). Must be one of the
> + following:
> + 0 = 19.2 MHz
> + 1 = 26.0 MHz
> + 2 = 38.4 MHz
> + 3 = 52.0 MHz
> + 4 = 38.4 MHz, XTAL
> + 5 = 26.0 MHz, XTAL
> +
> +- tcxoclock: the internal WLAN TCXO clock frequency (required for
> + WiLink7 not used for WiLink6 and WiLink8). Must be one of the
> + following:
> + 0 = 19.200 MHz
> + 1 = 26.000 MHz
> + 2 = 38.400 MHz
> + 3 = 52.000 MHz
> + 4 = 16.368 MHz
> + 5 = 32.736 MHz
> + 6 = 16.800 MHz
> + 7 = 33.600 MHz
If this is okay for everyone, can I push this via my tree (which goes to
linux-wireless->net->linus)? I think it makes more sense to send the
documentation together with the patch that actually implements the DT
node parsing in the driver.
--
Luca.
^ permalink raw reply
* Re: [rt2x00-users] [PATCH 0/3] rt2x00: rt2800: prepare for three-chain device support
From: Stanislaw Gruszka @ 2013-06-25 19:18 UTC (permalink / raw)
To: Gabor Juhos; +Cc: John Linville, linux-wireless, users
In-Reply-To: <51C8994E.4040809@openwrt.org>
On Mon, Jun 24, 2013 at 09:09:02PM +0200, Gabor Juhos wrote:
> I'm testing these patches on a Linksys AE3000 device which also uses the RT3573
> chip. I have an almost complete patch-set which allows me to use the device in
> STA and in AP mode, however I still have to resolve a few problems.
Cool, waiting for the post ... :-)
Stanislaw
^ permalink raw reply
* [PATCH] wireless: vlan priority handling in WMM
From: cedric.voncken @ 2013-06-25 15:31 UTC (permalink / raw)
To: linux-wireless; +Cc: Cedric Voncken
From: Cedric Voncken <cedric.voncken@acksys.fr>
If the VLAN priority is set in skb->vlan_tci use it to determine the WMM priority.
Signed-off-by: Cedric Voncken <cedric.voncken@acksys.fr>
---
net/wireless/util.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/net/wireless/util.c b/net/wireless/util.c
index 74458b7..6f57ae7 100644
--- a/net/wireless/util.c
+++ b/net/wireless/util.c
@@ -685,6 +685,7 @@ EXPORT_SYMBOL(ieee80211_amsdu_to_8023s);
unsigned int cfg80211_classify8021d(struct sk_buff *skb)
{
unsigned int dscp;
+ unsigned char vlan_priority;
/* skb->priority values from 256->263 are magic values to
* directly indicate a specific 802.1d priority. This is used
@@ -694,6 +695,10 @@ unsigned int cfg80211_classify8021d(struct sk_buff *skb)
if (skb->priority >= 256 && skb->priority <= 263)
return skb->priority - 256;
+ vlan_priority = (skb->vlan_tci >> 13) & 0x07;
+ if (vlan_priority > 0)
+ return vlan_priority;
+
switch (skb->protocol) {
case htons(ETH_P_IP):
dscp = ipv4_get_dsfield(ip_hdr(skb)) & 0xfc;
--
1.7.2.5
^ permalink raw reply related
* Re: [RFC][PATCH] b43: replace B43_BCMA_EXTRA with modparam allhwsupport
From: Jonas Gorski @ 2013-06-25 18:01 UTC (permalink / raw)
To: Rafał Miłecki; +Cc: linux-wireless, John W. Linville, b43-dev
In-Reply-To: <1372174495-14471-1-git-send-email-zajec5@gmail.com>
On Tue, Jun 25, 2013 at 5:34 PM, Rafał Miłecki <zajec5@gmail.com> wrote:
> This allows enabling support for extra hardware with just a module
> param, without kernel/module recompilation.
>
> Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
> ---
> drivers/net/wireless/b43/Kconfig | 6 ------
> drivers/net/wireless/b43/main.c | 16 ++++++++++++++--
> 2 files changed, 14 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/net/wireless/b43/Kconfig b/drivers/net/wireless/b43/Kconfig
> index 3f21e0b..51ff0b1 100644
> --- a/drivers/net/wireless/b43/Kconfig
> +++ b/drivers/net/wireless/b43/Kconfig
> @@ -31,12 +31,6 @@ config B43_BCMA
> depends on B43 && (BCMA = y || BCMA = B43)
> default y
>
> -config B43_BCMA_EXTRA
> - bool "Hardware support that overlaps with the brcmsmac driver"
> - depends on B43_BCMA
> - default n if BRCMSMAC
> - default y
> -
> config B43_SSB
> bool
> depends on B43 && (SSB = y || SSB = B43)
> diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
> index a95b77a..583993c 100644
> --- a/drivers/net/wireless/b43/main.c
> +++ b/drivers/net/wireless/b43/main.c
> @@ -113,13 +113,19 @@ static int b43_modparam_pio = 0;
> module_param_named(pio, b43_modparam_pio, int, 0644);
> MODULE_PARM_DESC(pio, "Use PIO accesses by default: 0=DMA, 1=PIO");
>
> +#ifdef CONFIG_BRCMSMAC
This is only defined if BRCMSMAC is built-in, but not if it is built
as a module; then it's CONFIG_BRCMSMAC_MODULE, which is probably not
what you want. To easily catch both, use IS_ENABLED(CONFIG_BRCMSMAC).
> +static int modparam_allhwsupport;
> +#else
> +static int modparam_allhwsupport = 1;
> +#endif
And since IS_ENABLED returns 0 or 1 you should be able to reduce it to one line:
static int modparam_allhwsupport = !IS_ENABLED(CONFIG_BRCMSMAC);
Jonas
^ permalink raw reply
* pull request: wireless 2013-06-25
From: John W. Linville @ 2013-06-25 17:45 UTC (permalink / raw)
To: dave; +Cc: linux-wireless, netdev, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 4001 bytes --]
Dave,
A few more late-breaking fixes hoping for 3.10...
Regarding the Bluetooth fix, Gustavo says:
"A important fix to 3.10, this patch fixes an issues that was preventing
the l2cap info response command to be handled properly."
Also for that Bluetooth fix, Johan adds:
"Once the code gives up parsing this PDU it also gives up essential
parts of the L2CAP connection creation process, i.e. without this
patch the stack will fail to establish connections properly."
Moving onto ath9k, Felix Fietkau fixes an RCU locking issue in
the transmit path. As for ath9k_htc, Sujith Manoharan fixes some
authentication timeouts by ensuring that a chip reset is done when
IDLE is turned off.
I think these are all micro-fixes that shouldn't cause any trouble.
Please let me know if there are problems!
John
---
The following changes since commit f57da7a65b386dd4535daa4f7a3773a025fbb022:
qlcnic: Do not sleep while holding spinlock (2013-06-24 00:28:28 -0700)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless.git for-davem
for you to fetch changes up to 9d5c34f568a8d80cb69cc89ebb426ceb1d1f4737:
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless into for-davem (2013-06-25 13:24:12 -0400)
----------------------------------------------------------------
Felix Fietkau (1):
ath9k: fix an RCU issue in calling ieee80211_get_tx_rates
Jaganath Kanakkassery (1):
Bluetooth: Fix invalid length check in l2cap_information_rsp()
John W. Linville (2):
Merge branch 'master' of git://git.kernel.org/.../bluetooth/bluetooth
Merge branch 'master' of git://git.kernel.org/.../linville/wireless into for-davem
Sujith Manoharan (1):
ath9k_htc: Handle IDLE state transition properly
drivers/net/wireless/ath/ath9k/htc_drv_main.c | 2 +-
drivers/net/wireless/ath/ath9k/xmit.c | 6 +++++-
net/bluetooth/l2cap_core.c | 2 +-
3 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_main.c b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
index 0743a47..62f1b76 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
@@ -1174,7 +1174,7 @@ static int ath9k_htc_config(struct ieee80211_hw *hw, u32 changed)
mutex_lock(&priv->htc_pm_lock);
priv->ps_idle = !!(conf->flags & IEEE80211_CONF_IDLE);
- if (priv->ps_idle)
+ if (!priv->ps_idle)
chip_reset = true;
mutex_unlock(&priv->htc_pm_lock);
diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c
index 1c9b1ba..83ab6be 100644
--- a/drivers/net/wireless/ath/ath9k/xmit.c
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
@@ -1570,6 +1570,8 @@ void ath_txq_schedule(struct ath_softc *sc, struct ath_txq *txq)
txq->axq_ampdu_depth >= ATH_AGGR_MIN_QDEPTH)
return;
+ rcu_read_lock();
+
ac = list_first_entry(&txq->axq_acq, struct ath_atx_ac, list);
last_ac = list_entry(txq->axq_acq.prev, struct ath_atx_ac, list);
@@ -1608,8 +1610,10 @@ void ath_txq_schedule(struct ath_softc *sc, struct ath_txq *txq)
if (ac == last_ac ||
txq->axq_ampdu_depth >= ATH_AGGR_MIN_QDEPTH)
- return;
+ break;
}
+
+ rcu_read_unlock();
}
/***********/
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
index 4be6a26..68843a2 100644
--- a/net/bluetooth/l2cap_core.c
+++ b/net/bluetooth/l2cap_core.c
@@ -4333,7 +4333,7 @@ static inline int l2cap_information_rsp(struct l2cap_conn *conn,
struct l2cap_info_rsp *rsp = (struct l2cap_info_rsp *) data;
u16 type, result;
- if (cmd_len != sizeof(*rsp))
+ if (cmd_len < sizeof(*rsp))
return -EPROTO;
type = __le16_to_cpu(rsp->type);
--
John W. Linville Someday the world will need a hero, and you
linville@tuxdriver.com might be all we have. Be ready.
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply related
* Re: [RFC][PATCH] b43: replace B43_BCMA_EXTRA with modparam allhwsupport
From: John W. Linville @ 2013-06-25 17:23 UTC (permalink / raw)
To: Rafał Miłecki; +Cc: linux-wireless, b43-dev
In-Reply-To: <1372174495-14471-1-git-send-email-zajec5@gmail.com>
Seems OK to me...
On Tue, Jun 25, 2013 at 05:34:55PM +0200, Rafał Miłecki wrote:
> This allows enabling support for extra hardware with just a module
> param, without kernel/module recompilation.
>
> Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
> ---
> drivers/net/wireless/b43/Kconfig | 6 ------
> drivers/net/wireless/b43/main.c | 16 ++++++++++++++--
> 2 files changed, 14 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/net/wireless/b43/Kconfig b/drivers/net/wireless/b43/Kconfig
> index 3f21e0b..51ff0b1 100644
> --- a/drivers/net/wireless/b43/Kconfig
> +++ b/drivers/net/wireless/b43/Kconfig
> @@ -31,12 +31,6 @@ config B43_BCMA
> depends on B43 && (BCMA = y || BCMA = B43)
> default y
>
> -config B43_BCMA_EXTRA
> - bool "Hardware support that overlaps with the brcmsmac driver"
> - depends on B43_BCMA
> - default n if BRCMSMAC
> - default y
> -
> config B43_SSB
> bool
> depends on B43 && (SSB = y || SSB = B43)
> diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
> index a95b77a..583993c 100644
> --- a/drivers/net/wireless/b43/main.c
> +++ b/drivers/net/wireless/b43/main.c
> @@ -113,13 +113,19 @@ static int b43_modparam_pio = 0;
> module_param_named(pio, b43_modparam_pio, int, 0644);
> MODULE_PARM_DESC(pio, "Use PIO accesses by default: 0=DMA, 1=PIO");
>
> +#ifdef CONFIG_BRCMSMAC
> +static int modparam_allhwsupport;
> +#else
> +static int modparam_allhwsupport = 1;
> +#endif
> +module_param_named(allhwsupport, modparam_allhwsupport, int, 0444);
> +MODULE_PARM_DESC(allhwsupport, "Enable support for all hardware (even it if overlaps with the brcmsmac driver)");
> +
> #ifdef CONFIG_B43_BCMA
> static const struct bcma_device_id b43_bcma_tbl[] = {
> BCMA_CORE(BCMA_MANUF_BCM, BCMA_CORE_80211, 0x11, BCMA_ANY_CLASS),
> -#ifdef CONFIG_B43_BCMA_EXTRA
> BCMA_CORE(BCMA_MANUF_BCM, BCMA_CORE_80211, 0x17, BCMA_ANY_CLASS),
> BCMA_CORE(BCMA_MANUF_BCM, BCMA_CORE_80211, 0x18, BCMA_ANY_CLASS),
> -#endif
> BCMA_CORE(BCMA_MANUF_BCM, BCMA_CORE_80211, 0x1D, BCMA_ANY_CLASS),
> BCMA_CORETABLE_END
> };
> @@ -5396,6 +5402,12 @@ static int b43_bcma_probe(struct bcma_device *core)
> struct b43_wl *wl;
> int err;
>
> + if (!modparam_allhwsupport &&
> + (core->id.rev == 0x17 || core->id.rev == 0x18)) {
> + pr_err("Support for cores revisions 0x17 and 0x18 disabled by module param allhwsupport=0. Try b43.allhwsupport=1\n");
> + return -ENOTSUPP;
> + }
> +
> dev = b43_bus_dev_bcma_init(core);
> if (!dev)
> return -ENODEV;
> --
> 1.7.10.4
>
> --
> 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
>
--
John W. Linville Someday the world will need a hero, and you
linville@tuxdriver.com might be all we have. Be ready.
^ permalink raw reply
* [RFC][PATCH] b43: replace B43_BCMA_EXTRA with modparam allhwsupport
From: Rafał Miłecki @ 2013-06-25 15:34 UTC (permalink / raw)
To: linux-wireless, John W. Linville; +Cc: b43-dev, Rafał Miłecki
This allows enabling support for extra hardware with just a module
param, without kernel/module recompilation.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
---
drivers/net/wireless/b43/Kconfig | 6 ------
drivers/net/wireless/b43/main.c | 16 ++++++++++++++--
2 files changed, 14 insertions(+), 8 deletions(-)
diff --git a/drivers/net/wireless/b43/Kconfig b/drivers/net/wireless/b43/Kconfig
index 3f21e0b..51ff0b1 100644
--- a/drivers/net/wireless/b43/Kconfig
+++ b/drivers/net/wireless/b43/Kconfig
@@ -31,12 +31,6 @@ config B43_BCMA
depends on B43 && (BCMA = y || BCMA = B43)
default y
-config B43_BCMA_EXTRA
- bool "Hardware support that overlaps with the brcmsmac driver"
- depends on B43_BCMA
- default n if BRCMSMAC
- default y
-
config B43_SSB
bool
depends on B43 && (SSB = y || SSB = B43)
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
index a95b77a..583993c 100644
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -113,13 +113,19 @@ static int b43_modparam_pio = 0;
module_param_named(pio, b43_modparam_pio, int, 0644);
MODULE_PARM_DESC(pio, "Use PIO accesses by default: 0=DMA, 1=PIO");
+#ifdef CONFIG_BRCMSMAC
+static int modparam_allhwsupport;
+#else
+static int modparam_allhwsupport = 1;
+#endif
+module_param_named(allhwsupport, modparam_allhwsupport, int, 0444);
+MODULE_PARM_DESC(allhwsupport, "Enable support for all hardware (even it if overlaps with the brcmsmac driver)");
+
#ifdef CONFIG_B43_BCMA
static const struct bcma_device_id b43_bcma_tbl[] = {
BCMA_CORE(BCMA_MANUF_BCM, BCMA_CORE_80211, 0x11, BCMA_ANY_CLASS),
-#ifdef CONFIG_B43_BCMA_EXTRA
BCMA_CORE(BCMA_MANUF_BCM, BCMA_CORE_80211, 0x17, BCMA_ANY_CLASS),
BCMA_CORE(BCMA_MANUF_BCM, BCMA_CORE_80211, 0x18, BCMA_ANY_CLASS),
-#endif
BCMA_CORE(BCMA_MANUF_BCM, BCMA_CORE_80211, 0x1D, BCMA_ANY_CLASS),
BCMA_CORETABLE_END
};
@@ -5396,6 +5402,12 @@ static int b43_bcma_probe(struct bcma_device *core)
struct b43_wl *wl;
int err;
+ if (!modparam_allhwsupport &&
+ (core->id.rev == 0x17 || core->id.rev == 0x18)) {
+ pr_err("Support for cores revisions 0x17 and 0x18 disabled by module param allhwsupport=0. Try b43.allhwsupport=1\n");
+ return -ENOTSUPP;
+ }
+
dev = b43_bus_dev_bcma_init(core);
if (!dev)
return -ENODEV;
--
1.7.10.4
^ permalink raw reply related
* Re: [RFH][PATCH] bcma: add support for BCM43142
From: Rafał Miłecki @ 2013-06-25 15:32 UTC (permalink / raw)
To: Michal Kazior; +Cc: linux-wireless, John W. Linville
In-Reply-To: <CA+BoTQnda59qziwwjVfH7zCmQipED7TuxsDg0RgWA7ZK78gALQ@mail.gmail.com>
2013/6/25 Michal Kazior <michal.kazior@tieto.com>:
> On 25 June 2013 16:52, Rafał Miłecki <zajec5@gmail.com> wrote:
>> I got following problem with the patch:
>> CC [M] drivers/bcma/driver_chipcommon_pmu.o
>> drivers/bcma/driver_chipcommon_pmu.c: In function ‘bcma_pmu2_pll_init0’:
>> drivers/bcma/driver_chipcommon_pmu.c:128:5: warning: large integer implicitly truncated to unsigned type [-Woverflow]
>>
>> This is caused by:
>> mask = ~(BCMA_RES_4314_HT_AVAIL |
>> BCMA_RES_4314_MACPHY_CLK_AVAIL);
>>
>> Any idea why
>> u32 mask = ~(BIT(28) | BIT(29))
>> causes that? :|
>>
>> I could expect that in case of using BIT(31), but not 28/29...
>
> Are you perhaps compiling for a 64bit target? If so then I you're
> dealing with a 64bit bitmask here. Negating ends up as an overflow as
> you try to cram it into the 32bit var.
Ahh, thanks!
Is there any preferred solution for that?
u32 mask = (u32)~(BIT(28) | BIT(29))
u32 mask = ~(BIT(28) | BIT(29)) & 0xFFFF
? I guess the first one looks nicer?
--
Rafał
^ permalink raw reply
* Re: [RFH][PATCH] bcma: add support for BCM43142
From: Michal Kazior @ 2013-06-25 15:08 UTC (permalink / raw)
To: Rafał Miłecki; +Cc: linux-wireless, John W. Linville
In-Reply-To: <1372171926-2686-1-git-send-email-zajec5@gmail.com>
On 25 June 2013 16:52, Rafał Miłecki <zajec5@gmail.com> wrote:
> I got following problem with the patch:
> CC [M] drivers/bcma/driver_chipcommon_pmu.o
> drivers/bcma/driver_chipcommon_pmu.c: In function ‘bcma_pmu2_pll_init0’:
> drivers/bcma/driver_chipcommon_pmu.c:128:5: warning: large integer implicitly truncated to unsigned type [-Woverflow]
>
> This is caused by:
> mask = ~(BCMA_RES_4314_HT_AVAIL |
> BCMA_RES_4314_MACPHY_CLK_AVAIL);
>
> Any idea why
> u32 mask = ~(BIT(28) | BIT(29))
> causes that? :|
>
> I could expect that in case of using BIT(31), but not 28/29...
Are you perhaps compiling for a 64bit target? If so then I you're
dealing with a 64bit bitmask here. Negating ends up as an overflow as
you try to cram it into the 32bit var.
^ permalink raw reply
* [RFH][PATCH] bcma: add support for BCM43142
From: Rafał Miłecki @ 2013-06-25 14:52 UTC (permalink / raw)
To: linux-wireless, John W. Linville; +Cc: Rafał Miłecki
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
---
H in RFH stand for "HELP" ;)
I got following problem with the patch:
CC [M] drivers/bcma/driver_chipcommon_pmu.o
drivers/bcma/driver_chipcommon_pmu.c: In function ‘bcma_pmu2_pll_init0’:
drivers/bcma/driver_chipcommon_pmu.c:128:5: warning: large integer implicitly truncated to unsigned type [-Woverflow]
This is caused by:
mask = ~(BCMA_RES_4314_HT_AVAIL |
BCMA_RES_4314_MACPHY_CLK_AVAIL);
Any idea why
u32 mask = ~(BIT(28) | BIT(29))
causes that? :|
I could expect that in case of using BIT(31), but not 28/29...
---
drivers/bcma/bcma_private.h | 2 +
drivers/bcma/driver_chipcommon.c | 11 ++-
drivers/bcma/driver_chipcommon_pmu.c | 123 +++++++++++++++++++++++++++
drivers/bcma/host_pci.c | 1 +
drivers/bcma/main.c | 19 +++++
drivers/bcma/sprom.c | 1 +
include/linux/bcma/bcma.h | 1 +
include/linux/bcma/bcma_driver_chipcommon.h | 55 ++++++++++++
8 files changed, 211 insertions(+), 2 deletions(-)
diff --git a/drivers/bcma/bcma_private.h b/drivers/bcma/bcma_private.h
index 79595a0..0215f9a 100644
--- a/drivers/bcma/bcma_private.h
+++ b/drivers/bcma/bcma_private.h
@@ -22,6 +22,8 @@
struct bcma_bus;
/* main.c */
+bool bcma_wait_value(struct bcma_device *core, u16 reg, u32 mask, u32 value,
+ int timeout);
int bcma_bus_register(struct bcma_bus *bus);
void bcma_bus_unregister(struct bcma_bus *bus);
int __init bcma_bus_early_register(struct bcma_bus *bus,
diff --git a/drivers/bcma/driver_chipcommon.c b/drivers/bcma/driver_chipcommon.c
index 036c674..b068f98 100644
--- a/drivers/bcma/driver_chipcommon.c
+++ b/drivers/bcma/driver_chipcommon.c
@@ -140,8 +140,15 @@ void bcma_core_chipcommon_init(struct bcma_drv_cc *cc)
bcma_core_chipcommon_early_init(cc);
if (cc->core->id.rev >= 20) {
- bcma_cc_write32(cc, BCMA_CC_GPIOPULLUP, 0);
- bcma_cc_write32(cc, BCMA_CC_GPIOPULLDOWN, 0);
+ u32 pullup = 0, pulldown = 0;
+
+ if (cc->core->bus->chipinfo.id == BCMA_CHIP_ID_BCM43142) {
+ pullup = 0x402e0;
+ pulldown = 0x20500;
+ }
+
+ bcma_cc_write32(cc, BCMA_CC_GPIOPULLUP, pullup);
+ bcma_cc_write32(cc, BCMA_CC_GPIOPULLDOWN, pulldown);
}
if (cc->capabilities & BCMA_CC_CAP_PMU)
diff --git a/drivers/bcma/driver_chipcommon_pmu.c b/drivers/bcma/driver_chipcommon_pmu.c
index edca73a..2056316 100644
--- a/drivers/bcma/driver_chipcommon_pmu.c
+++ b/drivers/bcma/driver_chipcommon_pmu.c
@@ -56,6 +56,109 @@ void bcma_chipco_regctl_maskset(struct bcma_drv_cc *cc, u32 offset, u32 mask,
}
EXPORT_SYMBOL_GPL(bcma_chipco_regctl_maskset);
+static u32 bcma_pmu_xtalfreq(struct bcma_drv_cc *cc)
+{
+ u32 ilp_ctl, alp_hz;
+
+ if (!(bcma_cc_read32(cc, BCMA_CC_PMU_STAT) &
+ BCMA_CC_PMU_STAT_EXT_LPO_AVAIL))
+ return 0;
+
+ bcma_cc_write32(cc, BCMA_CC_PMU_XTAL_FREQ,
+ BIT(BCMA_CC_PMU_XTAL_FREQ_MEASURE_SHIFT));
+ usleep_range(1000, 2000);
+
+ ilp_ctl = bcma_cc_read32(cc, BCMA_CC_PMU_XTAL_FREQ);
+ ilp_ctl &= BCMA_CC_PMU_XTAL_FREQ_ILPCTL_MASK;
+
+ bcma_cc_write32(cc, BCMA_CC_PMU_XTAL_FREQ, 0);
+
+ alp_hz = ilp_ctl * 32768 / 4;
+ return (alp_hz + 50000) / 100000 * 100;
+}
+
+static void bcma_pmu2_pll_init0(struct bcma_drv_cc *cc, u32 xtalfreq)
+{
+ struct bcma_bus *bus = cc->core->bus;
+ u32 freq_tgt_target = 0, freq_tgt_current;
+ u32 pll0, mask;
+
+ switch (bus->chipinfo.id) {
+ case BCMA_CHIP_ID_BCM43142:
+ /* pmu2_xtaltab0_adfll_485 */
+ switch (xtalfreq) {
+ case 12000:
+ freq_tgt_target = 0x50D52;
+ break;
+ case 20000:
+ freq_tgt_target = 0x307FE;
+ break;
+ case 26000:
+ freq_tgt_target = 0x254EA;
+ break;
+ case 37400:
+ freq_tgt_target = 0x19EF8;
+ break;
+ case 52000:
+ freq_tgt_target = 0x12A75;
+ break;
+ }
+ break;
+ }
+
+ if (!freq_tgt_target) {
+ bcma_err(bus, "Unknown TGT frequency for xtalfreq %d\n",
+ xtalfreq);
+ return;
+ }
+
+ pll0 = bcma_chipco_pll_read(cc, BCMA_CC_PMU15_PLL_PLLCTL0);
+ freq_tgt_current = (pll0 & BCMA_CC_PMU15_PLL_PC0_FREQTGT_MASK) >>
+ BCMA_CC_PMU15_PLL_PC0_FREQTGT_SHIFT;
+
+ if (freq_tgt_current == freq_tgt_target) {
+ bcma_debug(bus, "Target TGT frequency already set\n");
+ return;
+ }
+
+ /* Turn off PLL */
+ switch (bus->chipinfo.id) {
+ case BCMA_CHIP_ID_BCM43142:
+ mask = ~(BCMA_RES_4314_HT_AVAIL |
+ BCMA_RES_4314_MACPHY_CLK_AVAIL);
+
+ bcma_cc_mask32(cc, BCMA_CC_PMU_MINRES_MSK, mask);
+ bcma_cc_mask32(cc, BCMA_CC_PMU_MAXRES_MSK, mask);
+ bcma_wait_value(cc->core, BCMA_CLKCTLST,
+ BCMA_CLKCTLST_HAVEHT, 0, 20000);
+ break;
+ }
+
+ pll0 &= ~BCMA_CC_PMU15_PLL_PC0_FREQTGT_MASK;
+ pll0 |= freq_tgt_target << BCMA_CC_PMU15_PLL_PC0_FREQTGT_SHIFT;
+ bcma_chipco_pll_write(cc, BCMA_CC_PMU15_PLL_PLLCTL0, pll0);
+
+ /* Flush */
+ if (cc->pmu.rev >= 2)
+ bcma_cc_set32(cc, BCMA_CC_PMU_CTL, BCMA_CC_PMU_CTL_PLL_UPD);
+
+ /* TODO: Do we need to update OTP? */
+}
+
+static void bcma_pmu_pll_init(struct bcma_drv_cc *cc)
+{
+ struct bcma_bus *bus = cc->core->bus;
+ u32 xtalfreq = bcma_pmu_xtalfreq(cc);
+
+ switch (bus->chipinfo.id) {
+ case BCMA_CHIP_ID_BCM43142:
+ if (xtalfreq == 0)
+ xtalfreq = 20000;
+ bcma_pmu2_pll_init0(cc, xtalfreq);
+ break;
+ }
+}
+
static void bcma_pmu_resources_init(struct bcma_drv_cc *cc)
{
struct bcma_bus *bus = cc->core->bus;
@@ -66,6 +169,25 @@ static void bcma_pmu_resources_init(struct bcma_drv_cc *cc)
min_msk = 0x200D;
max_msk = 0xFFFF;
break;
+ case BCMA_CHIP_ID_BCM43142:
+ min_msk = BCMA_RES_4314_LPLDO_PU |
+ BCMA_RES_4314_PMU_SLEEP_DIS |
+ BCMA_RES_4314_PMU_BG_PU |
+ BCMA_RES_4314_CBUCK_LPOM_PU |
+ BCMA_RES_4314_CBUCK_PFM_PU |
+ BCMA_RES_4314_CLDO_PU |
+ BCMA_RES_4314_LPLDO2_LVM |
+ BCMA_RES_4314_WL_PMU_PU |
+ BCMA_RES_4314_LDO3P3_PU |
+ BCMA_RES_4314_OTP_PU |
+ BCMA_RES_4314_WL_PWRSW_PU |
+ BCMA_RES_4314_LQ_AVAIL |
+ BCMA_RES_4314_LOGIC_RET |
+ BCMA_RES_4314_MEM_SLEEP |
+ BCMA_RES_4314_MACPHY_RET |
+ BCMA_RES_4314_WL_CORE_READY;
+ max_msk = 0x3FFFFFFF;
+ break;
default:
bcma_debug(bus, "PMU resource config unknown or not needed for device 0x%04X\n",
bus->chipinfo.id);
@@ -165,6 +287,7 @@ void bcma_pmu_init(struct bcma_drv_cc *cc)
bcma_cc_set32(cc, BCMA_CC_PMU_CTL,
BCMA_CC_PMU_CTL_NOILPONW);
+ bcma_pmu_pll_init(cc);
bcma_pmu_resources_init(cc);
bcma_pmu_workarounds(cc);
}
diff --git a/drivers/bcma/host_pci.c b/drivers/bcma/host_pci.c
index fbf2759..a355e63 100644
--- a/drivers/bcma/host_pci.c
+++ b/drivers/bcma/host_pci.c
@@ -275,6 +275,7 @@ static DEFINE_PCI_DEVICE_TABLE(bcma_pci_bridge_tbl) = {
{ PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x4357) },
{ PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x4358) },
{ PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x4359) },
+ { PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x4365) },
{ PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x4727) },
{ 0, },
};
diff --git a/drivers/bcma/main.c b/drivers/bcma/main.c
index f72f52b..0067422 100644
--- a/drivers/bcma/main.c
+++ b/drivers/bcma/main.c
@@ -93,6 +93,25 @@ struct bcma_device *bcma_find_core_unit(struct bcma_bus *bus, u16 coreid,
return NULL;
}
+bool bcma_wait_value(struct bcma_device *core, u16 reg, u32 mask, u32 value,
+ int timeout)
+{
+ unsigned long deadline = jiffies + timeout;
+ u32 val;
+
+ do {
+ val = bcma_read32(core, reg);
+ if ((val & mask) == value)
+ return true;
+ cpu_relax();
+ udelay(10);
+ } while (!time_after_eq(jiffies, deadline));
+
+ bcma_warn(core->bus, "Timeout waiting for register 0x%04X!\n", reg);
+
+ return false;
+}
+
static void bcma_release_core_dev(struct device *dev)
{
struct bcma_device *core = container_of(dev, struct bcma_device, dev);
diff --git a/drivers/bcma/sprom.c b/drivers/bcma/sprom.c
index de15b4f..72bf454 100644
--- a/drivers/bcma/sprom.c
+++ b/drivers/bcma/sprom.c
@@ -503,6 +503,7 @@ static bool bcma_sprom_onchip_available(struct bcma_bus *bus)
case BCMA_CHIP_ID_BCM4331:
present = chip_status & BCMA_CC_CHIPST_4331_OTP_PRESENT;
break;
+ case BCMA_CHIP_ID_BCM43142:
case BCMA_CHIP_ID_BCM43224:
case BCMA_CHIP_ID_BCM43225:
/* for these chips OTP is always available */
diff --git a/include/linux/bcma/bcma.h b/include/linux/bcma/bcma.h
index 2e34db8..622fc50 100644
--- a/include/linux/bcma/bcma.h
+++ b/include/linux/bcma/bcma.h
@@ -144,6 +144,7 @@ struct bcma_host_ops {
/* Chip IDs of PCIe devices */
#define BCMA_CHIP_ID_BCM4313 0x4313
+#define BCMA_CHIP_ID_BCM43142 43142
#define BCMA_CHIP_ID_BCM43224 43224
#define BCMA_PKG_ID_BCM43224_FAB_CSM 0x8
#define BCMA_PKG_ID_BCM43224_FAB_SMIC 0xa
diff --git a/include/linux/bcma/bcma_driver_chipcommon.h b/include/linux/bcma/bcma_driver_chipcommon.h
index b8b09ea..c49e1a1 100644
--- a/include/linux/bcma/bcma_driver_chipcommon.h
+++ b/include/linux/bcma/bcma_driver_chipcommon.h
@@ -330,6 +330,8 @@
#define BCMA_CC_PMU_CAP 0x0604 /* PMU capabilities */
#define BCMA_CC_PMU_CAP_REVISION 0x000000FF /* Revision mask */
#define BCMA_CC_PMU_STAT 0x0608 /* PMU status */
+#define BCMA_CC_PMU_STAT_EXT_LPO_AVAIL 0x00000100
+#define BCMA_CC_PMU_STAT_WDRESET 0x00000080
#define BCMA_CC_PMU_STAT_INTPEND 0x00000040 /* Interrupt pending */
#define BCMA_CC_PMU_STAT_SBCLKST 0x00000030 /* Backplane clock status? */
#define BCMA_CC_PMU_STAT_HAVEALP 0x00000008 /* ALP available */
@@ -355,6 +357,11 @@
#define BCMA_CC_REGCTL_DATA 0x065C
#define BCMA_CC_PLLCTL_ADDR 0x0660
#define BCMA_CC_PLLCTL_DATA 0x0664
+#define BCMA_CC_PMU_STRAPOPT 0x0668 /* (corerev >= 28) */
+#define BCMA_CC_PMU_XTAL_FREQ 0x066C /* (pmurev >= 10) */
+#define BCMA_CC_PMU_XTAL_FREQ_ILPCTL_MASK 0x00001FFF
+#define BCMA_CC_PMU_XTAL_FREQ_MEASURE_MASK 0x80000000
+#define BCMA_CC_PMU_XTAL_FREQ_MEASURE_SHIFT 31
#define BCMA_CC_SPROM 0x0800 /* SPROM beginning */
/* NAND flash MLC controller registers (corerev >= 38) */
#define BCMA_CC_NAND_REVISION 0x0C00
@@ -435,6 +442,23 @@
#define BCMA_CC_PMU6_4706_PROC_NDIV_MODE_MASK 0x00000007
#define BCMA_CC_PMU6_4706_PROC_NDIV_MODE_SHIFT 0
+/* PMU rev 15 */
+#define BCMA_CC_PMU15_PLL_PLLCTL0 0
+#define BCMA_CC_PMU15_PLL_PC0_CLKSEL_MASK 0x00000003
+#define BCMA_CC_PMU15_PLL_PC0_CLKSEL_SHIFT 0
+#define BCMA_CC_PMU15_PLL_PC0_FREQTGT_MASK 0x003FFFFC
+#define BCMA_CC_PMU15_PLL_PC0_FREQTGT_SHIFT 2
+#define BCMA_CC_PMU15_PLL_PC0_PRESCALE_MASK 0x00C00000
+#define BCMA_CC_PMU15_PLL_PC0_PRESCALE_SHIFT 22
+#define BCMA_CC_PMU15_PLL_PC0_KPCTRL_MASK 0x07000000
+#define BCMA_CC_PMU15_PLL_PC0_KPCTRL_SHIFT 24
+#define BCMA_CC_PMU15_PLL_PC0_FCNTCTRL_MASK 0x38000000
+#define BCMA_CC_PMU15_PLL_PC0_FCNTCTRL_SHIFT 27
+#define BCMA_CC_PMU15_PLL_PC0_FDCMODE_MASK 0x40000000
+#define BCMA_CC_PMU15_PLL_PC0_FDCMODE_SHIFT 30
+#define BCMA_CC_PMU15_PLL_PC0_CTRLBIAS_MASK 0x80000000
+#define BCMA_CC_PMU15_PLL_PC0_CTRLBIAS_SHIFT 31
+
/* ALP clock on pre-PMU chips */
#define BCMA_CC_PMU_ALP_CLOCK 20000000
/* HT clock for systems with PMU-enabled chipcommon */
@@ -507,6 +531,37 @@
#define BCMA_CHIPCTL_5357_I2S_PINS_ENABLE BIT(18)
#define BCMA_CHIPCTL_5357_I2CSPI_PINS_ENABLE BIT(19)
+#define BCMA_RES_4314_LPLDO_PU BIT(0)
+#define BCMA_RES_4314_PMU_SLEEP_DIS BIT(1)
+#define BCMA_RES_4314_PMU_BG_PU BIT(2)
+#define BCMA_RES_4314_CBUCK_LPOM_PU BIT(3)
+#define BCMA_RES_4314_CBUCK_PFM_PU BIT(4)
+#define BCMA_RES_4314_CLDO_PU BIT(5)
+#define BCMA_RES_4314_LPLDO2_LVM BIT(6)
+#define BCMA_RES_4314_WL_PMU_PU BIT(7)
+#define BCMA_RES_4314_LNLDO_PU BIT(8)
+#define BCMA_RES_4314_LDO3P3_PU BIT(9)
+#define BCMA_RES_4314_OTP_PU BIT(10)
+#define BCMA_RES_4314_XTAL_PU BIT(11)
+#define BCMA_RES_4314_WL_PWRSW_PU BIT(12)
+#define BCMA_RES_4314_LQ_AVAIL BIT(13)
+#define BCMA_RES_4314_LOGIC_RET BIT(14)
+#define BCMA_RES_4314_MEM_SLEEP BIT(15)
+#define BCMA_RES_4314_MACPHY_RET BIT(16)
+#define BCMA_RES_4314_WL_CORE_READY BIT(17)
+#define BCMA_RES_4314_ILP_REQ BIT(18)
+#define BCMA_RES_4314_ALP_AVAIL BIT(19)
+#define BCMA_RES_4314_MISC_PWRSW_PU BIT(20)
+#define BCMA_RES_4314_SYNTH_PWRSW_PU BIT(21)
+#define BCMA_RES_4314_RX_PWRSW_PU BIT(22)
+#define BCMA_RES_4314_RADIO_PU BIT(23)
+#define BCMA_RES_4314_VCO_LDO_PU BIT(24)
+#define BCMA_RES_4314_AFE_LDO_PU BIT(25)
+#define BCMA_RES_4314_RX_LDO_PU BIT(26)
+#define BCMA_RES_4314_TX_LDO_PU BIT(27)
+#define BCMA_RES_4314_HT_AVAIL BIT(28)
+#define BCMA_RES_4314_MACPHY_CLK_AVAIL BIT(29)
+
/* Data for the PMU, if available.
* Check availability with ((struct bcma_chipcommon)->capabilities & BCMA_CC_CAP_PMU)
*/
--
1.7.10.4
^ permalink raw reply related
* Re: Power saving features for iwl4965
From: Stanislaw Gruszka @ 2013-06-25 14:25 UTC (permalink / raw)
To: Pedro Francisco; +Cc: Tino Keitel, ML linux-wireless
In-Reply-To: <20130614131829.GA5125@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 2056 bytes --]
On Fri, Jun 14, 2013 at 03:18:29PM +0200, Stanislaw Gruszka wrote:
> > >> I also got a SYSASSERT:
> > >> (...)
> > >>
> > >> I disabled powersave (but kept running the same kernel) and none of
> > >> the errors appeared again.
> > >
> > > Yes, this seems to be iwlegacy PS issue and has to be fixed before
> > > this patch could be applied.
> >
> > But is it a driver-only issue? I had assumed it was some sort of
> > fireware+driver issue...
> Looks like driver issue or firmware issue that can be workaround in
> the driver.
>
> > Will running with debug on help? Or is it easily reproducible on any
> > iwl3945 / iwl4465 ?
> >
> > Because in my case (iwl3945) it happens after boot, no prior suspend
> > to RAM is required to trigger the issues.
> I can reproduce microcode error on iwl4965 by reloading modules. Looks
> like we put device in sleep mode and it can not be properly booted when
> driver initalize. I did not yet test patch on iwl3945. When I'll do
> this, I think I'll be able to reproduce problems you discovered. If not
> I'll ask for more debug info.
I found problem on 4965, we have to send power configuration command to
device earlier, before some other commands. Attached patch solved
microcode errors I have on 4965.
Regarding iwl3945. Display on my 3945 laptop no longer works. I took
3945 device from that laptop and installed it on two different machines.
Unfortunately on none of them device was detected by pci system :-/
I have figure out how to get working 3945 testing environment, but for
now, perhaps you could provide me some more debug information.
Pedro, please do the fallowing:
Add this line in /etc/rsyslog.conf:
kern.* /var/log/kernel
Restart rsyslog services:
# systemctl restart rsyslog.service
Restart iwl3945 module with verbose debug enabled:
modprobe -r iwl3945
modprobe iwl3945 debug=0x47ffffff
Reproduce the problem.
Unload module:
modprobe -r iwl3945
Then provide me generated /var/log/kernel file (compressed if needed).
Thanks
Stanislaw
[-- Attachment #2: iwl4965-update-power-mode-early.patch --]
[-- Type: text/plain, Size: 730 bytes --]
diff --git a/drivers/net/wireless/iwlegacy/4965-mac.c b/drivers/net/wireless/iwlegacy/4965-mac.c
index d287fd2..e7821f6 100644
--- a/drivers/net/wireless/iwlegacy/4965-mac.c
+++ b/drivers/net/wireless/iwlegacy/4965-mac.c
@@ -5334,6 +5334,9 @@ il4965_alive_start(struct il_priv *il)
il->active_rate = RATES_MASK;
+ il_power_update_mode(il, true);
+ D_INFO("Updated power mode\n");
+
if (il_is_associated(il)) {
struct il_rxon_cmd *active_rxon =
(struct il_rxon_cmd *)&il->active;
@@ -5364,9 +5367,6 @@ il4965_alive_start(struct il_priv *il)
D_INFO("ALIVE processing complete.\n");
wake_up(&il->wait_command_queue);
- il_power_update_mode(il, true);
- D_INFO("Updated power mode\n");
-
return;
restart:
^ permalink raw reply related
* [PATCH v12 2/2] cfg80211: P2P find phase offload
From: Vladimir Kondratiev @ 2013-06-25 13:42 UTC (permalink / raw)
To: Johannes Berg
Cc: Vladimir Kondratiev, linux-wireless, Luis R . Rodriguez,
John W . Linville, Jouni Malinen, Arend van Spriel, Peer, Ilan
In-Reply-To: <1372167756-17928-1-git-send-email-qca_vkondrat@qca.qualcomm.com>
Allow to implement P2P find phase in the driver/firmware.
Offload scheme designed as follows:
- Driver provide methods start_p2p_find and stop_p2p_find in the cfg80211_ops;
- Driver indicate firmware or driver responds to the probe requests by setting
feature NL80211_FEATURE_P2P_PROBE_RESP_OFFLOAD
- wpa_supplicant analyses methods supported to discover p2p offload support;
- wpa_supplicant analyses feature flags to discover p2p probe response
offload support;
to perform p2p scan, wpa_supplicant:
- perform legacy scan, through driver's cfg80211_ops 'scan' method
- configure rx management filter to get probe-request and probe-response frames
- start p2p find via driver's cfg80211_ops start_p2p_find method
- driver start p2p find with hardware and notify wpa_supplicant with
cfg80211_p2p_find_notify_start()
- driver/firmware toggle search/listen states. Received probe-request and
probe-response frames passed to the wpa_supplicant via cfg80211_rx_mgmt
- when wpa_supplicant wants to stop p2p find, it calls driver's
cfg80211_ops stop_p2p_find method. Alternatively, driver/firmware may decide
to stop p2p find. In all cases, driver notifies wpa_supplicant using
cfg80211_p2p_find_notify_end()
All driver to user space communication done through nl80211 layer.
Offloaded P2P find does not support variations like progressive scan.
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
---
include/net/cfg80211.h | 76 ++++++++++++++++++
include/uapi/linux/nl80211.h | 14 ++++
net/wireless/nl80211.c | 180 +++++++++++++++++++++++++++++++++++++++++++
net/wireless/rdev-ops.h | 19 +++++
net/wireless/trace.h | 44 +++++++++++
5 files changed, 333 insertions(+)
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 8347500..e3cc49c 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -1805,6 +1805,38 @@ struct cfg80211_update_ft_ies_params {
};
/**
+ * struct cfg80211_p2p_find_params - parameters for P2P find
+ * @probe_ie: extra IE's for probe frames
+ * @probe_ie_len: length, bytes, of @probe_ie
+ * @probe_resp_ie: extra IE's for probe response frames
+ * @probe_resp_ie_len: length, bytes, of @probe_resp_ie
+ * Driver/firmware may add additional IE's as well as modify
+ * provided ones; typical IE's to be added are
+ * WLAN_EID_EXT_SUPP_RATES, WLAN_EID_DS_PARAMS,
+ * WLAN_EID_HT_CAPABILITY.
+ * @min_discoverable_interval: and
+ * @max_discoverable_interval: min/max for random multiplier of 100TU's
+ * for the listen state duration
+ * @listen_channel: channel to listen on; not NULL
+ * @n_channels: number of channels to operate on
+ * @channels: channels to operate on
+ * may be NULL, in this case driver suppose to scan for all social
+ * channels; or channel set should be non-empty (n_channels > 0)
+ */
+struct cfg80211_p2p_find_params {
+ const u8 *probe_ie;
+ size_t probe_ie_len;
+ const u8 *probe_resp_ie;
+ size_t probe_resp_ie_len;
+ u32 min_discoverable_interval;
+ u32 max_discoverable_interval;
+ struct ieee80211_channel *listen_channel;
+
+ int n_channels;
+ struct ieee80211_channel **channels;
+};
+
+/**
* struct cfg80211_ops - backend description for wireless configuration
*
* This struct is registered by fullmac card drivers and/or wireless stacks
@@ -2043,6 +2075,24 @@ struct cfg80211_update_ft_ies_params {
* driver can take the most appropriate actions.
* @crit_proto_stop: Indicates critical protocol no longer needs increased link
* reliability. This operation can not fail.
+ *
+ * @start_p2p_find: start P2P find phase
+ * Parameters include IEs for probe/probe-resp frames;
+ * and channels to operate on.
+ * Parameters are not retained after call, driver need to copy data if
+ * it need it later.
+ * P2P find can't run concurrently with ROC or scan,
+ * conflict with scan detected by cfg80211 and -EBUSY returned;
+ * and driver should check for ROC and return -EBUSY to indicate conflict.
+ * While performing P2P discovery, driver should report received
+ * probe-request and probe-response frames via cfg80211_rx_mgmt
+ * accordingly to the rx mgmt filter, as set by mgmt_frame_register().
+ * If device indicates NL80211_FEATURE_P2P_PROBE_RESP_OFFLOAD, it may
+ * reply some matching probes and replied probes may be not reported to
+ * the upper layers; otherwise it must not reply any probe.
+ * @stop_p2p_find: stop P2P find phase
+ * After stopping p2p find, driver should call
+ * cfg80211_p2p_find_notify_end() to inform upper layers
*/
struct cfg80211_ops {
int (*suspend)(struct wiphy *wiphy, struct cfg80211_wowlan *wow);
@@ -2278,6 +2328,12 @@ struct cfg80211_ops {
u16 duration);
void (*crit_proto_stop)(struct wiphy *wiphy,
struct wireless_dev *wdev);
+
+ int (*start_p2p_find)(struct wiphy *wiphy,
+ struct wireless_dev *wdev,
+ struct cfg80211_p2p_find_params *params);
+ void (*stop_p2p_find)(struct wiphy *wiphy,
+ struct wireless_dev *wdev);
};
/*
@@ -4177,6 +4233,26 @@ void cfg80211_report_wowlan_wakeup(struct wireless_dev *wdev,
*/
void cfg80211_crit_proto_stopped(struct wireless_dev *wdev, gfp_t gfp);
+/**
+ * cfg80211_p2p_find_notify_start - report p2p find phase started
+ * @wdev: the wireless device reporting the event
+ * @gfp: allocation flags
+ */
+void cfg80211_p2p_find_notify_start(struct wireless_dev *wdev, gfp_t gfp);
+
+/**
+ * cfg80211_p2p_find_notify_end - report p2p find phase ended
+ * @wdev: the wireless device reporting the event
+ * @gfp: allocation flags
+ *
+ * p2p find phase may be ended either unsolicited or in response to
+ * ops->stop_p2p_find
+ *
+ * In any case, if @start_p2p_find from driver's struct cfg80211_ops called,
+ * @cfg80211_p2p_find_notify_end should be eventually called
+ */
+void cfg80211_p2p_find_notify_end(struct wireless_dev *wdev, gfp_t gfp);
+
/* Logging, debugging and troubleshooting/diagnostic helpers. */
/* wiphy_printk helpers, similar to dev_printk */
diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h
index f125d2c..3a2f2b0 100644
--- a/include/uapi/linux/nl80211.h
+++ b/include/uapi/linux/nl80211.h
@@ -810,6 +810,9 @@ enum nl80211_commands {
NL80211_CMD_CRIT_PROTOCOL_START,
NL80211_CMD_CRIT_PROTOCOL_STOP,
+ NL80211_CMD_START_P2P_FIND,
+ NL80211_CMD_STOP_P2P_FIND,
+
/* add new commands above here */
/* used to define NL80211_CMD_MAX below */
@@ -1438,6 +1441,10 @@ enum nl80211_commands {
*
* @NL80211_ATTR_RXMGMT_FLAGS: flags for cfg80211_rx_mgmt, u32
*
+ * @NL80211_ATTR_MIN_DISCOVERABLE_INTERVAL:
+ * @NL80211_ATTR_MAX_DISCOVERABLE_INTERVAL: min/max discoverable interval
+ * for the p2p find, multiple of 100 TUs, represented as u32
+ *
* @NL80211_ATTR_MAX: highest attribute number currently defined
* @__NL80211_ATTR_AFTER_LAST: internal use
*/
@@ -1740,6 +1747,9 @@ enum nl80211_attrs {
NL80211_ATTR_RXMGMT_FLAGS,
+ NL80211_ATTR_MIN_DISCOVERABLE_INTERVAL,
+ NL80211_ATTR_MAX_DISCOVERABLE_INTERVAL,
+
/* add attributes here, update the policy in nl80211.c */
__NL80211_ATTR_AFTER_LAST,
@@ -3592,6 +3602,9 @@ enum nl80211_ap_sme_features {
* interface. An active monitor interface behaves like a normal monitor
* interface, but gets added to the driver. It ensures that incoming
* unicast packets directed at the configured interface address get ACKed.
+ * @NL80211_FEATURE_P2P_PROBE_RESP_OFFLOAD: When in P2P find phase,
+ * the device may respond to some probe-requests in hardware;
+ * replied probe-requests may be not reported to the upper layers.
*/
enum nl80211_feature_flags {
NL80211_FEATURE_SK_TX_STATUS = 1 << 0,
@@ -3612,6 +3625,7 @@ enum nl80211_feature_flags {
NL80211_FEATURE_FULL_AP_CLIENT_STATE = 1 << 15,
NL80211_FEATURE_USERSPACE_MPM = 1 << 16,
NL80211_FEATURE_ACTIVE_MONITOR = 1 << 17,
+ NL80211_FEATURE_P2P_PROBE_RESP_OFFLOAD = 1 << 18,
};
/**
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 65c5578..a36ff7e 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -349,6 +349,8 @@ static const struct nla_policy nl80211_policy[NL80211_ATTR_MAX+1] = {
[NL80211_ATTR_IE_RIC] = { .type = NLA_BINARY,
.len = IEEE80211_MAX_DATA_LEN },
[NL80211_ATTR_PEER_AID] = { .type = NLA_U16 },
+ [NL80211_ATTR_MIN_DISCOVERABLE_INTERVAL] = { .type = NLA_U32 },
+ [NL80211_ATTR_MAX_DISCOVERABLE_INTERVAL] = { .type = NLA_U32 },
};
/* policy for the key attributes */
@@ -1387,6 +1389,8 @@ static int nl80211_send_wiphy(struct cfg80211_registered_device *dev,
if (split) {
CMD(crit_proto_start, CRIT_PROTOCOL_START);
CMD(crit_proto_stop, CRIT_PROTOCOL_STOP);
+ CMD(start_p2p_find, START_P2P_FIND);
+ CMD(stop_p2p_find, STOP_P2P_FIND);
}
#ifdef CONFIG_NL80211_TESTMODE
@@ -8306,6 +8310,129 @@ static int nl80211_crit_protocol_stop(struct sk_buff *skb,
return 0;
}
+static int nl80211_start_p2p_find(struct sk_buff *skb, struct genl_info *info)
+{
+ struct cfg80211_registered_device *rdev = info->user_ptr[0];
+ struct wireless_dev *wdev = info->user_ptr[1];
+ struct wiphy *wiphy = &rdev->wiphy;
+ /*
+ * Defaults, as defined in the spec
+ * Ref: Wi-Fi Peer-to-Peer (P2P) Technical Specification v1.1
+ * Clause: 3.1.2.1.3 Find Phase
+ */
+ struct cfg80211_p2p_find_params params = {
+ .min_discoverable_interval = 1,
+ .max_discoverable_interval = 3,
+ };
+ struct nlattr *attr_freq = info->attrs[NL80211_ATTR_SCAN_FREQUENCIES];
+ struct nlattr *attr_l_freq = info->attrs[NL80211_ATTR_WIPHY_FREQ];
+ struct nlattr *attr;
+ int err, tmp, n_channels, i = 0;
+ struct ieee80211_channel **channels = NULL;
+ struct ieee80211_channel *chan;
+
+ if (wdev->iftype != NL80211_IFTYPE_P2P_DEVICE)
+ return -EOPNOTSUPP;
+
+ if (!rdev->ops->start_p2p_find || !rdev->ops->stop_p2p_find)
+ return -EOPNOTSUPP;
+
+ if (!attr_l_freq)
+ return -EINVAL;
+
+ if (!is_valid_ie_attr(info->attrs[NL80211_ATTR_IE]))
+ return -EINVAL;
+
+ if (!is_valid_ie_attr(info->attrs[NL80211_ATTR_IE_PROBE_RESP]))
+ return -EINVAL;
+
+ if (rdev->scan_req)
+ return -EBUSY;
+
+ chan = ieee80211_get_channel(wiphy, nla_get_u32(attr_l_freq));
+ if (!chan || (chan->flags & IEEE80211_CHAN_DISABLED))
+ return -EINVAL;
+ params.listen_channel = chan;
+
+ if (attr_freq) {
+ n_channels = validate_scan_freqs(attr_freq);
+ if (!n_channels)
+ return -EINVAL;
+
+ channels = kzalloc(n_channels * sizeof(*channels), GFP_KERNEL);
+ if (!channels)
+ return -ENOMEM;
+
+ /* user specified, bail out if channel not found */
+ nla_for_each_nested(attr, attr_freq, tmp) {
+ chan = ieee80211_get_channel(wiphy, nla_get_u32(attr));
+
+ if (!chan) {
+ err = -EINVAL;
+ goto out_free;
+ }
+
+ /* ignore disabled channels */
+ if (chan->flags & IEEE80211_CHAN_DISABLED)
+ continue;
+
+ params.channels[i] = chan;
+ i++;
+ }
+ if (!i) {
+ err = -EINVAL;
+ goto out_free;
+ }
+
+ params.n_channels = i;
+ params.channels = channels;
+ }
+
+
+ attr = info->attrs[NL80211_ATTR_IE];
+ if (attr) {
+ params.probe_ie_len = nla_len(attr);
+ params.probe_ie = nla_data(attr);
+ }
+
+ attr = info->attrs[NL80211_ATTR_IE_PROBE_RESP];
+ if (attr) {
+ params.probe_resp_ie_len = nla_len(attr);
+ params.probe_resp_ie = nla_data(attr);
+ }
+
+ attr = info->attrs[NL80211_ATTR_MIN_DISCOVERABLE_INTERVAL];
+ if (attr)
+ params.min_discoverable_interval = nla_get_u32(attr);
+
+ attr = info->attrs[NL80211_ATTR_MAX_DISCOVERABLE_INTERVAL];
+ if (attr)
+ params.max_discoverable_interval = nla_get_u32(attr);
+
+ err = rdev_start_p2p_find(rdev, wdev, ¶ms);
+
+out_free:
+ kfree(channels);
+
+ return err;
+}
+
+static int nl80211_stop_p2p_find(struct sk_buff *skb, struct genl_info *info)
+{
+ struct cfg80211_registered_device *rdev = info->user_ptr[0];
+ struct wireless_dev *wdev = info->user_ptr[1];
+
+ if (wdev->iftype != NL80211_IFTYPE_P2P_DEVICE)
+ return -EOPNOTSUPP;
+
+ if (!rdev->ops->start_p2p_find || !rdev->ops->stop_p2p_find)
+ return -EOPNOTSUPP;
+
+ rdev_stop_p2p_find(rdev, wdev);
+
+ return 0;
+}
+
#define NL80211_FLAG_NEED_WIPHY 0x01
#define NL80211_FLAG_NEED_NETDEV 0x02
#define NL80211_FLAG_NEED_RTNL 0x04
@@ -8978,6 +9105,22 @@ static struct genl_ops nl80211_ops[] = {
NL80211_FLAG_NEED_RTNL,
},
{
+ .cmd = NL80211_CMD_START_P2P_FIND,
+ .doit = nl80211_start_p2p_find,
+ .policy = nl80211_policy,
+ .flags = GENL_ADMIN_PERM,
+ .internal_flags = NL80211_FLAG_NEED_WDEV_UP |
+ NL80211_FLAG_NEED_RTNL,
+ },
+ {
+ .cmd = NL80211_CMD_STOP_P2P_FIND,
+ .doit = nl80211_stop_p2p_find,
+ .policy = nl80211_policy,
+ .flags = GENL_ADMIN_PERM,
+ .internal_flags = NL80211_FLAG_NEED_WDEV_UP |
+ NL80211_FLAG_NEED_RTNL,
+ },
+ {
.cmd = NL80211_CMD_GET_PROTOCOL_FEATURES,
.doit = nl80211_get_protocol_features,
.policy = nl80211_policy,
@@ -10645,6 +10788,43 @@ void cfg80211_tdls_oper_request(struct net_device *dev, const u8 *peer,
}
EXPORT_SYMBOL(cfg80211_tdls_oper_request);
+static
+void cfg80211_p2p_find_notify(struct wireless_dev *wdev, int cmd, gfp_t gfp)
+{
+ struct wiphy *wiphy = wdev->wiphy;
+ struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy);
+ struct sk_buff *msg;
+ void *hdr;
+
+ trace_cfg80211_p2p_find_notify(wdev, cmd);
+ msg = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL);
+ if (!msg)
+ return;
+
+ hdr = nl80211hdr_put(msg, 0, 0, 0, cmd);
+ if (!hdr) {
+ nlmsg_free(msg);
+ return;
+ }
+
+ genlmsg_end(msg, hdr);
+
+ genlmsg_multicast_netns(wiphy_net(&rdev->wiphy), msg, 0,
+ nl80211_scan_mcgrp.id, GFP_KERNEL);
+}
+
+void cfg80211_p2p_find_notify_start(struct wireless_dev *wdev, gfp_t gfp)
+{
+ cfg80211_p2p_find_notify(wdev, NL80211_CMD_START_P2P_FIND, gfp);
+}
+EXPORT_SYMBOL(cfg80211_p2p_find_notify_start);
+
+void cfg80211_p2p_find_notify_end(struct wireless_dev *wdev, gfp_t gfp)
+{
+ cfg80211_p2p_find_notify(wdev, NL80211_CMD_STOP_P2P_FIND, gfp);
+}
+EXPORT_SYMBOL(cfg80211_p2p_find_notify_end);
+
static int nl80211_netlink_notify(struct notifier_block * nb,
unsigned long state,
void *_notify)
diff --git a/net/wireless/rdev-ops.h b/net/wireless/rdev-ops.h
index 9f15f0a..94ff98a 100644
--- a/net/wireless/rdev-ops.h
+++ b/net/wireless/rdev-ops.h
@@ -923,4 +923,23 @@ static inline void rdev_crit_proto_stop(struct cfg80211_registered_device *rdev,
trace_rdev_return_void(&rdev->wiphy);
}
+static inline int rdev_start_p2p_find(struct cfg80211_registered_device *rdev,
+ struct wireless_dev *wdev,
+ struct cfg80211_p2p_find_params *params)
+{
+ int ret;
+ trace_rdev_start_p2p_find(&rdev->wiphy, wdev, params);
+ ret = rdev->ops->start_p2p_find(&rdev->wiphy, wdev, params);
+ trace_rdev_return_int(&rdev->wiphy, ret);
+ return ret;
+}
+
+static inline void rdev_stop_p2p_find(struct cfg80211_registered_device *rdev,
+ struct wireless_dev *wdev)
+{
+ trace_rdev_stop_p2p_find(&rdev->wiphy, wdev);
+ rdev->ops->stop_p2p_find(&rdev->wiphy, wdev);
+ trace_rdev_return_void(&rdev->wiphy);
+}
+
#endif /* __CFG80211_RDEV_OPS */
diff --git a/net/wireless/trace.h b/net/wireless/trace.h
index e1534baf..d4e4886 100644
--- a/net/wireless/trace.h
+++ b/net/wireless/trace.h
@@ -1841,6 +1841,36 @@ TRACE_EVENT(rdev_crit_proto_stop,
WIPHY_PR_ARG, WDEV_PR_ARG)
);
+TRACE_EVENT(rdev_start_p2p_find,
+ TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
+ struct cfg80211_p2p_find_params *params),
+ TP_ARGS(wiphy, wdev, params),
+ TP_STRUCT__entry(
+ WIPHY_ENTRY
+ WDEV_ENTRY
+ __field(u32, min_di)
+ __field(u32, max_di)
+ __field(u32, listen_freq)
+ __field(int, n_channels)
+ ),
+ TP_fast_assign(
+ WIPHY_ASSIGN;
+ WDEV_ASSIGN;
+ __entry->min_di = params->min_discoverable_interval;
+ __entry->max_di = params->max_discoverable_interval;
+ __entry->listen_freq = params->listen_channel->center_freq;
+ __entry->n_channels = params->n_channels;
+ ),
+ TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT ", listen %d MHz, disc. int. [%d..%d], n_channels %d",
+ WIPHY_PR_ARG, WDEV_PR_ARG, __entry->listen_freq,
+ __entry->min_di, __entry->max_di, __entry->n_channels)
+);
+
+DEFINE_EVENT(wiphy_wdev_evt, rdev_stop_p2p_find,
+ TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
+ TP_ARGS(wiphy, wdev)
+);
+
/*************************************************************
* cfg80211 exported functions traces *
*************************************************************/
@@ -2520,6 +2550,20 @@ TRACE_EVENT(cfg80211_ft_event,
WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(target_ap))
);
+TRACE_EVENT(cfg80211_p2p_find_notify,
+ TP_PROTO(struct wireless_dev *wdev, int cmd),
+ TP_ARGS(wdev, cmd),
+ TP_STRUCT__entry(
+ WDEV_ENTRY
+ __field(int, cmd)
+ ),
+ TP_fast_assign(
+ WDEV_ASSIGN;
+ __entry->cmd = cmd;
+ ),
+ TP_printk(WDEV_PR_FMT ", cmd: %d", WDEV_PR_ARG, __entry->cmd)
+);
+
#endif /* !__RDEV_OPS_TRACE || TRACE_HEADER_MULTI_READ */
#undef TRACE_INCLUDE_PATH
--
1.8.1.2
^ permalink raw reply related
* [PATCH v12 1/2] cfg80211: add 'flags' to cfg80211_rx_mgmt()
From: Vladimir Kondratiev @ 2013-06-25 13:42 UTC (permalink / raw)
To: Johannes Berg
Cc: Vladimir Kondratiev, linux-wireless, Luis R . Rodriguez,
John W . Linville, Jouni Malinen, Arend van Spriel, Peer, Ilan
In-Reply-To: <1372167756-17928-1-git-send-email-qca_vkondrat@qca.qualcomm.com>
Flags intended to report various auxiliary information.
Introduced flag NL80211_RXMGMT_FLAG_REPLIED to report
whether frame was replied by the device/driver.
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
---
drivers/net/wireless/ath/ath6kl/wmi.c | 7 +++----
drivers/net/wireless/ath/wil6210/wmi.c | 2 +-
drivers/net/wireless/brcm80211/brcmfmac/p2p.c | 4 ++--
drivers/net/wireless/mwifiex/util.c | 4 ++--
include/net/cfg80211.h | 3 ++-
include/uapi/linux/nl80211.h | 13 +++++++++++++
net/mac80211/rx.c | 3 +--
net/wireless/mlme.c | 4 ++--
net/wireless/nl80211.c | 6 ++++--
net/wireless/nl80211.h | 2 +-
10 files changed, 31 insertions(+), 17 deletions(-)
diff --git a/drivers/net/wireless/ath/ath6kl/wmi.c b/drivers/net/wireless/ath/ath6kl/wmi.c
index 87aefb4..546d5da 100644
--- a/drivers/net/wireless/ath/ath6kl/wmi.c
+++ b/drivers/net/wireless/ath/ath6kl/wmi.c
@@ -568,8 +568,8 @@ static int ath6kl_wmi_rx_probe_req_event_rx(struct wmi *wmi, u8 *datap, int len,
dlen, freq, vif->probe_req_report);
if (vif->probe_req_report || vif->nw_type == AP_NETWORK)
- cfg80211_rx_mgmt(&vif->wdev, freq, 0,
- ev->data, dlen, GFP_ATOMIC);
+ cfg80211_rx_mgmt(&vif->wdev, freq, 0, ev->data, dlen, 0,
+ GFP_ATOMIC);
return 0;
}
@@ -608,8 +608,7 @@ static int ath6kl_wmi_rx_action_event_rx(struct wmi *wmi, u8 *datap, int len,
return -EINVAL;
}
ath6kl_dbg(ATH6KL_DBG_WMI, "rx_action: len=%u freq=%u\n", dlen, freq);
- cfg80211_rx_mgmt(&vif->wdev, freq, 0,
- ev->data, dlen, GFP_ATOMIC);
+ cfg80211_rx_mgmt(&vif->wdev, freq, 0, ev->data, dlen, 0, GFP_ATOMIC);
return 0;
}
diff --git a/drivers/net/wireless/ath/wil6210/wmi.c b/drivers/net/wireless/ath/wil6210/wmi.c
index dc8059a..21c791e 100644
--- a/drivers/net/wireless/ath/wil6210/wmi.c
+++ b/drivers/net/wireless/ath/wil6210/wmi.c
@@ -339,7 +339,7 @@ static void wmi_evt_rx_mgmt(struct wil6210_priv *wil, int id, void *d, int len)
}
} else {
cfg80211_rx_mgmt(wil->wdev, freq, signal,
- (void *)rx_mgmt_frame, d_len, GFP_KERNEL);
+ (void *)rx_mgmt_frame, d_len, 0, GFP_KERNEL);
}
}
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/p2p.c b/drivers/net/wireless/brcm80211/brcmfmac/p2p.c
index 79555f0..d7a9745 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/p2p.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/p2p.c
@@ -1430,7 +1430,7 @@ int brcmf_p2p_notify_action_frame_rx(struct brcmf_if *ifp,
IEEE80211_BAND_5GHZ);
wdev = &ifp->vif->wdev;
- cfg80211_rx_mgmt(wdev, freq, 0, (u8 *)mgmt_frame, mgmt_frame_len,
+ cfg80211_rx_mgmt(wdev, freq, 0, (u8 *)mgmt_frame, mgmt_frame_len, 0,
GFP_ATOMIC);
kfree(mgmt_frame);
@@ -1895,7 +1895,7 @@ s32 brcmf_p2p_notify_rx_mgmt_p2p_probereq(struct brcmf_if *ifp,
IEEE80211_BAND_2GHZ :
IEEE80211_BAND_5GHZ);
- cfg80211_rx_mgmt(&vif->wdev, freq, 0, mgmt_frame, mgmt_frame_len,
+ cfg80211_rx_mgmt(&vif->wdev, freq, 0, mgmt_frame, mgmt_frame_len, 0,
GFP_ATOMIC);
brcmf_dbg(INFO, "mgmt_frame_len (%d) , e->datalen (%d), chanspec (%04x), freq (%d)\n",
diff --git a/drivers/net/wireless/mwifiex/util.c b/drivers/net/wireless/mwifiex/util.c
index e57ac0d..5d9e150 100644
--- a/drivers/net/wireless/mwifiex/util.c
+++ b/drivers/net/wireless/mwifiex/util.c
@@ -171,8 +171,8 @@ mwifiex_process_mgmt_packet(struct mwifiex_private *priv,
rx_pd->rx_pkt_length = cpu_to_le16(pkt_len);
cfg80211_rx_mgmt(priv->wdev, priv->roc_cfg.chan.center_freq,
- CAL_RSSI(rx_pd->snr, rx_pd->nf),
- skb->data, pkt_len, GFP_ATOMIC);
+ CAL_RSSI(rx_pd->snr, rx_pd->nf), skb->data, pkt_len,
+ 0, GFP_ATOMIC);
return 0;
}
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 6a43c34..8347500 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -3856,6 +3856,7 @@ 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: flags, as defined in enum nl80211_rxmgmt_flags
* @gfp: context flags
*
* This function is called whenever an Action frame is received for a station
@@ -3867,7 +3868,7 @@ void cfg80211_conn_failed(struct net_device *dev, const u8 *mac_addr,
* driver is responsible for rejecting the frame.
*/
bool cfg80211_rx_mgmt(struct wireless_dev *wdev, int freq, int sig_dbm,
- const u8 *buf, size_t len, gfp_t gfp);
+ const u8 *buf, size_t len, u32 flags, gfp_t gfp);
/**
* cfg80211_mgmt_tx_status - notification of TX status for management frame
diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h
index ca6facf..f125d2c 100644
--- a/include/uapi/linux/nl80211.h
+++ b/include/uapi/linux/nl80211.h
@@ -1436,6 +1436,8 @@ enum nl80211_commands {
* allowed to be used with the first @NL80211_CMD_SET_STATION command to
* update a TDLS peer STA entry.
*
+ * @NL80211_ATTR_RXMGMT_FLAGS: flags for cfg80211_rx_mgmt, u32
+ *
* @NL80211_ATTR_MAX: highest attribute number currently defined
* @__NL80211_ATTR_AFTER_LAST: internal use
*/
@@ -1736,6 +1738,8 @@ enum nl80211_attrs {
NL80211_ATTR_PEER_AID,
+ NL80211_ATTR_RXMGMT_FLAGS,
+
/* add attributes here, update the policy in nl80211.c */
__NL80211_ATTR_AFTER_LAST,
@@ -3754,4 +3758,13 @@ enum nl80211_crit_proto_id {
/* maximum duration for critical protocol measures */
#define NL80211_CRIT_PROTO_MAX_DURATION 5000 /* msec */
+/**
+ * enum nl80211_rxmgmt_flags - flags for cfg80211_rx_mgmt
+ *
+ * @NL80211_RXMGMT_FLAG_REPLIED: frame was replied by device/driver.
+ */
+enum nl80211_rxmgmt_flags {
+ NL80211_RXMGMT_FLAG_REPLIED = (1 << 0),
+};
+
#endif /* __LINUX_NL80211_H */
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index 23dbcfc..3f7fa49 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -2635,8 +2635,7 @@ ieee80211_rx_h_userspace_mgmt(struct ieee80211_rx_data *rx)
sig = status->signal;
if (cfg80211_rx_mgmt(&rx->sdata->wdev, status->freq, sig,
- rx->skb->data, rx->skb->len,
- GFP_ATOMIC)) {
+ rx->skb->data, rx->skb->len, 0, GFP_ATOMIC)) {
if (rx->sta)
rx->sta->rx_packets++;
dev_kfree_skb(rx->skb);
diff --git a/net/wireless/mlme.c b/net/wireless/mlme.c
index a61a44b..74b1856 100644
--- a/net/wireless/mlme.c
+++ b/net/wireless/mlme.c
@@ -615,7 +615,7 @@ int cfg80211_mlme_mgmt_tx(struct cfg80211_registered_device *rdev,
}
bool cfg80211_rx_mgmt(struct wireless_dev *wdev, int freq, int sig_mbm,
- const u8 *buf, size_t len, gfp_t gfp)
+ const u8 *buf, size_t len, u32 flags, gfp_t gfp)
{
struct wiphy *wiphy = wdev->wiphy;
struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy);
@@ -658,7 +658,7 @@ bool cfg80211_rx_mgmt(struct wireless_dev *wdev, int freq, int sig_mbm,
/* Indicate the received Action frame to user space */
if (nl80211_send_mgmt(rdev, wdev, reg->nlportid,
freq, sig_mbm,
- buf, len, gfp))
+ buf, len, flags, gfp))
continue;
result = true;
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 57be2f4..65c5578 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -9962,7 +9962,7 @@ EXPORT_SYMBOL(cfg80211_rx_unexpected_4addr_frame);
int nl80211_send_mgmt(struct cfg80211_registered_device *rdev,
struct wireless_dev *wdev, u32 nlportid,
int freq, int sig_dbm,
- const u8 *buf, size_t len, gfp_t gfp)
+ const u8 *buf, size_t len, u32 flags, gfp_t gfp)
{
struct net_device *netdev = wdev->netdev;
struct sk_buff *msg;
@@ -9985,7 +9985,9 @@ int nl80211_send_mgmt(struct cfg80211_registered_device *rdev,
nla_put_u32(msg, NL80211_ATTR_WIPHY_FREQ, freq) ||
(sig_dbm &&
nla_put_u32(msg, NL80211_ATTR_RX_SIGNAL_DBM, sig_dbm)) ||
- nla_put(msg, NL80211_ATTR_FRAME, len, buf))
+ nla_put(msg, NL80211_ATTR_FRAME, len, buf) ||
+ (flags &&
+ nla_put_u32(msg, NL80211_ATTR_RXMGMT_FLAGS, flags)))
goto nla_put_failure;
genlmsg_end(msg, hdr);
diff --git a/net/wireless/nl80211.h b/net/wireless/nl80211.h
index a4073e8..3b51a76 100644
--- a/net/wireless/nl80211.h
+++ b/net/wireless/nl80211.h
@@ -66,7 +66,7 @@ void nl80211_send_ibss_bssid(struct cfg80211_registered_device *rdev,
int nl80211_send_mgmt(struct cfg80211_registered_device *rdev,
struct wireless_dev *wdev, u32 nlpid,
int freq, int sig_dbm,
- const u8 *buf, size_t len, gfp_t gfp);
+ const u8 *buf, size_t len, u32 flags, gfp_t gfp);
void
nl80211_radar_notify(struct cfg80211_registered_device *rdev,
--
1.8.1.2
^ permalink raw reply related
* [PATCH v12 0/2] P2P find phase offload
From: Vladimir Kondratiev @ 2013-06-25 13:42 UTC (permalink / raw)
To: Johannes Berg
Cc: Vladimir Kondratiev, linux-wireless, Luis R . Rodriguez,
John W . Linville, Jouni Malinen, Arend van Spriel, Peer, Ilan
Addressing input by Ilan
- remove NL80211_ATTR_LISTEN_FREQ, use NL80211_ATTR_WIPHY_FREQ instead
- trace to include listen channel
This time, only patch 2/2 changed.
Vladimir Kondratiev (2):
cfg80211: add 'flags' to cfg80211_rx_mgmt()
cfg80211: P2P find phase offload
drivers/net/wireless/ath/ath6kl/wmi.c | 7 +-
drivers/net/wireless/ath/wil6210/wmi.c | 2 +-
drivers/net/wireless/brcm80211/brcmfmac/p2p.c | 4 +-
drivers/net/wireless/mwifiex/util.c | 4 +-
include/net/cfg80211.h | 79 ++++++++++-
include/uapi/linux/nl80211.h | 27 ++++
net/mac80211/rx.c | 3 +-
net/wireless/mlme.c | 4 +-
net/wireless/nl80211.c | 186 +++++++++++++++++++++++++-
net/wireless/nl80211.h | 2 +-
net/wireless/rdev-ops.h | 19 +++
net/wireless/trace.h | 44 ++++++
12 files changed, 364 insertions(+), 17 deletions(-)
--
1.8.1.2
^ permalink raw reply
* Re: [PATCH] Documentation: dt: bindings: TI WiLink modules
From: Felipe Balbi @ 2013-06-25 13:07 UTC (permalink / raw)
To: Luciano Coelho
Cc: balbi, grant.likely, rob.herring, devicetree-discuss, linux-doc,
linux-kernel, linux-wireless, tony, linux-omap, linux-arm
In-Reply-To: <1372161370.18889.13.camel@cumari.coelho.fi>
[-- Attachment #1: Type: text/plain, Size: 1425 bytes --]
On Tue, Jun 25, 2013 at 02:56:10PM +0300, Luciano Coelho wrote:
> On Tue, 2013-06-25 at 14:12 +0300, Felipe Balbi wrote:
> > On Tue, Jun 25, 2013 at 11:35:30AM +0300, Luciano Coelho wrote:
> > > +- tcxoclock: the internal WLAN TCXO clock frequency (required for
> > > + WiLink7 not used for WiLink6 and WiLink8). Must be one of the
> > > + following:
> > > + 0 = 19.200 MHz
> > > + 1 = 26.000 MHz
> > > + 2 = 38.400 MHz
> > > + 3 = 52.000 MHz
> > > + 4 = 16.368 MHz
> > > + 5 = 32.736 MHz
> > > + 6 = 16.800 MHz
> > > + 7 = 33.600 MHz
> >
> > DTS files are pre-processed, so you could add defines in a header and
> > share the header between DTS and driver. Could help you having:
> >
> > tcxoclock = WILINK_19_200MHz;
> >
> > instead of
> >
> > tcxoclock = 0;
>
> I don't see any .dts file really doing this. There are some imx*.dtsi
> files that include imx*.h files, but I don't see these headers being
> included in any source code file.
>
> In fact, we already have all these values defined in
> include/linux/wl12xx.h, so it could be nice to reuse. But the
> cross-directory includes would look "funny". And I think it's a bit
> overkill.
>
> These values are actually used by the firmware itself, not only the
> driver, so they are also platform independent and not related to the OS.
fair enough, then there's no chance they'll change all of a sudden.
--
balbi
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply
* Re: [PATCH] Documentation: dt: bindings: TI WiLink modules
From: Luciano Coelho @ 2013-06-25 11:56 UTC (permalink / raw)
To: balbi
Cc: grant.likely, rob.herring, devicetree-discuss, linux-doc,
linux-kernel, linux-wireless, tony, linux-omap, linux-arm
In-Reply-To: <20130625111234.GJ15407@arwen.pp.htv.fi>
On Tue, 2013-06-25 at 14:12 +0300, Felipe Balbi wrote:
> On Tue, Jun 25, 2013 at 11:35:30AM +0300, Luciano Coelho wrote:
> > +- tcxoclock: the internal WLAN TCXO clock frequency (required for
> > + WiLink7 not used for WiLink6 and WiLink8). Must be one of the
> > + following:
> > + 0 = 19.200 MHz
> > + 1 = 26.000 MHz
> > + 2 = 38.400 MHz
> > + 3 = 52.000 MHz
> > + 4 = 16.368 MHz
> > + 5 = 32.736 MHz
> > + 6 = 16.800 MHz
> > + 7 = 33.600 MHz
>
> DTS files are pre-processed, so you could add defines in a header and
> share the header between DTS and driver. Could help you having:
>
> tcxoclock = WILINK_19_200MHz;
>
> instead of
>
> tcxoclock = 0;
I don't see any .dts file really doing this. There are some imx*.dtsi
files that include imx*.h files, but I don't see these headers being
included in any source code file.
In fact, we already have all these values defined in
include/linux/wl12xx.h, so it could be nice to reuse. But the
cross-directory includes would look "funny". And I think it's a bit
overkill.
These values are actually used by the firmware itself, not only the
driver, so they are also platform independent and not related to the OS.
--
Luca.
^ permalink raw reply
* pull-request: iwlwifi-next 2013-06-25
From: Johannes Berg @ 2013-06-25 11:36 UTC (permalink / raw)
To: John Linville; +Cc: linux-wireless
[-- Attachment #1: Type: text/plain, Size: 4377 bytes --]
Hi John,
This is hopefully going to be the last big pull request for
iwlwifi-next, luckily it actually mostly removes code ;-)
Emmanuel removed some unneeded/unsupported module parameters and adds a
Bluetooth 1x1 lookup-table for some upcoming products. From Alex I have
an older patch to add low-power receive support, this depended on a
mac80211 commit that only just came in with the merge from wireless-next
I did. Ilan made beacon timings better, and Eytan added some debug
statements for thermal throttling. I have a few cleanups, a fix for a
long-standing but rare warning, and, arguably the most important patch
here, the firmware API version bump for the 7260/3160 devices.
Let me know if there are any issues.
johannes
The following changes since commit 9fbdc75116f7a2b183464d42f3abccb616584105:
Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next (2013-06-24 14:45:50 -0400)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next.git for-john
for you to fetch changes up to bd4ace2a36e7c87bb5f3eceb54d3b304d395dcf0:
iwlwifi: mvm: Add support for Low Power RX (2013-06-25 12:21:19 +0200)
----------------------------------------------------------------
Alexander Bondar (1):
iwlwifi: mvm: Add support for Low Power RX
Emmanuel Grumbach (4):
iwlwifi: remove bt_ch_announce module param
iwlwifi: remove plcp_check module parameter
iwlwifi: remove auto_agg module parameter
iwlwifi: mvm: add BT-Coex LUT for 1x1 products
Ilan Peer (1):
iwlwifi: mvm: Change the settings of AP beacon time
Johannes Berg (7):
iwlwifi: bump required firmware API version for 3160/7260
iwlwifi: mvm: allow firmware crashes to wake system for debug
iwlwifi: remove testmode
iwlwifi: pcie: rework RX buffer list init and freeing
iwlwifi: always use 'rxq' as RX queue struct name
iwlwifi: always use 'trans_pcie' name
Merge remote-tracking branch 'wireless-next/master' into iwlwifi-next
eytan lifshitz (1):
iwlwifi: mvm: add thermal throttling debugging
drivers/net/wireless/iwlwifi/Kconfig | 10 -
drivers/net/wireless/iwlwifi/Makefile | 1 -
drivers/net/wireless/iwlwifi/dvm/Makefile | 1 -
drivers/net/wireless/iwlwifi/dvm/agn.h | 37 -
drivers/net/wireless/iwlwifi/dvm/dev.h | 13 +-
drivers/net/wireless/iwlwifi/dvm/lib.c | 6 -
drivers/net/wireless/iwlwifi/dvm/mac80211.c | 2 -
drivers/net/wireless/iwlwifi/dvm/main.c | 15 +-
drivers/net/wireless/iwlwifi/dvm/rs.c | 43 +-
drivers/net/wireless/iwlwifi/dvm/rx.c | 40 +-
drivers/net/wireless/iwlwifi/dvm/testmode.c | 471 -------------
drivers/net/wireless/iwlwifi/dvm/tx.c | 12 -
drivers/net/wireless/iwlwifi/iwl-7000.c | 12 +-
drivers/net/wireless/iwlwifi/iwl-config.h | 1 +
drivers/net/wireless/iwlwifi/iwl-drv.c | 16 -
drivers/net/wireless/iwlwifi/iwl-modparams.h | 6 -
drivers/net/wireless/iwlwifi/iwl-test.c | 852 ------------------------
drivers/net/wireless/iwlwifi/iwl-test.h | 161 -----
drivers/net/wireless/iwlwifi/iwl-testmode.h | 309 ---------
drivers/net/wireless/iwlwifi/iwl-trans.h | 2 -
drivers/net/wireless/iwlwifi/mvm/bt-coex.c | 21 +-
drivers/net/wireless/iwlwifi/mvm/d3.c | 6 +
drivers/net/wireless/iwlwifi/mvm/debugfs.c | 27 +-
drivers/net/wireless/iwlwifi/mvm/fw-api-power.h | 5 +
drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c | 56 +-
drivers/net/wireless/iwlwifi/mvm/mvm.h | 8 +-
drivers/net/wireless/iwlwifi/mvm/power.c | 22 +-
drivers/net/wireless/iwlwifi/mvm/rs.c | 30 +-
drivers/net/wireless/iwlwifi/mvm/tt.c | 22 +-
drivers/net/wireless/iwlwifi/pcie/rx.c | 71 +-
drivers/net/wireless/iwlwifi/pcie/trans.c | 17 +-
31 files changed, 251 insertions(+), 2044 deletions(-)
delete mode 100644 drivers/net/wireless/iwlwifi/dvm/testmode.c
delete mode 100644 drivers/net/wireless/iwlwifi/iwl-test.c
delete mode 100644 drivers/net/wireless/iwlwifi/iwl-test.h
delete mode 100644 drivers/net/wireless/iwlwifi/iwl-testmode.h
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
^ permalink raw reply
* Re: [PATCH] Documentation: dt: bindings: TI WiLink modules
From: Felipe Balbi @ 2013-06-25 11:12 UTC (permalink / raw)
To: Luciano Coelho
Cc: grant.likely, rob.herring, devicetree-discuss, linux-doc,
linux-kernel, linux-wireless, tony, linux-omap, linux-arm
In-Reply-To: <1372149330-24335-1-git-send-email-coelho@ti.com>
[-- Attachment #1: Type: text/plain, Size: 2641 bytes --]
Hi,
On Tue, Jun 25, 2013 at 11:35:30AM +0300, Luciano Coelho wrote:
> Add device tree bindings documentation for the TI WiLink modules.
> Currently only the WLAN part of the WiLink6, WiLink7 and WiLink8
> modules is supported.
>
> Signed-off-by: Luciano Coelho <coelho@ti.com>
> ---
>
> I created a new directory under net to contain wireless bindings documentation.
>
> The actual implementation in the driver will follow separately.
>
> .../devicetree/bindings/net/wireless/ti-wilink.txt | 46 ++++++++++++++++++++
> 1 file changed, 46 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/net/wireless/ti-wilink.txt
>
> diff --git a/Documentation/devicetree/bindings/net/wireless/ti-wilink.txt b/Documentation/devicetree/bindings/net/wireless/ti-wilink.txt
> new file mode 100644
> index 0000000..d8e8bfbb
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/net/wireless/ti-wilink.txt
> @@ -0,0 +1,46 @@
> +TI WiLink Wireless Modules Device Tree Bindings
> +===============================================
> +
> +The WiLink modules provide wireless connectivity, such as WLAN,
> +Bluetooth, FM and NFC.
> +
> +There are several different modules available, which can be grouped by
> +their generation: WiLink6, WiLink7 and WiLink8. WiLink4 is not
> +currently supported with device tree.
> +
> +Currently, only the WLAN portion of the modules is supported with
> +device tree.
> +
> +Required properties:
> +--------------------
> +
> +- compatible: should be "ti,wilink6", "ti,wilink7" or "ti,wilink8"
> +- interrupt-parent: the interrupt controller
> +- interrupts: out-of-band WLAN interrupt
> + See the interrupt controller's bindings documentation for
> + detailed definition.
> +
> +Optional properties:
> +--------------------
> +
> +- refclock: the internal WLAN reference clock frequency (required for
> + WiLink6 and WiLink7; not used for WiLink8). Must be one of the
> + following:
> + 0 = 19.2 MHz
> + 1 = 26.0 MHz
> + 2 = 38.4 MHz
> + 3 = 52.0 MHz
> + 4 = 38.4 MHz, XTAL
> + 5 = 26.0 MHz, XTAL
> +
> +- tcxoclock: the internal WLAN TCXO clock frequency (required for
> + WiLink7 not used for WiLink6 and WiLink8). Must be one of the
> + following:
> + 0 = 19.200 MHz
> + 1 = 26.000 MHz
> + 2 = 38.400 MHz
> + 3 = 52.000 MHz
> + 4 = 16.368 MHz
> + 5 = 32.736 MHz
> + 6 = 16.800 MHz
> + 7 = 33.600 MHz
DTS files are pre-processed, so you could add defines in a header and
share the header between DTS and driver. Could help you having:
tcxoclock = WILINK_19_200MHz;
instead of
tcxoclock = 0;
--
balbi
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply
* Difference between 802.11n draft 2.0 and final version?
From: Oleksij Rempel @ 2013-06-25 10:29 UTC (permalink / raw)
To: linux-wireless@vger.kernel.org, ath9k-devel@lists.ath9k.org
Hello all,
i found notice that devices with 802.11n draft 2.0 and final version,
may have different features set. Are there any doc telling more about it?
I found it here:
http://www.wi-fi.org/knowledge-center/faq/will-my-wi-fi-certified-80211n-draft-20-based-wi-fi-product-work-products-are
"... keep in mind that Wi-Fi CERTIFIED 802.11n draft 2.0 devices may not
include some of the advanced features included in Wi-Fi CERTIFIED n
products."
--
Regards,
Oleksij
^ permalink raw reply
* Re: [PATCH v10 2/2] cfg80211: P2P find phase offload
From: Vladimir Kondratiev @ 2013-06-25 9:25 UTC (permalink / raw)
To: Peer, Ilan
Cc: Johannes Berg, linux-wireless@vger.kernel.org, Luis R . Rodriguez,
John W . Linville, Jouni Malinen
In-Reply-To: <CB3B3D4774441E42AA3EA0E1BA8230A01AD22795@HASMSX106.ger.corp.intel.com>
On Tuesday, June 25, 2013 07:06:28 AM Peer, Ilan wrote:
> > + * @listen_channel: channels to listen on; not NULL
>
> s/channels/channel/ (only a single listen channel)
Sure, thanks
<skip>
> Just to clarify something: even if the driver reports that it supports probe response offloading, can wpas choose not to use this capability and handle all the probe requests on its own (at least for debugging)? For example in case that the probe response IE len is zero, the driver can deduce the it should not respond to probe requests.
Problem is, some hardware do not let you to do so; it simply replies by itself.
NL80211_FEATURE_P2P_PROBE_RESP_OFFLOAD indicates device __can__ answer. From this,
wpa_s can conclude it may be answered by device probes that is may see or not.
It is out of scope for this commit to specify how to tell to the device to not answer
(I suppose to use debugfs for this)
>
> > @@ -1740,6 +1748,10 @@ enum nl80211_attrs {
> >
> > NL80211_ATTR_RXMGMT_FLAGS,
> >
> > + NL80211_ATTR_MIN_DISCOVERABLE_INTERVAL,
> > + NL80211_ATTR_MAX_DISCOVERABLE_INTERVAL,
> > + NL80211_ATTR_LISTEN_FREQ,
>
> You can use NL80211_ATTR_WIPHY_FREQ
OK, will do so.
>
> > +TRACE_EVENT(rdev_start_p2p_find,
> > + TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
> > + struct cfg80211_p2p_find_params *params),
> > + TP_ARGS(wiphy, wdev, params),
> > + TP_STRUCT__entry(
> > + WIPHY_ENTRY
> > + WDEV_ENTRY
> > + __field(u32, min_di)
> > + __field(u32, max_di)
> > + __field(int, n_channels)
>
> Can you also add here the listen channel?
Sure
Thanks, Vladimir
^ permalink raw reply
* Re: [PATCH v2] nl80211: fix mgmt tx status and testmode reporting for netns
From: Johannes Berg @ 2013-06-25 8:50 UTC (permalink / raw)
To: Michal Kazior; +Cc: linux-wireless
In-Reply-To: <1372144637-1676-1-git-send-email-michal.kazior@tieto.com>
On Tue, 2013-06-25 at 09:17 +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.
Applied, thanks.
johannes
^ permalink raw reply
* [PATCH] Documentation: dt: bindings: TI WiLink modules
From: Luciano Coelho @ 2013-06-25 8:35 UTC (permalink / raw)
To: grant.likely, rob.herring, devicetree-discuss, linux-doc,
linux-kernel
Cc: linux-wireless, tony, linux-omap, linux-arm
Add device tree bindings documentation for the TI WiLink modules.
Currently only the WLAN part of the WiLink6, WiLink7 and WiLink8
modules is supported.
Signed-off-by: Luciano Coelho <coelho@ti.com>
---
I created a new directory under net to contain wireless bindings documentation.
The actual implementation in the driver will follow separately.
.../devicetree/bindings/net/wireless/ti-wilink.txt | 46 ++++++++++++++++++++
1 file changed, 46 insertions(+)
create mode 100644 Documentation/devicetree/bindings/net/wireless/ti-wilink.txt
diff --git a/Documentation/devicetree/bindings/net/wireless/ti-wilink.txt b/Documentation/devicetree/bindings/net/wireless/ti-wilink.txt
new file mode 100644
index 0000000..d8e8bfbb
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/wireless/ti-wilink.txt
@@ -0,0 +1,46 @@
+TI WiLink Wireless Modules Device Tree Bindings
+===============================================
+
+The WiLink modules provide wireless connectivity, such as WLAN,
+Bluetooth, FM and NFC.
+
+There are several different modules available, which can be grouped by
+their generation: WiLink6, WiLink7 and WiLink8. WiLink4 is not
+currently supported with device tree.
+
+Currently, only the WLAN portion of the modules is supported with
+device tree.
+
+Required properties:
+--------------------
+
+- compatible: should be "ti,wilink6", "ti,wilink7" or "ti,wilink8"
+- interrupt-parent: the interrupt controller
+- interrupts: out-of-band WLAN interrupt
+ See the interrupt controller's bindings documentation for
+ detailed definition.
+
+Optional properties:
+--------------------
+
+- refclock: the internal WLAN reference clock frequency (required for
+ WiLink6 and WiLink7; not used for WiLink8). Must be one of the
+ following:
+ 0 = 19.2 MHz
+ 1 = 26.0 MHz
+ 2 = 38.4 MHz
+ 3 = 52.0 MHz
+ 4 = 38.4 MHz, XTAL
+ 5 = 26.0 MHz, XTAL
+
+- tcxoclock: the internal WLAN TCXO clock frequency (required for
+ WiLink7 not used for WiLink6 and WiLink8). Must be one of the
+ following:
+ 0 = 19.200 MHz
+ 1 = 26.000 MHz
+ 2 = 38.400 MHz
+ 3 = 52.000 MHz
+ 4 = 16.368 MHz
+ 5 = 32.736 MHz
+ 6 = 16.800 MHz
+ 7 = 33.600 MHz
--
1.7.10.4
^ permalink raw reply related
* [PATCH] ssb: drop BROKEN from SSB_SFLASH
From: Rafał Miłecki @ 2013-06-25 8:13 UTC (permalink / raw)
To: linux-wireless, John W. Linville; +Cc: Hauke Mehrtens, Rafał Miłecki
With recent patches ssb can fetch info about serial flash and register
it as a platform device. No more reasons to mark it BROKEN.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Cc: Hauke Mehrtens <hauke@hauke-m.de>
---
Hauke: does it look OK for you? Did you give it a try?
---
drivers/ssb/Kconfig | 2 +-
drivers/ssb/driver_chipcommon_sflash.c | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/drivers/ssb/Kconfig b/drivers/ssb/Kconfig
index 4f0dd37..775251d 100644
--- a/drivers/ssb/Kconfig
+++ b/drivers/ssb/Kconfig
@@ -139,7 +139,7 @@ config SSB_DRIVER_MIPS
config SSB_SFLASH
bool "SSB serial flash support"
- depends on SSB_DRIVER_MIPS && BROKEN
+ depends on SSB_DRIVER_MIPS
default y
# Assumption: We are on embedded, if we compile the MIPS core.
diff --git a/drivers/ssb/driver_chipcommon_sflash.c b/drivers/ssb/driver_chipcommon_sflash.c
index e84cf04..50328de 100644
--- a/drivers/ssb/driver_chipcommon_sflash.c
+++ b/drivers/ssb/driver_chipcommon_sflash.c
@@ -151,8 +151,8 @@ int ssb_sflash_init(struct ssb_chipcommon *cc)
sflash->size = sflash->blocksize * sflash->numblocks;
sflash->present = true;
- pr_info("Found %s serial flash (blocksize: 0x%X, blocks: %d)\n",
- e->name, e->blocksize, e->numblocks);
+ pr_info("Found %s serial flash (size: %dKiB, blocksize: 0x%X, blocks: %d)\n",
+ e->name, sflash->size / 1024, e->blocksize, e->numblocks);
/* Prepare platform device, but don't register it yet. It's too early,
* malloc (required by device_private_init) is not available yet. */
@@ -160,7 +160,5 @@ int ssb_sflash_init(struct ssb_chipcommon *cc)
sflash->size;
ssb_sflash_dev.dev.platform_data = sflash;
- pr_err("Serial flash support is not implemented yet!\n");
-
- return -ENOTSUPP;
+ return 0;
}
--
1.7.10.4
^ permalink raw reply related
* [PATCH v2] nl80211: fix mgmt tx status and testmode reporting for netns
From: Michal Kazior @ 2013-06-25 7:17 UTC (permalink / raw)
To: linux-wireless, johannes; +Cc: Michal Kazior
In-Reply-To: <1372074644-15280-1-git-send-email-michal.kazior@tieto.com>
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.
Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
---
v2: push testmode event to the right netns (thanks Johannes!)
net/wireless/nl80211.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index b14b7e3..db8ead9 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -6588,12 +6588,14 @@ EXPORT_SYMBOL(cfg80211_testmode_alloc_event_skb);
void cfg80211_testmode_event(struct sk_buff *skb, gfp_t gfp)
{
+ struct cfg80211_registered_device *rdev = ((void **)skb->cb)[0];
void *hdr = ((void **)skb->cb)[1];
struct nlattr *data = ((void **)skb->cb)[2];
nla_nest_end(skb, data);
genlmsg_end(skb, hdr);
- genlmsg_multicast(skb, 0, nl80211_testmode_mcgrp.id, gfp);
+ genlmsg_multicast_netns(wiphy_net(&rdev->wiphy), skb, 0,
+ nl80211_testmode_mcgrp.id, gfp);
}
EXPORT_SYMBOL(cfg80211_testmode_event);
#endif
@@ -10028,7 +10030,8 @@ void cfg80211_mgmt_tx_status(struct wireless_dev *wdev, u64 cookie,
genlmsg_end(msg, hdr);
- genlmsg_multicast(msg, 0, nl80211_mlme_mcgrp.id, gfp);
+ genlmsg_multicast_netns(wiphy_net(&rdev->wiphy), msg, 0,
+ nl80211_mlme_mcgrp.id, gfp);
return;
nla_put_failure:
--
1.7.9.5
^ permalink raw reply related
* RE: [PATCH v10 2/2] cfg80211: P2P find phase offload
From: Peer, Ilan @ 2013-06-25 7:06 UTC (permalink / raw)
To: Vladimir Kondratiev, Johannes Berg
Cc: linux-wireless@vger.kernel.org, Luis R . Rodriguez,
John W . Linville, Jouni Malinen
In-Reply-To: <1372063757-24286-3-git-send-email-qca_vkondrat@qca.qualcomm.com>
> /**
> + * struct cfg80211_p2p_find_params - parameters for P2P find
> + * @probe_ie: extra IE's for probe frames
> + * @probe_ie_len: length, bytes, of @probe_ie
> + * @probe_resp_ie: extra IE's for probe response frames
> + * @probe_resp_ie_len: length, bytes, of @probe_resp_ie
> + * Driver/firmware may add additional IE's as well as modify
> + * provided ones; typical IE's to be added are
> + * WLAN_EID_EXT_SUPP_RATES, WLAN_EID_DS_PARAMS,
> + * WLAN_EID_HT_CAPABILITY.
> + * @min_discoverable_interval: and
> + * @max_discoverable_interval: min/max for random multiplier of 100TU's
> + * for the listen state duration
> + * @listen_channel: channels to listen on; not NULL
s/channels/channel/ (only a single listen channel)
> + * @start_p2p_find: start P2P find phase
> + * Parameters include IEs for probe/probe-resp frames;
> + * and channels to operate on.
> + * Parameters are not retained after call, driver need to copy data if
> + * it need it later.
> + * P2P find can't run concurrently with ROC or scan,
> + * conflict with scan detected by cfg80211 and -EBUSY returned;
> + * and driver should check for ROC and return -EBUSY to indicate conflict.
> + * While performing P2P discovery, driver should report received
> + * probe-request and probe-response frames via cfg80211_rx_mgmt
> + * accordingly to the rx mgmt filter, as set by mgmt_frame_register().
> + * If device indicates NL80211_FEATURE_P2P_PROBE_RESP_OFFLOAD, it
> may
> + * reply some matching probes and replied probes may be not reported to
> + * the upper layers; otherwise it must not reply any probe.
Just to clarify something: even if the driver reports that it supports probe response offloading, can wpas choose not to use this capability and handle all the probe requests on its own (at least for debugging)? For example in case that the probe response IE len is zero, the driver can deduce the it should not respond to probe requests.
> @@ -1740,6 +1748,10 @@ enum nl80211_attrs {
>
> NL80211_ATTR_RXMGMT_FLAGS,
>
> + NL80211_ATTR_MIN_DISCOVERABLE_INTERVAL,
> + NL80211_ATTR_MAX_DISCOVERABLE_INTERVAL,
> + NL80211_ATTR_LISTEN_FREQ,
You can use NL80211_ATTR_WIPHY_FREQ
> +TRACE_EVENT(rdev_start_p2p_find,
> + TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
> + struct cfg80211_p2p_find_params *params),
> + TP_ARGS(wiphy, wdev, params),
> + TP_STRUCT__entry(
> + WIPHY_ENTRY
> + WDEV_ENTRY
> + __field(u32, min_di)
> + __field(u32, max_di)
> + __field(int, n_channels)
Can you also add here the listen channel?
Thanks,
Ilan
^ 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