On Thu, Nov 26, 2015 at 2:07 PM, Alexey Brodkin <alexey.brod...@synopsys.com> wrote: > Hi Jonas, > > On Mon, 2015-11-23 at 16:48 +0100, Jonas Gorski wrote: >> On Mon, Nov 23, 2015 at 9:21 AM, Alexey Brodkin >> <alexey.brod...@synopsys.com> wrote: >> > Hi Felix, Jonas, >> > >> > While playing with my AXS101 board and USB WI-Fi dongles I bumped in >> > a couple of issues. Fortunately I found at least one dongle that >> > works quite nice. That's TP-Link TL-WN721N (or its WN722N sibling) >> > which is based on Atheros AR9271 chip even though it did require >> > one unexpected tweak. >> > >> > For starters I just selected "kmod-ath9k-htc" in menuconfig and >> > on boot saw USB device recognized, its firmware was loaded, >> > "wifi detect" recognized it as well, see log below. >> > >> > But then "wlan0" interface was not created on "wifi" command. >> > >> > After some googling I somehow came to resolution that "hostapd" >> > package installation fixes this problem. And indeed once I got >> > image rebuilt with "CONFIG_PACKAGE_hostapd=y" all worked as expected >> > and I was able to use my board as a Wi-Fi access point. >> > >> > So the question is if this is expected (requirement for "hostapd") >> > [for "ath9k_htc"]? >> >> Yes, hostapd[-mini] (or wpad[-mini]) is required for AP mode, and >> wpasupplicant or wpad for encrypted STA mode. > > Ooops I didn't realize that right away, indeed I'm trying to setup WiFi > AP and hostAPD (which is really just "host AP Daemon") or alike is a must. > > The next question would be which option should I use then? > 1) good olde HostAPD > 2) its -mini sibling > 3) wpad > 4) its -mini sibling
OpenWrt default is wpad-mini for wifi capable devices (which is just a unified binary of hostapd and wpasupplicant to prevent code duplication and save space). The non-mini versions add support for enterprisey stuff like radius athentication, which aren't needed for most home setups. >> > Another minor issue is that USB dongle gets recognized a bit late >> > so that automatic "wifi detect" gets already executed and >> > "/etc/config/wireless" isn't created. That requires manual execution of >> > "wifi detect > /etc/config/wireless". Essentially extending delay in >> > "package/base-files/files/etc/init.d/boot" makes a difference: >> > ---------------------->8------------------- >> > # allow wifi modules time to settle >> > sleep 15 # instead of 1 >> > ---------------------->8------------------- >> > but I'm not sure if we want to do that change for all devices. >> > Then if there's a better way to make auto population of >> > "/etc/config/wireless"? >> >> Likely the firmware is loaded asynchronously, so the _probe function >> returns quickly. Our workaround in OpenWrt for other drivers is to >> make the _probe function wait for the firmware to have loaded. and >> thus the wifi device registered in the linux kernel. This will ensure >> the wifi subsystem knows about it when wifi detect is called. This >> seems to be missing for ath9k-htc. > > May I get a reference to an example of that workaround? see package/kernel/mac80211/patches/861-brcmfmac-register-wiphy-s-during-module_init.patch package/kernel/mac80211/patches/921-ath10k_init_devices_synchronously.patch package/kernel/mac80211/patches/940-mwl8k_init_devices_synchronously.patch Jonas _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel