<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>&nbsp;</P>
<P>But it does not work for 802.11b</P>
<DIV>&nbsp;</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>&nbsp;</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 &lt;emailgrant@gmail.com&gt;<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>&gt;&gt; i am plumbing to get an AP with hostapd and nl80211 working too, in my<BR>&gt;&gt; case with driver p54_pci.<BR>&gt;&gt; in order to get an interface in master mode, i have to use<BR>&gt;&gt; # iw phy phy0 interface add myap type __ap<BR>&gt;&gt; this gets me a seperate virtual interface that i can then use with<BR>&gt;&gt; hostapd.<BR>&gt; No you can do this much easier..<BR>&gt; just load the driver and run hostapd.<BR>&gt; (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.&nbsp; 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.&nbsp; Do you know how to fix this?<BR><BR>- Grant<BR><BR><BR>&gt;&gt; unfortunately it is still not operational.<BR>&gt;&gt; i don't know if there is a better way to achieve the&nbsp; same effect.<BR>&gt;&gt; i&nbsp; would be interested in one.<BR>&gt;&gt; i am using kernel 2.6.29_rc5, iw 0.9.9 and hostapd 0.6.8.<BR>&gt;<BR>&gt; no error messages, no crda, no logs?<BR>&gt;<BR>&gt; Regards,<BR>&gt;&nbsp; &nbsp; &nbsp; &nbsp; 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">&nbsp;</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>&nbsp; Can you send the following</DIV>
<DIV>1. which chipset&nbsp;you are using. Atheros ???&nbsp; like Atheros AR5212 etc.</DIV>
<DIV>2.&nbsp;which&nbsp;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&nbsp;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>&nbsp;</DIV>
<DIV>My instructions may not work on fedroa 10. because its kernel does not allow.&nbsp; see&nbsp;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>&nbsp;</DIV>
<DIV>By&nbsp;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>&nbsp;</DIV>
<DIV><STRONG>Lastly</STRONG>, as for I know for ath5k two&nbsp;for Atheros AR5xxx series&nbsp;patches are requried</DIV>
<DIV><STRONG>1).</STRONG></DIV>
<DIV>&nbsp;</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>&nbsp;</P>
<P><STRONG>2.)</STRONG></P>
<P>--- wireless-testing/drivers/net/wireless/ath5k/base.c&nbsp; &nbsp; &nbsp; 2009-02-10 06:11:43.186470883 +0100<BR>+++ wireless-testing/drivers/net/wireless/ath5k/base.c.old&nbsp; &nbsp; &nbsp; 2008-11-14&nbsp;09:36:40.000000000 +0100<BR>@@ -522,6 +501,7 @@<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; hw-&gt;wiphy-&gt;interface_modes =<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BIT(NL80211_IFTYPE_STATION) |<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BIT(NL80211_IFTYPE_ADHOC) |<BR>&nbsp;+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; BIT(NL80211_IFTYPE_AP) |<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BIT(NL80211_IFTYPE_MESH_POINT);<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; hw-&gt;extra_tx_headroom = 2;<BR></SPAN>&nbsp;</P></DIV>
<DIV>As the 1). is already in compat-wireless and I informed about the 2.).</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</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>&nbsp;</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 &lt;<SPAN class=yshortcuts id=lw_1235377955_4 style="CURSOR: hand; BORDER-BOTTOM: #0066cc 1px dashed">emailgrant@gmail.com</SPAN>&gt;<BR><B><SPAN style="FONT-WEIGHT: bold">To:</SPAN></B> Ahmad Ali Tabassam &lt;<SPAN class=yshortcuts id=lw_1235377955_5 style="CURSOR: hand; BORDER-BOTTOM: #0066cc 1px dashed">ahmadthe8@yahoo.com</SPAN>&gt;<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>&gt;&gt; I'm on 2.6.28<BR>&gt;<BR>&gt; As I know 2.6.28 has the support for ath5k, but it has to be enabled in the<BR>&gt; kerenel. I suggest an easy way.<BR>&gt;<BR>&gt; The easy way to use the ath5k (Atheros) with nl80211 (driver), just download<BR>&gt; the compat-wireless for kernels &gt;= <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>&gt; follow the following steps.<BR>&gt;<BR>&gt; 1-download<BR>&gt;<BR>&gt; <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>&gt;<BR>&gt; or download compat-wireless-old for kernels &lt;= <SPAN class=yshortcuts id=lw_1235377955_8 style="CURSOR: hand; BORDER-BOTTOM: #0066cc 1px dashed">2.6.26</SPAN> here:<BR>&gt;<BR>&gt; <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>&gt;<BR>&gt; 2-Add the following line if you want to use the ath5k with nl80211 as the<BR>&gt; master
 mode.<BR>&gt;<BR>&gt; --- wireless-testing/drivers/net/wireless/ath5k/base.c&nbsp; &nbsp; &nbsp; 2009-02-10<BR>&gt; <SPAN class=yshortcuts id=lw_1235377955_10 style="CURSOR: hand; BORDER-BOTTOM: #0066cc 1px dashed">06:11:43</SPAN>.186470883 +0100<BR>&gt; +++ wireless-testing/drivers/net/wireless/ath5k/base.c.old&nbsp; &nbsp; &nbsp; 2008-11-14<BR>&gt; <SPAN class=yshortcuts id=lw_1235377955_11 style="CURSOR: hand; BORDER-BOTTOM: #0066cc 1px dashed">09:36:40</SPAN>.000000000 +0100<BR>&gt; @@ -522,6 +501,7 @@<BR>&gt;&nbsp; &nbsp; &nbsp; &nbsp; hw-&gt;wiphy-&gt;interface_modes =<BR>&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; BIT(NL80211_IFTYPE_STATION) |<BR>&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; BIT(NL80211_IFTYPE_ADHOC) |<BR>&gt; +&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; BIT(NL80211_IFTYPE_AP) |<BR>&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; BIT(NL80211_IFTYPE_MESH_POINT);<BR>&gt;<BR>&gt;&nbsp;
 &nbsp; &nbsp; &nbsp; hw-&gt;extra_tx_headroom = 2;<BR>&gt;<BR>&gt; Note. If you are expert in the <SPAN class=yshortcuts id=lw_1235377955_12>linux kernel</SPAN>, than you can understand it<BR>&gt; easily. Otherwise with out doing into the detail, jut follow.<BR>&gt;<BR>&gt; a-&nbsp; &nbsp; Unzip the compat-wireless-XXX.tar<BR>&gt;<BR>&gt; b-&nbsp; &nbsp; Add the line with plus (+) in the<BR>&gt; compat-wireless-XXX/drivers/net/wireless/ath5k/base.c. it should be in the<BR>&gt; same place as shown above.<BR>&gt;<BR>&gt; c-&nbsp; &nbsp; Build and compile the compat-wireless-XXX. (make and make install)<BR>&gt;<BR>&gt;<BR>&gt;<BR>&gt; 3-&nbsp; &nbsp; &nbsp; Then build and compile the hostapd for nl80211, I am sure you will<BR>&gt; have it working<BR>&gt;<BR>&gt; # Driver interface for drivers using the nl80211 kernel interface<BR>&gt;<BR>&gt;&nbsp; &nbsp; CONFIG_DRIVER_NL80211=y<BR>&gt;<BR>&gt; The linbnl must be installed on your
 distribution<BR>&gt;<BR>&gt; Note. I was working on it (ath5k), without adding the line it does not work<BR>&gt;<BR>&gt; For more informations.<BR>&gt;<BR>&gt; <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>&gt;<BR>&gt; <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>&gt;<BR>&gt; Best Regards<BR>&gt;<BR>&gt; 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>&gt;&gt;&gt;&gt;&gt; I'm being told in #madwifi that I need to use hostapd to set master<BR>&gt;&gt;&gt;&gt;&gt; mode with ath5k since iwconfig gives
 me:<BR>&gt;&gt;&gt;&gt;&gt;<BR>&gt;&gt;&gt;&gt;&gt; ath0 does not support setting the mode to "master"<BR>&gt;&gt;&gt;&gt;&gt;<BR>&gt;&gt;&gt;&gt;&gt; I've always set master mode with iwconfig and then started hostapd to<BR>&gt;&gt;&gt;&gt;&gt; control authentication.&nbsp; How can I use hostapd to set master mode?<BR>&gt;&gt;&gt;&gt;<BR>&gt;&gt;&gt;&gt; By starting it.. Just set driver=nl80211 in hostapd.conf and hostapd<BR>&gt;&gt;&gt;&gt; takes care of the details.<BR>&gt;&gt;&gt;<BR>&gt;&gt;&gt; I just tried that but I get:<BR>&gt;&gt;&gt;<BR>&gt;&gt;&gt; Failed to set interface ath0 to master mode.<BR>&gt;&gt;&gt; nl80211 driver initialization failed.<BR>&gt;&gt;&gt; rmdir[ctrl_interface]: No such file or directory<BR>&gt;&gt;&gt; ELOOP: remaining socket: sock=5 eloop_data=...<BR>&gt;&gt;&gt;<BR>&gt;&gt;&gt; Could the problem be that my udev renames wlan0 to ath0, or is that<BR>&gt;&gt;&gt; just an arbitrary
 label?<BR>&gt;&gt;&gt;<BR>&gt;&gt;<BR>&gt;&gt;<BR>&gt;&gt; What version kernel do you have?&nbsp; nl80211 requires a pretty recent one.<BR>&gt;<BR>&gt; I'm on 2.6.28.&nbsp; I've read that should do it but it doesn't seem to.&nbsp; Any<BR>&gt; ideas?<BR>&gt;<BR>&gt; - Grant<BR></DIV></DIV></DIV><BR></DIV></DIV></div><br>



      </body></html>