ATH11K Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Sven Eckelmann <sven@narfation.org>
To: ath11k@lists.infradead.org
Cc: Shashidhar Lakkavalli <slakkavalli@datto.com>,
	Kalle Valo <kvalo@codeaurora.org>,
	John Crispin <john@phrozen.org>
Subject: Re: [PATCH V7 3/8] ath11k: move phymode selection from function to array lookup
Date: Wed, 12 Jun 2019 11:04:42 +0200	[thread overview]
Message-ID: <1644973.F42viomyVb@bentobox> (raw)
In-Reply-To: <20190603190157.25165-4-john@phrozen.org>


[-- Attachment #1.1: Type: text/plain, Size: 1168 bytes --]

On Monday, 3 June 2019 21:01:52 CEST John Crispin wrote:
> With HE support getting added, the approach of using functions will quickly
> get convoluted. Change the code to use an array lookup function instead.
> 
> Signed-off-by: Shashidhar Lakkavalli <slakkavalli@datto.com>
> Signed-off-by: John Crispin <john@phrozen.org>
> ---
[...]
>  u8 ath11k_mac_bitrate_to_idx(const struct ieee80211_supported_band *sband,
>  			     u32 bitrate)
>  {
> @@ -4062,7 +4045,12 @@ ath11k_mac_vdev_start_restart(struct ath11k_vif *arvif,
>  	arg.channel.freq = chandef->chan->center_freq;
>  	arg.channel.band_center_freq1 = chandef->center_freq1;
>  	arg.channel.band_center_freq2 = chandef->center_freq2;
> -	arg.channel.mode = chan_to_phymode(chandef);
> +	arg.channel.mode =
> +		ath11k_phymodes[chandef->chan->band][he_support][chandef->width];
> +	if (arg.channel.mode == MODE_11G &&
> +	    chandef->chan->flags & IEEE80211_CHAN_NO_OFDM)
> +		arg.channel.mode = MODE_11B;
> +	WARN_ON(arg.channel.mode == MODE_UNKNOWN);

What is the reason for splitting it up between HE and non-HE PHY modes? It is 
not like there is a split between VHT and HT PHY mode.

Kind regards,
	Sven

[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

[-- Attachment #2: Type: text/plain, Size: 146 bytes --]

_______________________________________________
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

  reply	other threads:[~2019-06-12  9:05 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-03 19:01 [PATCH V7 0/8] ath11k: add HE support John Crispin
2019-06-03 19:01 ` [PATCH V7 1/8] mac80211: propagate HE operation info into bss_conf John Crispin
2019-06-03 19:01 ` [PATCH V7 2/8] ath11k: fix some whitespace errors John Crispin
2019-06-03 19:01 ` [PATCH V7 3/8] ath11k: move phymode selection from function to array lookup John Crispin
2019-06-12  9:04   ` Sven Eckelmann [this message]
2019-06-03 19:01 ` [PATCH V7 4/8] ath11k: add HE handling to the debug code John Crispin
2019-06-03 19:01 ` [PATCH V7 5/8] ath11k: extend reading of FW capabilities John Crispin
2019-06-03 19:01 ` [PATCH V7 6/8] ath11k: add defines for max MCS rates per phymode John Crispin
2019-06-03 19:01 ` [PATCH V7 7/8] ath11k: handle rx status for HE frames John Crispin
2019-06-03 19:01 ` [PATCH V7 8/8] ath11k: add HE support John Crispin
2019-06-04  8:40   ` Kalle Valo
2019-06-06 15:16 ` [PATCH V7 0/8] " 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=1644973.F42viomyVb@bentobox \
    --to=sven@narfation.org \
    --cc=ath11k@lists.infradead.org \
    --cc=john@phrozen.org \
    --cc=kvalo@codeaurora.org \
    --cc=slakkavalli@datto.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