lwfinger / rtl8188eu

Repository for stand-alone RTL8188EU driver.
Other
1.69k stars 599 forks source link

Driver causes BUG in CentOS kernel #246

Open coolerUA opened 6 years ago

coolerUA commented 6 years ago

OS: CentOS 7 Kernel: 3.10.0-693.21.1.el7.x86_64 Driver compiles from this github repo with two warnings:

/root/wifi/rtl8188eu/os_dep/os_intfs.c:701:2: предупреждение: несовместимый тип указателя в инициализации [по умолчанию включена] .ndo_select_queue = rtw_select_queue, ^ /root/wifi/rtl8188eu/os_dep/os_intfs.c:701:2: предупреждение: (где-то рядом с инициализацией для «rtw_netdev_ops..ndo_select_queue») [по умолчанию включена]

hostapd compiles from this github repo without errors. Starts without errors. Wifi interface added to bridge

# brctl show bridge0
bridge name bridge id       STP enabled interfaces
bridge0     8000.74dada052ab9   no      eth0
                            wlan0

Ios devices can't connect. hostapd shows in log:

Mar 14 09:59:15 ofc-gw hostapd: wlan0: STA f4:f1:5a:42:77:65 IEEE 802.11: associated
Mar 14 09:59:15 ofc-gw hostapd: wlan0: STA f4:f1:5a:42:77:65 IEEE 802.11: associated
Mar 14 09:59:15 ofc-gw hostapd: wlan0: STA f4:f1:5a:42:77:65 WPA: received EAPOL-Key 2/4 Pairwise with unexpected replay counter
Mar 14 09:59:16 ofc-gw hostapd: wlan0: STA f4:f1:5a:42:77:65 WPA: received EAPOL-Key 2/4 Pairwise with unexpected replay counter
Mar 14 09:59:20 ofc-gw hostapd: wlan0: STA f4:f1:5a:42:77:65 IEEE 802.11: deauthenticated due to local deauth request
Mar 14 09:59:20 ofc-gw hostapd: wlan0: STA f4:f1:5a:42:77:65 IEEE 802.11: disassociated

Android devices connected successfully.

Mar 14 10:00:43 ofc-gw hostapd: wlan0: STA 14:6b:72:7b:7c:bc IEEE 802.11: associated
Mar 14 10:00:43 ofc-gw hostapd: wlan0: STA 14:6b:72:7b:7c:bc IEEE 802.11: associated
Mar 14 10:00:43 ofc-gw hostapd: wlan0: STA 14:6b:72:7b:7c:bc WPA: received EAPOL-Key 2/4 Pairwise with unexpected replay counter
Mar 14 10:00:44 ofc-gw hostapd: wlan0: STA 14:6b:72:7b:7c:bc WPA: received EAPOL-Key 2/4 Pairwise with unexpected replay counter
Mar 14 10:00:44 ofc-gw hostapd: wlan0: STA 14:6b:72:7b:7c:bc RADIUS: starting accounting session 5AA8D626-00000000
Mar 14 10:00:44 ofc-gw hostapd: wlan0: STA 14:6b:72:7b:7c:bc WPA: pairwise key handshake completed (RSN)

BUT! After about minute, in system messages log pops an error:

Mar 14 10:01:44 ofc-gw kernel: BUG: scheduling while atomic: swapper/0/0/0x10000100
Mar 14 10:01:44 ofc-gw kernel: Modules linked in: 8188eu(OE) xt_nat veth ipt_MASQUERADE nf_nat_masquerade_ipv4 nf_log_ipv4 nf_log_common xt_LOG ip_set_hash_ip nf_conntrack_irc nf_nat_pptp nf_nat_proto_gre nf_conntrack_pptp nf_conntrack_proto_gre nf_nat_ftp iptable_nat nf_conntrack_ipv4 nf_conntrack_ftp nf_defrag_ipv4 nf_nat_ipv4 xt_addrtype xt_conntrack nf_nat nf_conntrack br_netfilter 8021q garp mrp bridge stp llc xt_set ip_set nfnetlink iptable_filter dm_thin_pool dm_persistent_data dm_bio_prison dm_bufio iTCO_wdt iTCO_vendor_support snd_hda_codec_realtek snd_hda_codec_generic hp_wmi sparse_keymap gpio_ich rfkill snd_hda_intel ppdev snd_hda_codec mei_wdt coretemp snd_hda_core kvm snd_hwdep snd_seq snd_seq_device snd_pcm irqbypass snd_timer pcspkr snd sg lpc_ich soundcore parport_pc parport shpchp tpm_infineon wmi
Mar 14 10:01:44 ofc-gw kernel: mei_me mei acpi_cpufreq ip_tables xfs libcrc32c sd_mod crc_t10dif crct10dif_generic sr_mod cdrom crct10dif_common ata_generic i915 ahci libahci pata_acpi i2c_algo_bit drm_kms_helper libata serio_raw syscopyarea sysfillrect sysimgblt fb_sys_fops e1000e drm r8169 mii ptp pps_core video i2c_core dm_mirror dm_region_hash dm_log dm_mod
Mar 14 10:01:44 ofc-gw kernel: CPU: 0 PID: 0 Comm: swapper/0 Tainted: G        W  OE  ------------   3.10.0-693.21.1.el7.x86_64 #1
Mar 14 10:01:44 ofc-gw kernel: Hardware name: Hewlett-Packard HP Compaq 8000 Elite SFF PC/3646h, BIOS 786G7 v01.02 10/22/2009
Mar 14 10:01:44 ofc-gw kernel: Call Trace:
Mar 14 10:01:44 ofc-gw kernel: <IRQ>  [<ffffffff816ae7c8>] dump_stack+0x19/0x1b
Mar 14 10:01:44 ofc-gw kernel: [<ffffffff816a8bf7>] __schedule_bug+0x64/0x72
Mar 14 10:01:44 ofc-gw kernel: [<ffffffff816b4034>] __schedule+0x9a4/0xa30
Mar 14 10:01:44 ofc-gw kernel: [<ffffffff810c79ec>] ? try_to_wake_up+0x18c/0x350
Mar 14 10:01:44 ofc-gw kernel: [<ffffffff810c4bd6>] __cond_resched+0x26/0x30
Mar 14 10:01:44 ofc-gw kernel: [<ffffffff816b438a>] _cond_resched+0x3a/0x50
Mar 14 10:01:44 ofc-gw kernel: [<ffffffff811e40fc>] kmem_cache_alloc_trace+0x3c/0x200
Mar 14 10:01:44 ofc-gw kernel: [<ffffffffc07c969b>] ? rtw_chk_hi_queue_cmd+0x25/0xb2 [8188eu]
Mar 14 10:01:44 ofc-gw kernel: [<ffffffffc07c969b>] rtw_chk_hi_queue_cmd+0x25/0xb2 [8188eu]
Mar 14 10:01:44 ofc-gw kernel: [<ffffffffc083ac6f>] usb_write_port_complete+0x6e/0x3a8 [8188eu]
Mar 14 10:01:44 ofc-gw kernel: [<ffffffff81496580>] __usb_hcd_giveback_urb+0x80/0x110
Mar 14 10:01:44 ofc-gw kernel: [<ffffffff81497453>] usb_giveback_urb_bh+0xb3/0x120
Mar 14 10:01:44 ofc-gw kernel: [<ffffffff81093e83>] tasklet_action+0x83/0x140
Mar 14 10:01:44 ofc-gw kernel: [<ffffffff81094035>] __do_softirq+0xf5/0x280
Mar 14 10:01:44 ofc-gw kernel: [<ffffffff816c3afc>] call_softirq+0x1c/0x30
Mar 14 10:01:44 ofc-gw kernel: [<ffffffff8102d435>] do_softirq+0x65/0xa0
Mar 14 10:01:44 ofc-gw kernel: [<ffffffff810943b5>] irq_exit+0x105/0x110
Mar 14 10:01:44 ofc-gw kernel: [<ffffffff816c4d96>] do_IRQ+0x56/0xf0
Mar 14 10:01:44 ofc-gw kernel: [<ffffffff816b7362>] common_interrupt+0x162/0x162
Mar 14 10:01:44 ofc-gw kernel: <EOI>  [<ffffffff81530b04>] ? cpuidle_enter_state+0x54/0xd0
Mar 14 10:01:44 ofc-gw kernel: [<ffffffff81530afd>] ? cpuidle_enter_state+0x4d/0xd0
Mar 14 10:01:44 ofc-gw kernel: [<ffffffff81530c5e>] cpuidle_idle_call+0xde/0x230
Mar 14 10:01:44 ofc-gw kernel: [<ffffffff81034f8e>] arch_cpu_idle+0xe/0x40
Mar 14 10:01:44 ofc-gw kernel: [<ffffffff810eb6da>] cpu_startup_entry+0x14a/0x1c0
Mar 14 10:01:44 ofc-gw kernel: [<ffffffff8169d5d7>] rest_init+0x77/0x80
Mar 14 10:01:44 ofc-gw kernel: [<ffffffff81b580f3>] start_kernel+0x447/0x468
Mar 14 10:01:44 ofc-gw kernel: [<ffffffff81b57ab2>] ? repair_env_string+0x5c/0x5c
Mar 14 10:01:44 ofc-gw kernel: [<ffffffff81b57120>] ? early_idt_handler_array+0x120/0x120
Mar 14 10:01:44 ofc-gw kernel: [<ffffffff81b5766b>] x86_64_start_reservations+0x24/0x26
Mar 14 10:01:44 ofc-gw kernel: [<ffffffff81b577bc>] x86_64_start_kernel+0x14f/0x172

