mbox series

[v2,00/11] nl80211: rx path for control port frames (enabled only for wpa_supplicant)

Message ID 20200411102527.154154-1-markus.theil@tu-ilmenau.de
Headers show
Series nl80211: rx path for control port frames (enabled only for wpa_supplicant) | expand

Message

Markus Theil April 11, 2020, 10:25 a.m. UTC
This patch series adds rx control port support over nl80211. Control port
over nl80211 delivers all EAPOL userspace.

Nl80211 control port for AP mode is included, but disabled, as currently no
tx status support for control port frames is included in the kernel.

Wpa_supplicant now uses control port rx over nl80211 for both
EAPOL frames. pre-auth frame rx is disabled.
wpa_supplicant connects noticeably faster in my tests with this patch series
applied.

Thanks to Jouni for pointing out, that pre-auth frames should not be handled over
the nl80211 control port in comments on a previous version of this patchset.

v2:
- drop pre-auth over ctrl port, warn if pre-auth frame is received

Markus Theil (11):
  nl80211: also check for no preauth feature
  nl80211: differentiate between ETH_P_PAE and ETH_P_RSN_PREAUTH for
    control port rx
  nl80211: handle control port frame in bss events
  nl80211: rename nl_connect to nl_connect_and_ctrl
  nl80211: tie connect_or_ctrl handle to bss init/destroy
  nl80211: add method for sending messages with connection owner
    attributes set
  nl80211: add helper method for control port usage
  nl80211: use and/or set socker owner where necessary
  nl80211: correctly handle deauth from scan with ctrl port rx
  nl80211: also add no preauth flag on connect
  nl80211: disable ctrl port over nl80211 for ap mode

 src/drivers/driver_nl80211.c       | 175 +++++++++++++++++++----------
 src/drivers/driver_nl80211.h       |   3 +-
 src/drivers/driver_nl80211_capa.c  |   4 +-
 src/drivers/driver_nl80211_event.c |  28 +++--
 src/drivers/driver_nl80211_scan.c  |   2 +-
 5 files changed, 145 insertions(+), 67 deletions(-)

Comments

Jouni Malinen April 19, 2020, 9:28 p.m. UTC | #1
On Sat, Apr 11, 2020 at 12:25:16PM +0200, Markus Theil wrote:
> This patch series adds rx control port support over nl80211. Control port
> over nl80211 delivers all EAPOL userspace.
> 
> Nl80211 control port for AP mode is included, but disabled, as currently no
> tx status support for control port frames is included in the kernel.
> 
> Wpa_supplicant now uses control port rx over nl80211 for both
> EAPOL frames. pre-auth frame rx is disabled.
> wpa_supplicant connects noticeably faster in my tests with this patch series
> applied.

Thanks, applied with changes along the lines pointed out in the other
comments in this thread. This seems to be working nicely for both TX and
RX and for both STA and AP modes. TX/RX capability can now be selected
independently and automatically with the exception of AP mode TX which I
changed to be disabled by default based on the missing TX status
reporting. That said, I did do this in a manner that allows overriding
with control_port_ap=1 driver param so that all combinations can be
tested in hwsim test cases to avoid breaking something accidentally (and
to also allow that to be used for other purposes, if there are cases
where control port TX is more valuable than the retransmission
optimizations from TX status. Anyway, it would be nice to get TX status
support added for the control port TX so that there would be no
remaining missing capabilities compared to the previously used packet
socket approach.
Markus Theil April 20, 2020, 11:17 a.m. UTC | #2
On 4/19/20 23:28, Jouni Malinen wrote:
> On Sat, Apr 11, 2020 at 12:25:16PM +0200, Markus Theil wrote:
>> This patch series adds rx control port support over nl80211. Control port
>> over nl80211 delivers all EAPOL userspace.
>>
>> Nl80211 control port for AP mode is included, but disabled, as currently no
>> tx status support for control port frames is included in the kernel.
>>
>> Wpa_supplicant now uses control port rx over nl80211 for both
>> EAPOL frames. pre-auth frame rx is disabled.
>> wpa_supplicant connects noticeably faster in my tests with this patch series
>> applied.
> Thanks, applied with changes along the lines pointed out in the other
> comments in this thread. This seems to be working nicely for both TX and
> RX and for both STA and AP modes. TX/RX capability can now be selected
> independently and automatically with the exception of AP mode TX which I
> changed to be disabled by default based on the missing TX status
> reporting. That said, I did do this in a manner that allows overriding
> with control_port_ap=1 driver param so that all combinations can be
> tested in hwsim test cases to avoid breaking something accidentally (and
> to also allow that to be used for other purposes, if there are cases
> where control port TX is more valuable than the retransmission
> optimizations from TX status. Anyway, it would be nice to get TX status
> support added for the control port TX so that there would be no
> remaining missing capabilities compared to the previously used packet
> socket approach.
>
Thanks! I already have control port TX status patches for the Linux 
kernel floating around on my disk. After I had some time to test them 
I'll send patches for the missing control port tx status.