Re: [PATCH v2 2/9] mt76: connac: fix broadcast muar_idx in alloc_sta_req
flat view
From: Felix Fietkau <nbd@nbd.name>
Date: 2021-12-19 22:06:38
On 2021-12-19 21:50, Felix Fietkau wrote:
On 2021-12-19 18:40, Lorenzo Bianconi wrote:quoted
Set muar_idx for broadcast wcid to 0xe in mt76_connac_mcu_alloc_sta_req routine. Fixes: d0e274af2f2e4 ("mt76: mt76_connac: create mcu library") Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> --- drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)diff --git a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c index 5664f119447b..b150c7f2f005 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c +++ b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c@@ -271,7 +271,7 @@ mt76_connac_mcu_alloc_sta_req(struct mt76_dev *dev, struct mt76_vif *mvif, { struct sta_req_hdr hdr = { .bss_idx = mvif->idx, - .muar_idx = wcid ? mvif->omac_idx : 0, + .muar_idx = wcid && wcid->sta ? mvif->omac_idx : 0xe,I took another look at the driver code, and I think this part is wrong. I think it should be like this instead: When deleting an entry (sta or vif wcid), we should set muar_idx to 0xe When not deleting, it should be mvif->omac_idx if we have a vif, and 0xe otherwise.
After some more discussion with Lorenzo and taking a fresh look at the vendor code, it seems to me that the existing code in mt76_connac_mcu.c is fine, and 7915 can use it as-is. I will drop this patch. - Felix