寻找与wifi相关的源代码 !

 与wifi相关的源代码位于/arch/arm/mach_msm/ 、/driver/net/wireless/ 又因为通过SDIO来启动,所以还有代码在/driver/mmc/ 中。

 相关的文件必然经过编译的。

在board_msm_7227a.c中

/* Ensure ar6000pm device is registered before MMC/SDC */
msm7x27a_init_ar6000pm();
        /* init buffer for atheros wlan while system up */
        msm7x27a_init_ath_buf();

static int __init msm7x27a_init_ar6000pm(void)
{
return platform_device_register(&msm_wlan_ar6000_pm_device);
}


static struct platform_device msm_wlan_ar6000_pm_device = {
.name           = "wlan_ar6000_pm_dev",
.id             = -1,
};


/* allocate atheros scatter buffer while system up */
#define AR6K_SCATTER_REQS 4
#define AR6K_SCATTER_SIZE (18*1024)


static char *ath_scatter_buf[AR6K_SCATTER_REQS];


static int __init msm7x27a_init_ath_buf(void)
{
    int i = 0;


    pr_err("%s:  Enter. \n", __func__);


    for (i = 0; i < AR6K_SCATTER_REQS; i ++)
    {
        ath_scatter_buf[i] = kmalloc(AR6K_SCATTER_SIZE, GFP_KERNEL);


        if (ath_scatter_buf[i] == NULL)
        {
            pr_err("%s:  No buffer. \n", __func__);
            return -ENOMEM;
        }


    }


    return 0;
}


/* ath_scatter_buf_get: called by ar6005 driver, for get pointer of memory allocated while system up.  */
char *ath_scatter_buf_get(int size, int index)
{
    if (size > AR6K_SCATTER_SIZE)
    {
        pr_err("%s: scatter request size=%d, larger than AR6K_SCATTER_SIZE=%d \n", __func__, size, AR6K_SCATTER_SIZE);
        return NULL;
    }


    if (index >= AR6K_SCATTER_REQS)
    {
        pr_err("%s: scatter request index=%d, larger than AR6K_SCATTER_REQS=%d \n", __func__, index, AR6K_SCATTER_REQS);
        return NULL;
        }


    if (ath_scatter_buf[index] == NULL)
    {
        pr_err("%s: ath_scatter_buf[index] == NULL, Error Error!. \n", __func__);
        return NULL;
    }


    pr_err("%s: scatter request index=%d, buff addr=0x%p. \n", __func__, index, ath_scatter_buf[index]);


    return ath_scatter_buf[index];
}


EXPORT_SYMBOL(ath_scatter_buf_get);

这几段代码删了。

发现之前不断死机重启的毛病没有了!!!!  有时间看看是什么情况···· 现在一切为了wifi~~~~

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值