Gmane
Favicon
From: reom <acidreom <at> hotmail.com>
Subject: channel selecting problem with athchans
Newsgroups: gmane.linux.drivers.madwifi.devel
Date: 2008-08-08 05:32:15 GMT (22 weeks and 23 hours ago)
i tested athchans command because i wanted to make my station device scans 
only some specific channels.

but after i select channels using athchans command, station still scans some 
other channels that i didn't set.

so i searched madwifi driver code and i think this parts are the reason of 
problem.

in ieee80211_scan_sta.c

sta_start()
{
...
	/*
	 * Add the channels from the ic (from HAL) that are not present
	 * in the staScanTable.
	 */
	for (i = 0; i < ic->ic_nchans; i++) {
		c = &ic->ic_channels[i];
		/*
		 * scan dynamic turbo channels in normal mode.
		 */
		if (IEEE80211_IS_CHAN_DTURBO(c))
			continue;
		mode = ieee80211_chan2mode(c);
		if (vap->iv_des_mode != IEEE80211_MODE_AUTO) {
			/*
			 * If a desired mode was specified, scan only 
			 * channels that satisfy that constraint.
			 */
			if (vap->iv_des_mode != mode)
				continue;

		}
		if (!checktable(staScanTable, c))
			ss->ss_chans[ss->ss_last++] = c;
	}
...
}

madwifi choose scan channel twice.
one from staScanTable. 
second from hal (channels in hal but not in staScanTable).

during the fist process , station doesn't choose channels that are not active.
bur for the second, station doesn't care that channel is active or not.
i think this is the reason why my station still scan other channels i don't 
want.

is it intented? or is there something wrong in my guess? or is it a bug?

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/