Skip to contentSkip to conversation

mwifiex:Testing AP functionality with hostapd

DISCUSSION Hans Kröner 3 participants 8 messages Jun 7, 2012 – Jun 8, 2012

lore
Share & tools
lore
#0 lore raw

I wanted to test the new "AP mode" functionality in the mwifiex driver so I built a kernel off the wireless-testing tree and hostapd v2.0-devel from git. I tried this on a "DreamPlug" that uses the SD8787.

"Client mode" is working fine, but I can't seem to be able to get "AP mode" working. No matter what I do I get this output from hostapd:

random: Trying to read entropy from /dev/random
Configuration file: hostapd-minimal.conf
nl80211: interface uap0 in phy phy0
rfkill: initial event: idx=0 type=2 op=0 soft=0 hard=0
rfkill: initial event: idx=1 type=1 op=0 soft=0 hard=0
nl80211: Disable use_monitor with device_ap_sme since no monitor mode support d etected
nl80211: Add own interface ifindex 5
nl80211: Set mode ifindex 5 iftype 3 (AP)
nl80211: Setup AP - device_ap_sme=1 use_monitor=0
nl80211: Subscribe to mgmt frames with AP handle 0x74608 (device SME)
nl80211: Register frame type=0xd0 nl_handle=0x74608
nl80211: Register frame match - hexdump(len=0): [NULL]
nl80211: Register frame command failed (type=208): ret=-95 (Operation not suppo rted)
nl80211: Register frame match - hexdump(len=0): [NULL]
nl80211: Failed to set interface uap0 into AP mode
netlink: Operstate: linkmode=0, operstate=6
nl80211: Set mode ifindex 5 iftype 2 (STATION)
nl80211: Failed to set interface 5 to mode 2: -16 (Device or resource busy)
nl80211: Try mode change after setting interface down
nl80211: Set mode ifindex 5 iftype 2 (STATION)
nl80211: Failed to set interface 5 to mode 2: -16 (Device or resource busy)
nl80211: Set mode ifindex 5 iftype 2 (STATION)
nl80211: Failed to set interface 5 to mode 2: -16 (Device or resource busy) [ ... ]
nl80211: Interface mode change to 2 from 3 failed
nl80211 driver initialization failed.

I've tried bringing both mlan0 and uap0 interfaces down/up and different combinations of both to no avail. The patches for "AP mode" support mention that is has been tested against hostapd v2.0-devel. Is there anything I should be aware of when building hostapd? I'm also not sure if I'm running the correct firmware for the SD8787.

Thanks in advance for any input!!!

Hans

--- mwifiex_sdio firmware ---

mwifiex_sdio mmc0:0001:1: WLAN FW already running! Skip FW dnld mwifiex_sdio mmc0:0001:1: WLAN FW is active
mwifiex_sdio mmc0:0001:1: driver_version = mwifiex 1.0 (14.57.5.p69)

--- hostapd .config ---

CONFIG_DRIVER_HOSTAP=y
CONFIG_DRIVER_NL80211=y
CONFIG_LIBNL32=y
CFLAGS += -I/usr/include/libnl3
CONFIG_IAPP=y
CONFIG_RSN_PREAUTH=y
CONFIG_PEERKEY=y
CONFIG_EAP=y
CONFIG_EAP_MD5=y
CONFIG_EAP_TLS=y
CONFIG_EAP_MSCHAPV2=y
CONFIG_EAP_PEAP=y
CONFIG_EAP_GTC=y
CONFIG_EAP_TTLS=y
CONFIG_PKCS12=y
CONFIG_IPV6=y
CONFIG_IEEE80211N=y

--- hostatp-minimal.conf ---

interface=uap0
driver=nl80211
ssid=DreamPlug
hw_mode=g
channel=1

#1 lore raw

Hello Hans,

Can you please let me know:
i. mwifiex FW version: you can get this value while loading driver in dmesg. ii. hostapd version
iii. Also can you please put extended logs by -ddd command line parameter.

mwifiex AP mode is supported for hostapd develv2 only.

Regards,
Avinash

Quoted 85 lines · Hans Kröner

I wanted to test the new "AP mode" functionality in the mwifiex driver so I built a kernel off the wireless-testing tree and hostapd v2.0-devel from git. I tried this on a "DreamPlug" that uses the SD8787.

