<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Mike Gerwitz &#187; kernel</title>
	<atom:link href="http://mikegerwitz.com/tags/kernel/feed/" rel="self" type="application/rss+xml" />
	<link>http://mikegerwitz.com</link>
	<description>Free Software Hacker</description>
	<lastBuildDate>Mon, 07 May 2012 14:14:29 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>RaLink Wireless &#8211; Random Disconnects (No ProbeResp)</title>
		<link>http://mikegerwitz.com/ralink-wireless-random-disconnects-no-proberesp/</link>
		<comments>http://mikegerwitz.com/ralink-wireless-random-disconnects-no-proberesp/#comments</comments>
		<pubDate>Wed, 15 Oct 2008 10:32:25 +0000</pubDate>
		<dc:creator>Mike Gerwitz</dc:creator>
				<category><![CDATA[GNU/Linux]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.mikegerwitz.com/2008/10/15/ralink-wireless-random-disconnects-no-proberesp/</guid>
		<description><![CDATA[Some time ago, while using Gentoo, I modified the kernel to stop a wireless problem I had been having and forgot to make a post about it. Now, I&#8217;ve switched by to Ubuntu (didn&#8217;t have time to administer Gentoo and compile everything, and I missed Ubuntu). Luckily, version 8.10 BETA was released just a few [...]]]></description>
			<content:encoded><![CDATA[<p>Some time ago, while using Gentoo, I modified the kernel to stop a wireless problem I had been having and forgot to make a post about it. Now, I&#8217;ve switched by to Ubuntu (didn&#8217;t have time to administer Gentoo and compile everything, and I missed Ubuntu). Luckily, version 8.10 BETA was released just a few days earlier and I was able to upgrade, getting the 2.6.27 kernel (required so my computer wouldn&#8217;t randomly shut down (other computers may freeze instead) due to the drivers, while the net was in use).</p>
<p>For settings up RaLink drivers for your wireless device, please see a previous entry: <a href="http://www.mikegerwitz.com/2008/08/30/rt61-rt2x00-ralink-linux-driver-installation/">RT61 / RT2×00 RaLink Linux Driver Installation</a></p>
<p>In many previous kernel versions, including 2.6.27, my wireless would randomly go down. I checked <tt>dmesg | tail</tt> and found that I received the following error:</p>
<pre>
[41884.647257] wlan0: authenticate with AP 00:15:e9:76:1a:ee
[41884.658208] wlan0: authenticated
[41884.658208] wlan0: associate with AP 00:15:e9:76:1a:ee
[41884.668257] wlan0: RX ReassocResp from 00:15:e9:76:1a:ee (capab=0x431 status=0 aid=5)
[41884.668257] wlan0: associated
[41892.844239] wlan0: no IPv6 routers present
[68822.729255] wlan0: No ProbeResp from current AP 00:15:e9:76:1a:ee - assume out of range
</pre>
<p>For more information, please see my posts in the following bug report:<br />
<a href="https://bugs.launchpad.net/ubuntu/+source/linux/+bug/200500">https://bugs.launchpad.net/ubuntu/+source/linux/+bug/200500</a><br />
<a href="https://bugs.launchpad.net/ubuntu/+source/linux/+bug/200500/comments/35">https://bugs.launchpad.net/ubuntu/+source/linux/+bug/200500/comments/35</a></p>
<p>Within the bug report, a link was referenced to modify the kernel, increasing the amount of time to wait for a response, so it doesn&#8217;t assume it&#8217;s out of range and disconnect. The problem is &#8211; the file to edit didn&#8217;t exist anymore in 2.6.27:</p>
<p><a href="http://rt2x00.serialmonkey.com/phpBB/viewtopic.php?f=5&amp;t=2081&amp;p=30312&amp;hilit=No+ProbeResp+from+current+AP#p30312" rel="nofollow">http://<wbr></wbr>rt2x00.<wbr></wbr>serialmonkey.<wbr></wbr>com/phpBB/<wbr></wbr>viewtopic.<wbr></wbr>php?f=5&amp;<wbr></wbr>t=2081&amp;<wbr></wbr>p=30312&amp;<wbr></wbr>hilit=No+<wbr></wbr>ProbeResp+<wbr></wbr>from+current+<wbr></wbr>AP#p30312</a></p>
<p>First, you must obtain your kernel source. In gentoo, emerge the vanilla or gentoo sources. In Ubuntu, run the following commands (taken and modified from https://help.ubuntu.com/community/Kernel/Compile):</p>

<div class="wp_codebox"><table><tr id="p407"><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code" id="p40code7"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">su</span>
<span style="color: #666666; font-style: italic;"># (Enter root password - if it's not set, run &quot;sudo su&quot; instead)</span>
$ <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> linux-source
$ <span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src
$ <span style="color: #c20cb9; font-weight: bold;">tar</span> xjvf <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>linux-source-<span style="color: #000000; font-weight: bold;">*</span>.tar.bz2
$ <span style="color: #7a0874; font-weight: bold;">cd</span> linux-source-<span style="color: #000000; font-weight: bold;">*</span>
$ <span style="color: #c20cb9; font-weight: bold;">vi</span> .<span style="color: #000000; font-weight: bold;">/</span>net<span style="color: #000000; font-weight: bold;">/</span>mac80211<span style="color: #000000; font-weight: bold;">/</span>mlme.c <span style="color: #666666; font-style: italic;">#or use your favorite text editor</span></pre></td></tr></table></div>

<p>In the file <tt>mlme.c</tt>, find the following line:</p>

<div class="wp_codebox"><table><tr id="p408"><td class="line_numbers"><pre>1
</pre></td><td class="code" id="p40code8"><pre class="c" style="font-family:monospace;"><span style="color: #339933;">#define IEEE80211_MONITORING_INTERVAL (2 * HZ)</span></pre></td></tr></table></div>

<p>Modify it so it looks like this (we&#8217;re changing the &#8220;2&#8243; to &#8220;100&#8243;):</p>

<div class="wp_codebox"><table><tr id="p409"><td class="line_numbers"><pre>1
</pre></td><td class="code" id="p40code9"><pre class="c" style="font-family:monospace;"><span style="color: #339933;">#define IEEE80211_MONITORING_INTERVAL (100 * HZ)</span></pre></td></tr></table></div>

<p>Save and close the file. Let&#8217;s get to building it. With Gentoo, you would simply run &#8220;make &amp;&amp; make modules_install&#8221;, navigate to &#8220;arch/your_arch/boot&#8221;, find the image, and copy it to /boot. Then modify GRUB/Lilo accordingly. Since Gentoo users probably know what they&#8217;re doing, I&#8217;ll focus on Ubuntu, which I recently figured out how to do via the above wiki. Ubuntu does it oddly.</p>
<p>Using the commands in the wiki, I had some trouble. It was trying to build using the &#8220;xen&#8221; archeticture &#8211; definatly not what I have. I wanted amd64 (which is x86_64 in the eyes of the kernel). So, I added the &#8211;arch option to the below commands. Be sure to specify YOUR architecture (such as i386). Also note the &#8211;apend-to-version line. This will append text to the kernel version (which&#8217;ll show up in <tt>uname -r</tt>). Remove it if you don&#8217;t want anything. If you do, modify the text in the command.</p>
<p><strong>Multi-core/multiple processors: </strong>If you have multiple processors or cores (such as dual-core), type the following command before continuing, replacing the number with <tt>1 + number of processors/cores</tt>. This will increase the compiling speed (trust me, you want that) by utilizing all available processors/cores. If you&#8217;re busy doing something else, you may wish not to set it, so your computer doesn&#8217;t slow down too much.</p>

<div class="wp_codebox"><table><tr id="p4010"><td class="line_numbers"><pre>1
2
</pre></td><td class="code" id="p40code10"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># Do this only if you have multiple processors (see above paragraph)</span>
$ <span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">CONCURRENCY_LEVEL</span>=<span style="color: #000000;">3</span></pre></td></tr></table></div>


<div class="wp_codebox"><table><tr id="p4011"><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code" id="p40code11"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #660033;">-vi</span> <span style="color: #000000; font-weight: bold;">/</span>boot<span style="color: #000000; font-weight: bold;">/</span>config-<span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">uname</span> -r<span style="color: #000000; font-weight: bold;">`</span> .config <span style="color: #666666; font-style: italic;">#copy current configuration to use when building kernel</span>
$ make-kpkg <span style="color: #660033;">--arch</span>=amd64 clean
$ fakeroot make-kpkg <span style="color: #660033;">--arch</span>=amd64 <span style="color: #660033;">--initrd</span> <span style="color: #660033;">--append-to-version</span>=-some-string-here kernel-image kernel-headers</pre></td></tr></table></div>

<p>Go grab something to eat, watch TV, throw pebbles at young children &#8211; something to pass the time. It&#8217;ll take a while.</p>
<p>After it is complete, in Ubuntu, this will have created *.deb files and placed them in the parent directory (in this case, /usr/src). Let&#8217;s install them!</p>

<div class="wp_codebox"><table><tr id="p4012"><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code" id="p40code12"><pre class="bash" style="font-family:monospace;">$ <span style="color: #7a0874; font-weight: bold;">echo</span> vesafb <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">tee</span> <span style="color: #660033;">-a</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>initramfs-tools<span style="color: #000000; font-weight: bold;">/</span>modules
$ <span style="color: #7a0874; font-weight: bold;">echo</span> fbcon <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">tee</span> <span style="color: #660033;">-a</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>initramfs-tools<span style="color: #000000; font-weight: bold;">/</span>modules
$ <span style="color: #c20cb9; font-weight: bold;">dpkg</span> <span style="color: #660033;">-i</span> linux-<span style="color: #000000; font-weight: bold;">*</span>.deb</pre></td></tr></table></div>

<p>After that, check out the following link for building the restricted modules:<br />
<a href="https://help.ubuntu.com/community/CustomRestrictedModule">https://help.ubuntu.com/community/CustomRestrictedModules</a></p>
<p>Then, of course, modify GRUB to boot the new image. Good luck!</p>]]></content:encoded>
			<wfw:commentRss>http://mikegerwitz.com/ralink-wireless-random-disconnects-no-proberesp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

