<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:arial, helvetica, sans-serif;font-size:12pt"><DIV></DIV><SPAN lang=EN>
<P>Hi Grant</P>
<P><FONT size=2>As for I know, it should work for 802.11g. e.i</FONT></P>
<P>hw_mode=g</P>
<P>channel=1</P>
<P></SPAN> </P>
<P>But it does not work for 802.11b</P>
<DIV> </DIV><EM></EM><SPAN style="COLOR: rgb(0,0,255)"><SPAN style="FONT-WEIGHT: bold">B</SPAN>est <SPAN style="FONT-WEIGHT: bold">R</SPAN>egards <BR><BR style="COLOR: rgb(0,0,255)"></SPAN><SPAN style="COLOR: rgb(0,0,255)"><SPAN style="FONT-WEIGHT: bold">A</SPAN>hmad <SPAN style="FONT-WEIGHT: bold">A</SPAN>li </SPAN><SPAN style="FONT-WEIGHT: bold; COLOR: rgb(0,0,255)">T</SPAN><SPAN style="COLOR: rgb(0,0,255)">abassam</SPAN><BR>Institute Industrial IT<BR>University of Applied Sciences, Lemgo Germany<BR>
<DIV><BR> </DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: arial, helvetica, sans-serif"><BR><FONT face=Tahoma size=2>
<DIV style="FONT-SIZE: 13px; FONT-FAMILY: arial, helvetica, sans-serif">
<HR SIZE=1>
</DIV>
<DIV style="FONT-SIZE: 13px; FONT-FAMILY: arial, helvetica, sans-serif"><B><SPAN style="FONT-WEIGHT: bold">From:</SPAN></B> Grant <emailgrant@gmail.com><BR><B><SPAN style="FONT-WEIGHT: bold">To:</SPAN></B> hostap@lists.shmoo.com<BR><B><SPAN style="FONT-WEIGHT: bold">Sent:</SPAN></B> Sunday, February 22, 2009 12:29:28 PM<BR><B><SPAN style="FONT-WEIGHT: bold">Subject:</SPAN></B> Re: Use hostapd to set master mode?<BR></FONT><BR>>> i am plumbing to get an AP with hostapd and nl80211 working too, in my<BR>>> case with driver p54_pci.<BR>>> in order to get an interface in master mode, i have to use<BR>>> # iw phy phy0 interface add myap type __ap<BR>>> this gets me a seperate virtual interface that i can then use with<BR>>> hostapd.<BR>> No you can do this much easier..<BR>> just load the driver and run hostapd.<BR>> (Of course you have to set interface=wlan0 (depends on your setup) in hostapd.conf
before)<BR><BR>Thanks to Ahmad, my interface will go into master mode after another<BR>kernel patch, but I'm getting a new<BR>error. Depending on the channel I set in hostapd.conf, I get either:<BR><BR>"ioctl[SIOCSIFFLAGS]: Operation not permitted"<BR><BR>or:<BR><BR>"could not set channel for kernel driver"<BR><BR>and hostapd fails to start. Do you know how to fix this?<BR><BR>- Grant<BR><BR><BR>>> unfortunately it is still not operational.<BR>>> i don't know if there is a better way to achieve the same effect.<BR>>> i would be interested in one.<BR>>> i am using kernel 2.6.29_rc5, iw 0.9.9 and hostapd 0.6.8.<BR>><BR>> no error messages, no crda, no logs?<BR>><BR>> Regards,<BR>> Chr<BR>_______________________________________________<BR>HostAP mailing list<BR><A href="mailto:HostAP@lists.shmoo.com"
ymailto="mailto:HostAP@lists.shmoo.com">HostAP@lists.shmoo.com</A><BR><A href="http://lists.shmoo.com/mailman/listinfo/hostap" target=_blank>http://lists.shmoo.com/mailman/listinfo/hostap</A></DIV>
<DIV style="FONT-SIZE: 13px; FONT-FAMILY: arial, helvetica, sans-serif"> </DIV>
<DIV style="FONT-SIZE: 13px; FONT-FAMILY: arial, helvetica, sans-serif">
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: arial, helvetica, sans-serif">
<DIV></DIV>
<DIV>Hi</DIV>
<DIV> Can you send the following</DIV>
<DIV>1. which chipset you are using. Atheros ??? like Atheros AR5212 etc.</DIV>
<DIV>2. which distribution. (for fedora see <A href="http://wireless.kernel.org/en/users/Download#DoIneedthisonFedora.3F" target=_blank rel=nofollow><SPAN class=yshortcuts id=lw_1235377955_0>http://wireless.kernel.org/en/users/Download#DoIneedthisonFedora.3F</SPAN></A>)</DIV>
<DIV>3. which kernel version (as for I know <SPAN class=yshortcuts id=lw_1235377955_1 style="CURSOR: hand; BORDER-BOTTOM: #0066cc 1px dashed">2.6.28</SPAN> is in Fedora 10).</DIV>
<DIV> </DIV>
<DIV>My instructions may not work on fedroa 10. because its kernel does not allow. see detail, </DIV>
<DIV><A href="http://wireless.kernel.org/en/users/Download#DoIneedthisonFedora.3F" target=_blank rel=nofollow>http://wireless.kernel.org/en/users/Download#DoIneedthisonFedora.3F</A></DIV>
<DIV> </DIV>
<DIV>By defaut ath5k is not enabled in kernel 2.6.28</DIV>
<DIV><A href="http://www.fht.lkams.kernel.org/pub/linux/kernel/v2.6/linux-2.6.28.tar.gz" target=_blank rel=nofollow><SPAN class=yshortcuts id=lw_1235377955_2>http://www.fht.lkams.kernel.org/pub/linux/kernel/v2.6/linux-2.6.28.tar.gz</SPAN></A></DIV>
<DIV>unzip and see in the following file. /net/mac80211/cfg.c </DIV>
<DIV> </DIV>
<DIV><STRONG>Lastly</STRONG>, as for I know for ath5k two for Atheros AR5xxx series patches are requried</DIV>
<DIV><STRONG>1).</STRONG></DIV>
<DIV> </DIV>
<DIV><SPAN lang=EN>
<P>--- wireless-testing.orig/net/mac80211/cfg.c 2008-10-28 10:32:35.<SPAN class=yshortcuts id=lw_1235377955_3>000000000</SPAN> +0200</P>
<P>+++ wireless-testing/net/mac80211/cfg.c 2008-10-28 10:32:40.000000000 +0200</P>
<P>@@ -26,6 +26,8 @@</P>
<P>#ifdef CONFIG_MAC80211_MESH</P>
<P>case NL80211_IFTYPE_MESH_POINT:</P>
<P>#endif</P>
<P>+ case NL80211_IFTYPE_AP:</P>
<P>+ case NL80211_IFTYPE_AP_VLAN:</P>
<P>case NL80211_IFTYPE_WDS:</P>
<P>return true;</P>
<P>default:</P>
<P><STRONG></STRONG> </P>
<P><STRONG>2.)</STRONG></P>
<P>--- wireless-testing/drivers/net/wireless/ath5k/base.c 2009-02-10 06:11:43.186470883 +0100<BR>+++ wireless-testing/drivers/net/wireless/ath5k/base.c.old 2008-11-14 09:36:40.000000000 +0100<BR>@@ -522,6 +501,7 @@<BR> hw->wiphy->interface_modes =<BR> BIT(NL80211_IFTYPE_STATION) |<BR> BIT(NL80211_IFTYPE_ADHOC) |<BR> + BIT(NL80211_IFTYPE_AP) |<BR> BIT(NL80211_IFTYPE_MESH_POINT);<BR><BR> hw->extra_tx_headroom = 2;<BR></SPAN> </P></DIV>
<DIV>As the 1). is already in compat-wireless and I informed about the 2.).</DIV>
<DIV> </DIV>
<DIV> </DIV><EM></EM><SPAN style="COLOR: rgb(0,0,255)"><SPAN style="FONT-WEIGHT: bold">B</SPAN>est <SPAN style="FONT-WEIGHT: bold">R</SPAN>egards <BR><BR style="COLOR: rgb(0,0,255)"></SPAN><SPAN style="COLOR: rgb(0,0,255)"><SPAN style="FONT-WEIGHT: bold">A</SPAN>hmad <SPAN style="FONT-WEIGHT: bold">A</SPAN>li </SPAN><SPAN style="FONT-WEIGHT: bold; COLOR: rgb(0,0,255)">T</SPAN><SPAN style="COLOR: rgb(0,0,255)">abassam</SPAN><BR>Institute Industrial IT<BR>University of Applied Sciences, Lemgo Germany<BR>
<DIV><BR> </DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: arial, helvetica, sans-serif"><BR>
<DIV style="FONT-SIZE: 13px; FONT-FAMILY: arial, helvetica, sans-serif"><FONT face=Tahoma size=2>
<HR SIZE=1>
<B><SPAN style="FONT-WEIGHT: bold">From:</SPAN></B> Grant <<SPAN class=yshortcuts id=lw_1235377955_4 style="CURSOR: hand; BORDER-BOTTOM: #0066cc 1px dashed">emailgrant@gmail.com</SPAN>><BR><B><SPAN style="FONT-WEIGHT: bold">To:</SPAN></B> Ahmad Ali Tabassam <<SPAN class=yshortcuts id=lw_1235377955_5 style="CURSOR: hand; BORDER-BOTTOM: #0066cc 1px dashed">ahmadthe8@yahoo.com</SPAN>><BR><B><SPAN style="FONT-WEIGHT: bold">Sent:</SPAN></B> Sunday, February 22, 2009 4:12:37 PM<BR><B><SPAN style="FONT-WEIGHT: bold">Subject:</SPAN></B> Re: Use hostapd to set master mode?<BR></FONT><BR>>> I'm on 2.6.28<BR>><BR>> As I know 2.6.28 has the support for ath5k, but it has to be enabled in the<BR>> kerenel. I suggest an easy way.<BR>><BR>> The easy way to use the ath5k (Atheros) with nl80211 (driver), just download<BR>> the compat-wireless for kernels >= <SPAN class=yshortcuts id=lw_1235377955_6 style="CURSOR: hand; BORDER-BOTTOM:
#0066cc 1px dashed">2.6.27</SPAN> here: It will be nice if you<BR>> follow the following steps.<BR>><BR>> 1-download<BR>><BR>> <A href="http://wireless.kernel.org/download/compat-wireless-2.6/compat-wireless-2.6.tar.bz2" target=_blank rel=nofollow><SPAN class=yshortcuts id=lw_1235377955_7>http://wireless.kernel.org/download/compat-wireless-2.6/compat-wireless-2.6.tar.bz2</SPAN></A><BR>><BR>> or download compat-wireless-old for kernels <= <SPAN class=yshortcuts id=lw_1235377955_8 style="CURSOR: hand; BORDER-BOTTOM: #0066cc 1px dashed">2.6.26</SPAN> here:<BR>><BR>> <A href="http://wireless.kernel.org/download/compat-wireless-2.6/compat-wireless-old.tar.bz2" target=_blank rel=nofollow><SPAN class=yshortcuts id=lw_1235377955_9>http://wireless.kernel.org/download/compat-wireless-2.6/compat-wireless-old.tar.bz2</SPAN></A><BR>><BR>> 2-Add the following line if you want to use the ath5k with nl80211 as the<BR>> master
mode.<BR>><BR>> --- wireless-testing/drivers/net/wireless/ath5k/base.c 2009-02-10<BR>> <SPAN class=yshortcuts id=lw_1235377955_10 style="CURSOR: hand; BORDER-BOTTOM: #0066cc 1px dashed">06:11:43</SPAN>.186470883 +0100<BR>> +++ wireless-testing/drivers/net/wireless/ath5k/base.c.old 2008-11-14<BR>> <SPAN class=yshortcuts id=lw_1235377955_11 style="CURSOR: hand; BORDER-BOTTOM: #0066cc 1px dashed">09:36:40</SPAN>.000000000 +0100<BR>> @@ -522,6 +501,7 @@<BR>> hw->wiphy->interface_modes =<BR>> BIT(NL80211_IFTYPE_STATION) |<BR>> BIT(NL80211_IFTYPE_ADHOC) |<BR>> + BIT(NL80211_IFTYPE_AP) |<BR>> BIT(NL80211_IFTYPE_MESH_POINT);<BR>><BR>>
hw->extra_tx_headroom = 2;<BR>><BR>> Note. If you are expert in the <SPAN class=yshortcuts id=lw_1235377955_12>linux kernel</SPAN>, than you can understand it<BR>> easily. Otherwise with out doing into the detail, jut follow.<BR>><BR>> a- Unzip the compat-wireless-XXX.tar<BR>><BR>> b- Add the line with plus (+) in the<BR>> compat-wireless-XXX/drivers/net/wireless/ath5k/base.c. it should be in the<BR>> same place as shown above.<BR>><BR>> c- Build and compile the compat-wireless-XXX. (make and make install)<BR>><BR>><BR>><BR>> 3- Then build and compile the hostapd for nl80211, I am sure you will<BR>> have it working<BR>><BR>> # Driver interface for drivers using the nl80211 kernel interface<BR>><BR>> CONFIG_DRIVER_NL80211=y<BR>><BR>> The linbnl must be installed on your
distribution<BR>><BR>> Note. I was working on it (ath5k), without adding the line it does not work<BR>><BR>> For more informations.<BR>><BR>> <A href="http://wireless.kernel.org/en/users/Download" target=_blank rel=nofollow><SPAN class=yshortcuts id=lw_1235377955_13>http://wireless.kernel.org/en/users/Download</SPAN></A><BR>><BR>> <A href="http://wireless.kernel.org/en/users/Drivers/ath5k" target=_blank rel=nofollow><SPAN class=yshortcuts id=lw_1235377955_14>http://wireless.kernel.org/en/users/Drivers/ath5k</SPAN></A><BR>><BR>> Best Regards<BR>><BR>> Ahmad Ali Tabassam<BR><BR>Thank you for that, but after following your instructions I still get<BR>the same "Failed to set interface ath0 to master mode" error.<BR><BR>- Grant<BR><BR><BR>>>>>> I'm being told in #madwifi that I need to use hostapd to set master<BR>>>>>> mode with ath5k since iwconfig gives
me:<BR>>>>>><BR>>>>>> ath0 does not support setting the mode to "master"<BR>>>>>><BR>>>>>> I've always set master mode with iwconfig and then started hostapd to<BR>>>>>> control authentication. How can I use hostapd to set master mode?<BR>>>>><BR>>>>> By starting it.. Just set driver=nl80211 in hostapd.conf and hostapd<BR>>>>> takes care of the details.<BR>>>><BR>>>> I just tried that but I get:<BR>>>><BR>>>> Failed to set interface ath0 to master mode.<BR>>>> nl80211 driver initialization failed.<BR>>>> rmdir[ctrl_interface]: No such file or directory<BR>>>> ELOOP: remaining socket: sock=5 eloop_data=...<BR>>>><BR>>>> Could the problem be that my udev renames wlan0 to ath0, or is that<BR>>>> just an arbitrary
label?<BR>>>><BR>>><BR>>><BR>>> What version kernel do you have? nl80211 requires a pretty recent one.<BR>><BR>> I'm on 2.6.28. I've read that should do it but it doesn't seem to. Any<BR>> ideas?<BR>><BR>> - Grant<BR></DIV></DIV></DIV><BR></DIV></DIV></div><br>
</body></html>