"Client mode" is working fine, but I can't seem to be able to get "AP mode" working. No matter what I do I get this output from hostapd:

random: Trying to read entropy from /dev/random
Configuration file: hostapd-minimal.conf
nl80211: interface uap0 in phy phy0
rfkill: initial event: idx=0 type=2 op=0 soft=0 hard=0
rfkill: initial event: idx=1 type=1 op=0 soft=0 hard=0
nl80211: Disable use_monitor with device_ap_sme since no monitor mode support d etected
nl80211: Add own interface ifindex 5
nl80211: Set mode ifindex 5 iftype 3 (AP)
nl80211: Setup AP - device_ap_sme=1 use_monitor=0
nl80211: Subscribe to mgmt frames with AP handle 0x74608 (device SME)
nl80211: Register frame type=0xd0 nl_handle=0x74608
nl80211: Register frame match - hexdump(len=0): [NULL]
nl80211: Register frame command failed (type=208): ret=-95 (Operation not suppo rted)
nl80211: Register frame match - hexdump(len=0): [NULL]
nl80211: Failed to set interface uap0 into AP mode
netlink: Operstate: linkmode=0, operstate=6
nl80211: Set mode ifindex 5 iftype 2 (STATION)
nl80211: Failed to set interface 5 to mode 2: -16 (Device or resource busy)
nl80211: Try mode change after setting interface down
nl80211: Set mode ifindex 5 iftype 2 (STATION)
nl80211: Failed to set interface 5 to mode 2: -16 (Device or resource busy)
nl80211: Set mode ifindex 5 iftype 2 (STATION)
nl80211: Failed to set interface 5 to mode 2: -16 (Device or resource busy) [ ... ]
nl80211: Interface mode change to 2 from 3 failed
nl80211 driver initialization failed.

I've tried bringing both mlan0 and uap0 interfaces down/up and different combinations of both to no avail. The patches for "AP mode" support mention that is has been tested against hostapd v2.0-devel. Is there anything I should be aware of when building hostapd? I'm also not sure if I'm running the correct firmware for the SD8787.

Thanks in advance for any input!!!

Hans

--- mwifiex_sdio firmware ---

mwifiex_sdio mmc0:0001:1: WLAN FW already running! Skip FW dnld mwifiex_sdio mmc0:0001:1: WLAN FW is active
mwifiex_sdio mmc0:0001:1: driver_version = mwifiex 1.0 (14.57.5.p69)

--- hostapd .config ---

CONFIG_DRIVER_HOSTAP=y
CONFIG_DRIVER_NL80211=y
CONFIG_LIBNL32=y
CFLAGS += -I/usr/include/libnl3
CONFIG_IAPP=y
CONFIG_RSN_PREAUTH=y
CONFIG_PEERKEY=y
CONFIG_EAP=y
CONFIG_EAP_MD5=y
CONFIG_EAP_TLS=y
CONFIG_EAP_MSCHAPV2=y
CONFIG_EAP_PEAP=y
CONFIG_EAP_GTC=y
CONFIG_EAP_TTLS=y
CONFIG_PKCS12=y
CONFIG_IPV6=y
CONFIG_IEEE80211N=y

--- hostatp-minimal.conf ---

interface=uap0
driver=nl80211
ssid=DreamPlug
hw_mode=g
channel=1

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

#2 lore raw

Hi Avinash,

Thanks for your reply!

i) Firmware version is reported as "mwifiex 1.0 (14.57.5.p69)"

ii) hostapd version is "v2.0-devel" I took it from git at
git://w1.fi/srv/git/hostap.git and used the config in my previous post to build it. I'm at commit 5b3763336466f2c55611437cb924aeee45f7203e

iii) Output of hostapd "-ddd" is the same as my previous post, which used
"-dd". Here it is:

