Skip to content

Commit ed7e818

Browse files
Kang Yangkvalo
authored andcommitted
wifi: ath12k: fix and enable AP mode for WCN7850
For AP mode, the peer is created earlier in ath12k_mac_op_add_interface() but ath12k_mac_op_assign_vif_chanctx() will try to create peer again. Then an error will return which makes AP mode startup fail. Kernel log: [ 5017.665006] ath12k_pci 0000:04:00.0: failed to create peer after vdev start delay: -22 wpa_supplicant log: Failed to set beacon parameters Interface initialization failed wls1: interface state UNINITIALIZED->DISABLED wls1: AP-DISABLED wls1: Unable to setup interface. Failed to initialize AP interface wls1: interface state DISABLED->DISABLED wls1: AP-DISABLED So fix this check and enable AP mode for WCN7850, as now AP mode works normally. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4 Signed-off-by: Kang Yang <[email protected]> Acked-by: Jeff Johnson <[email protected]> Signed-off-by: Kalle Valo <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent a3012f2 commit ed7e818

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

drivers/net/wireless/ath/ath12k/hw.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -949,7 +949,8 @@ static const struct ath12k_hw_params ath12k_hw_params[] = {
949949
.rx_mac_buf_ring = true,
950950
.vdev_start_delay = true,
951951

952-
.interface_modes = BIT(NL80211_IFTYPE_STATION),
952+
.interface_modes = BIT(NL80211_IFTYPE_STATION) |
953+
BIT(NL80211_IFTYPE_AP),
953954
.supports_monitor = false,
954955

955956
.idle_ps = true,

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6389,8 +6389,8 @@ ath12k_mac_op_assign_vif_chanctx(struct ieee80211_hw *hw,
63896389
}
63906390

63916391
if (ab->hw_params->vdev_start_delay &&
6392-
(arvif->vdev_type == WMI_VDEV_TYPE_AP ||
6393-
arvif->vdev_type == WMI_VDEV_TYPE_MONITOR)) {
6392+
arvif->vdev_type != WMI_VDEV_TYPE_AP &&
6393+
arvif->vdev_type != WMI_VDEV_TYPE_MONITOR) {
63946394
param.vdev_id = arvif->vdev_id;
63956395
param.peer_type = WMI_PEER_TYPE_DEFAULT;
63966396
param.peer_addr = ar->mac_addr;

0 commit comments

Comments
 (0)