Skip to content

Commit af3d896

Browse files
author
Kalle Valo
committed
ath11k: convert ath11k_wmi_pdev_set_ps_mode() to use enum wmi_sta_ps_mode
It's more descriptive to use the actual enum used by the firmware instead of a boolean so change ath11k_wmi_pdev_set_ps_mode() to use a boolean. Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/20211108123826.8463-1-kvalo@codeaurora.org
1 parent cfdf6b1 commit af3d896

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

drivers/net/wireless/ath/ath11k/mac.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5638,7 +5638,8 @@ static int ath11k_mac_op_add_interface(struct ieee80211_hw *hw,
56385638
goto err_peer_del;
56395639
}
56405640

5641-
ret = ath11k_wmi_pdev_set_ps_mode(ar, arvif->vdev_id, false);
5641+
ret = ath11k_wmi_pdev_set_ps_mode(ar, arvif->vdev_id,
5642+
WMI_STA_PS_MODE_DISABLED);
56425643
if (ret) {
56435644
ath11k_warn(ar->ab, "failed to disable vdev %d ps mode: %d\n",
56445645
arvif->vdev_id, ret);

drivers/net/wireless/ath/ath11k/wmi.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1244,7 +1244,8 @@ int ath11k_wmi_pdev_set_param(struct ath11k *ar, u32 param_id,
12441244
return ret;
12451245
}
12461246

1247-
int ath11k_wmi_pdev_set_ps_mode(struct ath11k *ar, int vdev_id, u32 enable)
1247+
int ath11k_wmi_pdev_set_ps_mode(struct ath11k *ar, int vdev_id,
1248+
enum wmi_sta_ps_mode psmode)
12481249
{
12491250
struct ath11k_pdev_wmi *wmi = ar->wmi;
12501251
struct wmi_pdev_set_ps_mode_cmd *cmd;
@@ -1259,7 +1260,7 @@ int ath11k_wmi_pdev_set_ps_mode(struct ath11k *ar, int vdev_id, u32 enable)
12591260
cmd->tlv_header = FIELD_PREP(WMI_TLV_TAG, WMI_TAG_STA_POWERSAVE_MODE_CMD) |
12601261
FIELD_PREP(WMI_TLV_LEN, sizeof(*cmd) - TLV_HDR_SIZE);
12611262
cmd->vdev_id = vdev_id;
1262-
cmd->sta_ps_mode = enable;
1263+
cmd->sta_ps_mode = psmode;
12631264

12641265
ret = ath11k_wmi_cmd_send(wmi, skb, WMI_STA_POWERSAVE_MODE_CMDID);
12651266
if (ret) {
@@ -1269,7 +1270,7 @@ int ath11k_wmi_pdev_set_ps_mode(struct ath11k *ar, int vdev_id, u32 enable)
12691270

12701271
ath11k_dbg(ar->ab, ATH11K_DBG_WMI,
12711272
"WMI vdev set psmode %d vdev id %d\n",
1272-
enable, vdev_id);
1273+
psmode, vdev_id);
12731274

12741275
return ret;
12751276
}

drivers/net/wireless/ath/ath11k/wmi.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5351,7 +5351,8 @@ int ath11k_wmi_set_peer_param(struct ath11k *ar, const u8 *peer_addr,
53515351
u32 vdev_id, u32 param_id, u32 param_val);
53525352
int ath11k_wmi_pdev_set_param(struct ath11k *ar, u32 param_id,
53535353
u32 param_value, u8 pdev_id);
5354-
int ath11k_wmi_pdev_set_ps_mode(struct ath11k *ar, int vdev_id, u32 enable);
5354+
int ath11k_wmi_pdev_set_ps_mode(struct ath11k *ar, int vdev_id,
5355+
enum wmi_sta_ps_mode psmode);
53555356
int ath11k_wmi_wait_for_unified_ready(struct ath11k_base *ab);
53565357
int ath11k_wmi_cmd_init(struct ath11k_base *ab);
53575358
int ath11k_wmi_wait_for_service_ready(struct ath11k_base *ab);

0 commit comments

Comments
 (0)