* [PATCH v3 7/8] wlcore: sdio: get clocks from device tree
From: Luciano Coelho @ 2013-07-03 14:03 UTC (permalink / raw)
To: linux-wireless, tony, nsekhar
Cc: mturquette, mark.rutland, balbi, grant.likely, rob.herring,
devicetree-discuss, linux-doc, linux-kernel, linux-omap,
linux-arm-kernel, coelho, nm
In-Reply-To: <1372860209-3504-1-git-send-email-coelho@ti.com>
Read the clock nodes from the device tree and use them to set the
frequency for the refclock and the tcxo clock.
Also, call sdio_set_drvdata() earlier, so the glue is already set in
the driver data when we call wlcore_get_pdata_from_of() and we don't
need to pass it as a parameter.
Signed-off-by: Luciano Coelho <coelho@ti.com>
Reviewed-by: Felipe Balbi <balbi@ti.com>
---
drivers/net/wireless/ti/wlcore/sdio.c | 36 +++++++++++++++++++++++++++++++--
1 file changed, 34 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/ti/wlcore/sdio.c b/drivers/net/wireless/ti/wlcore/sdio.c
index 980bf3d..60fce49 100644
--- a/drivers/net/wireless/ti/wlcore/sdio.c
+++ b/drivers/net/wireless/ti/wlcore/sdio.c
@@ -53,6 +53,7 @@ static bool dump = false;
struct wl12xx_sdio_glue {
struct device *dev;
struct platform_device *core;
+ struct clk *refclock, *tcxoclock;
};
static const struct sdio_device_id wl1271_devices[] = {
@@ -224,6 +225,7 @@ static struct wl12xx_platform_data *wlcore_get_pdata_from_of(struct device *dev)
struct wl12xx_platform_data *pdata;
struct device_node *np = dev->of_node;
struct device_node *clock_node;
+ struct wl12xx_sdio_glue *glue = sdio_get_drvdata(dev_to_sdio_func(dev));
if (!np) {
np = of_find_matching_node(NULL, dev->driver->of_match_table);
@@ -250,6 +252,26 @@ static struct wl12xx_platform_data *wlcore_get_pdata_from_of(struct device *dev)
for_each_matching_node(clock_node, wlcore_sdio_of_clk_match_table)
of_fixed_clk_setup(clock_node);
+ /* TODO: make sure we have this when needed (ie. for WL6 and WL7) */
+ glue->refclock = of_clk_get_by_name(np, "refclock");
+ if (IS_ERR(glue->refclock)) {
+ dev_err(dev, "couldn't find refclock on the device tree\n");
+ glue->refclock = NULL;
+ } else {
+ clk_prepare_enable(glue->refclock);
+ pdata->ref_clock_freq = clk_get_rate(glue->refclock);
+ }
+
+ /* TODO: make sure we have this when needed (ie. for WL7) */
+ glue->tcxoclock = of_clk_get_by_name(np, "tcxoclock");
+ if (IS_ERR(glue->tcxoclock)) {
+ dev_err(dev, "couldn't find tcxoclock on the device tree\n");
+ glue->tcxoclock = NULL;
+ } else {
+ clk_prepare_enable(glue->tcxoclock);
+ pdata->ref_clock_freq = clk_get_rate(glue->tcxoclock);
+ }
+
goto out;
out_free:
@@ -294,6 +316,8 @@ static int wl1271_probe(struct sdio_func *func,
/* Use block mode for transferring over one block size of data */
func->card->quirks |= MMC_QUIRK_BLKSZ_FOR_BYTE_MODE;
+ sdio_set_drvdata(func, glue);
+
/* The pdata allocated here is freed when the device is freed,
* so we don't need an additional out label to free it in case
* of error further on.
@@ -319,8 +343,6 @@ static int wl1271_probe(struct sdio_func *func,
if (mmcflags & MMC_PM_KEEP_POWER)
pdev_data->pwr_in_suspend = true;
- sdio_set_drvdata(func, glue);
-
/* Tell PM core that we don't need the card to be powered now */
pm_runtime_put_noidle(&func->dev);
@@ -387,6 +409,16 @@ static void wl1271_remove(struct sdio_func *func)
{
struct wl12xx_sdio_glue *glue = sdio_get_drvdata(func);
+ if (glue->refclock) {
+ clk_disable_unprepare(glue->refclock);
+ clk_put(glue->refclock);
+ }
+
+ if (glue->tcxoclock) {
+ clk_disable_unprepare(glue->tcxoclock);
+ clk_put(glue->tcxoclock);
+ }
+
/* Undo decrement done above in wl1271_probe */
pm_runtime_get_noresume(&func->dev);
--
1.7.10.4
^ permalink raw reply related
* Re: [PATCH v3 1/8] wl1251: split wl251 platform data to a separate structure
From: Felipe Balbi @ 2013-07-03 14:11 UTC (permalink / raw)
To: Luciano Coelho
Cc: linux-wireless, tony, nsekhar, mturquette, mark.rutland, balbi,
grant.likely, rob.herring, devicetree-discuss, linux-doc,
linux-kernel, linux-omap, linux-arm-kernel, nm
In-Reply-To: <1372860209-3504-2-git-send-email-coelho@ti.com>
[-- Attachment #1: Type: text/plain, Size: 446 bytes --]
On Wed, Jul 03, 2013 at 05:03:22PM +0300, Luciano Coelho wrote:
> Move the wl1251 part of the wl12xx platform data structure into a new
> structure specifically for wl1251. Change the platform data built-in
> block and board files accordingly.
>
> Cc: Tony Lindgren <tony@atomide.com>
> Signed-off-by: Luciano Coelho <coelho@ti.com>
> Acked-by: Tony Lindgren <tony@atomide.com>
Reviewed-by: Felipe Balbi <balbi@ti.com>
--
balbi
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply
* Re: [PATCH v3 2/8] wlcore: set irq_flags in the board files instead of hiding behind a quirk
From: Felipe Balbi @ 2013-07-03 14:13 UTC (permalink / raw)
To: Luciano Coelho
Cc: linux-wireless, tony, nsekhar, mturquette, mark.rutland, balbi,
grant.likely, rob.herring, devicetree-discuss, linux-doc,
linux-kernel, linux-omap, linux-arm-kernel, nm
In-Reply-To: <1372860209-3504-3-git-send-email-coelho@ti.com>
[-- Attachment #1: Type: text/plain, Size: 1267 bytes --]
Hi,
On Wed, Jul 03, 2013 at 05:03:23PM +0300, Luciano Coelho wrote:
> diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c
> index 56a9a4f..953f620 100644
> --- a/arch/arm/mach-omap2/board-4430sdp.c
> +++ b/arch/arm/mach-omap2/board-4430sdp.c
> @@ -703,12 +703,30 @@ static void __init omap4_sdp4430_wifi_init(void)
>
> omap4_sdp4430_wifi_mux_init();
> omap4_sdp4430_wlan_data.irq = gpio_to_irq(GPIO_WIFI_IRQ);
> +
> + ret = gpio_request_one(GPIO_WIFI_IRQ, GPIOF_IN, "GPIO_WIFI_IRQ");
> + if (ret) {
> + pr_err("error requesting wl12xx gpio: %d\n", ret);
> + goto out;
> + }
> +
> + ret = irq_set_irq_type(gpio_to_irq(GPIO_WIFI_IRQ), IRQ_TYPE_LEVEL_HIGH);
> + if (ret) {
> + pr_err("error setting wl12xx irq type: %d\n", ret);
> + goto free;
> + }
> +
> ret = wl12xx_set_platform_data(&omap4_sdp4430_wlan_data);
> if (ret)
> pr_err("Error setting wl12xx data: %d\n", ret);
> +
> ret = platform_device_register(&omap_vwlan_device);
> if (ret)
> pr_err("Error registering wl12xx device: %d\n", ret);
> +out:
> + return;
> +free:
> + gpio_free(GPIO_WIFI_IRQ);
actually, you should leave this GPIO requested in order to use it as
IRQ.
ditto for all others
--
balbi
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply
* Re: [PATCH v3 3/8] wlcore: remove pwr_in_suspend from platform data
From: Felipe Balbi @ 2013-07-03 14:14 UTC (permalink / raw)
To: Luciano Coelho
Cc: linux-wireless, tony, nsekhar, mturquette, mark.rutland, balbi,
grant.likely, rob.herring, devicetree-discuss, linux-doc,
linux-kernel, linux-omap, linux-arm-kernel, nm
In-Reply-To: <1372860209-3504-4-git-send-email-coelho@ti.com>
[-- Attachment #1: Type: text/plain, Size: 423 bytes --]
On Wed, Jul 03, 2013 at 05:03:24PM +0300, Luciano Coelho wrote:
> The pwr_in_suspend flag depends on the MMC settings which can be
> retrieved from the SDIO subsystem, so it doesn't need to be part of
> the platform data structure. Move it to the platform device data that
> is passed from SDIO to wlcore.
>
> Signed-off-by: Luciano Coelho <coelho@ti.com>
Reviewed-by: Felipe Balbi <balbi@ti.com>
--
balbi
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply
* Re: [PATCH v3 2/8] wlcore: set irq_flags in the board files instead of hiding behind a quirk
From: Luciano Coelho @ 2013-07-03 14:15 UTC (permalink / raw)
To: linux-wireless
Cc: tony, nsekhar, mturquette, mark.rutland, balbi, grant.likely,
rob.herring, devicetree-discuss, linux-doc, linux-kernel,
linux-omap, linux-arm-kernel, nm
In-Reply-To: <1372860209-3504-3-git-send-email-coelho@ti.com>
On Wed, 2013-07-03 at 17:03 +0300, Luciano Coelho wrote:
> The platform_quirk element in the platform data was used to change the
> way the IRQ is triggered. When set, the EDGE_IRQ quirk would change
> the irqflags used and treat edge trigger differently from the rest.
>
> Instead of hiding this irq flag setting behind the quirk, have the
> board files set the flags during initialization. This will be more
> meaningful than driver-specific quirks when we switch to DT.
>
> Additionally, fix missing gpio_request() calls in the boarding files
> (so that setting the flags actually works).
>
> Cc: Tony Lindgren <tony@atomide.com>
> Cc: Sekhar Nori <nsekhar@ti.com>
> Signed-off-by: Luciano Coelho <coelho@ti.com>
> ---
[...]
> @@ -5928,16 +5927,21 @@ static void wlcore_nvs_cb(const struct firmware *fw, void *context)
> wlcore_adjust_conf(wl);
>
> wl->irq = platform_get_irq(pdev, 0);
> - wl->platform_quirks = pdata->platform_quirks;
> wl->if_ops = pdev_data->if_ops;
>
> - if (wl->platform_quirks & WL12XX_PLATFORM_QUIRK_EDGE_IRQ)
> - irqflags = IRQF_TRIGGER_RISING;
> - else
> - irqflags = IRQF_TRIGGER_HIGH | IRQF_ONESHOT;
> + irq_data = irq_get_irq_data(wl->irq);
> + if (!irq_data) {
> + wl1271_error("couldn't get irq data for irq %d\n", wl->irq);
> + ret = -EINVAL;
> + goto out_free_nvs;
> + }
> +
> + wl->irq_flags = irqd_get_trigger_type(irq_data);
BTW, there seems to be a patch on its way to make reading the flags
easier (ie. no need to get the irq_data first):
http://mid.gmane.org/1367945288-5625-1-git-send-email-javier@dowhile0.org
I'm not sure if this is going to be taken in, but if it does, it would
be nice to change the code here to use the new irq_get_trigger_type()
function.
--
Luca.
^ permalink raw reply
* Re: [PATCH v3 4/8] wl12xx: use frequency instead of enumerations for pdata clocks
From: Felipe Balbi @ 2013-07-03 14:16 UTC (permalink / raw)
To: Luciano Coelho
Cc: linux-wireless, tony, nsekhar, mturquette, mark.rutland, balbi,
grant.likely, rob.herring, devicetree-discuss, linux-doc,
linux-kernel, linux-omap, linux-arm-kernel, nm
In-Reply-To: <1372860209-3504-5-git-send-email-coelho@ti.com>
[-- Attachment #1: Type: text/plain, Size: 501 bytes --]
On Wed, Jul 03, 2013 at 05:03:25PM +0300, Luciano Coelho wrote:
> Instead of defining an enumeration with the FW specific values for the
> different clock rates, use the actual frequency instead. Also add a
> boolean to specify whether the clock is XTAL or not.
>
> Change all board files to reflect this.
>
> Cc: Tony Lindgren <tony@atomide.com>
> Cc: Sekhar Nori <nsekhar@ti.com>
> Signed-off-by: Luciano Coelho <coelho@ti.com>
Reviewed-by: Felipe Balbi <balbi@ti.com>
--
balbi
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply
* Re: [PATCH v3 2/8] wlcore: set irq_flags in the board files instead of hiding behind a quirk
From: Luciano Coelho @ 2013-07-03 14:18 UTC (permalink / raw)
To: balbi
Cc: linux-wireless, tony, nsekhar, mturquette, mark.rutland,
grant.likely, rob.herring, devicetree-discuss, linux-doc,
linux-kernel, linux-omap, linux-arm-kernel, nm
In-Reply-To: <20130703141332.GO15056@arwen.pp.htv.fi>
On Wed, 2013-07-03 at 17:13 +0300, Felipe Balbi wrote:
> Hi,
>
> On Wed, Jul 03, 2013 at 05:03:23PM +0300, Luciano Coelho wrote:
> > diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c
> > index 56a9a4f..953f620 100644
> > --- a/arch/arm/mach-omap2/board-4430sdp.c
> > +++ b/arch/arm/mach-omap2/board-4430sdp.c
> > @@ -703,12 +703,30 @@ static void __init omap4_sdp4430_wifi_init(void)
> >
> > omap4_sdp4430_wifi_mux_init();
> > omap4_sdp4430_wlan_data.irq = gpio_to_irq(GPIO_WIFI_IRQ);
> > +
> > + ret = gpio_request_one(GPIO_WIFI_IRQ, GPIOF_IN, "GPIO_WIFI_IRQ");
> > + if (ret) {
> > + pr_err("error requesting wl12xx gpio: %d\n", ret);
> > + goto out;
> > + }
> > +
> > + ret = irq_set_irq_type(gpio_to_irq(GPIO_WIFI_IRQ), IRQ_TYPE_LEVEL_HIGH);
> > + if (ret) {
> > + pr_err("error setting wl12xx irq type: %d\n", ret);
> > + goto free;
> > + }
> > +
> > ret = wl12xx_set_platform_data(&omap4_sdp4430_wlan_data);
> > if (ret)
> > pr_err("Error setting wl12xx data: %d\n", ret);
> > +
> > ret = platform_device_register(&omap_vwlan_device);
> > if (ret)
> > pr_err("Error registering wl12xx device: %d\n", ret);
> > +out:
> > + return;
> > +free:
> > + gpio_free(GPIO_WIFI_IRQ);
>
> actually, you should leave this GPIO requested in order to use it as
> IRQ.
>
> ditto for all others
Actually, I don't need to use the GPIO if something goes wrong (ie.
setting the IRQ type or setting the platform data). Notice that in the
normal cases (ie. without errors), I return before the gpio_free() is
called.
This is not really needed, but it's a bit cleaner and we can probably
release some resources.
--
Luca.
^ permalink raw reply
* Re: [PATCH v3 5/8] wlcore: add initial device tree support to the sdio module
From: Felipe Balbi @ 2013-07-03 14:18 UTC (permalink / raw)
To: Luciano Coelho
Cc: linux-wireless, tony, nsekhar, mturquette, mark.rutland, balbi,
grant.likely, rob.herring, devicetree-discuss, linux-doc,
linux-kernel, linux-omap, linux-arm-kernel, nm
In-Reply-To: <1372860209-3504-6-git-send-email-coelho@ti.com>
[-- Attachment #1: Type: text/plain, Size: 398 bytes --]
On Wed, Jul 03, 2013 at 05:03:26PM +0300, Luciano Coelho wrote:
> If platform data is not available, try to get the required information
> from the device tree. Register an OF match table and parse the
> appropriate device tree nodes.
>
> Parse interrupt property only, for now.
>
> Signed-off-by: Luciano Coelho <coelho@ti.com>
Reviewed-by: Felipe Balbi <balbi@ti.com>
--
balbi
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply
* Re: [PATCH v3 8/8] wlcore/wl12xx: check if we got correct clock data from DT
From: Felipe Balbi @ 2013-07-03 14:19 UTC (permalink / raw)
To: Luciano Coelho
Cc: linux-wireless, tony, nsekhar, mturquette, mark.rutland, balbi,
grant.likely, rob.herring, devicetree-discuss, linux-doc,
linux-kernel, linux-omap, linux-arm-kernel, nm
In-Reply-To: <1372860209-3504-9-git-send-email-coelho@ti.com>
[-- Attachment #1: Type: text/plain, Size: 491 bytes --]
On Wed, Jul 03, 2013 at 05:03:29PM +0300, Luciano Coelho wrote:
> The fref and the tcxo clocks settings are optional in some platforms.
> WiLink8 doesn't need either, so we don't check the values. WiLink 6
> only needs the fref clock, so we check that it is valid or return with
> an error. WiLink7 needs both clocks, if either is not available we
> return with an error.
>
> Signed-off-by: Luciano Coelho <coelho@ti.com>
Reviewed-by: Felipe Balbi <balbi@ti.com>
--
balbi
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply
* Re: [PATCH v3 2/8] wlcore: set irq_flags in the board files instead of hiding behind a quirk
From: Felipe Balbi @ 2013-07-03 14:23 UTC (permalink / raw)
To: Luciano Coelho
Cc: balbi, linux-wireless, tony, nsekhar, mturquette, mark.rutland,
grant.likely, rob.herring, devicetree-discuss, linux-doc,
linux-kernel, linux-omap, linux-arm-kernel, nm
In-Reply-To: <1372861094.21065.118.camel@cumari.coelho.fi>
[-- Attachment #1: Type: text/plain, Size: 1939 bytes --]
On Wed, Jul 03, 2013 at 05:18:14PM +0300, Luciano Coelho wrote:
> On Wed, 2013-07-03 at 17:13 +0300, Felipe Balbi wrote:
> > Hi,
> >
> > On Wed, Jul 03, 2013 at 05:03:23PM +0300, Luciano Coelho wrote:
> > > diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c
> > > index 56a9a4f..953f620 100644
> > > --- a/arch/arm/mach-omap2/board-4430sdp.c
> > > +++ b/arch/arm/mach-omap2/board-4430sdp.c
> > > @@ -703,12 +703,30 @@ static void __init omap4_sdp4430_wifi_init(void)
> > >
> > > omap4_sdp4430_wifi_mux_init();
> > > omap4_sdp4430_wlan_data.irq = gpio_to_irq(GPIO_WIFI_IRQ);
> > > +
> > > + ret = gpio_request_one(GPIO_WIFI_IRQ, GPIOF_IN, "GPIO_WIFI_IRQ");
> > > + if (ret) {
> > > + pr_err("error requesting wl12xx gpio: %d\n", ret);
> > > + goto out;
> > > + }
> > > +
> > > + ret = irq_set_irq_type(gpio_to_irq(GPIO_WIFI_IRQ), IRQ_TYPE_LEVEL_HIGH);
> > > + if (ret) {
> > > + pr_err("error setting wl12xx irq type: %d\n", ret);
> > > + goto free;
> > > + }
> > > +
> > > ret = wl12xx_set_platform_data(&omap4_sdp4430_wlan_data);
> > > if (ret)
> > > pr_err("Error setting wl12xx data: %d\n", ret);
> > > +
> > > ret = platform_device_register(&omap_vwlan_device);
> > > if (ret)
> > > pr_err("Error registering wl12xx device: %d\n", ret);
> > > +out:
> > > + return;
> > > +free:
> > > + gpio_free(GPIO_WIFI_IRQ);
> >
> > actually, you should leave this GPIO requested in order to use it as
> > IRQ.
> >
> > ditto for all others
>
> Actually, I don't need to use the GPIO if something goes wrong (ie.
> setting the IRQ type or setting the platform data). Notice that in the
> normal cases (ie. without errors), I return before the gpio_free() is
> called.
hah, missed the 'return' call, my bad :-p
Reviewed-by: Felipe Balbi <balbi@ti.com>
Corrected-my-broken-eye-sight-by: Luciano Coelho <coelho@ti.com>
--
balbi
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply
* [PATCH v13 0/2] P2P find phase offload
From: Vladimir Kondratiev @ 2013-07-03 14:37 UTC (permalink / raw)
To: Johannes Berg
Cc: linux-wireless, Luis R . Rodriguez, John W . Linville,
Jouni Malinen, Arend van Spriel, Ilan Peer
Addressing next round of input
- add more comments about NL80211_ATTR_RXMGMT_FLAGS
- always supply non-empty channel list for start_p2p_find();
in case wpa_s don't provide one, build our own
- track p2p find state, similar to nl80211_start_p2p_device()
and protect from multiple start/stop requests. For this,
out-of context of stop_p2p_find call of cfg80211_p2p_find_notify_end
now requires rtnl_lock()
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 | 31 ++++
net/mac80211/rx.c | 3 +-
net/wireless/mlme.c | 4 +-
net/wireless/nl80211.c | 211
+++++++++++++++++++++++++-
net/wireless/nl80211.h | 2 +-
net/wireless/rdev-ops.h | 19 +++
net/wireless/trace.h | 44 ++++++
12 files changed, 393 insertions(+), 17 deletions(-)
--
1.8.1.2
^ permalink raw reply
* [PATCH v13 1/2] cfg80211: add 'flags' to cfg80211_rx_mgmt()
From: Vladimir Kondratiev @ 2013-07-03 14:37 UTC (permalink / raw)
To: Johannes Berg
Cc: linux-wireless, Luis R . Rodriguez, John W . Linville,
Jouni Malinen, Arend van Spriel, Ilan Peer
In-Reply-To: <1372331863-14083-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 | 17 +++++++++++++++++
net/mac80211/rx.c | 3 +--
net/wireless/mlme.c | 4 ++--
net/wireless/nl80211.c | 6 ++++--
net/wireless/nl80211.h | 2 +-
10 files changed, 35 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 7b0730a..c6acc70 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -3886,6 +3886,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
@@ -3897,7 +3898,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 861e5eb..a042507 100644
--- a/include/uapi/linux/nl80211.h
+++ b/include/uapi/linux/nl80211.h
@@ -1436,6 +1436,10 @@ 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 nl80211_send_mgmt(), u32.
+ * As specified in the enum nl80211_rxmgmt_flags.
+ * Passed from cfg80211_rx_mgmt()
+ *
* @NL80211_ATTR_MAX: highest attribute number currently defined
* @__NL80211_ATTR_AFTER_LAST: internal use
*/
@@ -1736,6 +1740,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,
@@ -3758,4 +3764,15 @@ 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 received management frame.
+ *
+ * Used by 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 bfac5e1..8d49c1c 100644
--- a/net/wireless/mlme.c
+++ b/net/wireless/mlme.c
@@ -621,7 +621,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);
@@ -664,7 +664,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 7dc3343..8c98083 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -9994,7 +9994,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;
@@ -10017,7 +10017,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 v13 2/2] cfg80211: P2P find phase offload
From: Vladimir Kondratiev @ 2013-07-03 14:37 UTC (permalink / raw)
To: Johannes Berg
Cc: linux-wireless, Luis R . Rodriguez, John W . Linville,
Jouni Malinen, Arend van Spriel, Ilan Peer
In-Reply-To: <1372331863-14083-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 | 205
+++++++++++++++++++++++++++++++++++++++++++
net/wireless/rdev-ops.h | 19 ++++
net/wireless/trace.h | 44 ++++++++++
5 files changed, 358 insertions(+)
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index c6acc70..c2dace9 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -1833,6 +1833,36 @@ 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; non-empty list
+ */
+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
@@ -2071,6 +2101,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);
@@ -2306,6 +2354,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);
};
/*
@@ -2937,6 +2991,7 @@ struct wireless_dev {
struct mutex mtx;
bool use_4addr, p2p_started;
+ bool p2p_find_active; /* protected by rtnl */
u8 address[ETH_ALEN] __aligned(sizeof(u16));
@@ -4207,6 +4262,27 @@ 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. If called out of context of ops->stop_p2p_find,
+ * should be protected with rtnl_lock()
+ *
+ * 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 a042507..4c18cc7 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 */
@@ -1440,6 +1443,10 @@ enum nl80211_commands {
* As specified in the enum nl80211_rxmgmt_flags.
* Passed from cfg80211_rx_mgmt()
*
+ * @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
*/
@@ -1742,6 +1749,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,
@@ -3598,6 +3608,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,
@@ -3618,6 +3631,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 8c98083..a681247 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 */
@@ -1393,6 +1395,8 @@ static int nl80211_send_wiphy(struct
cfg80211_registered_device *dev,
if (state->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
@@ -8337,6 +8341,152 @@ static int nl80211_crit_protocol_stop(struct sk_buff
*skb,
return 0;
}
+static int p2p_find_handle_channel(struct wiphy *wiphy,
+ struct cfg80211_p2p_find_params *params,
+ u32 freq)
+{
+ struct ieee80211_channel *chan = ieee80211_get_channel(wiphy, freq);
+
+ if (!chan)
+ return -EINVAL;
+
+ /* ignore disabled channels */
+ if (chan->flags & IEEE80211_CHAN_DISABLED)
+ return 0;
+
+ params->channels[params->n_channels++] = chan;
+ 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,
+ };
+ /* P2P spec defines social channels 1,6,11 @2.4GHz and 2 @60GHz */
+ static u32 social_freqs[] = {2412, 2437, 2462, 60480};
+ 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;
+ 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;
+
+ if (wdev->p2p_find_active)
+ 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;
+ } else {
+ n_channels = ARRAY_SIZE(social_freqs);
+ }
+ params.channels = kzalloc(n_channels * sizeof(*params.channels),
+ GFP_KERNEL);
+ if (!params.channels)
+ return -ENOMEM;
+
+ if (attr_freq) {
+ /* user specified, bail out if channel not found */
+ nla_for_each_nested(attr, attr_freq, tmp) {
+ err = p2p_find_handle_channel(wiphy, ¶ms,
+ nla_get_u32(attr));
+ if (err)
+ goto out_free;
+ }
+ } else { /* all supported social channels */
+ /* ignore errors for non-existing channels */
+ for (tmp = 0; tmp < ARRAY_SIZE(social_freqs); tmp++) {
+ p2p_find_handle_channel(wiphy, ¶ms,
+ social_freqs[tmp]);
+ }
+ }
+ if (!params.n_channels) {
+ err = -EINVAL;
+ goto out_free;
+ }
+
+ 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);
+
+ wdev->p2p_find_active = true;
+ err = rdev_start_p2p_find(rdev, wdev, ¶ms);
+ if (err)
+ wdev->p2p_find_active = false;
+
+out_free:
+ kfree(params.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;
+
+ if (!wdev->p2p_find_active)
+ return -ENOENT;
+
+ 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
@@ -9010,6 +9160,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,
@@ -10677,6 +10843,45 @@ 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)
+{
+ ASSERT_RTNL();
+ cfg80211_p2p_find_notify(wdev, NL80211_CMD_STOP_P2P_FIND, gfp);
+ wdev->p2p_find_active = false;
+}
+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
* Re: [PATCH v3 2/8] wlcore: set irq_flags in the board files instead of hiding behind a quirk
From: Javier Martinez Canillas @ 2013-07-03 15:12 UTC (permalink / raw)
To: Luciano Coelho
Cc: linux-wireless, tony, nsekhar, mturquette, mark.rutland, balbi,
grant.likely, rob.herring, devicetree-discuss, linux-doc,
linux-kernel, linux-omap, linux-arm-kernel, nm
In-Reply-To: <1372860925.21065.115.camel@cumari.coelho.fi>
On Wed, Jul 3, 2013 at 4:15 PM, Luciano Coelho <coelho@ti.com> wrote:
> On Wed, 2013-07-03 at 17:03 +0300, Luciano Coelho wrote:
>> The platform_quirk element in the platform data was used to change the
>> way the IRQ is triggered. When set, the EDGE_IRQ quirk would change
>> the irqflags used and treat edge trigger differently from the rest.
>>
>> Instead of hiding this irq flag setting behind the quirk, have the
>> board files set the flags during initialization. This will be more
>> meaningful than driver-specific quirks when we switch to DT.
>>
>> Additionally, fix missing gpio_request() calls in the boarding files
>> (so that setting the flags actually works).
>>
>> Cc: Tony Lindgren <tony@atomide.com>
>> Cc: Sekhar Nori <nsekhar@ti.com>
>> Signed-off-by: Luciano Coelho <coelho@ti.com>
>> ---
>
> [...]
>
>> @@ -5928,16 +5927,21 @@ static void wlcore_nvs_cb(const struct firmware *fw, void *context)
>> wlcore_adjust_conf(wl);
>>
>> wl->irq = platform_get_irq(pdev, 0);
>> - wl->platform_quirks = pdata->platform_quirks;
>> wl->if_ops = pdev_data->if_ops;
>>
>> - if (wl->platform_quirks & WL12XX_PLATFORM_QUIRK_EDGE_IRQ)
>> - irqflags = IRQF_TRIGGER_RISING;
>> - else
>> - irqflags = IRQF_TRIGGER_HIGH | IRQF_ONESHOT;
>> + irq_data = irq_get_irq_data(wl->irq);
>> + if (!irq_data) {
>> + wl1271_error("couldn't get irq data for irq %d\n", wl->irq);
>> + ret = -EINVAL;
>> + goto out_free_nvs;
>> + }
>> +
>> + wl->irq_flags = irqd_get_trigger_type(irq_data);
>
> BTW, there seems to be a patch on its way to make reading the flags
> easier (ie. no need to get the irq_data first):
>
> http://mid.gmane.org/1367945288-5625-1-git-send-email-javier@dowhile0.org
>
> I'm not sure if this is going to be taken in, but if it does, it would
> be nice to change the code here to use the new irq_get_trigger_type()
> function.
>
> --
> Luca.
>
Hi Luca
That patch has been already merged in Linus tree as commit 1f6236bf
("genirq: Add irq_get_trigger_type() to get IRQ flags").
So yes, it would be better if you can use irq_get_trigger_type()
instead calling irq_get_irq_data() + irqd_get_trigger_type().
Best regards,
Javier
^ permalink raw reply
* compat-wireless is not avalaible ?
From: Xavier @ 2013-07-03 16:24 UTC (permalink / raw)
To: linux-wireless
Hi to all,
Why
http://www.orbit-lab.org/kernel/compat-wireless-3-stable/v3.2/compat-wireless-3.2.5-1.tar.bz2
is not avalilable ?
Where it's available ?
Thanks, see you.
^ permalink raw reply
* [PATCH] wireless: Convert mwifiex/pcie to dev_pm_ops from legacy pm_ops
From: Shuah Khan @ 2013-07-03 16:47 UTC (permalink / raw)
To: bzhao, linville, rjw, hauke, lars
Cc: Shuah Khan, linux-wireless, netdev, linux-kernel, shuahkhan
Convert the mwifiex/pci driver to use dev_pm_ops for power management and
remove Legacy PM handling. This change re-uses existing suspend and resume
interfaces for dev_pm_ops, and changes CONFIG_PM ifdefs to CONFIG_PM_SLEEP
as the driver does not support run-time PM.
Signed-off-by: Shuah Khan <shuah.kh@samsung.com>
---
drivers/net/wireless/mwifiex/pcie.c | 26 +++++++++++++++++---------
1 file changed, 17 insertions(+), 9 deletions(-)
diff --git a/drivers/net/wireless/mwifiex/pcie.c b/drivers/net/wireless/mwifiex/pcie.c
index 20c9c4c..4a57eb4 100644
--- a/drivers/net/wireless/mwifiex/pcie.c
+++ b/drivers/net/wireless/mwifiex/pcie.c
@@ -76,7 +76,7 @@ static bool mwifiex_pcie_ok_to_access_hw(struct mwifiex_adapter *adapter)
return false;
}
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
/*
* Kernel needs to suspend all functions separately. Therefore all
* registered functions must have drivers with suspend and resume
@@ -85,11 +85,12 @@ static bool mwifiex_pcie_ok_to_access_hw(struct mwifiex_adapter *adapter)
* If already not suspended, this function allocates and sends a host
* sleep activate request to the firmware and turns off the traffic.
*/
-static int mwifiex_pcie_suspend(struct pci_dev *pdev, pm_message_t state)
+static int mwifiex_pcie_suspend(struct device *dev)
{
struct mwifiex_adapter *adapter;
struct pcie_service_card *card;
int hs_actived;
+ struct pci_dev *pdev = to_pci_dev(dev);
if (pdev) {
card = (struct pcie_service_card *) pci_get_drvdata(pdev);
@@ -120,10 +121,11 @@ static int mwifiex_pcie_suspend(struct pci_dev *pdev, pm_message_t state)
* If already not resumed, this function turns on the traffic and
* sends a host sleep cancel request to the firmware.
*/
-static int mwifiex_pcie_resume(struct pci_dev *pdev)
+static int mwifiex_pcie_resume(struct device *dev)
{
struct mwifiex_adapter *adapter;
struct pcie_service_card *card;
+ struct pci_dev *pdev = to_pci_dev(dev);
if (pdev) {
card = (struct pcie_service_card *) pci_get_drvdata(pdev);
@@ -211,9 +213,9 @@ static void mwifiex_pcie_remove(struct pci_dev *pdev)
wait_for_completion(&adapter->fw_load);
if (user_rmmod) {
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
if (adapter->is_suspended)
- mwifiex_pcie_resume(pdev);
+ mwifiex_pcie_resume(&pdev->dev);
#endif
for (i = 0; i < adapter->priv_num; i++)
@@ -249,16 +251,22 @@ static DEFINE_PCI_DEVICE_TABLE(mwifiex_ids) = {
MODULE_DEVICE_TABLE(pci, mwifiex_ids);
+#ifdef CONFIG_PM_SLEEP
+/* Power Management Hooks */
+static SIMPLE_DEV_PM_OPS(mwifiex_pcie_pm_ops, mwifiex_pcie_suspend,
+ mwifiex_pcie_resume);
+#endif
+
/* PCI Device Driver */
static struct pci_driver __refdata mwifiex_pcie = {
.name = "mwifiex_pcie",
.id_table = mwifiex_ids,
.probe = mwifiex_pcie_probe,
.remove = mwifiex_pcie_remove,
-#ifdef CONFIG_PM
- /* Power Management Hooks */
- .suspend = mwifiex_pcie_suspend,
- .resume = mwifiex_pcie_resume,
+#ifdef CONFIG_PM_SLEEP
+ .driver = {
+ .pm = &mwifiex_pcie_pm_ops,
+ },
#endif
};
--
1.7.10.4
^ permalink raw reply related
* Re: compat-wireless is not avalaible ?
From: Sven-Haegar Koch @ 2013-07-03 18:02 UTC (permalink / raw)
To: Xavier; +Cc: linux-wireless
In-Reply-To: <8D04620FE438D64-1114-7061B@webmail-va009.sysops.aol.com>
On Wed, 3 Jul 2013, Xavier wrote:
> Why
>
> http://www.orbit-lab.org/kernel/compat-wireless-3-stable/v3.2/compat-wireless-3.2.5-1.tar.bz2
>
> is not avalilable ?
>
> Where it's available ?
Have a look at
https://www.kernel.org/pub/linux/kernel/projects/backports/stable/ for
newer versions.
c'ya
sven-haegar
--
Three may keep a secret, if two of them are dead.
- Ben F.
^ permalink raw reply
* RE: [PATCH] mwifiex: don't ignore SDIO interrupts during shutdown
From: Bing Zhao @ 2013-07-03 18:41 UTC (permalink / raw)
To: Daniel Drake, Amitkumar Karwar
Cc: linux-wireless@vger.kernel.org, linville@tuxdriver.com
In-Reply-To: <20130703015653.82651FAAD5@dev.laptop.org>
Hi Daniel,
> When the card is being removed, mwifiex_remove_card() immediately sets
> surprise_removed to 1. This flag then causes the SDIO interrupt handler
> to ignore all interrupts without even acking them.
Since the card is removed, even if there is a pending interrupt received after card removal, it's not possible to ack it or disable interrupts. We cannot access hardware registers after card removal.
Perhaps you are talking about unloading driver (rmmod mwifiex_sdio) instead?
Thanks,
Bing
^ permalink raw reply
* Re: [PATCH] mwifiex: don't ignore SDIO interrupts during shutdown
From: Daniel Drake @ 2013-07-03 18:45 UTC (permalink / raw)
To: Bing Zhao
Cc: Amitkumar Karwar, linux-wireless@vger.kernel.org,
linville@tuxdriver.com
In-Reply-To: <477F20668A386D41ADCC57781B1F70430EA2E06694@SC-VEXCH1.marvell.com>
On Wed, Jul 3, 2013 at 12:41 PM, Bing Zhao <bzhao@marvell.com> wrote:
> Perhaps you are talking about unloading driver (rmmod mwifiex_sdio) instead?
Yes - or going into unpowered suspend, or powering down the computer.
All of those trigger the "remove card" path which is what I wanted to
refer to.
Thanks
Daniel
^ permalink raw reply
* Re: compat-wireless is not avalaible ?
From: Xavier @ 2013-07-03 18:48 UTC (permalink / raw)
To: linux-wireless
In-Reply-To: <alpine.DEB.2.10.1307032001430.29512@aurora.sdinet.de>
On Wed, Jul 03, 2013 at 08:02:31PM +0200, Sven-Haegar Koch wrote:
Hi Sven-Haegar,
> On Wed, 3 Jul 2013, Xavier wrote:
>
> > Why
> >
> >
http://www.orbit-lab.org/kernel/compat-wireless-3-stable/v3.2/compat-wireless-3.2.5-1.tar.bz2
> >
> > is not avalilable ?
> >
> > Where it's available ?
>
> Have a look at
> https://www.kernel.org/pub/linux/kernel/projects/backports/stable/
for
> newer versions.
>
Thanks for your answer.
This is a good link, but I need compat-wireless stable for 3.2 version
of Linux kernel.
In that link, there are all for >= 3.7 Linux kernel version.
Exist any site for 3.2 Linux kernel version of compat-wireless ?
Thanks, see you.
^ permalink raw reply
* [PATCH] ath9k: make rfkill configurable
From: Johannes Berg @ 2013-07-03 18:55 UTC (permalink / raw)
To: linux-wireless; +Cc: Johannes Berg
From: Johannes Berg <johannes.berg@intel.com>
When the platform doesn't have rfkill support, i.e. nothing
is connected to the rfkill GPIO, there's little value in
polling the GPIO. Add a Kconfig option to allow disabling
the polling in ath9k.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
drivers/net/wireless/ath/ath9k/Kconfig | 10 ++++++++++
drivers/net/wireless/ath/ath9k/hw.c | 2 +-
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/ath/ath9k/Kconfig b/drivers/net/wireless/ath/ath9k/Kconfig
index 760ab3f..6372626 100644
--- a/drivers/net/wireless/ath/ath9k/Kconfig
+++ b/drivers/net/wireless/ath/ath9k/Kconfig
@@ -96,6 +96,16 @@ config ATH9K_LEGACY_RATE_CONTROL
has to be passed to mac80211 using the module parameter,
ieee80211_default_rc_algo.
+config ATH9K_RFKILL
+ bool "Atheros ath9k rfkill support" if EXPERT
+ depends on ATH9K
+ depends on RFKILL=y || RFKILL=ATH9K
+ default y
+ help
+ Say Y to have ath9k poll the RF-Kill GPIO every couple of
+ seconds. Turn off to save power, but enable it if you have
+ a platform that can toggle the RF-Kill GPIO.
+
config ATH9K_HTC
tristate "Atheros HTC based wireless cards support"
depends on USB && MAC80211
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
index 4ca0cb0..e420c6b 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -2504,7 +2504,7 @@ int ath9k_hw_fill_cap_info(struct ath_hw *ah)
else
pCap->rts_aggr_limit = (8 * 1024);
-#if defined(CONFIG_RFKILL) || defined(CONFIG_RFKILL_MODULE)
+#ifdef CONFIG_ATH9K_RFKILL
ah->rfsilent = ah->eep_ops->get_eeprom(ah, EEP_RF_SILENT);
if (ah->rfsilent & EEP_RFSILENT_ENABLED) {
ah->rfkill_gpio =
--
1.8.0
^ permalink raw reply related
* IEEE VHT80 802.11 channels
From: Luis R. Rodriguez @ 2013-07-03 19:05 UTC (permalink / raw)
To: linux-wireless; +Cc: Felix Bitterli
We reviewed a while ago how we'd enable VHT80 channels and decided to
go with a scaping of the regulatory data even though IEEE defined very
specific channels. I hadn't seen a list with these center of freq IEEE
channels so I figured I'd post them. As far as I can tell I see these
defined. Whether or not you can use them will vary depending on your
country's regulatory rules.
5210, 5290, 5530, 5610, 5610, 5690, 5775
Luis
^ permalink raw reply
* Re: [rt2x00-users] [PATCH 1/5] rt2x00: rt2800lib: introduce rt2800_eeprom_word enum
From: Stanislaw Gruszka @ 2013-07-03 19:14 UTC (permalink / raw)
To: Gabor Juhos; +Cc: John Linville, linux-wireless, users
In-Reply-To: <1372269318-30233-2-git-send-email-juhosg@openwrt.org>
On Wed, Jun 26, 2013 at 07:55:14PM +0200, Gabor Juhos wrote:
> The patch converts the EEPROM_* word address defines
> into new enum values. The new enum type will be used
> by new functions which will be introduced in subsequent
> changes.
>
> The patch contains no functional changes.
>
> Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Acked-by: Stanislaw Gruszka <stf_xl@wp.pl>
^ permalink raw reply
* Re: [rt2x00-users] [PATCH 2/5] rt2x00: rt2800lib: introduce local EEPROM access functions
From: Stanislaw Gruszka @ 2013-07-03 19:15 UTC (permalink / raw)
To: Gabor Juhos; +Cc: John Linville, linux-wireless, users
In-Reply-To: <1372269318-30233-3-git-send-email-juhosg@openwrt.org>
On Wed, Jun 26, 2013 at 07:55:15PM +0200, Gabor Juhos wrote:
> The patch adds rt2800 specific functions for
> EEPROM data access and changes the code to use
> these instead of the generic rt2x00_eeprom_*
> variants.
>
> To avoid functional changes, the new functions
> are wrappers around the corresponding generic
> rt2x00_eeprom_* routines for now. Functional
> changes will be implemented in additional patches.
>
> Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Acked-by: Stanislaw Gruszka <stf_xl@wp.pl>
^ permalink raw reply
* Re: [rt2x00-users] [PATCH 3/5] rt2x00: rt2800lib: introduce rt2800_eeprom_read_from_array helper
From: Stanislaw Gruszka @ 2013-07-03 19:15 UTC (permalink / raw)
To: Gabor Juhos; +Cc: John Linville, linux-wireless, users
In-Reply-To: <1372269318-30233-4-git-send-email-juhosg@openwrt.org>
On Wed, Jun 26, 2013 at 07:55:16PM +0200, Gabor Juhos wrote:
> Add a new helper function and use that for reading
> single elements of various arrays in the EEPROM.
>
> The patch does not change the current behaviour,
> but it allows to use sequential values for the
> rt2800_eeprom_word enums. The conversion will be
> implemented in a subsequent change.
>
> Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Acked-by: Stanislaw Gruszka <stf_xl@wp.pl>
^ 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