madwifi 信道切换

正常的切换过程:

cmd "switch channel " ->

ioctl() -> system kernal ->

ieee80211_ioctl_siwfreq() : {

 

 

}

 

To reduce channel switch delay , modifications are made to madwifi driver code.

Iwill display what I found out according NetX's codes

1. struct ieee80211com {

      ......

      /*在此结构体内添加一个切换函数指针*/

      #ifdef CCK_NOASSOC /* No Association */
      void (*ic_chan_set)(struct ieee80211com *,
      struct ieee80211_channel *);
      #endif /* CCK_NOASSOC */

      .......

      }

在函数 ath_attach() 中,ic_chan_set 被指向为

ath_chan_wrapper() 【见右边】

该函数很简单,如下:

#ifdef CCK_NOASSOC /* No Association */
static void ath_chan_wrapper (struct ieee80211com *ic, struct ieee80211_channel *chan)
{
struct net_device *dev = ic->ic_dev;
struct ath_softc *sc = dev->priv;
(void)ath_chan_set(sc, chan);

}
#endif /* CCK_NOASSOC */

只有三行,直接调用ath_chan_set()函数。

 

 

######

#

#

#

#

#

#

 

in func ath_attach():

#ifdef CCK_NOASSOC
/* CCK Tx unproc */
sc->sc_txunproc = 0;
sc->sc_maxtxunproc = 0;
ic->ic_chan_set = ath_chan_wrapper;
#endif /* CCK_NOASSOC */

#

#

#

#

#

#

#

#

#

#

#

#

#

#

#

#

#

#

#

#

#

#

#

#

#

#

#

#

#

#

#

#

#

#

#

#

#

#

#

#

#

#

#

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值