In line BUG: scheduling while atomic: {process} {process} can be different, but most of it it is swapper.

# grep "BUG: " /var/log/messages* | awk '{ print $NF }' | awk -F/ '{print $1}' | sort | uniq -c|sort -nr
    155 swapper
      2 dracut
      1 skipcpio
      1 java

Tried to run on 4.15.9-1.el7.elrepo.x86_64 kernel. Compile runs without errors or warnings. But hostapd drops error

random: Trying to read entropy from /dev/random
Configuration file: ../../rtl_hostapd.conf
drv->ifindex=20
Interface in bridge bridge0; configure for EAPOL receive
BSS count 1, BSSID mask 00:00:00:00:00:00 (0 bits)
Allowed channel: mode=1 chan=1 freq=2412 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=2 freq=2417 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=3 freq=2422 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=4 freq=2427 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=5 freq=2432 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=6 freq=2437 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=7 freq=2442 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=8 freq=2447 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=9 freq=2452 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=10 freq=2457 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=11 freq=2462 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=12 freq=2467 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=13 freq=2472 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=1 freq=2412 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=2 freq=2417 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=3 freq=2422 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=4 freq=2427 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=5 freq=2432 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=6 freq=2437 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=7 freq=2442 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=8 freq=2447 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=9 freq=2452 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=10 freq=2457 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=11 freq=2462 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=36 freq=5180 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=40 freq=5200 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=44 freq=5220 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=48 freq=5240 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=149 freq=5745 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=153 freq=5765 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=157 freq=5785 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=161 freq=5805 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=165 freq=5825 MHz max_tx_power=0 dBm
Completing interface initialization
Mode: IEEE 802.11g  Channel: 1  Frequency: 2412 MHz
RATE[0] rate=10 flags=0x1
RATE[1] rate=20 flags=0x1
RATE[2] rate=55 flags=0x1
RATE[3] rate=110 flags=0x1
RATE[4] rate=60 flags=0x0
RATE[5] rate=90 flags=0x0
RATE[6] rate=120 flags=0x0
RATE[7] rate=180 flags=0x0
RATE[8] rate=240 flags=0x0
RATE[9] rate=360 flags=0x0
RATE[10] rate=480 flags=0x0
RATE[11] rate=540 flags=0x0
Flushing old station entries
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
Could not connect to kernel driver.
Deauthenticate all stations
+rtl871x_sta_deauth_ops, ff:ff:ff:ff:ff:ff is deauth, reason=2
rtl871x_set_key_ops
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
Failed to set encryption.
Failed to clear default encryption keys (ifname=wlan0 keyidx=0)
rtl871x_set_key_ops
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
Failed to set encryption.
Failed to clear default encryption keys (ifname=wlan0 keyidx=1)
rtl871x_set_key_ops
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
Failed to set encryption.
Failed to clear default encryption keys (ifname=wlan0 keyidx=2)
rtl871x_set_key_ops
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
Failed to set encryption.
Failed to clear default encryption keys (ifname=wlan0 keyidx=3)
Using interface wlan0 with hwaddr 7c:8b:ca:08:50:a9 and ssid 'Quantum2'
Deriving WPA PSK based on passphrase
SSID - hexdump_ascii(len=8):
     51 75 61 6e 74 75 6d 32                           Quantum2        
