linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Luciano Coelho <luciano.coelho@nokia.com>
To: ext Arik Nemtsov <arik@wizery.com>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [PATCH v2 04/18] wl1271: AP-mode high level commands
Date: Wed, 22 Dec 2010 23:16:54 +0200	[thread overview]
Message-ID: <1293052614.14423.42.camel@powerslave> (raw)
In-Reply-To: <1293028057-6212-5-git-send-email-arik@wizery.com>

On Wed, 2010-12-22 at 16:27 +0200, ext Arik Nemtsov wrote:
> Add commands to start/stop BSS, add/remove STA and configure encryption
> keys. Split the encryption commands "set key" and "set default key" into
> AP and STA specific versions.
> 
> Signed-off-by: Arik Nemtsov <arik@wizery.com>
> ---

[...]

> @@ -850,3 +943,178 @@ out_free:
>  out:
>  	return ret;
>  }
> +
> +int wl1271_cmd_start_bss(struct wl1271 *wl)
> +{
> +	struct wl1271_cmd_bss_start *cmd;
> +	struct ieee80211_bss_conf *bss_conf = &wl->vif->bss_conf;
> +	int ret;
> +
> +	wl1271_debug(DEBUG_CMD, "cmd start bss");
> +
> +	/*
> +	 * FIXME: We currently do not support hidden SSID. The real SSID
> +	 * should be fetched from mac80211 first.
> +	 */
> +	if (wl->ssid_len == 0) {
> +		wl1271_warning("Hidden SSID currently not supported for AP");
> +		return -EINVAL;
> +	}
> +
> +	cmd = kzalloc(sizeof(*cmd), GFP_KERNEL);
> +	if (!cmd) {
> +		ret = -ENOMEM;
> +		goto out;
> +	}

Please decide if you want to return directly here or set ret and goto
out.  For consistency, I'd suggest to set ret and goto out, since this
is how (most of) the rest of the code does.


> +int wl1271_cmd_add_sta(struct wl1271 *wl, struct ieee80211_sta *sta, u8 hlid)
> +{
> +	struct wl1271_cmd_add_sta *cmd;
> +	int ret;
> +
> +	wl1271_debug(DEBUG_CMD, "cmd add sta %d", (int)hlid);
> +
> +	cmd = kzalloc(sizeof(*cmd), GFP_KERNEL);
> +	if (!cmd) {
> +		ret = -ENOMEM;
> +		goto out;
> +	}
> +
> +	/* currently we don't support UAPSD */
> +	memset(cmd->psd_type, 0, sizeof(cmd->psd_type));
> +	cmd->sp_len = 0;

No need to memset, since you're kzalloc'ing anyway.  I guess just a good
comment here is enough.


> diff --git a/drivers/net/wireless/wl12xx/cmd.h b/drivers/net/wireless/wl12xx/cmd.h
> index 2a1d9db..02f843c 100644
> --- a/drivers/net/wireless/wl12xx/cmd.h
> +++ b/drivers/net/wireless/wl12xx/cmd.h
> @@ -54,12 +54,20 @@ struct sk_buff *wl1271_cmd_build_ap_probe_req(struct wl1271 *wl,
>  int wl1271_cmd_build_arp_rsp(struct wl1271 *wl, __be32 ip_addr);
>  int wl1271_build_qos_null_data(struct wl1271 *wl);
>  int wl1271_cmd_build_klv_null_data(struct wl1271 *wl);
> -int wl1271_cmd_set_default_wep_key(struct wl1271 *wl, u8 id);
> -int wl1271_cmd_set_key(struct wl1271 *wl, u16 action, u8 id, u8 key_type,
> +int wl1271_cmd_set_sta_default_wep_key(struct wl1271 *wl, u8 id);
> +int wl1271_cmd_set_ap_default_wep_key(struct wl1271 *wl, u8 id);
> +int wl1271_cmd_set_sta_key(struct wl1271 *wl, u16 action, u8 id, u8 key_type,
>  		       u8 key_size, const u8 *key, const u8 *addr,
>  		       u32 tx_seq_32, u16 tx_seq_16);

Indentation?

> +int wl1271_cmd_set_ap_key(struct wl1271 *wl, u16 action, u8 id, u8 key_type,
> +			u8 key_size, const u8 *key, u8 hlid, u32 tx_seq_32,
> +			u16 tx_seq_16);

Ditto.


-- 
Cheers,
Luca.


  reply	other threads:[~2010-12-22 21:16 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-22 14:27 [PATCH v2 00/18] AP mode support for wl12xx Arik Nemtsov
2010-12-22 14:27 ` [PATCH v2 01/18] wl1271: Add AP related configuration to conf_drv_settings Arik Nemtsov
2010-12-22 20:22   ` Luciano Coelho
2010-12-23 11:05     ` Arik Nemtsov
2010-12-22 14:27 ` [PATCH v2 02/18] wl1271: AP mode - AP specific CMD_CONFIGURE sub-commands Arik Nemtsov
2010-12-22 20:44   ` Luciano Coelho
2010-12-23  6:48     ` Arik Nemtsov
2010-12-22 14:27 ` [PATCH v2 03/18] wl1271: AP mode - add AP specific event Arik Nemtsov
2010-12-22 14:27 ` [PATCH v2 04/18] wl1271: AP-mode high level commands Arik Nemtsov
2010-12-22 21:16   ` Luciano Coelho [this message]
2010-12-23  7:48     ` Arik Nemtsov
2010-12-22 14:27 ` [PATCH v2 05/18] wl1271: AP mode - workaround for FW bug on station remove Arik Nemtsov
2010-12-22 21:19   ` Luciano Coelho
2010-12-23  7:51     ` Arik Nemtsov
2010-12-22 14:27 ` [PATCH v2 06/18] wl1271: AP mode - init sequence Arik Nemtsov
2010-12-27 12:57   ` Luciano Coelho
2010-12-28  6:16     ` Arik Nemtsov
2010-12-28  8:34       ` Luciano Coelho
2010-12-22 14:27 ` [PATCH v2 07/18] wl1271: AP specific RX filter configuration Arik Nemtsov
2010-12-22 21:29   ` Luciano Coelho
2010-12-23  7:58     ` Arik Nemtsov
2010-12-22 14:27 ` [PATCH v2 08/18] wl1271: Add AP related definitions to HOST-FW interface Arik Nemtsov
2010-12-22 21:36   ` Luciano Coelho
2010-12-23  8:05     ` Arik Nemtsov
2010-12-22 14:27 ` [PATCH v2 09/18] wl1271: Configure AP on BSS info change Arik Nemtsov
2010-12-27 13:11   ` Luciano Coelho
2010-12-27 21:46     ` Arik Nemtsov
2010-12-22 14:27 ` [PATCH v2 10/18] wl1271: AP mode config in ieee80211_ops.config Arik Nemtsov
2010-12-22 14:27 ` [PATCH v2 11/18] wl1271: AP mode - change filter config Arik Nemtsov
2010-12-22 14:27 ` [PATCH v2 12/18] wl1271: AP mode - add STA add/remove ops Arik Nemtsov
2010-12-27 13:34   ` Luciano Coelho
2010-12-28  5:37     ` Arik Nemtsov
2010-12-22 14:27 ` [PATCH v2 13/18] wl1271: AP mode - changes in TX path Arik Nemtsov
2010-12-22 14:27 ` [PATCH v2 14/18] wl1271: AP mode - record TX configuration settings Arik Nemtsov
2010-12-28 11:35   ` Luciano Coelho
2010-12-28 11:37     ` Arik Nemtsov
2010-12-22 14:27 ` [PATCH v2 15/18] wl1271: AP mode - encryption support Arik Nemtsov
2010-12-28 12:03   ` Luciano Coelho
2010-12-28 17:16     ` Arik Nemtsov
2010-12-22 14:27 ` [PATCH v2 16/18] wl1271: AP mode - fetch appropriate firmware for AP Arik Nemtsov
2010-12-22 14:27 ` [PATCH v2 17/18] wl1271: Read MAC address from NVS file on HW startup Arik Nemtsov
2010-12-28 12:57   ` Luciano Coelho
2010-12-22 14:27 ` [PATCH v2 18/18] wl1271: Enable AP-mode 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=1293052614.14423.42.camel@powerslave \
    --to=luciano.coelho@nokia.com \
    --cc=arik@wizery.com \
    --cc=linux-wireless@vger.kernel.org \
    /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).