random: Trying to read entropy from /dev/random Configuration file: hostapd-minimal.conf
nl80211: interface uap0 in phy phy0
rfkill: initial event: idx=0 type=2 op=0 soft=0 hard=0
rfkill: initial event: idx=1 type=1 op=0 soft=0 hard=0
nl80211: Disable use_monitor with device_ap_sme since no monitor mode support detected
nl80211: Add own interface ifindex 5
nl80211: Set mode ifindex 5 iftype 3 (AP)
nl80211: Setup AP - device_ap_sme=1 use_monitor=0
nl80211: Subscribe to mgmt frames with AP handle 0x74608 (device SME)
nl80211: Register frame type=0xd0 nl_handle=0x74608
nl80211: Register frame match - hexdump(len=0): [NULL]
nl80211: Register frame command failed (type=208): ret=-95 (Operation not supported)
nl80211: Register frame match - hexdump(len=0): [NULL]
nl80211: Failed to set interface uap0 into AP mode
netlink: Operstate: linkmode=0, operstate=6
nl80211: Set mode ifindex 5 iftype 2 (STATION)
nl80211: Failed to set interface 5 to mode 2: -16 (Device or resource busy)
nl80211: Try mode change after setting interface down
nl80211: Set mode ifindex 5 iftype 2 (STATION)
nl80211: Failed to set interface 5 to mode 2: -16 (Device or resource busy)
nl80211: Set mode ifindex 5 iftype 2 (STATION)
nl80211: Failed to set interface 5 to mode 2: -16 (Device or resource busy)
nl80211: Set mode ifindex 5 iftype 2 (STATION)
nl80211: Failed to set interface 5 to mode 2: -16 (Device or resource busy)
nl80211: Set mode ifindex 5 iftype 2 (STATION)
nl80211: Failed to set interface 5 to mode 2: -16 (Device or resource busy)
nl80211: Set mode ifindex 5 iftype 2 (STATION)
nl80211: Failed to set interface 5 to mode 2: -16 (Device or resource busy)
nl80211: Set mode ifindex 5 iftype 2 (STATION)
nl80211: Failed to set interface 5 to mode 2: -16 (Device or resource busy)
nl80211: Set mode ifindex 5 iftype 2 (STATION)
nl80211: Failed to set interface 5 to mode 2: -16 (Device or resource busy)
nl80211: Set mode ifindex 5 iftype 2 (STATION)
nl80211: Failed to set interface 5 to mode 2: -16 (Device or resource busy)
nl80211: Set mode ifindex 5 iftype 2 (STATION)
nl80211: Failed to set interface 5 to mode 2: -16 (Device or resource busy)
nl80211: Set mode ifindex 5 iftype 2 (STATION)
nl80211: Failed to set interface 5 to mode 2: -16 (Device or resource busy)
nl80211: Interface mode change to 2 from 3 failed
nl80211 driver initialization failed.

Thanks for your help!!!

Best Regards,

Hans

#3 lore raw

Hi Hans,

mwifiex AP functionality has been tested against following hostapd revision:

http://hostap.epitest.fi/gitweb/gitweb.cgi?p=hostap.git;a=snapshot;h=5f32f79c6e071f02076e09931adc8fc4e0ecd383;sf=tgz

Can you please test mwifiex AP setup against this hostapd revision and let me know result?

Regards,
Avinash

Quoted 67 lines · Hans Kröner

Hi Avinash,

Thanks for your reply!

i)    Firmware version is reported as "mwifiex 1.0 (14.57.5.p69)"

ii)   hostapd version is "v2.0-devel" I took it from git at
     git://w1.fi/srv/git/hostap.git and used the config in my previous post to build it. I'm at commit 5b3763336466f2c55611437cb924aeee45f7203e