PSK (ASCII passphrase) - hexdump_ascii(len=8): [REMOVED]
PSK (from passphrase) - hexdump(len=32): [REMOVED]
WPS: Use configured UUID - hexdump(len=16): 12 34 56 78 9a bc de f0 12 34 56 78 9a bc de f0
WPS: Converting display to virtual_display for WPS 2.0 compliance
WPS: Converting push_button to virtual_push_button for WPS 2.0 compliance
WPS: Build Beacon IEs
WPS:  * Version (hardcoded 0x10)
WPS:  * Wi-Fi Protected Setup State (2)
WPS:  * Version2 (0x20)
WPS: Build Probe Response IEs
WPS:  * Version (hardcoded 0x10)
WPS:  * Wi-Fi Protected Setup State (2)
WPS:  * Response Type (3)
WPS:  * UUID-E
WPS:  * Manufacturer
WPS:  * Model Name
WPS:  * Model Number
WPS:  * Serial Number
WPS:  * Primary Device Type
WPS:  * Device Name
WPS:  * Config Methods (210c)
WPS:  * RF Bands (1)
WPS:  * Version2 (0x20)
rtl871x_set_beacon_ops
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
Failed to set beacon head/tail or DTIM period
WPS: Building WPS IE for (Re)Association Response
WPS:  * Version (hardcoded 0x10)
WPS:  * Response Type (3)
WPS:  * Version2 (0x20)
rtl871x_set_wps_assoc_resp_ie
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
Failed to initialize WPS Registrar
wlan0: Unable to setup interface.
Flushing old station entries
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
Could not connect to kernel driver.
Deauthenticate all stations
+rtl871x_sta_deauth_ops, ff:ff:ff:ff:ff:ff is deauth, reason=2
rmdir[ctrl_interface]: No such file or directory
ELOOP: remaining socket: sock=8 eloop_data=0x1535ec0 user_data=(nil) handler=0x424e60

My hostapd config:

# grep -v -e "^#" hostapd.conf -e "^$"
interface=wlan0
ctrl_interface=/var/run/hostapd
ssid=test
channel=1
wpa=2
wpa_passphrase=87654321
bridge=bridge0
eap_server=1
wps_state=2
uuid=12345678-9abc-def0-1234-56789abcdef0
device_name=RTL8188EU
manufacturer=Realtek
model_name=RTW_SOFTAP
model_number=WLAN_CU
serial_number=12345
device_type=6-0050F204-1
os_version=01020300
config_methods=label display push_button keypad
driver=rtl871xdrv
beacon_int=100
hw_mode=g
ieee80211n=1
wme_enabled=1
ht_capab=[SHORT-GI-20][SHORT-GI-40]
wpa_key_mgmt=WPA-PSK
wpa_pairwise=CCMP
max_num_sta=8
wpa_group_rekey=86400

Device: TL-WN722N in syslog on plug-in:

Mar 14 10:20:46 ofc-gw kernel: usb 2-6: new high-speed USB device number 4 using ehci-pci
Mar 14 10:20:46 ofc-gw kernel: usb 2-6: New USB device found, idVendor=2357, idProduct=010c
Mar 14 10:20:46 ofc-gw kernel: usb 2-6: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Mar 14 10:20:46 ofc-gw kernel: usb 2-6: Product: 802.11n NIC
Mar 14 10:20:46 ofc-gw kernel: usb 2-6: Manufacturer: Realtek
Mar 14 10:20:46 ofc-gw kernel: usb 2-6: SerialNumber: 00E04C0001
Mar 14 10:20:46 ofc-gw mtp-probe: checking bus 2, device 4: "/sys/devices/pci0000:00/0000:00:1d.7/usb2/2-6"
Mar 14 10:20:46 ofc-gw mtp-probe: bus: 2, device: 4 was not an MTP device
Mar 14 10:20:46 ofc-gw kernel: Chip Version Info: CHIP_8188E_Normal_Chip_TSMC_D_CUT_1T1R_RomVer(0)
Mar 14 10:20:46 ofc-gw kernel: EEPROM ID = 0x8129

lshw output:

        *-usb:7
             description: USB controller
             product: 82801JD/DO (ICH10 Family) USB2 EHCI Controller #1
             vendor: Intel Corporation
             physical id: 1d.7
             bus info: pci@0000:00:1d.7
             version: 02
             width: 32 bits
             clock: 33MHz
             capabilities: pm debug ehci bus_master cap_list
             configuration: driver=ehci-pci latency=0
             resources: irq:20 memory:f0526c00-f0526fff
           *-usbhost
                product: EHCI Host Controller
                vendor: Linux 3.10.0-693.21.1.el7.x86_64 ehci_hcd
                physical id: 1
                bus info: usb@2
                logical name: usb2
                version: 3.10
                capabilities: usb-2.00
                configuration: driver=hub slots=6 speed=480Mbit/s
              *-usb DISABLED
                   description: Wireless interface
                   product: 802.11n NIC
                   vendor: Realtek
                   physical id: 6
                   bus info: usb@2:6
                   logical name: wlan0
                   version: 0.00
                   serial: 00E04C0001
                   capabilities: usb-2.00 ethernet physical wireless
                   configuration: broadcast=yes driver=r8188eu maxpower=500mA multicast=yes speed=480Mbit/s wireless=unassociated

lsusb

# lsusb -s 002:004 -v
Bus 002 Device 004: ID 2357:010c  
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x2357 
  idProduct          0x010c 
  bcdDevice            0.00
  iManufacturer           1 Realtek
  iProduct                2 802.11n NIC
  iSerial                 3 00E04C0001
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           39
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower              500mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           3
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass    255 Vendor Specific Subclass
      bInterfaceProtocol    255 Vendor Specific Protocol
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x03  EP 3 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
Device Qualifier (for other device speed):
  bLength                10
  bDescriptorType         6
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  bNumConfigurations      1
Device Status:     0x0002
  (Bus Powered)
  Remote Wakeup Enabled

