mirror of
https://github.com/torvalds/linux.git
synced 2026-05-25 15:41:52 +02:00
wifi: mt76: mt7925: extend mt7925_mcu_uni_roc_event
We extended the function to be able multiple pieces of information in a single event, supporting the future MLO-enabled firmware. Co-developed-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com> Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com> Co-developed-by: Deren Wu <deren.wu@mediatek.com> Signed-off-by: Deren Wu <deren.wu@mediatek.com> Signed-off-by: Sean Wang <sean.wang@mediatek.com> Link: https://patch.msgid.link/4be7b34904034d521dab147883b898b5402fd29f.1720248331.git.sean.wang@kernel.org Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
parent
7cf7785a92
commit
49681949b9
|
|
@ -313,16 +313,14 @@ mt7925_mcu_roc_iter(void *priv, u8 *mac, struct ieee80211_vif *vif)
|
|||
mvif->band_idx = grant->dbdcband;
|
||||
}
|
||||
|
||||
static void
|
||||
mt7925_mcu_uni_roc_event(struct mt792x_dev *dev, struct sk_buff *skb)
|
||||
static void mt7925_mcu_roc_handle_grant(struct mt792x_dev *dev,
|
||||
struct tlv *tlv)
|
||||
{
|
||||
struct ieee80211_hw *hw = dev->mt76.hw;
|
||||
struct mt7925_roc_grant_tlv *grant;
|
||||
struct mt7925_mcu_rxd *rxd;
|
||||
int duration;
|
||||
|
||||
rxd = (struct mt7925_mcu_rxd *)skb->data;
|
||||
grant = (struct mt7925_roc_grant_tlv *)(rxd->tlv + 4);
|
||||
grant = (struct mt7925_roc_grant_tlv *)tlv;
|
||||
|
||||
/* should never happen */
|
||||
WARN_ON_ONCE((le16_to_cpu(grant->tag) != UNI_EVENT_ROC_GRANT));
|
||||
|
|
@ -340,6 +338,29 @@ mt7925_mcu_uni_roc_event(struct mt792x_dev *dev, struct sk_buff *skb)
|
|||
jiffies + msecs_to_jiffies(duration));
|
||||
}
|
||||
|
||||
static void
|
||||
mt7925_mcu_uni_roc_event(struct mt792x_dev *dev, struct sk_buff *skb)
|
||||
{
|
||||
struct tlv *tlv;
|
||||
int i = 0;
|
||||
|
||||
skb_pull(skb, sizeof(struct mt7925_mcu_rxd) + 4);
|
||||
|
||||
while (i < skb->len) {
|
||||
tlv = (struct tlv *)(skb->data + i);
|
||||
|
||||
switch (le16_to_cpu(tlv->tag)) {
|
||||
case UNI_EVENT_ROC_GRANT:
|
||||
mt7925_mcu_roc_handle_grant(dev, tlv);
|
||||
break;
|
||||
case UNI_EVENT_ROC_GRANT_SUB_LINK:
|
||||
break;
|
||||
}
|
||||
|
||||
i += le16_to_cpu(tlv->len);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
mt7925_mcu_scan_event(struct mt792x_dev *dev, struct sk_buff *skb)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@ enum mt7925_roc_req {
|
|||
|
||||
enum {
|
||||
UNI_EVENT_ROC_GRANT = 0,
|
||||
UNI_EVENT_ROC_GRANT_SUB_LINK = 4,
|
||||
UNI_EVENT_ROC_TAG_NUM
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user