From: Luciano Coelho <luciano.coelho@nokia.com>
To: ext Shahar Levi <shahar_levi@ti.com>
Cc: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH v3 02/03] wl1271: 11n Support, ACX Commands
Date: Tue, 12 Oct 2010 16:46:09 +0300 [thread overview]
Message-ID: <1286891169.12528.43.camel@chilepepper> (raw)
In-Reply-To: <1286812038-19013-3-git-send-email-shahar_levi@ti.com>
On Mon, 2010-10-11 at 17:47 +0200, ext Shahar Levi wrote:
> Added ACX command to the FW for 11n support.
>
> Signed-off-by: Shahar Levi <shahar_levi@ti.com>
> ---
More minors.
> diff --git a/drivers/net/wireless/wl12xx/wl1271_acx.c b/drivers/net/wireless/wl12xx/wl1271_acx.c
> index 6189934..cd89482 100644
> --- a/drivers/net/wireless/wl12xx/wl1271_acx.c
> +++ b/drivers/net/wireless/wl12xx/wl1271_acx.c
> @@ -1226,6 +1226,91 @@ out:
> return ret;
> }
>
> +int wl1271_acx_set_ht_capabilities(struct wl1271 *wl,
> + struct ieee80211_sta_ht_cap *ht_cap,
> + bool allow_ht_operation)
> +{
> + struct wl1271_acx_ht_capabilities *acx;
> + u8 mac_address[ETH_ALEN] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
As I said in my comment to 01/03, it's better to have the comment about
this here and not in the header.
> + acx = kzalloc(sizeof(*acx), GFP_KERNEL);
> + if (!acx) {
> + ret = -ENOMEM;
> + goto out;
> + }
> +
> + /* Allow HT Operation ? */
> + if (allow_ht_operation) {
> + acx->ht_capabilites =
> + WL1271_ACX_FW_CAP_BIT_MASK_HT_OPERATION;
> + acx->ht_capabilites |=
> + ((ht_cap->cap & IEEE80211_HT_CAP_GRN_FLD) ?
> + WL1271_ACX_FW_CAP_BIT_MASK_GREENFIELD_FRAME_FORMAT : 0);
> + acx->ht_capabilites |=
> + ((ht_cap->cap & IEEE80211_HT_CAP_SGI_20) ?
> + WL1271_ACX_FW_CAP_BIT_MASK_SHORT_GI_FOR_20MHZ_PACKETS : 0);
> + acx->ht_capabilites |=
> + ((ht_cap->cap & IEEE80211_HT_CAP_LSIG_TXOP_PROT) ?
> + WL1271_ACX_FW_CAP_BIT_MASK_LSIG_TXOP_PROTECTION : 0);
We use one full TAB for indentation on the next line after an = sign.
Some of this won't fit in 80 chars width, but that's because they're too
long anyway.
So two things to change: first, you can remove the _BIT_MASK part of all
this macros, so they're shorter; second, add a full TAB in the
indentation, like this:
acx->ht_capabilites =
WL1271_ACX_FW_CAP_HT_OPERATION;
> +
> + /* get data from A-MPDU parameters field */
> + acx->ampdu_max_length = ht_cap->ampdu_factor;
> + acx->ampdu_min_spacing = ht_cap->ampdu_density;
> +
> + memcpy(acx->mac_address, mac_address, ETH_ALEN);
> + }
> + /* HT operations are not allowed */
> + else {
> + acx->ht_capabilites = 0;
> + }
} else {
acx->ht_capabilities = 0;
}
If you still want to add the "HT operations are not allowed" comment,
add it in the same line where "} else {" is.
--
Cheers,
Luca.
next prev parent reply other threads:[~2010-10-12 13:46 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-11 15:47 [PATCH v3 00/03] wl1271: 11n Support, add support to 80211n spec Shahar Levi
2010-10-11 15:47 ` [PATCH v3 01/03] wl1271: 11n Support, Add Definitions Shahar Levi
2010-10-12 13:34 ` Luciano Coelho
2010-10-11 15:47 ` [PATCH v3 02/03] wl1271: 11n Support, ACX Commands Shahar Levi
2010-10-12 13:46 ` Luciano Coelho [this message]
2010-10-11 15:47 ` [PATCH v3 03/03] wl1271: 11n Support, functionality and configuration ability Shahar Levi
2010-10-12 14:18 ` Luciano Coelho
2010-10-12 16:03 ` Shahar Levi
2010-10-13 6:17 ` Kalle Valo
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=1286891169.12528.43.camel@chilepepper \
--to=luciano.coelho@nokia.com \
--cc=linux-wireless@vger.kernel.org \
--cc=shahar_levi@ti.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).