Commit c802b6d7 authored by Rameshkumar Sundaram's avatar Rameshkumar Sundaram Committed by Kalle Valo

ath11k: Clear auth flag only for actual association in security mode

AUTH flag is needed when peer assoc command is sent from host in
security mode for non-assoc cases. Firmware will handle AUTH flag
when client is associating as AUTH flag will be set after key exchange.
For internally provided peer assoc commands from host, there won't be
any key exchange, so AUTH flag is expected to be set in host.

Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.4.0.1-01838-QCAHKSWPL_SILICONZ-1
Co-developed-by: default avatarLavanya Suresh <lavaks@codeaurora.org>
Signed-off-by: default avatarLavanya Suresh <lavaks@codeaurora.org>
Signed-off-by: default avatarRameshkumar Sundaram <quic_ramess@quicinc.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/1635177786-20854-1-git-send-email-quic_ramess@quicinc.com
parent 16a2c3d5
...@@ -2495,6 +2495,7 @@ static void ath11k_bss_assoc(struct ieee80211_hw *hw, ...@@ -2495,6 +2495,7 @@ static void ath11k_bss_assoc(struct ieee80211_hw *hw,
rcu_read_unlock(); rcu_read_unlock();
peer_arg.is_assoc = true;
ret = ath11k_wmi_send_peer_assoc_cmd(ar, &peer_arg); ret = ath11k_wmi_send_peer_assoc_cmd(ar, &peer_arg);
if (ret) { if (ret) {
ath11k_warn(ar->ab, "failed to run peer assoc for %pM vdev %i: %d\n", ath11k_warn(ar->ab, "failed to run peer assoc for %pM vdev %i: %d\n",
...@@ -3772,6 +3773,7 @@ static int ath11k_station_assoc(struct ath11k *ar, ...@@ -3772,6 +3773,7 @@ static int ath11k_station_assoc(struct ath11k *ar,
ath11k_peer_assoc_prepare(ar, vif, sta, &peer_arg, reassoc); ath11k_peer_assoc_prepare(ar, vif, sta, &peer_arg, reassoc);
peer_arg.is_assoc = true;
ret = ath11k_wmi_send_peer_assoc_cmd(ar, &peer_arg); ret = ath11k_wmi_send_peer_assoc_cmd(ar, &peer_arg);
if (ret) { if (ret) {
ath11k_warn(ar->ab, "failed to run peer assoc for STA %pM vdev %i: %d\n", ath11k_warn(ar->ab, "failed to run peer assoc for STA %pM vdev %i: %d\n",
...@@ -3983,6 +3985,7 @@ static void ath11k_sta_rc_update_wk(struct work_struct *wk) ...@@ -3983,6 +3985,7 @@ static void ath11k_sta_rc_update_wk(struct work_struct *wk)
ath11k_peer_assoc_prepare(ar, arvif->vif, sta, ath11k_peer_assoc_prepare(ar, arvif->vif, sta,
&peer_arg, true); &peer_arg, true);
peer_arg.is_assoc = false;
err = ath11k_wmi_send_peer_assoc_cmd(ar, &peer_arg); err = ath11k_wmi_send_peer_assoc_cmd(ar, &peer_arg);
if (err) if (err)
ath11k_warn(ar->ab, "failed to run peer assoc for STA %pM vdev %i: %d\n", ath11k_warn(ar->ab, "failed to run peer assoc for STA %pM vdev %i: %d\n",
......
...@@ -1763,7 +1763,7 @@ ath11k_wmi_copy_peer_flags(struct wmi_peer_assoc_complete_cmd *cmd, ...@@ -1763,7 +1763,7 @@ ath11k_wmi_copy_peer_flags(struct wmi_peer_assoc_complete_cmd *cmd,
cmd->peer_flags |= WMI_PEER_AUTH; cmd->peer_flags |= WMI_PEER_AUTH;
if (param->need_ptk_4_way) { if (param->need_ptk_4_way) {
cmd->peer_flags |= WMI_PEER_NEED_PTK_4_WAY; cmd->peer_flags |= WMI_PEER_NEED_PTK_4_WAY;
if (!hw_crypto_disabled) if (!hw_crypto_disabled && param->is_assoc)
cmd->peer_flags &= ~WMI_PEER_AUTH; cmd->peer_flags &= ~WMI_PEER_AUTH;
} }
if (param->need_gtk_2_way) if (param->need_gtk_2_way)
......
...@@ -3617,6 +3617,7 @@ struct peer_assoc_params { ...@@ -3617,6 +3617,7 @@ struct peer_assoc_params {
u32 peer_he_tx_mcs_set[WMI_HOST_MAX_HE_RATE_SET]; u32 peer_he_tx_mcs_set[WMI_HOST_MAX_HE_RATE_SET];
bool twt_responder; bool twt_responder;
bool twt_requester; bool twt_requester;
bool is_assoc;
struct ath11k_ppe_threshold peer_ppet; struct ath11k_ppe_threshold peer_ppet;
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment