Message ID | fe60489b1aea76a7f3f61b2f42431ba424ceb9a1.1639935477.git.lorenzo@kernel.org (mailing list archive) |
---|---|
State | Rejected |
Delegated to: | Felix Fietkau |
Headers | show |
Series | introduce mt76-connac dependency in mt7915 driver | expand |
On 2021-12-19 18:40, Lorenzo Bianconi wrote: > 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. - Felix
On 2021-12-19 21:50, Felix Fietkau wrote: > > On 2021-12-19 18:40, Lorenzo Bianconi wrote: >> 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
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, .is_tlv_append = 1, }; struct sk_buff *skb;
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(-)