mt76: mt7615: introduce support for hardware beacon filter
Introduce support for hw beacon filter if available in the firmware Co-developed-by: Sean Wang <sean.wang@mediatek.com> Signed-off-by: Sean Wang <sean.wang@mediatek.com> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
parent
a69b0b30e6
commit
c8646872d6
|
@ -2652,6 +2652,47 @@ void m7615_mcu_set_ps_iter(void *priv, u8 *mac, struct ieee80211_vif *vif)
|
|||
&req, sizeof(req), false);
|
||||
}
|
||||
|
||||
int mt7615_mcu_set_bss_pm(struct mt7615_dev *dev, struct ieee80211_vif *vif,
|
||||
bool enable)
|
||||
{
|
||||
struct mt7615_vif *mvif = (struct mt7615_vif *)vif->drv_priv;
|
||||
struct {
|
||||
u8 bss_idx;
|
||||
u8 dtim_period;
|
||||
__le16 aid;
|
||||
__le16 bcn_interval;
|
||||
__le16 atim_window;
|
||||
u8 uapsd;
|
||||
u8 bmc_delivered_ac;
|
||||
u8 bmc_triggered_ac;
|
||||
u8 pad;
|
||||
} req = {
|
||||
.bss_idx = mvif->idx,
|
||||
.aid = cpu_to_le16(vif->bss_conf.aid),
|
||||
.dtim_period = vif->bss_conf.dtim_period,
|
||||
.bcn_interval = cpu_to_le16(vif->bss_conf.beacon_int),
|
||||
};
|
||||
struct {
|
||||
u8 bss_idx;
|
||||
u8 pad[3];
|
||||
} req_hdr = {
|
||||
.bss_idx = mvif->idx,
|
||||
};
|
||||
int err;
|
||||
|
||||
if (vif->type != NL80211_IFTYPE_STATION ||
|
||||
!mt7615_firmware_offload(dev))
|
||||
return -ENOTSUPP;
|
||||
|
||||
err = __mt76_mcu_send_msg(&dev->mt76, MCU_CMD_SET_BSS_ABORT,
|
||||
&req_hdr, sizeof(req_hdr), false);
|
||||
if (err < 0 || !enable)
|
||||
return err;
|
||||
|
||||
return __mt76_mcu_send_msg(&dev->mt76, MCU_CMD_SET_BSS_CONNECTED,
|
||||
&req, sizeof(req), false);
|
||||
}
|
||||
|
||||
int mt7615_mcu_set_channel_domain(struct mt7615_phy *phy)
|
||||
{
|
||||
struct mt76_phy *mphy = phy->mt76;
|
||||
|
|
|
@ -419,6 +419,8 @@ enum {
|
|||
MCU_CMD_START_HW_SCAN = MCU_CE_PREFIX | 0x03,
|
||||
MCU_CMD_SET_PS_PROFILE = MCU_CE_PREFIX | 0x05,
|
||||
MCU_CMD_SET_CHAN_DOMAIN = MCU_CE_PREFIX | 0x0f,
|
||||
MCU_CMD_SET_BSS_CONNECTED = MCU_CE_PREFIX | 0x16,
|
||||
MCU_CMD_SET_BSS_ABORT = MCU_CE_PREFIX | 0x17,
|
||||
MCU_CMD_CANCEL_HW_SCAN = MCU_CE_PREFIX | 0x1b,
|
||||
MCU_CMD_SCHED_SCAN_ENABLE = MCU_CE_PREFIX | 0x61,
|
||||
MCU_CMD_SCHED_SCAN_REQ = MCU_CE_PREFIX | 0x62,
|
||||
|
|
|
@ -474,6 +474,8 @@ int mt7615_mac_wtbl_update_key(struct mt7615_dev *dev,
|
|||
enum set_key_cmd cmd);
|
||||
void mt7615_mac_reset_work(struct work_struct *work);
|
||||
|
||||
int mt7615_mcu_set_bss_pm(struct mt7615_dev *dev, struct ieee80211_vif *vif,
|
||||
bool enable);
|
||||
int mt7615_mcu_wait_response(struct mt7615_dev *dev, int cmd, int seq);
|
||||
int mt7615_mcu_msg_send(struct mt76_dev *mdev, int cmd, const void *data,
|
||||
int len, bool wait_resp);
|
||||
|
|
Loading…
Reference in New Issue