linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Gery Kahn <geryk@ti.com>
To: Arik Nemtsov <arik@wizery.com>
Cc: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
	Luciano Coelho <luciano.coelho@nokia.com>
Subject: Re: [PATCH 17/18] wl1271: Read MAC address from NVS file on HW startup
Date: Tue, 30 Nov 2010 17:48:56 +0200	[thread overview]
Message-ID: <4CF51CE8.9090809@ti.com> (raw)
In-Reply-To: <1290079951-16793-18-git-send-email-arik@wizery.com>

On 11/18/2010 01:32 PM, Arik Nemtsov wrote:
> Try to read the MAC address from the on-disk NVS file.
> A non-zero MAC address is required to add an AP interface.
>
> Signed-off-by: Arik Nemtsov<arik@wizery.com>
> ---
>   drivers/net/wireless/wl12xx/main.c |   12 ++++++++++++
>   1 files changed, 12 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c
> index 708b699..e5fbbb6 100644
> --- a/drivers/net/wireless/wl12xx/main.c
> +++ b/drivers/net/wireless/wl12xx/main.c
> @@ -2987,6 +2987,18 @@ int wl1271_register_hw(struct wl1271 *wl)
>   	if (wl->mac80211_registered)
>   		return 0;
>
> +	ret = wl1271_fetch_nvs(wl);
> +	if (ret == 0) {
> +		u8 *nvs_ptr = (u8 *)wl->nvs->nvs;
> +
> +		wl->mac_addr[0] = nvs_ptr[11];
> +		wl->mac_addr[1] = nvs_ptr[10];
> +		wl->mac_addr[2] = nvs_ptr[6];
> +		wl->mac_addr[3] = nvs_ptr[5];
> +		wl->mac_addr[4] = nvs_ptr[4];
> +		wl->mac_addr[5] = nvs_ptr[3];
> +	}
> +
>   	SET_IEEE80211_PERM_ADDR(wl->hw, wl->mac_addr);
>
>   	ret = ieee80211_register_hw(wl->hw);
The code flow of the add if (wl1271_op_add_interface) overwrites it from vif.
There are 3 places for MAC: wl, vif and NVS :)
Should be considered also PLT flow which is not goes
through wl1271_op_add_interface, but from wl1271_tm_cmd().

  reply	other threads:[~2010-11-30 15:49 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-18 11:32 [PATCH 00/18] AP mode support for wl12xx Arik Nemtsov
2010-11-18 11:32 ` [PATCH 01/18] wl1271: Add AP related configuration to conf_drv_settings Arik Nemtsov
2010-11-18 11:32 ` [PATCH 02/18] wl1271: AP mode - AP specific CMD_CONFIGURE sub-commands Arik Nemtsov
2010-11-18 11:32 ` [PATCH 03/18] wl1271: AP mode - add AP specific event Arik Nemtsov
2010-11-18 11:32 ` [PATCH 04/18] wl1271: AP-mode high level commands Arik Nemtsov
2010-11-18 11:32 ` [PATCH 05/18] wl1271: AP mode - workaround for FW bug on station remove Arik Nemtsov
2010-11-18 11:32 ` [PATCH 06/18] wl1271: AP mode - init sequence Arik Nemtsov
2010-11-18 11:32 ` [PATCH 07/18] wl1271: AP specific RX filter configuration Arik Nemtsov
2010-11-18 11:32 ` [PATCH 08/18] wl1271: Add AP related definitions to HOST-FW interface Arik Nemtsov
2010-11-18 11:32 ` [PATCH 09/18] wl1271: Configure AP on BSS info change Arik Nemtsov
2010-11-18 11:32 ` [PATCH 10/18] wl1271: AP mode config in ieee80211_ops.config Arik Nemtsov
2010-11-18 11:32 ` [PATCH 11/18] wl1271: AP mode - change filter config Arik Nemtsov
2010-11-18 11:32 ` [PATCH 12/18] wl1271: AP mode - add STA add/remove ops Arik Nemtsov
2010-11-18 11:32 ` [PATCH 13/18] wl1271: AP mode - changes in TX path Arik Nemtsov
2010-11-18 11:32 ` [PATCH 14/18] wl1271: AP mode - record TX configuration settings Arik Nemtsov
2010-11-18 11:32 ` [PATCH 15/18] wl1271: AP mode - encryption support Arik Nemtsov
2010-11-18 11:32 ` [PATCH 16/18] wl1271: AP mode - fetch appropriate firmware for AP Arik Nemtsov
2010-11-18 11:32 ` [PATCH 17/18] wl1271: Read MAC address from NVS file on HW startup Arik Nemtsov
2010-11-30 15:48   ` Gery Kahn [this message]
2010-11-30 16:04     ` Arik Nemtsov
2010-11-30 19:01       ` Gery Kahn
2010-11-30 19:20         ` Arik Nemtsov
2010-11-30 19:36           ` Gery Kahn
2010-11-30 21:23             ` Arik Nemtsov
2010-11-18 11:32 ` [PATCH 18/18] wl1271: Enable AP-mode Arik Nemtsov
2010-11-18 11:37 ` [PATCH 00/18] AP mode support for wl12xx Luciano Coelho
2010-11-18 11:42   ` Arik Nemtsov
2010-11-26  8:15 ` Luciano Coelho
2010-11-29  6:50   ` Arik Nemtsov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4CF51CE8.9090809@ti.com \
    --to=geryk@ti.com \
    --cc=arik@wizery.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=luciano.coelho@nokia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).