主题 : 求解wifi驱动程序 复制链接 | 浏览器收藏 | 打印
级别: 新手上路
UID: 58070
精华: 0
发帖: 14
金钱: 75 两
威望: 15 点
综合积分: 28 分
注册时间: 2011-11-02
最后登录: 2012-05-29
楼主  发表于: 2012-03-06 20:52

 求解wifi驱动程序

最近正在研究tiny6410SDwifi的驱动程序。main.c其中有一段
/**
*  @brief This function opens the ethX interface
*
*  @param dev     A pointer to net_device structure
*  @return        0 or -EBUSY if monitor mode active
*/
static int     lbs_deb_enter(struct net_device *dev)
{
    struct lbs_private *priv = dev->ml_priv;      
    int ret = 0;

    lbs_deb_enter(LBS_DEB_NET);

    spin_lock_irq(&priv->driver_lock);
    priv->stopping = false;

    if (priv->connect_status == LBS_CONNECTED)
        netif_carrier_on(dev);
    else
        netif_carrier_off(dev);

    if (!priv->tx_pending_len)
        netif_wake_queue(dev);

    spin_unlock_irq(&priv->driver_lock);
    lbs_deb_leave_args(LBS_DEB_NET, "ret %d", ret);
    return ret;
}
完全不太懂,能每句话大致翻一下么?
拜托了