Show
Ignore:
Timestamp:
01/10/08 21:10:41 (4 years ago)
Author:
benoit
Message:

Fixed a kernel panic due to incorrect linux API use
hard_start_xmit() functions must either return NETDEV_TX_OK or
NETDEV_TX_BUSY (they might also return negative errno values as well,
like -ENETDOWN)
Correct a small missing static reported by sparse
This revert part of r3075

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • madwifi/trunk/net80211/ieee80211_output.c

    r3076 r3123  
    197197/* 
    198198 * Context: process context (BHs disabled) 
     199 * It must return either NETDEV_TX_OK or NETDEV_TX_BUSY 
    199200 */ 
    200201int 
     
    233234        if (vap->iv_opmode == IEEE80211_M_MONITOR) { 
    234235                ieee80211_monitor_encap(vap, skb); 
    235                 return ieee80211_parent_queue_xmit(skb); 
     236                ieee80211_parent_queue_xmit(skb); 
     237                return NETDEV_TX_OK; 
    236238        } 
    237239         
     
    291293                                                       eh->ether_dhost); 
    292294                        /* Ignore this return code. */ 
    293                         (void)ieee80211_parent_queue_xmit(skb1); 
     295                        ieee80211_parent_queue_xmit(skb1); 
    294296                } 
    295297        } 
    296298#endif 
    297299        ieee80211_unref_node(&ni); 
    298         return ieee80211_parent_queue_xmit(skb); 
     300        ieee80211_parent_queue_xmit(skb); 
     301        return NETDEV_TX_OK; 
    299302 
    300303bad: 
     
    303306        if (ni != NULL) 
    304307                ieee80211_unref_node(&ni); 
    305         return 0; 
    306 
    307  
    308 int ieee80211_parent_queue_xmit(struct sk_buff *skb) { 
     308        return NETDEV_TX_OK; 
     309
     310 
     311/* 
     312 * skb is consumed in all cases 
     313 */ 
     314 
     315void ieee80211_parent_queue_xmit(struct sk_buff *skb) { 
    309316        struct ieee80211vap *vap = skb->dev->priv; 
    310         int ret; 
    311317 
    312318        vap->iv_devstats.tx_packets++; 
     
    317323        skb->dev = vap->iv_ic->ic_dev; 
    318324 
    319         if ((ret = dev_queue_xmit(skb)) == NET_XMIT_DROP) 
     325        if (dev_queue_xmit(skb) == NET_XMIT_DROP) 
    320326                vap->iv_devstats.tx_dropped++; 
    321327 
    322         return ret; 
    323328} 
    324329