提交 2515ab62 编写于 作者: S Stephen Hemminger

beceem: Add proper carrier and link management

Start with carrier off.
Don't track up/down status in driver private flag.
Signed-off-by: NStephen Hemminger <shemminger@vyatta.com>
上级 d7affd0f
......@@ -498,7 +498,6 @@ struct _MINI_ADAPTER
int irq;
unsigned long chip_id;
unsigned int bFlashBoot;
unsigned int if_up;
// spinlock_t sleeper_lock;
atomic_t rdm_wrm_access;
atomic_t tx_rx_access;
......
......@@ -17,7 +17,6 @@ static INT bcm_open(struct net_device *dev)
BCM_DEBUG_PRINT(Adapter,DBG_TYPE_INITEXIT, DRV_ENTRY, DBG_LVL_ALL, "======>");
if(Adapter->fw_download_done==FALSE)
return -EINVAL;
Adapter->if_up=1;
if(Adapter->LinkUpStatus == 1){
if(netif_queue_stopped(Adapter->dev)){
netif_carrier_on(Adapter->dev);
......@@ -34,7 +33,6 @@ static INT bcm_close(struct net_device *dev)
PMINI_ADAPTER Adapter = GET_BCM_ADAPTER(dev);
BCM_DEBUG_PRINT(Adapter,DBG_TYPE_INITEXIT, DRV_ENTRY, DBG_LVL_ALL, "=====>");
Adapter->if_up=0;
if(!netif_queue_stopped(dev)) {
netif_carrier_off(dev);
netif_stop_queue(dev);
......@@ -145,6 +143,7 @@ int register_networkdev(PMINI_ADAPTER Adapter)
net->ethtool_ops = &bcm_ethtool_ops;
net->mtu = MTU_SIZE; /* 1400 Bytes */
net->tx_queue_len = TX_QLEN;
netif_carrier_off(net);
SET_NETDEV_DEV(net, &uintf->dev);
SET_NETDEV_DEVTYPE(net, &wimax_type);
......
......@@ -148,7 +148,7 @@ static void read_bulk_callback(struct urb *urb)
atomic_add(pLeader->PLength, &Adapter->GoodRxByteCount);
BCM_DEBUG_PRINT(psIntfAdapter->psAdapter,DBG_TYPE_RX, RX_DATA, DBG_LVL_ALL, "Recived Data pkt of len :0x%X", pLeader->PLength);
if(Adapter->if_up)
if(netif_running(Adapter->dev))
{
/* Moving ahead by ETH_HLEN to the data ptr as received from FW */
skb_pull(skb, ETH_HLEN);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册