This patch is just FOR TESTING! It adds hw specific value for the channel to the configuration structure so drivers can switch channels more easily. Index: netdev/net/ieee80211/ieee80211.c =================================================================== --- netdev.orig/net/ieee80211/ieee80211.c 2006-01-05 14:41:56.000000000 +0100 +++ netdev/net/ieee80211/ieee80211.c 2006-01-05 14:41:59.000000000 +0100 @@ -4640,6 +4640,7 @@ int ieee80211_update_hw(struct net_devic local->conf.freq = local->hw->modes[0].channels[0].freq; local->conf.channel = local->hw->modes[0].channels[0].chan; + local->conf.channel_val = local->hw->modes[0].channels[0].val; /* FIXME: Invoke config to allow driver to set the channel. */ return 0; Index: netdev/include/net/ieee80211.h =================================================================== --- netdev.orig/include/net/ieee80211.h 2006-01-05 14:41:56.000000000 +0100 +++ netdev/include/net/ieee80211.h 2006-01-05 14:41:59.000000000 +0100 @@ -235,6 +235,7 @@ struct ieee80211_tx_status { struct ieee80211_conf { int channel; /* IEEE 802.11 channel number */ int freq; /* MHz */ + int channel_val; /* hw specific value for the channel */ int mode; /* IW_MODE_ */ @@ -325,6 +326,7 @@ struct ieee80211_scan_conf { * on */ int scan_freq; /* new freq in MHz to switch to for passive scan */ + int scan_channel_val; /* hw specific value for the channel */ int scan_phymode; /* MODE_IEEE80211A, .. */ unsigned char scan_power_level; unsigned char scan_antenna_max; @@ -333,6 +335,7 @@ struct ieee80211_scan_conf { int running_channel; /* IEEE 802.11 channel number we operate on * normally */ int running_freq; /* freq in MHz we're operating on normally */ + int running_channel_val; /* hw specific value for the channel */ int running_phymode; unsigned char running_power_level; unsigned char running_antenna_max; Index: netdev/net/ieee80211/ieee80211_i.h =================================================================== --- netdev.orig/net/ieee80211/ieee80211_i.h 2006-01-05 14:41:56.000000000 +0100 +++ netdev/net/ieee80211/ieee80211_i.h 2006-01-05 14:41:59.000000000 +0100 @@ -489,6 +489,7 @@ struct ieee80211_local { unsigned long last_scan_completed; struct timer_list scan_timer; int scan_oper_channel; + int scan_oper_channel_val; int scan_oper_power_level; int scan_oper_freq; int scan_oper_phymode; Index: netdev/net/ieee80211/ieee80211_scan.c =================================================================== --- netdev.orig/net/ieee80211/ieee80211_scan.c 2006-01-05 14:41:56.000000000 +0100 +++ netdev/net/ieee80211/ieee80211_scan.c 2006-01-05 14:41:59.000000000 +0100 @@ -153,6 +153,7 @@ static void ieee80211_scan_start(struct conf->scan_channel = chan->chan; conf->scan_freq = chan->freq; + conf->scan_channel_val = chan->val; conf->scan_phymode = mode->mode; conf->scan_power_level = chan->power_level; conf->scan_antenna_max = chan->antenna_max; @@ -272,6 +273,7 @@ static void ieee80211_scan_handler(unsig conf.running_freq = local->conf.freq; conf.running_channel = local->conf.channel; conf.running_phymode = local->conf.phymode; + conf.running_channel_val = local->conf.channel_val; conf.running_power_level = local->conf.power_level; conf.running_antenna_max = local->conf.antenna_max; Index: netdev/net/ieee80211/ieee80211_ioctl.c =================================================================== --- netdev.orig/net/ieee80211/ieee80211_ioctl.c 2006-01-05 14:41:56.000000000 +0100 +++ netdev/net/ieee80211/ieee80211_ioctl.c 2006-01-05 14:41:59.000000000 +0100 @@ -1701,6 +1701,7 @@ int ieee80211_ioctl_siwfreq(struct net_d continue; local->conf.channel = chan->chan; + local->conf.channel_val = chan->val; local->conf.power_level = chan->power_level; local->conf.freq = chan->freq; local->conf.phymode = mode->mode; Index: netdev/net/ieee80211/ieee80211_sta.c =================================================================== --- netdev.orig/net/ieee80211/ieee80211_sta.c 2006-01-05 14:41:56.000000000 +0100 +++ netdev/net/ieee80211/ieee80211_sta.c 2006-01-05 14:41:59.000000000 +0100 @@ -2370,6 +2370,7 @@ static void ieee80211_sta_save_oper_chan { struct ieee80211_local *local = dev->priv; local->scan_oper_channel = local->conf.channel; + local->scan_oper_channel_val = local->conf.channel_val; local->scan_oper_power_level = local->conf.power_level; local->scan_oper_freq = local->conf.freq; local->scan_oper_phymode = local->conf.phymode; @@ -2381,6 +2382,7 @@ static int ieee80211_sta_restore_oper_ch { struct ieee80211_local *local = dev->priv; local->conf.channel = local->scan_oper_channel; + local->conf.channel_val = local->scan_oper_channel_val; local->conf.power_level = local->scan_oper_power_level; local->conf.freq = local->scan_oper_freq; local->conf.phymode = local->scan_oper_phymode; @@ -2467,6 +2469,7 @@ static void ieee80211_sta_scan_timer(uns #endif local->conf.channel = chan->chan; + local->conf.channel_val = chan->val; local->conf.power_level = chan->power_level; local->conf.freq = chan->freq; local->conf.phymode = mode->mode;