Message ID | 20241202091858.200773-1-jtornosm@redhat.com (mailing list archive) |
---|---|
State | New |
Delegated to: | Kalle Valo |
Headers | show |
Series | wifi: ath11k: allow APs combination when dual stations are supported | expand |
On 12/2/2024 5:18 PM, Jose Ignacio Tornos Martinez wrote: > Since commit f019f4dff2e4 ("wifi: ath11k: support 2 station interfaces"), > if dual stations are supported for a device, we can not configure more that > one AP and/or DFS cannot be enabled. > Try https://lore.kernel.org/all/20241127022742.4016870-1-quic_yuzha@quicinc.com/ > Enable this by creating a new parameter (ignore_support_dual_stations) to > ignore this feature if it is convenient. Default behavior is to support > dual stations if possible. > > Reported-by: Vladimir Benes <vbenes@redhat.com> > Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com> > --- > drivers/net/wireless/ath/ath11k/core.c | 9 +++++++++ > 1 file changed, 9 insertions(+) > > diff --git a/drivers/net/wireless/ath/ath11k/core.c b/drivers/net/wireless/ath/ath11k/core.c > index be67382c00f6..55c7a55d85ff 100644 > --- a/drivers/net/wireless/ath/ath11k/core.c > +++ b/drivers/net/wireless/ath/ath11k/core.c > @@ -37,6 +37,12 @@ bool ath11k_ftm_mode; > module_param_named(ftm_mode, ath11k_ftm_mode, bool, 0444); > MODULE_PARM_DESC(ftm_mode, "Boots up in factory test mode"); > > +static bool ath11k_ignore_support_dual_stations; > +module_param_named(ignore_support_dual_stations, > + ath11k_ignore_support_dual_stations, bool, 0644); > +MODULE_PARM_DESC(ignore_support_dual_stations, > + "Ignore the support for dual stations to support other combinations"); > + > static const struct ath11k_hw_params ath11k_hw_params[] = { > { > .hw_rev = ATH11K_HW_IPQ8074, > @@ -2162,6 +2168,9 @@ static int ath11k_init_hw_params(struct ath11k_base *ab) > } > > ab->hw_params = *hw_params; > + if (ab->hw_params.support_dual_stations && > + ath11k_ignore_support_dual_stations) > + ab->hw_params.support_dual_stations = false; > > ath11k_info(ab, "%s\n", ab->hw_params.name); >
Sorry, but your solution is not working for me. We need to be able to setup 2 APs, as it was possible before, and with your interface combinations it is not possible either. I was trying to create a second interface combination to recover the old scenario as well, but I couldn't, that is the reason why I have implemented this parameter. Thanks Best regards Jose Ignacio
On 12/3/2024 4:04 PM, Jose Ignacio Tornos Martinez wrote: > Sorry, but your solution is not working for me. > We need to be able to setup 2 APs, as it was possible before, and with your > interface combinations it is not possible either. > I was trying to create a second interface combination to recover the old > scenario as well, but I couldn't, that is the reason why I have implemented > this parameter. > > Thanks > > Best regards > Jose Ignacio > Which chip do you use? I can't be sure about your scenario, but based on your description, I tried it on the 6855 and it works: sh-5.1# iw dev phy#0 Interface wlan2 ifindex 6 wdev 0x3 addr 12:03:7f:21:84:11 ssid QSoftAP2 type AP channel 149 (5745 MHz), width: 20 MHz, center1: 5745 MHz txpower 18.00 dBm multicast TXQ: qsz-byt qsz-pkt flows drops marks overlmt hashcol tx-bytes tx-packets 0 0 0 0 0 0 0 0 0 Interface wlan1 ifindex 5 wdev 0x2 addr 02:03:7f:21:84:11 ssid QSoftAP1 type AP channel 36 (5180 MHz), width: 20 MHz, center1: 5180 MHz txpower 5.00 dBm multicast TXQ: qsz-byt qsz-pkt flows drops marks overlmt hashcol tx-bytes tx-packets 0 0 0 0 0 0 0 0 0 Interface wlan0 ifindex 4 wdev 0x1 addr 00:03:7f:21:84:11 type managed txpower 18.00 dBm multicast TXQ: qsz-byt qsz-pkt flows drops marks overlmt hashcol tx-bytes tx-packets 0 0 0 0 0 0 0 0 0
> Which chip do you use?
Since I am not totally sure about the useful information, let me show you
the kernel logs:
$ dmesg | grep ath11k
[ 3.659388] ath11k_pci 0000:01:00.0: BAR 0 [mem 0x84200000-0x843fffff 64bit]: assigned
[ 3.659405] ath11k_pci 0000:01:00.0: enabling device (0000 -> 0002)
[ 3.659649] ath11k_pci 0000:01:00.0: MSI vectors: 32
[ 3.659653] ath11k_pci 0000:01:00.0: wcn6855 hw2.1
[ 4.871571] ath11k_pci 0000:01:00.0: chip_id 0x2 chip_family 0xb board_id 0xff soc_id 0x400c0210
[ 4.871586] ath11k_pci 0000:01:00.0: fw_version 0x11088c35 fw_build_timestamp 2024-04-17 08:34 fw_build_id WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.41
[ 5.241485] ath11k_pci 0000:01:00.0 wlp1s0: renamed from wlan0
If I try to setup 2 APs with your interface combination I get this:
# iw list | grep -A6 "valid interface combinations:"
valid interface combinations:
* #{ managed } <= 2, #{ AP, P2P-client, P2P-GO } <= 16, #{ P2P-device } <= 1,
total <= 16, #channels <= 1, STA/AP BI must match, radar detect widths: { 20 MHz (no HT), 20 MHz, 40 MHz, 80 MHz, 80+80 MHz, 160 MHz }
* #{ managed } <= 2, #{ AP, P2P-client, P2P-GO } <= 16, #{ P2P-device } <= 1,
total <= 3, #channels <= 2, STA/AP BI must match
HT Capability overrides:
# iw dev
phy#0
Interface wlp1s0_1
ifindex 6
wdev 0x4
addr a2:42:d2:1e:89:a3
type managed
txpower 16.00 dBm
multicast TXQ:
qsz-byt qsz-pkt flows drops marks overlmt hashcol tx-bytes tx-packets
0 0 0 0 0 0 0 0 0
Interface wlp1s0_0
ifindex 5
wdev 0x3
addr 52:e9:be:33:6a:61
ssid test-qe-wpa2-psk
type AP
channel 13 (2472 MHz), width: 20 MHz, center1: 2472 MHz
txpower 14.00 dBm
multicast TXQ:
qsz-byt qsz-pkt flows drops marks overlmt hashcol tx-bytes tx-packets
0 0 0 0 0 0 0 0 0
Interface wlp1s0
ifindex 3
wdev 0x1
addr c8:94:02:b5:fe:fb
type managed
txpower 16.00 dBm
multicast TXQ:
qsz-byt qsz-pkt flows drops marks overlmt hashcol tx-bytes tx-packets
0 0 0 0 0 0 0 0 0
Or even this with no AP up:
# iw dev
phy#0
Interface wlp1s0_1
ifindex 6
wdev 0x4
addr ca:e5:84:22:10:ec
type managed
txpower 16.00 dBm
multicast TXQ:
qsz-byt qsz-pkt flows drops marks overlmt hashcol tx-bytes tx-packets
0 0 0 0 0 0 0 0 0
Interface wlp1s0_0
ifindex 5
wdev 0x3
addr 9e:4e:c5:ea:4c:e9
type AP
txpower 16.00 dBm
multicast TXQ:
qsz-byt qsz-pkt flows drops marks overlmt hashcol tx-bytes tx-packets
0 0 0 0 0 0 0 0 0
Interface wlp1s0
ifindex 3
wdev 0x1
addr c8:94:02:b5:fe:fb
type managed
txpower 16.00 dBm
multicast TXQ:
qsz-byt qsz-pkt flows drops marks overlmt hashcol tx-bytes tx-packets
0 0 0 0 0 0 0 0 0
If I use the parameter to ignore the feature and configure the interface combination as before:
# iw list | grep -A4 "valid interface combinations:"
valid interface combinations:
* #{ managed } <= 1, #{ AP, P2P-client, P2P-GO } <= 16, #{ P2P-device } <= 1,
total <= 16, #channels <= 1, STA/AP BI must match, radar detect widths: { 20 MHz (no HT), 20 MHz, 40 MHz, 80 MHz }
HT Capability overrides:
# iw dev
phy#1
Interface wlp1s0_1
ifindex 7
wdev 0x100000004
addr 82:90:89:90:c1:37
ssid test-qe-wpa3-psk
type AP
channel 13 (2472 MHz), width: 20 MHz, center1: 2472 MHz
txpower 16.00 dBm
multicast TXQ:
qsz-byt qsz-pkt flows drops marks overlmt hashcol tx-bytes tx-packets
0 0 0 0 0 0 0 0 0
Interface wlp1s0_0
ifindex 6
wdev 0x100000003
addr 6a:ef:d0:db:10:f0
ssid test-qe-wpa2-psk
type AP
channel 13 (2472 MHz), width: 20 MHz, center1: 2472 MHz
txpower 16.00 dBm
multicast TXQ:
qsz-byt qsz-pkt flows drops marks overlmt hashcol tx-bytes tx-packets
0 0 0 0 0 0 0 0 0
Interface wlp1s0
ifindex 4
wdev 0x100000001
addr c8:94:02:b5:fe:fb
type managed
txpower 16.00 dBm
multicast TXQ:
qsz-byt qsz-pkt flows drops marks overlmt hashcol tx-bytes tx-packets
0 0 0 0 0 0 0 0 0
Thanks
Best regards
Jose Ignacio
On 12/3/2024 5:48 PM, Jose Ignacio Tornos Martinez wrote: >> Which chip do you use? > Since I am not totally sure about the useful information, let me show you > the kernel logs: > $ dmesg | grep ath11k > [ 3.659388] ath11k_pci 0000:01:00.0: BAR 0 [mem 0x84200000-0x843fffff 64bit]: assigned > [ 3.659405] ath11k_pci 0000:01:00.0: enabling device (0000 -> 0002) > [ 3.659649] ath11k_pci 0000:01:00.0: MSI vectors: 32 > [ 3.659653] ath11k_pci 0000:01:00.0: wcn6855 hw2.1 > [ 4.871571] ath11k_pci 0000:01:00.0: chip_id 0x2 chip_family 0xb board_id 0xff soc_id 0x400c0210 > [ 4.871586] ath11k_pci 0000:01:00.0: fw_version 0x11088c35 fw_build_timestamp 2024-04-17 08:34 fw_build_id WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.41 > [ 5.241485] ath11k_pci 0000:01:00.0 wlp1s0: renamed from wlan0 > yes, you also use wcn6855 hw2.1. > If I try to setup 2 APs with your interface combination I get this: > # iw list | grep -A6 "valid interface combinations:" > valid interface combinations: > * #{ managed } <= 2, #{ AP, P2P-client, P2P-GO } <= 16, #{ P2P-device } <= 1, > total <= 16, #channels <= 1, STA/AP BI must match, radar detect widths: { 20 MHz (no HT), 20 MHz, 40 MHz, 80 MHz, 80+80 MHz, 160 MHz } > > * #{ managed } <= 2, #{ AP, P2P-client, P2P-GO } <= 16, #{ P2P-device } <= 1, > total <= 3, #channels <= 2, STA/AP BI must match > HT Capability overrides: 2 combinations are to support DBS and DFS. Combinations is correct. channels=2, max interfaces=3. And you want setup sta + sap + sap, right? When up the second sap will meet error? Could you pls share the error logs? I'm not very sure if you add all interface with managed type, and do "ifconfig xxx up" before running hostapd. You can try add second and third interface with "iw dev xx interface add xx type __ap". > # iw dev > phy#0 > Interface wlp1s0_1 > ifindex 6 > wdev 0x4 > addr a2:42:d2:1e:89:a3 > type managed > txpower 16.00 dBm > multicast TXQ: > qsz-byt qsz-pkt flows drops marks overlmt hashcol tx-bytes tx-packets > 0 0 0 0 0 0 0 0 0 > Interface wlp1s0_0 > ifindex 5 > wdev 0x3 > addr 52:e9:be:33:6a:61 > ssid test-qe-wpa2-psk > type AP > channel 13 (2472 MHz), width: 20 MHz, center1: 2472 MHz > txpower 14.00 dBm > multicast TXQ: > qsz-byt qsz-pkt flows drops marks overlmt hashcol tx-bytes tx-packets > 0 0 0 0 0 0 0 0 0 > Interface wlp1s0 > ifindex 3 > wdev 0x1 > addr c8:94:02:b5:fe:fb > type managed > txpower 16.00 dBm > multicast TXQ: > qsz-byt qsz-pkt flows drops marks overlmt hashcol tx-bytes tx-packets > 0 0 0 0 0 0 0 0 0 > Or even this with no AP up: > # iw dev > phy#0 > Interface wlp1s0_1 > ifindex 6 > wdev 0x4 > addr ca:e5:84:22:10:ec > type managed > txpower 16.00 dBm > multicast TXQ: > qsz-byt qsz-pkt flows drops marks overlmt hashcol tx-bytes tx-packets > 0 0 0 0 0 0 0 0 0 > Interface wlp1s0_0 > ifindex 5 > wdev 0x3 > addr 9e:4e:c5:ea:4c:e9 > type AP > txpower 16.00 dBm > multicast TXQ: > qsz-byt qsz-pkt flows drops marks overlmt hashcol tx-bytes tx-packets > 0 0 0 0 0 0 0 0 0 > Interface wlp1s0 > ifindex 3 > wdev 0x1 > addr c8:94:02:b5:fe:fb > type managed > txpower 16.00 dBm > multicast TXQ: > qsz-byt qsz-pkt flows drops marks overlmt hashcol tx-bytes tx-packets > 0 0 0 0 0 0 0 0 0 > > If I use the parameter to ignore the feature and configure the interface combination as before: > # iw list | grep -A4 "valid interface combinations:" > valid interface combinations: > * #{ managed } <= 1, #{ AP, P2P-client, P2P-GO } <= 16, #{ P2P-device } <= 1, > total <= 16, #channels <= 1, STA/AP BI must match, radar detect widths: { 20 MHz (no HT), 20 MHz, 40 MHz, 80 MHz } > > HT Capability overrides: > # iw dev > phy#1 > Interface wlp1s0_1 > ifindex 7 > wdev 0x100000004 > addr 82:90:89:90:c1:37 > ssid test-qe-wpa3-psk > type AP > channel 13 (2472 MHz), width: 20 MHz, center1: 2472 MHz > txpower 16.00 dBm > multicast TXQ: > qsz-byt qsz-pkt flows drops marks overlmt hashcol tx-bytes tx-packets > 0 0 0 0 0 0 0 0 0 > Interface wlp1s0_0 > ifindex 6 > wdev 0x100000003 > addr 6a:ef:d0:db:10:f0 > ssid test-qe-wpa2-psk > type AP > channel 13 (2472 MHz), width: 20 MHz, center1: 2472 MHz > txpower 16.00 dBm > multicast TXQ: > qsz-byt qsz-pkt flows drops marks overlmt hashcol tx-bytes tx-packets > 0 0 0 0 0 0 0 0 0 > Interface wlp1s0 > ifindex 4 > wdev 0x100000001 > addr c8:94:02:b5:fe:fb > type managed > txpower 16.00 dBm > multicast TXQ: > qsz-byt qsz-pkt flows drops marks overlmt hashcol tx-bytes tx-packets > 0 0 0 0 0 0 0 0 0 > > Thanks > > Best regards > Jose Ignacio >
> And you want setup sta + sap + sap, right? Your proposed interface combination fails as well for me if I am just setting 2APs. > When up the second sap will meet error? Could you pls share the error > logs? This is the log that is appearing: [ 61.909165] 8021q: 802.1Q VLAN Support v1.8 [ 62.227530] ath11k_pci 0000:01:00.0: failed to create vdev 3, reached max vdev limit 3 It is appearing after configuring both APs when only one AP is up and when both are down (see my previous 'iw dev' outputs). > I'm not very sure if you add all interface with managed type, and do > "ifconfig xxx up" before running hostapd. Yes, I am setting the link up before running hostapd. >You can try add second and third interface with > "iw dev xx interface add xx type __ap". And yes, I am doing like that for both APs. Please, take into account that everything is working with the old interface configuration and when it is set with the parameter (no error log), but it is not working for me with your interface combination. Have you tried with 2.4GHz band? Thanks Best regards Jose Ignacio
On 12/4/2024 12:33 AM, Jose Ignacio Tornos Martinez wrote: >> And you want setup sta + sap + sap, right? > Your proposed interface combination fails as well for me if I am just > setting 2APs. >> When up the second sap will meet error? Could you pls share the error >> logs? > This is the log that is appearing: > [ 61.909165] 8021q: 802.1Q VLAN Support v1.8 > [ 62.227530] ath11k_pci 0000:01:00.0: failed to create vdev 3, reached max vdev limit 3 > It is appearing after configuring both APs when only one AP is up and when > both are down (see my previous 'iw dev' outputs). > >> I'm not very sure if you add all interface with managed type, and do >> "ifconfig xxx up" before running hostapd. > Yes, I am setting the link up before running hostapd. >> You can try add second and third interface with >> "iw dev xx interface add xx type __ap". > And yes, I am doing like that for both APs. Pls try add interface with type __ap or directly use hostapd up the ap interfaces that will re-type managed to ap. > Please, take into account that everything is working with the old interface > configuration and when it is set with the parameter (no error log), but it > is not working for me with your interface combination. f019f4dff2e4 ("wifi: ath11k: support 2 station interfaces") update about interface combination limits. If chip support DBS, station interfaces max is 2 that why you can't up the 3rd managed type interface. You better add interface with ap type. > Have you tried with 2.4GHz band? > 2.4GHz works fine also. sh-5.1# iw dev phy#0 Interface wlan2 ifindex 6 wdev 0x3 addr 12:03:7f:21:84:11 ssid QSoftAP2 type AP channel 6 (2437 MHz), width: 20 MHz, center1: 2437 MHz txpower 5.00 dBm multicast TXQ: qsz-byt qsz-pkt flows drops marks overlmt hashcol tx-bytes tx-packets 0 0 0 0 0 0 0 0 0 Interface wlan1 ifindex 5 wdev 0x2 addr 02:03:7f:21:84:11 ssid QSoftAP1 type AP channel 6 (2437 MHz), width: 20 MHz, center1: 2437 MHz txpower 18.00 dBm multicast TXQ: qsz-byt qsz-pkt flows drops marks overlmt hashcol tx-bytes tx-packets 0 0 0 0 0 0 0 0 0 Interface wlan0 ifindex 4 wdev 0x1 addr 00:03:7f:21:84:11 type managed txpower 5.00 dBm multicast TXQ: qsz-byt qsz-pkt flows drops marks overlmt hashcol tx-bytes tx-packets 0 0 0 0 0 0 0 0 0 > Thanks > > Best regards > Jose Ignacio >
> Pls try add interface with type __ap or directly use hostapd up the ap > interfaces that will re-type managed to ap. This is what I am doing. > f019f4dff2e4 ("wifi: ath11k: support 2 station interfaces") update about > interface combination limits. My patch by means of a parameter allows to come back to the original interface combination (before f019f4dff2e4 and not the current one that you comment), so as I commented, this is the interface combination that I am finally using to setup the two APs: # iw list | grep -A4 "valid interface combinations:" valid interface combinations: * #{ managed } <= 1, #{ AP, P2P-client, P2P-GO } <= 16, #{ P2P-device } <= 1, total <= 16, #channels <= 1, STA/AP BI must match, radar detect widths: { 20 MHz (no HT), 20 MHz, 40 MHz, 80 MHz } HT Capability overrides: And I repeat that with that, my setup is working (no error log). > If chip support DBS, station interfaces max is 2 that why you can't up > the 3rd managed type interface. You better add interface with ap type. Ok, but as I commented this is what I am doing. Just to clarify, only with your proposed interface combination I am getting problems with a 3rd managed type interface. > 2.4GHz works fine also. That is great. Ok, at this point, as I need my setup, in order to allow me to debug and get the differences, could you share how you are configuring the two APs to test and debug here? Thanks Best regards Jose Ignacio
I can share mine too if you want. Thanks Best regards Jose Ignacio
diff --git a/drivers/net/wireless/ath/ath11k/core.c b/drivers/net/wireless/ath/ath11k/core.c index be67382c00f6..55c7a55d85ff 100644 --- a/drivers/net/wireless/ath/ath11k/core.c +++ b/drivers/net/wireless/ath/ath11k/core.c @@ -37,6 +37,12 @@ bool ath11k_ftm_mode; module_param_named(ftm_mode, ath11k_ftm_mode, bool, 0444); MODULE_PARM_DESC(ftm_mode, "Boots up in factory test mode"); +static bool ath11k_ignore_support_dual_stations; +module_param_named(ignore_support_dual_stations, + ath11k_ignore_support_dual_stations, bool, 0644); +MODULE_PARM_DESC(ignore_support_dual_stations, + "Ignore the support for dual stations to support other combinations"); + static const struct ath11k_hw_params ath11k_hw_params[] = { { .hw_rev = ATH11K_HW_IPQ8074, @@ -2162,6 +2168,9 @@ static int ath11k_init_hw_params(struct ath11k_base *ab) } ab->hw_params = *hw_params; + if (ab->hw_params.support_dual_stations && + ath11k_ignore_support_dual_stations) + ab->hw_params.support_dual_stations = false; ath11k_info(ab, "%s\n", ab->hw_params.name);
Since commit f019f4dff2e4 ("wifi: ath11k: support 2 station interfaces"), if dual stations are supported for a device, we can not configure more that one AP and/or DFS cannot be enabled. Enable this by creating a new parameter (ignore_support_dual_stations) to ignore this feature if it is convenient. Default behavior is to support dual stations if possible. Reported-by: Vladimir Benes <vbenes@redhat.com> Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com> --- drivers/net/wireless/ath/ath11k/core.c | 9 +++++++++ 1 file changed, 9 insertions(+)