mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-02-22 07:43:45 -05:00
wifi: mt76: mt7925: config the dwell time by firmware
To optimize the scan time of mt7925, remove the dwell time setting for the scan command and let it be controlled by the firmware as mt7921. Signed-off-by: Michael Lo <michael.lo@mediatek.com> Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com> Link: https://patch.msgid.link/20241106013221.18101-1-mingyen.hsieh@mediatek.com Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
committed by
Felix Fietkau
parent
50f64e4253
commit
efeaabc568
@@ -2689,14 +2689,12 @@ int mt7925_mcu_set_dbdc(struct mt76_phy *phy, bool enable)
|
||||
return err;
|
||||
}
|
||||
|
||||
#define MT76_CONNAC_SCAN_CHANNEL_TIME 60
|
||||
|
||||
int mt7925_mcu_hw_scan(struct mt76_phy *phy, struct ieee80211_vif *vif,
|
||||
struct ieee80211_scan_request *scan_req)
|
||||
{
|
||||
struct mt76_vif *mvif = (struct mt76_vif *)vif->drv_priv;
|
||||
struct cfg80211_scan_request *sreq = &scan_req->req;
|
||||
int n_ssids = 0, err, i, duration;
|
||||
int n_ssids = 0, err, i;
|
||||
struct ieee80211_channel **scan_list = sreq->channels;
|
||||
struct mt76_dev *mdev = phy->dev;
|
||||
struct mt76_connac_mcu_scan_channel *chan;
|
||||
@@ -2732,14 +2730,6 @@ int mt7925_mcu_hw_scan(struct mt76_phy *phy, struct ieee80211_vif *vif,
|
||||
req->scan_type = sreq->n_ssids ? 1 : 0;
|
||||
req->probe_req_num = sreq->n_ssids ? 2 : 0;
|
||||
|
||||
duration = MT76_CONNAC_SCAN_CHANNEL_TIME;
|
||||
/* increase channel time for passive scan */
|
||||
if (!sreq->n_ssids)
|
||||
duration *= 2;
|
||||
req->timeout_value = cpu_to_le16(sreq->n_channels * duration);
|
||||
req->channel_min_dwell_time = cpu_to_le16(duration);
|
||||
req->channel_dwell_time = cpu_to_le16(duration);
|
||||
|
||||
tlv = mt76_connac_mcu_add_tlv(skb, UNI_SCAN_SSID, sizeof(*ssid));
|
||||
ssid = (struct scan_ssid_tlv *)tlv;
|
||||
for (i = 0; i < sreq->n_ssids; i++) {
|
||||
|
||||
Reference in New Issue
Block a user