mt76: mt7915: add HE-LTF into fixed rate command
Add HE-LTF control. Signed-off-by: Shayne Chen <shayne.chen@mediatek.com> Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
parent
4fee32153a
commit
4d2423326d
|
@ -365,12 +365,14 @@ int mt7915_init_debugfs(struct mt7915_dev *dev)
|
|||
#ifdef CONFIG_MAC80211_DEBUGFS
|
||||
/** per-station debugfs **/
|
||||
|
||||
/* usage: <tx mode> <ldpc> <stbc> <bw> <gi> <nss> <mcs> */
|
||||
static int mt7915_sta_fixed_rate_set(void *data, u64 rate)
|
||||
{
|
||||
struct ieee80211_sta *sta = data;
|
||||
struct mt7915_sta *msta = (struct mt7915_sta *)sta->drv_priv;
|
||||
|
||||
/* usage: <he ltf> <tx mode> <ldpc> <stbc> <bw> <gi> <nss> <mcs>
|
||||
* <tx mode>: see enum mt76_phy_type
|
||||
*/
|
||||
return mt7915_mcu_set_fixed_rate(msta->vif->phy->dev, sta, rate);
|
||||
}
|
||||
|
||||
|
|
|
@ -2317,10 +2317,9 @@ int mt7915_mcu_set_fixed_rate(struct mt7915_dev *dev,
|
|||
if (!rate) {
|
||||
ra->field = cpu_to_le32(RATE_PARAM_AUTO);
|
||||
goto out;
|
||||
} else {
|
||||
ra->field = cpu_to_le32(RATE_PARAM_FIXED);
|
||||
}
|
||||
|
||||
ra->field = cpu_to_le32(RATE_PARAM_FIXED);
|
||||
ra->phy.type = FIELD_GET(RATE_CFG_PHY_TYPE, rate);
|
||||
ra->phy.bw = FIELD_GET(RATE_CFG_BW, rate);
|
||||
ra->phy.nss = FIELD_GET(RATE_CFG_NSS, rate);
|
||||
|
@ -2333,10 +2332,12 @@ int mt7915_mcu_set_fixed_rate(struct mt7915_dev *dev,
|
|||
ra->phy.ldpc = FIELD_GET(RATE_CFG_LDPC, rate) * 7;
|
||||
|
||||
/* HT/VHT - SGI: 1, LGI: 0; HE - SGI: 0, MGI: 1, LGI: 2 */
|
||||
if (ra->phy.type > MT_PHY_TYPE_VHT)
|
||||
ra->phy.sgi = ra->phy.mcs * 85;
|
||||
else
|
||||
ra->phy.sgi = ra->phy.mcs * 15;
|
||||
if (ra->phy.type > MT_PHY_TYPE_VHT) {
|
||||
ra->phy.he_ltf = FIELD_GET(RATE_CFG_HE_LTF, rate) * 85;
|
||||
ra->phy.sgi = FIELD_GET(RATE_CFG_GI, rate) * 85;
|
||||
} else {
|
||||
ra->phy.sgi = FIELD_GET(RATE_CFG_GI, rate) * 15;
|
||||
}
|
||||
|
||||
out:
|
||||
return mt76_mcu_skb_send_msg(&dev->mt76, skb,
|
||||
|
|
|
@ -948,6 +948,7 @@ struct sta_rec_ra_fixed {
|
|||
#define RATE_CFG_STBC GENMASK(19, 16)
|
||||
#define RATE_CFG_LDPC GENMASK(23, 20)
|
||||
#define RATE_CFG_PHY_TYPE GENMASK(27, 24)
|
||||
#define RATE_CFG_HE_LTF GENMASK(31, 28)
|
||||
|
||||
struct sta_rec_bf {
|
||||
__le16 tag;
|
||||
|
|
Loading…
Reference in New Issue