mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-09 11:23:09 -04:00
mt76: mt7921: fix endianness issues in mt7921_mcu_set_tx()
Fix the following sparse warning in mt7921_mcu_set_tx routine: drivers/net/wireless/mediatek/mt76/mt7921/mcu.c:792:25: warning: incorrect type in assignment (different base types) drivers/net/wireless/mediatek/mt76/mt7921/mcu.c:792:25: expected restricted __le16 [usertype] aifs drivers/net/wireless/mediatek/mt76/mt7921/mcu.c:792:25: got unsigned char [usertype] aifs drivers/net/wireless/mediatek/mt76/mt7921/mcu.c:798:35: warning: incorrect type in assignment (different base types) drivers/net/wireless/mediatek/mt76/mt7921/mcu.c:798:35: expected restricted __le16 [usertype] cw_min Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
committed by
Felix Fietkau
parent
4090d43af4
commit
4abe5b9288
@@ -740,7 +740,6 @@ EXPORT_SYMBOL_GPL(mt7921_mcu_exit);
|
||||
int mt7921_mcu_set_tx(struct mt7921_dev *dev, struct ieee80211_vif *vif)
|
||||
{
|
||||
struct mt7921_vif *mvif = (struct mt7921_vif *)vif->drv_priv;
|
||||
|
||||
struct edca {
|
||||
__le16 cw_min;
|
||||
__le16 cw_max;
|
||||
@@ -760,7 +759,6 @@ int mt7921_mcu_set_tx(struct mt7921_dev *dev, struct ieee80211_vif *vif)
|
||||
.qos = vif->bss_conf.qos,
|
||||
.wmm_idx = mvif->mt76.wmm_idx,
|
||||
};
|
||||
|
||||
struct mu_edca {
|
||||
u8 cw_min;
|
||||
u8 cw_max;
|
||||
@@ -784,20 +782,20 @@ int mt7921_mcu_set_tx(struct mt7921_dev *dev, struct ieee80211_vif *vif)
|
||||
.qos = vif->bss_conf.qos,
|
||||
.wmm_idx = mvif->mt76.wmm_idx,
|
||||
};
|
||||
int to_aci[] = {1, 0, 2, 3};
|
||||
static const int to_aci[] = { 1, 0, 2, 3 };
|
||||
int ac, ret;
|
||||
|
||||
for (ac = 0; ac < IEEE80211_NUM_ACS; ac++) {
|
||||
struct ieee80211_tx_queue_params *q = &mvif->queue_params[ac];
|
||||
struct edca *e = &req.edca[to_aci[ac]];
|
||||
|
||||
e->aifs = q->aifs;
|
||||
e->aifs = cpu_to_le16(q->aifs);
|
||||
e->txop = cpu_to_le16(q->txop);
|
||||
|
||||
if (q->cw_min)
|
||||
e->cw_min = cpu_to_le16(q->cw_min);
|
||||
else
|
||||
e->cw_min = 5;
|
||||
e->cw_min = cpu_to_le16(5);
|
||||
|
||||
if (q->cw_max)
|
||||
e->cw_max = cpu_to_le16(q->cw_max);
|
||||
|
||||
Reference in New Issue
Block a user