Loading drivers/net/wireless/ath/wil6210/main.c +1 −0 Original line number Diff line number Diff line Loading @@ -806,6 +806,7 @@ int wil_priv_init(struct wil6210_priv *wil) wil->amsdu_en = 1; wil->fw_state = WIL_FW_STATE_DOWN; wil->max_mcs = 0; return 0; Loading drivers/net/wireless/ath/wil6210/sysfs.c +41 −0 Original line number Diff line number Diff line Loading @@ -435,6 +435,46 @@ int wil_snr_thresh_set(struct wil6210_priv *wil, const char *buf) return 0; } static ssize_t max_mcs_show(struct device *dev, struct device_attribute *attr, char *buf) { struct wil6210_priv *wil = dev_get_drvdata(dev); ssize_t len; len = scnprintf(buf, PAGE_SIZE, "%d\n", wil->max_mcs); return len; } static ssize_t max_mcs_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { struct wil6210_priv *wil = dev_get_drvdata(dev); u8 max_mcs; if (kstrtou8(buf, 0, &max_mcs)) return -EINVAL; if (test_bit(wil_status_fwready, wil->status)) { wil_err(wil, "Cannot set MAX MCS while interface is up\n"); return -EIO; } if (max_mcs > WIL_MCS_MAX) { wil_err(wil, "Ignore invalid MCS %d\n", max_mcs); return -EINVAL; } wil_info(wil, "Sysfs: set max MCS to %d\n", max_mcs); wil->max_mcs = max_mcs; return count; } static DEVICE_ATTR_RW(max_mcs); static ssize_t snr_thresh_store(struct device *dev, struct device_attribute *attr, Loading Loading @@ -465,6 +505,7 @@ static struct attribute *wil6210_sysfs_entries[] = { &dev_attr_snr_thresh.attr, &dev_attr_vr_profile.attr, &dev_attr_fst_config.attr, &dev_attr_max_mcs.attr, NULL }; Loading drivers/net/wireless/ath/wil6210/wil6210.h +5 −0 Original line number Diff line number Diff line Loading @@ -1142,6 +1142,11 @@ struct wil6210_priv { u32 tx_reserved_entries; /* Used only in Talyn code-path */ s32 cqm_rssi_thold; /* For now, this applies to VR mode only. Can be extended * in the future to apply also to other modes. */ u8 max_mcs; }; #define wil_to_wiphy(i) (i->wiphy) Loading drivers/net/wireless/ath/wil6210/wmi.c +3 −1 Original line number Diff line number Diff line Loading @@ -4362,7 +4362,9 @@ int wmi_set_vr_profile(struct wil6210_priv *wil, u8 profile) }; cmd.profile = profile; wil_info(wil, "sending set vr config command, profile=%d\n", profile); cmd.max_mcs = wil->max_mcs; wil_info(wil, "sending set vr config command, profile=%d, max_mcs=%d\n", profile, wil->max_mcs); rc = wmi_call(wil, WMI_SET_VR_PROFILE_CMDID, vif->mid, &cmd, sizeof(cmd), WMI_SET_VR_PROFILE_EVENTID, &reply, sizeof(reply), WIL_WMI_CALL_GENERAL_TO_MS); Loading drivers/net/wireless/ath/wil6210/wmi.h +3 −1 Original line number Diff line number Diff line Loading @@ -4280,7 +4280,9 @@ enum wmi_vr_profile { struct wmi_set_vr_profile_cmd { /* enum wmi_vr_profile */ u8 profile; u8 reserved[3]; /* Set to 0 to use FW default */ u8 max_mcs; u8 reserved[2]; } __packed; /* WMI_SET_VR_PROFILE_EVENTID */ Loading Loading
drivers/net/wireless/ath/wil6210/main.c +1 −0 Original line number Diff line number Diff line Loading @@ -806,6 +806,7 @@ int wil_priv_init(struct wil6210_priv *wil) wil->amsdu_en = 1; wil->fw_state = WIL_FW_STATE_DOWN; wil->max_mcs = 0; return 0; Loading
drivers/net/wireless/ath/wil6210/sysfs.c +41 −0 Original line number Diff line number Diff line Loading @@ -435,6 +435,46 @@ int wil_snr_thresh_set(struct wil6210_priv *wil, const char *buf) return 0; } static ssize_t max_mcs_show(struct device *dev, struct device_attribute *attr, char *buf) { struct wil6210_priv *wil = dev_get_drvdata(dev); ssize_t len; len = scnprintf(buf, PAGE_SIZE, "%d\n", wil->max_mcs); return len; } static ssize_t max_mcs_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { struct wil6210_priv *wil = dev_get_drvdata(dev); u8 max_mcs; if (kstrtou8(buf, 0, &max_mcs)) return -EINVAL; if (test_bit(wil_status_fwready, wil->status)) { wil_err(wil, "Cannot set MAX MCS while interface is up\n"); return -EIO; } if (max_mcs > WIL_MCS_MAX) { wil_err(wil, "Ignore invalid MCS %d\n", max_mcs); return -EINVAL; } wil_info(wil, "Sysfs: set max MCS to %d\n", max_mcs); wil->max_mcs = max_mcs; return count; } static DEVICE_ATTR_RW(max_mcs); static ssize_t snr_thresh_store(struct device *dev, struct device_attribute *attr, Loading Loading @@ -465,6 +505,7 @@ static struct attribute *wil6210_sysfs_entries[] = { &dev_attr_snr_thresh.attr, &dev_attr_vr_profile.attr, &dev_attr_fst_config.attr, &dev_attr_max_mcs.attr, NULL }; Loading
drivers/net/wireless/ath/wil6210/wil6210.h +5 −0 Original line number Diff line number Diff line Loading @@ -1142,6 +1142,11 @@ struct wil6210_priv { u32 tx_reserved_entries; /* Used only in Talyn code-path */ s32 cqm_rssi_thold; /* For now, this applies to VR mode only. Can be extended * in the future to apply also to other modes. */ u8 max_mcs; }; #define wil_to_wiphy(i) (i->wiphy) Loading
drivers/net/wireless/ath/wil6210/wmi.c +3 −1 Original line number Diff line number Diff line Loading @@ -4362,7 +4362,9 @@ int wmi_set_vr_profile(struct wil6210_priv *wil, u8 profile) }; cmd.profile = profile; wil_info(wil, "sending set vr config command, profile=%d\n", profile); cmd.max_mcs = wil->max_mcs; wil_info(wil, "sending set vr config command, profile=%d, max_mcs=%d\n", profile, wil->max_mcs); rc = wmi_call(wil, WMI_SET_VR_PROFILE_CMDID, vif->mid, &cmd, sizeof(cmd), WMI_SET_VR_PROFILE_EVENTID, &reply, sizeof(reply), WIL_WMI_CALL_GENERAL_TO_MS); Loading
drivers/net/wireless/ath/wil6210/wmi.h +3 −1 Original line number Diff line number Diff line Loading @@ -4280,7 +4280,9 @@ enum wmi_vr_profile { struct wmi_set_vr_profile_cmd { /* enum wmi_vr_profile */ u8 profile; u8 reserved[3]; /* Set to 0 to use FW default */ u8 max_mcs; u8 reserved[2]; } __packed; /* WMI_SET_VR_PROFILE_EVENTID */ Loading