All of lore.kernel.org
 help / color / mirror / Atom feed
From: John Crispin <john@phrozen.org>
To: Rajkumar Manoharan <rmanohar@codeaurora.org>
Cc: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>,
	Srini Kode <skode@qti.qualcomm.com>,
	ath11k@lists.infradead.org, Kalle Valo <kvalo@codeaurora.org>,
	Shashidhar Lakkavalli <slakkavalli@datto.com>
Subject: Re: [PATCH V2 4/4] ath11k: add HE support
Date: Tue, 30 Apr 2019 09:05:21 +0200	[thread overview]
Message-ID: <2ebdfa38-8e73-1982-6453-ede1434d6ebd@phrozen.org> (raw)
In-Reply-To: <e6083123cf28cb4c48814b45d27d43cc@codeaurora.org>


Hi,

[...]
>
>               WIDTH_20_NOHT |   WIDTH_20    | WIDTH_40     | 
> WIDTH_80      | WIDTH_160        | WIDTH_80P80
>
> MODE_11G            11G       11NG_HT20       11NG_HT40 NA         
>          NA            NA
> MODE_11G_HE         11G       11AX_HE20_2G    11AX_HE40_2G 
> 11AX_HE80_2G         NA            NA
> MODE_11A            11A       11NA_HT20       11NA_HT40 NA          
>          NA            NA
> MODE_11A_VHT        11A       11AC_VHT20      11AC_VHT40 11AC_VHT80  
>          11AC_VHT160   11AC_VHT80_80
> MODE_11A_HE         11A       11AX_HE20       11AX_HE40 11AX_HE80   
>          11AX_HE160    11AX_HE80_80
>
> [...]
>
good idea !


>> +static enum wmi_phy_mode ath11k_mac_get_phymode_he(struct ath11k *ar,
>> +                           struct ieee80211_sta *sta)
>> +{
>> +    if (sta->bandwidth == IEEE80211_STA_RX_BW_160) {
>> +        if (sta->he_cap.he_cap_elem.phy_cap_info[0] &
>> + IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_160MHZ_IN_5G)
>> +            return MODE_11AX_HE160;
>> +        else if (sta->he_cap.he_cap_elem.phy_cap_info[0] &
>> + IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_80PLUS80_MHZ_IN_5G)
>> +            return MODE_11AX_HE80_80;
>> +        /* not sure if this is a valid case? */
>> +        return MODE_11AX_HE160;
>> +    }
>> +
>> +    if (sta->bandwidth == IEEE80211_STA_RX_BW_80)
>> +        return MODE_11AX_HE80;
>> +
>> +    if (sta->bandwidth == IEEE80211_STA_RX_BW_40)
>> +        return MODE_11AX_HE40;
>> +
>> +    if (sta->bandwidth == IEEE80211_STA_RX_BW_20)
>> +        return MODE_11AX_HE20;
>> +
>> +    return MODE_UNKNOWN;
>> +}
>> +
>
> I think this function also be removed if we have MODE table as 
> mentioned above.
>
> [...]
>
>> +static void ath11k_mac_copy_he_cap(struct ath11k_pdev_cap *cap,
>> +                   struct ieee80211_sband_iftype_data *data,
>> +                   int band)
>> +{
>> +    int i;
>> +
>> +    for (i = 0; i < 2; i++) {
>> +        struct ieee80211_sta_he_cap *he_cap = &data[i].he_cap;
>> +        struct ath11k_band_cap *band_cap = &cap->band[band];
>> +        struct ieee80211_he_cap_elem *he_cap_elem =
>> +                &he_cap->he_cap_elem;
>> +
>> +        he_cap->has_he = true;
>> +        memcpy(he_cap_elem->mac_cap_info, band_cap->he_cap_info,
>> +               sizeof(he_cap_elem->mac_cap_info));
>> +        memcpy(he_cap_elem->phy_cap_info, band_cap->he_cap_phy_info,
>> +               sizeof(he_cap_elem->phy_cap_info));
>> +
>> +        if (i) {
>> +            data[i].types_mask = BIT(NL80211_IFTYPE_STATION);
>> +            he_cap_elem->mac_cap_info[0] &=
>> +                ~IEEE80211_HE_MAC_CAP0_TWT_RES;
>> +            he_cap_elem->mac_cap_info[0] |=
>> +                IEEE80211_HE_MAC_CAP0_TWT_REQ;
>> +            /* TODO - add further differences between AP and STA */
>> +        } else {
>> +            data[i].types_mask = BIT(NL80211_IFTYPE_AP);
>> +        }
>>
> Hmmm.. If you are running loop to extract he_cap, he_cap_extn, how 
> will you extend HE support
> for other interface types (Mesh)?
>
I will make this future-proof

     John



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

      reply	other threads:[~2019-04-30  7:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-25 18:17 [PATCH V2 0/4] ath11k: add HE support John Crispin
2019-04-25 18:17 ` [PATCH V2 1/4] ath11k: add HE handling to the debug code John Crispin
2019-04-25 18:17 ` [PATCH V2 2/4] ath11k: extend reading of FW capabilities John Crispin
2019-04-25 18:17 ` [PATCH V2 3/4] ath11k: handle rx status for HE frames John Crispin
2019-04-25 18:17 ` [PATCH V2 4/4] ath11k: add HE support John Crispin
2019-04-30  5:41   ` Rajkumar Manoharan
2019-04-30  7:05     ` John Crispin [this message]

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=2ebdfa38-8e73-1982-6453-ede1434d6ebd@phrozen.org \
    --to=john@phrozen.org \
    --cc=ath11k@lists.infradead.org \
    --cc=kvalo@codeaurora.org \
    --cc=rmanohar@codeaurora.org \
    --cc=rmanohar@qti.qualcomm.com \
    --cc=skode@qti.qualcomm.com \
    --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 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.