If needed any additional info - please post, I`ll add it.

lwfinger commented 6 years ago

I do not have any systems with kernels as old as 3.10, thus I cannot see the warnings you get while compiling. I will try to find that problem and fix it, but that will take too much time for now.

I have fixed the scheduling while atomic bug. In addition, the "Operation not supported" situation will log the actual code that is failing.

Please pull and run again.

coolerUA commented 6 years ago

pulled, compiled under

# uname -r
4.15.9-1.el7.elrepo.x86_64

Output of hostapd not changed.

random: Trying to read entropy from /dev/random
Configuration file: ../../rtl_hostapd.conf
drv->ifindex=6
Configure bridge bridge0 for EAPOL traffic.
BSS count 1, BSSID mask 00:00:00:00:00:00 (0 bits)
Allowed channel: mode=1 chan=1 freq=2412 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=2 freq=2417 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=3 freq=2422 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=4 freq=2427 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=5 freq=2432 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=6 freq=2437 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=7 freq=2442 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=8 freq=2447 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=9 freq=2452 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=10 freq=2457 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=11 freq=2462 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=12 freq=2467 MHz max_tx_power=0 dBm
Allowed channel: mode=1 chan=13 freq=2472 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=1 freq=2412 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=2 freq=2417 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=3 freq=2422 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=4 freq=2427 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=5 freq=2432 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=6 freq=2437 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=7 freq=2442 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=8 freq=2447 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=9 freq=2452 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=10 freq=2457 MHz max_tx_power=0 dBm
Allowed channel: mode=0 chan=11 freq=2462 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=36 freq=5180 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=40 freq=5200 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=44 freq=5220 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=48 freq=5240 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=149 freq=5745 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=153 freq=5765 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=157 freq=5785 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=161 freq=5805 MHz max_tx_power=0 dBm
Allowed channel: mode=2 chan=165 freq=5825 MHz max_tx_power=0 dBm
Completing interface initialization
Mode: IEEE 802.11g  Channel: 1  Frequency: 2412 MHz
RATE[0] rate=10 flags=0x1
RATE[1] rate=20 flags=0x1
RATE[2] rate=55 flags=0x1
RATE[3] rate=110 flags=0x1
RATE[4] rate=60 flags=0x0
RATE[5] rate=90 flags=0x0
RATE[6] rate=120 flags=0x0
RATE[7] rate=180 flags=0x0
RATE[8] rate=240 flags=0x0
RATE[9] rate=360 flags=0x0
RATE[10] rate=480 flags=0x0
RATE[11] rate=540 flags=0x0
Flushing old station entries
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
Could not connect to kernel driver.
Deauthenticate all stations
+rtl871x_sta_deauth_ops, ff:ff:ff:ff:ff:ff is deauth, reason=2
rtl871x_set_key_ops
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
Failed to set encryption.
Failed to clear default encryption keys (ifname=wlan0 keyidx=0)
rtl871x_set_key_ops
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
Failed to set encryption.
Failed to clear default encryption keys (ifname=wlan0 keyidx=1)
rtl871x_set_key_ops
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
Failed to set encryption.
Failed to clear default encryption keys (ifname=wlan0 keyidx=2)
rtl871x_set_key_ops
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
Failed to set encryption.
Failed to clear default encryption keys (ifname=wlan0 keyidx=3)
Using interface wlan0 with hwaddr 7c:8b:ca:08:50:a9 and ssid 'Testwifi'
Deriving WPA PSK based on passphrase
SSID - hexdump_ascii(len=8):
     54 65 73 74 77 69 66 69                           Testwifi        
PSK (ASCII passphrase) - hexdump_ascii(len=8): [REMOVED]
PSK (from passphrase) - hexdump(len=32): [REMOVED]
WPS: Use configured UUID - hexdump(len=16): 12 34 56 78 9a bc de f0 12 34 56 78 9a bc de f0
WPS: Converting display to virtual_display for WPS 2.0 compliance
WPS: Converting push_button to virtual_push_button for WPS 2.0 compliance
WPS: Build Beacon IEs
WPS:  * Version (hardcoded 0x10)
WPS:  * Wi-Fi Protected Setup State (2)
WPS:  * Version2 (0x20)
WPS: Build Probe Response IEs
WPS:  * Version (hardcoded 0x10)
WPS:  * Wi-Fi Protected Setup State (2)
WPS:  * Response Type (3)
WPS:  * UUID-E
WPS:  * Manufacturer
WPS:  * Model Name
WPS:  * Model Number
WPS:  * Serial Number
WPS:  * Primary Device Type
WPS:  * Device Name
WPS:  * Config Methods (210c)
WPS:  * RF Bands (1)
WPS:  * Version2 (0x20)
rtl871x_set_beacon_ops
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
Failed to set beacon head/tail or DTIM period
WPS: Building WPS IE for (Re)Association Response
WPS:  * Version (hardcoded 0x10)
WPS:  * Response Type (3)
WPS:  * Version2 (0x20)
rtl871x_set_wps_assoc_resp_ie
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
Failed to initialize WPS Registrar
wlan0: Unable to setup interface.
Flushing old station entries
ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
Could not connect to kernel driver.
Deauthenticate all stations
+rtl871x_sta_deauth_ops, ff:ff:ff:ff:ff:ff is deauth, reason=2
rmdir[ctrl_interface]: No such file or directory
ELOOP: remaining socket: sock=8 eloop_data=0x7f8ec0 user_data=(nil) handler=0x424e60

Here is strace output of it.

# strace -s 256 ./hostapd -dd ../../rtl_hostapd.conf
execve("./hostapd", ["./hostapd", "-dd", "../../rtl_hostapd.conf"], [/* 36 vars */]) = 0
brk(NULL)                               = 0x1be0000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ffb854c5000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=18910, ...}) = 0
mmap(NULL, 18910, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7ffb854c0000
close(3)                                = 0
open("/lib64/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\20\35\2\0\0\0\0\0@\0\0\0\0\0\0\0(c \0\0\0\0\0\0\0\0\0@\0008\0\n\0@\0K\0J\0\6\0\0\0\5\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0000\2\0\0\0\0\0\0000\2\0\0\0\0\0\0\10\0\0\0\0\0\0\0\3\0\0\0\4\0\0\0\240I\30\0\0\0\0\0\240I\30\0\0\0\0\0\240I\30\0\0\0\0\0\34\0\0\0\0\0\0\0\34\0\0\0\0\0\0\0\20\0\0\0\0\0\0\0\1\0\0\0\5\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\224}\33\0\0\0\0\0\224}\33\0\0\0\0\0\0\0 \0\0\0\0\0\1\0\0\0\6\0\0\0000\207\33\0\0\0\0\0000\207;\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=2127336, ...}) = 0
mmap(NULL, 3940800, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7ffb84ee2000
mprotect(0x7ffb8509a000, 2097152, PROT_NONE) = 0
mmap(0x7ffb8529a000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1b8000) = 0x7ffb8529a000
mmap(0x7ffb852a0000, 16832, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7ffb852a0000
close(3)                                = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ffb854bf000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ffb854bd000
arch_prctl(ARCH_SET_FS, 0x7ffb854bd740) = 0
mprotect(0x7ffb8529a000, 16384, PROT_READ) = 0
mprotect(0x666000, 4096, PROT_READ)     = 0
mprotect(0x7ffb854c6000, 4096, PROT_READ) = 0
munmap(0x7ffb854c0000, 18910)           = 0
brk(NULL)                               = 0x1be0000
brk(0x1c01000)                          = 0x1c01000
brk(NULL)                               = 0x1c01000
open("/dev/random", O_RDONLY|O_NONBLOCK) = 3
fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 2), ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ffb854c4000
write(1, "random: Trying to read entropy from /dev/random\n", 48random: Trying to read entropy from /dev/random
) = 48
rt_sigaction(SIGHUP, {0x4169a0, [HUP], SA_RESTORER|SA_RESTART, 0x7ffb84f17270}, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGUSR1, {0x4169a0, [USR1], SA_RESTORER|SA_RESTART, 0x7ffb84f17270}, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGINT, {0x4169a0, [INT], SA_RESTORER|SA_RESTART, 0x7ffb84f17270}, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGTERM, {0x4169a0, [TERM], SA_RESTORER|SA_RESTART, 0x7ffb84f17270}, {SIG_DFL, [], 0}, 8) = 0
write(1, "Configuration file: ../../rtl_hostapd.conf\n", 43Configuration file: ../../rtl_hostapd.conf
) = 43
open("../../rtl_hostapd.conf", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=602, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ffb854c3000
read(4, "interface=wlan0\nctrl_interface=/var/run/hostapd\nssid=Testwifi\nchannel=1\nwpa=2\nwpa_passphrase=12345678\nbridge=bridge0\neap_server=1\nwps_state=2\nuuid=12345678-9abc-def0-1234-56789abcdef0\ndevice_name=RTL8188EU\nmanufacturer=Realtek\nmodel_name=RTW_SOFTAP\nmodel_n"..., 4096) = 602
read(4, "", 4096)                       = 0
close(4)                                = 0
munmap(0x7ffb854c3000, 4096)            = 0
socket(AF_INET, SOCK_DGRAM, IPPROTO_IP) = 4
ioctl(4, SIOCGIFFLAGS, {ifr_name="wlan0", ifr_flags=IFF_UP|IFF_BROADCAST|IFF_MULTICAST}) = 0
ioctl(4, SIOCGIFINDEX, {ifr_name="wlan0", }) = 0
write(1, "drv->ifindex=6\n", 15drv->ifindex=6
)        = 15
socket(AF_PACKET, SOCK_RAW, 36488)      = 5
ioctl(5, SIOCGIFINDEX, {ifr_name="wlan0", }) = 0
bind(5, {sa_family=AF_PACKET, proto=0x888e, if6, pkttype=PACKET_HOST, addr(0)={0, }, 20) = 0
ioctl(5, SIOCGIFHWADDR, {ifr_name="wlan0", ifr_hwaddr=7c:8b:ca:08:50:a9}) = 0
write(1, "Configure bridge bridge0 for EAPOL traffic.\n", 44Configure bridge bridge0 for EAPOL traffic.
) = 44
socket(AF_PACKET, SOCK_RAW, 36488)      = 6
ioctl(6, SIOCGIFINDEX, {ifr_name="bridge0", }) = 0
bind(6, {sa_family=AF_PACKET, proto=0x888e, if5, pkttype=PACKET_HOST, addr(0)={0, }, 20) = 0
ioctl(6, SIOCGIFHWADDR, {ifr_name="bridge0", ifr_hwaddr=74:da:da:05:2a:c0}) = 0
ioctl(4, SIOCSIWMODE, 0x7ffc9d20f6e0)   = 0
socket(AF_NETLINK, SOCK_RAW, NETLINK_ROUTE) = 8
bind(8, {sa_family=AF_NETLINK, pid=0, groups=00000001}, 12) = 0
write(1, "BSS count 1, BSSID mask 00:00:00:00:00:00 (0 bits)\n", 51BSS count 1, BSSID mask 00:00:00:00:00:00 (0 bits)
) = 51
write(1, "Allowed channel: mode=1 chan=1 freq=2412 MHz max_tx_power=0 dBm\n", 64Allowed channel: mode=1 chan=1 freq=2412 MHz max_tx_power=0 dBm
) = 64
write(1, "Allowed channel: mode=1 chan=2 freq=2417 MHz max_tx_power=0 dBm\n", 64Allowed channel: mode=1 chan=2 freq=2417 MHz max_tx_power=0 dBm
) = 64
write(1, "Allowed channel: mode=1 chan=3 freq=2422 MHz max_tx_power=0 dBm\n", 64Allowed channel: mode=1 chan=3 freq=2422 MHz max_tx_power=0 dBm
) = 64
write(1, "Allowed channel: mode=1 chan=4 freq=2427 MHz max_tx_power=0 dBm\n", 64Allowed channel: mode=1 chan=4 freq=2427 MHz max_tx_power=0 dBm
) = 64
write(1, "Allowed channel: mode=1 chan=5 freq=2432 MHz max_tx_power=0 dBm\n", 64Allowed channel: mode=1 chan=5 freq=2432 MHz max_tx_power=0 dBm
) = 64
write(1, "Allowed channel: mode=1 chan=6 freq=2437 MHz max_tx_power=0 dBm\n", 64Allowed channel: mode=1 chan=6 freq=2437 MHz max_tx_power=0 dBm
) = 64
write(1, "Allowed channel: mode=1 chan=7 freq=2442 MHz max_tx_power=0 dBm\n", 64Allowed channel: mode=1 chan=7 freq=2442 MHz max_tx_power=0 dBm
) = 64
write(1, "Allowed channel: mode=1 chan=8 freq=2447 MHz max_tx_power=0 dBm\n", 64Allowed channel: mode=1 chan=8 freq=2447 MHz max_tx_power=0 dBm
) = 64
write(1, "Allowed channel: mode=1 chan=9 freq=2452 MHz max_tx_power=0 dBm\n", 64Allowed channel: mode=1 chan=9 freq=2452 MHz max_tx_power=0 dBm
) = 64
write(1, "Allowed channel: mode=1 chan=10 freq=2457 MHz max_tx_power=0 dBm\n", 65Allowed channel: mode=1 chan=10 freq=2457 MHz max_tx_power=0 dBm
) = 65
write(1, "Allowed channel: mode=1 chan=11 freq=2462 MHz max_tx_power=0 dBm\n", 65Allowed channel: mode=1 chan=11 freq=2462 MHz max_tx_power=0 dBm
) = 65
write(1, "Allowed channel: mode=1 chan=12 freq=2467 MHz max_tx_power=0 dBm\n", 65Allowed channel: mode=1 chan=12 freq=2467 MHz max_tx_power=0 dBm
) = 65
write(1, "Allowed channel: mode=1 chan=13 freq=2472 MHz max_tx_power=0 dBm\n", 65Allowed channel: mode=1 chan=13 freq=2472 MHz max_tx_power=0 dBm
) = 65
write(1, "Allowed channel: mode=0 chan=1 freq=2412 MHz max_tx_power=0 dBm\n", 64Allowed channel: mode=0 chan=1 freq=2412 MHz max_tx_power=0 dBm
) = 64
write(1, "Allowed channel: mode=0 chan=2 freq=2417 MHz max_tx_power=0 dBm\n", 64Allowed channel: mode=0 chan=2 freq=2417 MHz max_tx_power=0 dBm
) = 64
write(1, "Allowed channel: mode=0 chan=3 freq=2422 MHz max_tx_power=0 dBm\n", 64Allowed channel: mode=0 chan=3 freq=2422 MHz max_tx_power=0 dBm
) = 64
write(1, "Allowed channel: mode=0 chan=4 freq=2427 MHz max_tx_power=0 dBm\n", 64Allowed channel: mode=0 chan=4 freq=2427 MHz max_tx_power=0 dBm
) = 64
write(1, "Allowed channel: mode=0 chan=5 freq=2432 MHz max_tx_power=0 dBm\n", 64Allowed channel: mode=0 chan=5 freq=2432 MHz max_tx_power=0 dBm
) = 64
write(1, "Allowed channel: mode=0 chan=6 freq=2437 MHz max_tx_power=0 dBm\n", 64Allowed channel: mode=0 chan=6 freq=2437 MHz max_tx_power=0 dBm
) = 64
write(1, "Allowed channel: mode=0 chan=7 freq=2442 MHz max_tx_power=0 dBm\n", 64Allowed channel: mode=0 chan=7 freq=2442 MHz max_tx_power=0 dBm
) = 64
write(1, "Allowed channel: mode=0 chan=8 freq=2447 MHz max_tx_power=0 dBm\n", 64Allowed channel: mode=0 chan=8 freq=2447 MHz max_tx_power=0 dBm
) = 64
write(1, "Allowed channel: mode=0 chan=9 freq=2452 MHz max_tx_power=0 dBm\n", 64Allowed channel: mode=0 chan=9 freq=2452 MHz max_tx_power=0 dBm
) = 64
write(1, "Allowed channel: mode=0 chan=10 freq=2457 MHz max_tx_power=0 dBm\n", 65Allowed channel: mode=0 chan=10 freq=2457 MHz max_tx_power=0 dBm
) = 65
write(1, "Allowed channel: mode=0 chan=11 freq=2462 MHz max_tx_power=0 dBm\n", 65Allowed channel: mode=0 chan=11 freq=2462 MHz max_tx_power=0 dBm
) = 65
write(1, "Allowed channel: mode=2 chan=36 freq=5180 MHz max_tx_power=0 dBm\n", 65Allowed channel: mode=2 chan=36 freq=5180 MHz max_tx_power=0 dBm
) = 65
write(1, "Allowed channel: mode=2 chan=40 freq=5200 MHz max_tx_power=0 dBm\n", 65Allowed channel: mode=2 chan=40 freq=5200 MHz max_tx_power=0 dBm
) = 65
write(1, "Allowed channel: mode=2 chan=44 freq=5220 MHz max_tx_power=0 dBm\n", 65Allowed channel: mode=2 chan=44 freq=5220 MHz max_tx_power=0 dBm
) = 65
write(1, "Allowed channel: mode=2 chan=48 freq=5240 MHz max_tx_power=0 dBm\n", 65Allowed channel: mode=2 chan=48 freq=5240 MHz max_tx_power=0 dBm
) = 65
write(1, "Allowed channel: mode=2 chan=149 freq=5745 MHz max_tx_power=0 dBm\n", 66Allowed channel: mode=2 chan=149 freq=5745 MHz max_tx_power=0 dBm
) = 66
write(1, "Allowed channel: mode=2 chan=153 freq=5765 MHz max_tx_power=0 dBm\n", 66Allowed channel: mode=2 chan=153 freq=5765 MHz max_tx_power=0 dBm
) = 66
write(1, "Allowed channel: mode=2 chan=157 freq=5785 MHz max_tx_power=0 dBm\n", 66Allowed channel: mode=2 chan=157 freq=5785 MHz max_tx_power=0 dBm
) = 66
write(1, "Allowed channel: mode=2 chan=161 freq=5805 MHz max_tx_power=0 dBm\n", 66Allowed channel: mode=2 chan=161 freq=5805 MHz max_tx_power=0 dBm
) = 66
write(1, "Allowed channel: mode=2 chan=165 freq=5825 MHz max_tx_power=0 dBm\n", 66Allowed channel: mode=2 chan=165 freq=5825 MHz max_tx_power=0 dBm
) = 66
write(1, "Completing interface initialization\n", 36Completing interface initialization
) = 36
write(1, "Mode: IEEE 802.11g  Channel: 1  Frequency: 2412 MHz\n", 52Mode: IEEE 802.11g  Channel: 1  Frequency: 2412 MHz
) = 52
write(1, "RATE[0] rate=10 flags=0x1\n", 26RATE[0] rate=10 flags=0x1
) = 26
write(1, "RATE[1] rate=20 flags=0x1\n", 26RATE[1] rate=20 flags=0x1
) = 26
write(1, "RATE[2] rate=55 flags=0x1\n", 26RATE[2] rate=55 flags=0x1
) = 26
write(1, "RATE[3] rate=110 flags=0x1\n", 27RATE[3] rate=110 flags=0x1
) = 27
write(1, "RATE[4] rate=60 flags=0x0\n", 26RATE[4] rate=60 flags=0x0
) = 26
write(1, "RATE[5] rate=90 flags=0x0\n", 26RATE[5] rate=90 flags=0x0
) = 26
write(1, "RATE[6] rate=120 flags=0x0\n", 27RATE[6] rate=120 flags=0x0
) = 27
write(1, "RATE[7] rate=180 flags=0x0\n", 27RATE[7] rate=180 flags=0x0
) = 27
write(1, "RATE[8] rate=240 flags=0x0\n", 27RATE[8] rate=240 flags=0x0
) = 27
write(1, "RATE[9] rate=360 flags=0x0\n", 27RATE[9] rate=360 flags=0x0
) = 27
write(1, "RATE[10] rate=480 flags=0x0\n", 28RATE[10] rate=480 flags=0x0
) = 28
write(1, "RATE[11] rate=540 flags=0x0\n", 28RATE[11] rate=540 flags=0x0
) = 28
write(1, "Flushing old station entries\n", 29Flushing old station entries
) = 29
ioctl(4, _IOC(0, 0x8b, 0xfc, 0x00), 0x7ffc9d20f570) = -1 EOPNOTSUPP (Operation not supported)
dup(2)                                  = 9
fcntl(9, F_GETFL)                       = 0x8402 (flags O_RDWR|O_APPEND|O_LARGEFILE)
fstat(9, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 2), ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ffb854c3000
write(9, "ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported\n", 50ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
) = 50
close(9)                                = 0
munmap(0x7ffb854c3000, 4096)            = 0
write(1, "Could not connect to kernel driver.\n", 36Could not connect to kernel driver.
) = 36
write(1, "Deauthenticate all stations\n", 28Deauthenticate all stations
) = 28
write(1, "+rtl871x_sta_deauth_ops, ff:ff:ff:ff:ff:ff is deauth, reason=2\n", 63+rtl871x_sta_deauth_ops, ff:ff:ff:ff:ff:ff is deauth, reason=2
) = 63
write(1, "rtl871x_set_key_ops\n", 20rtl871x_set_key_ops
)   = 20
ioctl(4, _IOC(0, 0x8b, 0xfc, 0x00), 0x7ffc9d20f5a0) = -1 EOPNOTSUPP (Operation not supported)
dup(2)                                  = 9
fcntl(9, F_GETFL)                       = 0x8402 (flags O_RDWR|O_APPEND|O_LARGEFILE)
fstat(9, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 2), ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ffb854c3000
write(9, "ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported\n", 50ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
) = 50
close(9)                                = 0
munmap(0x7ffb854c3000, 4096)            = 0
write(1, "Failed to set encryption.\n", 26Failed to set encryption.
) = 26
write(1, "Failed to clear default encryption keys (ifname=wlan0 keyidx=0)\n", 64Failed to clear default encryption keys (ifname=wlan0 keyidx=0)
) = 64
write(1, "rtl871x_set_key_ops\n", 20rtl871x_set_key_ops
)   = 20
ioctl(4, _IOC(0, 0x8b, 0xfc, 0x00), 0x7ffc9d20f5a0) = -1 EOPNOTSUPP (Operation not supported)
dup(2)                                  = 9
fcntl(9, F_GETFL)                       = 0x8402 (flags O_RDWR|O_APPEND|O_LARGEFILE)
fstat(9, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 2), ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ffb854c3000
write(9, "ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported\n", 50ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
) = 50
close(9)                                = 0
munmap(0x7ffb854c3000, 4096)            = 0
write(1, "Failed to set encryption.\n", 26Failed to set encryption.
) = 26
write(1, "Failed to clear default encryption keys (ifname=wlan0 keyidx=1)\n", 64Failed to clear default encryption keys (ifname=wlan0 keyidx=1)
) = 64
write(1, "rtl871x_set_key_ops\n", 20rtl871x_set_key_ops
)   = 20
ioctl(4, _IOC(0, 0x8b, 0xfc, 0x00), 0x7ffc9d20f5a0) = -1 EOPNOTSUPP (Operation not supported)
dup(2)                                  = 9
fcntl(9, F_GETFL)                       = 0x8402 (flags O_RDWR|O_APPEND|O_LARGEFILE)
fstat(9, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 2), ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ffb854c3000
write(9, "ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported\n", 50ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
) = 50
close(9)                                = 0
munmap(0x7ffb854c3000, 4096)            = 0
write(1, "Failed to set encryption.\n", 26Failed to set encryption.
) = 26
write(1, "Failed to clear default encryption keys (ifname=wlan0 keyidx=2)\n", 64Failed to clear default encryption keys (ifname=wlan0 keyidx=2)
) = 64
write(1, "rtl871x_set_key_ops\n", 20rtl871x_set_key_ops
)   = 20
ioctl(4, _IOC(0, 0x8b, 0xfc, 0x00), 0x7ffc9d20f5a0) = -1 EOPNOTSUPP (Operation not supported)
dup(2)                                  = 9
fcntl(9, F_GETFL)                       = 0x8402 (flags O_RDWR|O_APPEND|O_LARGEFILE)
fstat(9, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 2), ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ffb854c3000
write(9, "ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported\n", 50ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
) = 50
close(9)                                = 0
munmap(0x7ffb854c3000, 4096)            = 0
write(1, "Failed to set encryption.\n", 26Failed to set encryption.
) = 26
write(1, "Failed to clear default encryption keys (ifname=wlan0 keyidx=3)\n", 64Failed to clear default encryption keys (ifname=wlan0 keyidx=3)
) = 64
write(1, "Using interface wlan0 with hwaddr 7c:8b:ca:08:50:a9 and ssid 'Testwifi'\n", 72Using interface wlan0 with hwaddr 7c:8b:ca:08:50:a9 and ssid 'Testwifi'
) = 72
write(1, "Deriving WPA PSK based on passphrase\n", 37Deriving WPA PSK based on passphrase
) = 37
write(1, "SSID - hexdump_ascii(len=8):\n", 29SSID - hexdump_ascii(len=8):
) = 29
write(1, "     54 65 73 74 77 69 66 69                           Testwifi        \n", 72     54 65 73 74 77 69 66 69                           Testwifi        
) = 72
write(1, "PSK (ASCII passphrase) - hexdump_ascii(len=8): [REMOVED]\n", 57PSK (ASCII passphrase) - hexdump_ascii(len=8): [REMOVED]
) = 57
write(1, "PSK (from passphrase) - hexdump(len=32): [REMOVED]\n", 51PSK (from passphrase) - hexdump(len=32): [REMOVED]
) = 51
gettimeofday({1521045714, 131129}, NULL) = 0
write(1, "WPS: Use configured UUID - hexdump(len=16): 12 34 56 78 9a bc de f0 12 34 56 78 9a bc de f0\n", 92WPS: Use configured UUID - hexdump(len=16): 12 34 56 78 9a bc de f0 12 34 56 78 9a bc de f0
) = 92
write(1, "WPS: Converting display to virtual_display for WPS 2.0 compliance\n", 66WPS: Converting display to virtual_display for WPS 2.0 compliance
) = 66
write(1, "WPS: Converting push_button to virtual_push_button for WPS 2.0 compliance\n", 74WPS: Converting push_button to virtual_push_button for WPS 2.0 compliance
) = 74
write(1, "WPS: Build Beacon IEs\n", 22WPS: Build Beacon IEs
) = 22
write(1, "WPS:  * Version (hardcoded 0x10)\n", 33WPS:  * Version (hardcoded 0x10)
) = 33
write(1, "WPS:  * Wi-Fi Protected Setup State (2)\n", 40WPS:  * Wi-Fi Protected Setup State (2)
) = 40
write(1, "WPS:  * Version2 (0x20)\n", 24WPS:  * Version2 (0x20)
) = 24
write(1, "WPS: Build Probe Response IEs\n", 30WPS: Build Probe Response IEs
) = 30
write(1, "WPS:  * Version (hardcoded 0x10)\n", 33WPS:  * Version (hardcoded 0x10)
) = 33
write(1, "WPS:  * Wi-Fi Protected Setup State (2)\n", 40WPS:  * Wi-Fi Protected Setup State (2)
) = 40
write(1, "WPS:  * Response Type (3)\n", 26WPS:  * Response Type (3)
) = 26
write(1, "WPS:  * UUID-E\n", 15WPS:  * UUID-E
)        = 15
write(1, "WPS:  * Manufacturer\n", 21WPS:  * Manufacturer
)  = 21
write(1, "WPS:  * Model Name\n", 19WPS:  * Model Name
)    = 19
write(1, "WPS:  * Model Number\n", 21WPS:  * Model Number
)  = 21
write(1, "WPS:  * Serial Number\n", 22WPS:  * Serial Number
) = 22
write(1, "WPS:  * Primary Device Type\n", 28WPS:  * Primary Device Type
) = 28
write(1, "WPS:  * Device Name\n", 20WPS:  * Device Name
)   = 20
write(1, "WPS:  * Config Methods (210c)\n", 30WPS:  * Config Methods (210c)
) = 30
write(1, "WPS:  * RF Bands (1)\n", 21WPS:  * RF Bands (1)
)  = 21
write(1, "WPS:  * Version2 (0x20)\n", 24WPS:  * Version2 (0x20)
) = 24
write(1, "rtl871x_set_beacon_ops\n", 23rtl871x_set_beacon_ops
) = 23
ioctl(4, _IOC(0, 0x8b, 0xfc, 0x00), 0x7ffc9d20f420) = -1 EOPNOTSUPP (Operation not supported)
dup(2)                                  = 9
fcntl(9, F_GETFL)                       = 0x8402 (flags O_RDWR|O_APPEND|O_LARGEFILE)
fstat(9, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 2), ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ffb854c3000
write(9, "ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported\n", 50ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
) = 50
close(9)                                = 0
munmap(0x7ffb854c3000, 4096)            = 0
write(1, "Failed to set beacon head/tail or DTIM period\n", 46Failed to set beacon head/tail or DTIM period
) = 46
write(1, "WPS: Building WPS IE for (Re)Association Response\n", 50WPS: Building WPS IE for (Re)Association Response
) = 50
write(1, "WPS:  * Version (hardcoded 0x10)\n", 33WPS:  * Version (hardcoded 0x10)
) = 33
write(1, "WPS:  * Response Type (3)\n", 26WPS:  * Response Type (3)
) = 26
write(1, "WPS:  * Version2 (0x20)\n", 24WPS:  * Version2 (0x20)
) = 24
write(1, "rtl871x_set_wps_assoc_resp_ie\n", 30rtl871x_set_wps_assoc_resp_ie
) = 30
ioctl(4, _IOC(0, 0x8b, 0xfc, 0x00), 0x7ffc9d20f460) = -1 EOPNOTSUPP (Operation not supported)
dup(2)                                  = 9
fcntl(9, F_GETFL)                       = 0x8402 (flags O_RDWR|O_APPEND|O_LARGEFILE)
fstat(9, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 2), ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ffb854c3000
write(9, "ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported\n", 50ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
) = 50
close(9)                                = 0
munmap(0x7ffb854c3000, 4096)            = 0
write(1, "Failed to initialize WPS Registrar\n", 35Failed to initialize WPS Registrar
) = 35
write(1, "wlan0: Unable to setup interface.\n", 34wlan0: Unable to setup interface.
) = 34
write(1, "Flushing old station entries\n", 29Flushing old station entries
) = 29
ioctl(4, _IOC(0, 0x8b, 0xfc, 0x00), 0x7ffc9d20f6a0) = -1 EOPNOTSUPP (Operation not supported)
dup(2)                                  = 9
fcntl(9, F_GETFL)                       = 0x8402 (flags O_RDWR|O_APPEND|O_LARGEFILE)
fstat(9, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 2), ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ffb854c3000
write(9, "ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported\n", 50ioctl[RTL_IOCTL_HOSTAPD]: Operation not supported
) = 50
close(9)                                = 0
munmap(0x7ffb854c3000, 4096)            = 0
write(1, "Could not connect to kernel driver.\n", 36Could not connect to kernel driver.
) = 36
write(1, "Deauthenticate all stations\n", 28Deauthenticate all stations
) = 28
write(1, "+rtl871x_sta_deauth_ops, ff:ff:ff:ff:ff:ff is deauth, reason=2\n", 63+rtl871x_sta_deauth_ops, ff:ff:ff:ff:ff:ff is deauth, reason=2
) = 63
close(0)                                = 0
unlink("/var/run/hostapd/wlan0")        = -1 ENOENT (No such file or directory)
rmdir("/var/run/hostapd")               = -1 ENOENT (No such file or directory)
dup(2)                                  = 0
fcntl(0, F_GETFL)                       = 0x8402 (flags O_RDWR|O_APPEND|O_LARGEFILE)
fstat(0, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 2), ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ffb854c3000
write(0, "rmdir[ctrl_interface]: No such file or directory\n", 49rmdir[ctrl_interface]: No such file or directory
) = 49
close(0)                                = 0
munmap(0x7ffb854c3000, 4096)            = 0
ioctl(4, SIOCSIWMODE, 0x7ffc9d20f730)   = 0
close(4)                                = 0
close(6)                                = 0
close(5)                                = 0
close(3)                                = 0
gettimeofday({1521045714, 157407}, NULL) = 0
write(1, "ELOOP: remaining socket: sock=8 eloop_data=0x1be1ec0 user_data=(nil) handler=0x424e60\n", 86ELOOP: remaining socket: sock=8 eloop_data=0x1be1ec0 user_data=(nil) handler=0x424e60
) = 86
exit_group(1)                           = ?
+++ exited with 1 +++

offtopic Also, seems hostapd do nothing on line

Configure bridge bridge0 for EAPOL traffic.

If wlan0 was not in bridge, it does not add wlan0 to bridge0, even if

bridge=bridge0

in config. Or I am misunderstood this option. /offtopic