Changeset 3123

Show
Ignore:
Timestamp:
01/10/08 21:10:41 (1 year 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/ath/if_ath.c

    r3122 r3123  
    29592959 * 
    29602960 * Context: process context with BHs disabled 
     2961 * It mut return either NETDEV_TX_OK or NETDEV_TX_BUSY 
    29612962 */ 
    29622963static int 
     
    58745875 * 
    58755876 * NB: MAY ALLOCATE */ 
    5876 struct sk_buff * 
     5877static struct sk_buff * 
    58775878ath_skb_removepad(struct sk_buff *skb, unsigned int copy_skb) 
    58785879{ 
  • madwifi/trunk/net80211/ieee80211_input.c

    r3091 r3123  
    37373737        M_PWR_SAV_SET(skb);             /* ensure MORE_DATA bit is set correctly */ 
    37383738 
    3739         (void)ieee80211_parent_queue_xmit(skb);       /* Submit to parent device, including updating stats */ 
     3739        ieee80211_parent_queue_xmit(skb);     /* Submit to parent device, including updating stats */ 
    37403740} 
    37413741 
  • 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 
  • madwifi/trunk/net80211/ieee80211_power.c

    r3075 r3123  
    210210 * The new packet is placed on the node's saved queue, and the TIM 
    211211 * is changed, if necessary. 
     212 * It must return either NETDEV_TX_OK or NETDEV_TX_BUSY 
    212213 */ 
    213214int 
     
    232233#endif 
    233234                ieee80211_unref_node(&SKB_CB(skb)->ni); 
    234                 ieee80211_dev_kfree_skb(&skb); 
    235235                return NETDEV_TX_BUSY; 
    236236        } 
     
    340340#endif 
    341341 
    342                         (void)ieee80211_parent_queue_xmit(skb); 
     342                        ieee80211_parent_queue_xmit(skb); 
    343343                } 
    344344                vap->iv_set_tim(ni, 0); 
     
    381381                                if (skb == NULL) 
    382382                                        break; 
    383                                 (void)ieee80211_parent_queue_xmit(skb); 
     383                                ieee80211_parent_queue_xmit(skb); 
    384384                        } 
    385385                } 
  • madwifi/trunk/net80211/ieee80211_proto.h

    r3075 r3123  
    7373        int, int, u_int64_t); 
    7474int ieee80211_hardstart(struct sk_buff *, struct net_device *); 
    75 int ieee80211_parent_queue_xmit(struct sk_buff *); 
     75void ieee80211_parent_queue_xmit(struct sk_buff *); 
    7676int ieee80211_send_nulldata(struct ieee80211_node *); 
    7777int ieee80211_send_qosnulldata(struct ieee80211_node *, int);