mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
beceem: Add proper carrier and link management
Start with carrier off. Don't track up/down status in driver private flag. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
This commit is contained in:
parent
d7affd0f58
commit
2515ab628f
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user