From: Kalle Valo <kvalo@qca.qualcomm.com>
To: Janusz Dziedzic <janusz.dziedzic@tieto.com>
Cc: linux-wireless@vger.kernel.org, ath10k@lists.infradead.org
Subject: Re: [PATCH] ath10k: add set_bitrate_mask callback
Date: Mon, 23 Dec 2013 09:01:13 +0200 [thread overview]
Message-ID: <87d2koxd8m.fsf@kamboji.qca.qualcomm.com> (raw)
In-Reply-To: <1387653946-2988-1-git-send-email-janusz.dziedzic@tieto.com> (Janusz Dziedzic's message of "Sat, 21 Dec 2013 20:25:46 +0100")
Janusz Dziedzic <janusz.dziedzic@tieto.com> writes:
> Add set_bitrate_mask callback. Currently
> ath10k HW is limited to handle only single
> fixed rate setting or limit number of used
> spatial streams.
>
> Example:
> iw wlanX set bitrates legacy-5 ht-mcs-5 vht-mcs-5 2:9
> will setup VHT, nss=2, mcs=9
>
> iw wlanX set bitrates legacy-5 18 ht-mcs-5 vht-mcs-5
> will setup legacy, 18Mbps
>
> iw wlanX set bitrates legacy-5 ht-mcs-5 3 vht-mcs-5
> will setup HT, nss=1, mcs=3
>
> iw wlanX set bitrate legacy-5 ht-mcs-5 vht-mcs-5 1:0-9
> will setup nss=1
>
> iw wlanX set bitrate legacy-5 ht-mcs-5 vht-mcs-5 1:0-9 2:0-9
> will setup nss=2
>
> Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
I see a new warning with this patch:
ath10k/mac.c:3593:52: error: unknown field name in initializer
> Depends on, nl80211: add VHT support for set_bitrate_mask
Good, I need to always know this. I now merged wireless-next to ath-next
to get the dependency included.
> --- a/drivers/net/wireless/ath/ath10k/wmi.h
> +++ b/drivers/net/wireless/ath/ath10k/wmi.h
> @@ -3003,6 +3003,24 @@ struct wmi_vdev_install_key_arg {
> const void *key_data;
> };
>
> +/*
> + * CCK: 0 - 11Mbps, 1 - 5,5Mbps, 2 - 2Mbps, 3 - 1Mbps,
> + * 4 - 11Mbps (s), 5 - 5,5Mbps (s), 6 - 2Mbps (s)
> + * OFDM: 0 - 48Mbps, 1 - 24Mbps, 2 - 12Mbps, 3 - 6Mbps,
> + * 4 - 54Mbps, 5 - 36Mbps, 6 - 18Mbps, 7 - 9Mbps
> + * HT/VHT: MCS index
> + */
> +struct wmi_vdev_fixed_rate {
> + union {
> + u8 rate;
> + struct {
> + u8 preamble:2, /* %WMI_RATE_PREAMBLE_ */
> + nss:2,
> + rate_mcs:4; /* see above */
> + } __packed;
> + } __packed;
> +} __packed;
Bitfields are frowned upon in kernel, better to use SM() and MS().
--
Kalle Valo
_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k
WARNING: multiple messages have this Message-ID (diff)
From: Kalle Valo <kvalo@qca.qualcomm.com>
To: Janusz Dziedzic <janusz.dziedzic@tieto.com>
Cc: <ath10k@lists.infradead.org>, <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH] ath10k: add set_bitrate_mask callback
Date: Mon, 23 Dec 2013 09:01:13 +0200 [thread overview]
Message-ID: <87d2koxd8m.fsf@kamboji.qca.qualcomm.com> (raw)
In-Reply-To: <1387653946-2988-1-git-send-email-janusz.dziedzic@tieto.com> (Janusz Dziedzic's message of "Sat, 21 Dec 2013 20:25:46 +0100")
Janusz Dziedzic <janusz.dziedzic@tieto.com> writes:
> Add set_bitrate_mask callback. Currently
> ath10k HW is limited to handle only single
> fixed rate setting or limit number of used
> spatial streams.
>
> Example:
> iw wlanX set bitrates legacy-5 ht-mcs-5 vht-mcs-5 2:9
> will setup VHT, nss=2, mcs=9
>
> iw wlanX set bitrates legacy-5 18 ht-mcs-5 vht-mcs-5
> will setup legacy, 18Mbps
>
> iw wlanX set bitrates legacy-5 ht-mcs-5 3 vht-mcs-5
> will setup HT, nss=1, mcs=3
>
> iw wlanX set bitrate legacy-5 ht-mcs-5 vht-mcs-5 1:0-9
> will setup nss=1
>
> iw wlanX set bitrate legacy-5 ht-mcs-5 vht-mcs-5 1:0-9 2:0-9
> will setup nss=2
>
> Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
I see a new warning with this patch:
ath10k/mac.c:3593:52: error: unknown field name in initializer
> Depends on, nl80211: add VHT support for set_bitrate_mask
Good, I need to always know this. I now merged wireless-next to ath-next
to get the dependency included.
> --- a/drivers/net/wireless/ath/ath10k/wmi.h
> +++ b/drivers/net/wireless/ath/ath10k/wmi.h
> @@ -3003,6 +3003,24 @@ struct wmi_vdev_install_key_arg {
> const void *key_data;
> };
>
> +/*
> + * CCK: 0 - 11Mbps, 1 - 5,5Mbps, 2 - 2Mbps, 3 - 1Mbps,
> + * 4 - 11Mbps (s), 5 - 5,5Mbps (s), 6 - 2Mbps (s)
> + * OFDM: 0 - 48Mbps, 1 - 24Mbps, 2 - 12Mbps, 3 - 6Mbps,
> + * 4 - 54Mbps, 5 - 36Mbps, 6 - 18Mbps, 7 - 9Mbps
> + * HT/VHT: MCS index
> + */
> +struct wmi_vdev_fixed_rate {
> + union {
> + u8 rate;
> + struct {
> + u8 preamble:2, /* %WMI_RATE_PREAMBLE_ */
> + nss:2,
> + rate_mcs:4; /* see above */
> + } __packed;
> + } __packed;
> +} __packed;
Bitfields are frowned upon in kernel, better to use SM() and MS().
--
Kalle Valo
next prev parent reply other threads:[~2013-12-23 7:01 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-21 19:25 [PATCH] ath10k: add set_bitrate_mask callback Janusz Dziedzic
2013-12-21 19:25 ` Janusz Dziedzic
2013-12-23 7:01 ` Kalle Valo [this message]
2013-12-23 7:01 ` Kalle Valo
2013-12-23 13:55 ` Janusz Dziedzic
2013-12-23 13:55 ` Janusz Dziedzic
2013-12-23 14:04 ` Kalle Valo
2013-12-23 14:04 ` 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=87d2koxd8m.fsf@kamboji.qca.qualcomm.com \
--to=kvalo@qca.qualcomm.com \
--cc=ath10k@lists.infradead.org \
--cc=janusz.dziedzic@tieto.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.