iii)  Output of hostapd "-ddd" is the same as my previous post, which used "-dd". Here it is:

               random: Trying to read entropy from /dev/random Configuration file: hostapd-minimal.conf
               nl80211: interface uap0 in phy phy0
               rfkill: initial event: idx=0 type=2 op=0 soft=0 hard=0
               rfkill: initial event: idx=1 type=1 op=0 soft=0 hard=0
               nl80211: Disable use_monitor with device_ap_sme since no monitor mode support detected
               nl80211: Add own interface ifindex 5
               nl80211: Set mode ifindex 5 iftype 3 (AP)
               nl80211: Setup AP - device_ap_sme=1 use_monitor=0
               nl80211: Subscribe to mgmt frames with AP handle 0x74608 (device SME)
               nl80211: Register frame type=0xd0 nl_handle=0x74608
               nl80211: Register frame match - hexdump(len=0): [NULL]
               nl80211: Register frame command failed (type=208): ret=-95 (Operation not supported)
               nl80211: Register frame match - hexdump(len=0): [NULL]
               nl80211: Failed to set interface uap0 into AP mode
               netlink: Operstate: linkmode=0, operstate=6
               nl80211: Set mode ifindex 5 iftype 2 (STATION)
               nl80211: Failed to set interface 5 to mode 2: -16 (Device or resource busy)
               nl80211: Try mode change after setting interface down
               nl80211: Set mode ifindex 5 iftype 2 (STATION)
               nl80211: Failed to set interface 5 to mode 2: -16 (Device or resource busy)
               nl80211: Set mode ifindex 5 iftype 2 (STATION)
               nl80211: Failed to set interface 5 to mode 2: -16 (Device or resource busy)
               nl80211: Set mode ifindex 5 iftype 2 (STATION)
               nl80211: Failed to set interface 5 to mode 2: -16 (Device or resource busy)
               nl80211: Set mode ifindex 5 iftype 2 (STATION)
               nl80211: Failed to set interface 5 to mode 2: -16 (Device or resource busy)
               nl80211: Set mode ifindex 5 iftype 2 (STATION)
               nl80211: Failed to set interface 5 to mode 2: -16 (Device or resource busy)
               nl80211: Set mode ifindex 5 iftype 2 (STATION)
               nl80211: Failed to set interface 5 to mode 2: -16 (Device or resource busy)
               nl80211: Set mode ifindex 5 iftype 2 (STATION)
               nl80211: Failed to set interface 5 to mode 2: -16 (Device or resource busy)
               nl80211: Set mode ifindex 5 iftype 2 (STATION)
               nl80211: Failed to set interface 5 to mode 2: -16 (Device or resource busy)
               nl80211: Set mode ifindex 5 iftype 2 (STATION)
               nl80211: Failed to set interface 5 to mode 2: -16 (Device or resource busy)
               nl80211: Set mode ifindex 5 iftype 2 (STATION)
               nl80211: Failed to set interface 5 to mode 2: -16 (Device or resource busy)
               nl80211: Interface mode change to 2 from 3 failed
               nl80211 driver initialization failed.

Thanks for your help!!!

Best Regards,

Hans

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

#4 lore raw

Hi Avinash,

I'll try to build that version in a little while. At the time of that revision, hostapd could not be linked against libnl-3. When you built the version you tested against, were you using libnl-1 or libnl-2?

Could you provide me with the .config file you used to build hostapd so I can be sure that I'm not including things I shouldn't be, or missing important parts?

Thanks again!

Best Regards,

Hans

#5 lore raw

Hello Hans,
My libnl version libnl-1.

Also there are no changes in .config. Simply copy defconfig to .config.

Regards,
Avinash

Quoted 20 lines · Hans Kröner

Hi Avinash,

I'll try to build that version in a little while. At the time of that revision, hostapd could not be linked against libnl-3. When you built the version you tested against, were you using libnl-1 or libnl-2?

Could you provide me with the .config file you used to build hostapd so I can be sure that I'm not including things I shouldn't be, or missing important parts?

Thanks again!

Best Regards,

Hans

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

#6 lore raw
In reply to Hans Kröner

Hi Hans,

Quoted 6 lines

I wanted to test the new "AP mode" functionality in the mwifiex driver so I built a kernel off the wireless-testing tree and hostapd v2.0-devel from git. I tried this on a "DreamPlug" that uses the SD8787.

"Client mode" is working fine, but I can't seem to be able to get "AP mode" working. No matter what I do I get this output from hostapd:

[...]

Quoted 4 lines

I've tried bringing both mlan0 and uap0 interfaces down/up and different combinations of both to no avail. The patches for "AP mode" support mention that is has been tested against hostapd v2.0-devel. Is there anything I should be aware of when building hostapd?

The latest hostapd code requires mgmt handlers which we are still working on. Please checkout the commit id mentioned by Avinash.

Quoted 1 line

I'm also not sure if I'm running the correct firmware for the SD8787.

[...]

Quoted 1 line

mwifiex_sdio mmc0:0001:1: driver_version = mwifiex 1.0 (14.57.5.p69)

Please get the latest firmware image (14.66.9.p80) here:

git://git.marvell.com/mwifiex-firmware.git
http://git.marvell.com/?p=mwifiex-firmware.git;a=summary

Thanks,
Bing

#7 lore raw

I updated the firmware with the one provided by Bing in his message and built hostapd from the commit id I got from Avinash. hostapd starts up correctly and is exposing the access point.

Thanks to the both of you for your help!!!

Best Regards,

Hans