Ticket #417: madwifi-parent_queue.2.diff

File madwifi-parent_queue.2.diff, 3.5 kB (added by mentor, 6 years ago)

Slightly better.

  • net80211/ieee80211_input.c

    old new  
    5353#include "if_athproto.h" 
    5454 
    5555#include <net80211/ieee80211_var.h> 
     56#include <net80211/ieee80211_proto.h> 
    5657 
    5758#ifdef IEEE80211_DEBUG 
    5859/* 
     
    33173318                        vap->iv_set_tim(ni, 0); 
    33183319        } 
    33193320        M_PWR_SAV_SET(skb);             /* bypass PS handling */ 
    3320         skb->dev = vap->iv_dev;                /* XXX needed? */ 
    3321         (void) dev_queue_xmit(skb);    /* resubmit */ 
     3321         
     3322        ieee80211_parent_queue_xmit(skb);      /* Submit to parent device, including updating stats */ 
    33223323} 
    33233324 
    33243325#ifdef ATH_SUPERG_FF 
  • net80211/ieee80211_output.c

    old new  
    252252                        "%s: discard, classification failure", __func__); 
    253253                goto bad; 
    254254        } 
     255         
     256        cb->ni = ni; 
     257        skb->dev = parent; 
     258         
    255259        /* power-save checks */ 
    256260        if (WME_UAPSD_AC_CAN_TRIGGER(skb->priority, ni)) { 
    257261                /* U-APSD power save queue */ 
    258262                /* XXXAPSD: assuming triggerable means deliverable */ 
    259263                M_FLAG_SET(skb, M_UAPSD); 
    260         } else if ((ni->ni_flags & IEEE80211_NODE_PWR_MGT) && !M_PWR_SAV_GET(skb)) { 
     264        } else if ((ni->ni_flags & IEEE80211_NODE_PWR_MGT)) { 
    261265                /* 
    262266                 * Station in power save mode; stick the frame 
    263267                 * on the sta's power save queue and continue. 
     
    266270                ieee80211_pwrsave(ni, skb); 
    267271                goto reclaim; 
    268272        } 
    269         M_FLAG_KEEP_ONLY(skb, M_UAPSD | M_PWR_SAV); 
    270         cb->ni = ni; 
    271273 
    272         vap->iv_devstats.tx_packets++; 
    273         vap->iv_devstats.tx_bytes += skb->len; 
    274         ic->ic_lastdata = jiffies; 
    275  
    276         skb->dev = parent; 
    277274#ifdef ATH_SUPERG_XR 
    278275        /*  
    279276         * broadcast/multicast  packets need to be sent on XR vap in addition to 
     
    293290                } 
    294291        } 
    295292#endif 
    296         (void) dev_queue_xmit(skb); 
     293        ieee80211_parent_queue_xmit(skb); 
    297294        return 0; 
    298295bad: 
    299296        if (skb != NULL) 
     
    304301        return 0; 
    305302} 
    306303 
     304void ieee80211_parent_queue_xmit(struct sk_buff *skb) { 
     305        struct ieee80211vap *vap = skb->dev->priv; 
     306        struct ieee80211com *ic = vap->iv_ic; 
     307 
     308        vap->iv_devstats.tx_packets++; 
     309        vap->iv_devstats.tx_bytes += skb->len; 
     310        ic->ic_lastdata = jiffies; 
     311 
     312        (void) dev_queue_xmit(skb); 
     313} 
     314 
    307315/* 
    308316 * Set the direction field and address fields of an outgoing 
    309317 * non-QoS frame.  Note this should be called early on in 
  • net80211/ieee80211_power.c

    old new  
    4848#include "if_media.h" 
    4949 
    5050#include <net80211/ieee80211_var.h> 
     51#include <net80211/ieee80211_proto.h> 
    5152 
    5253static void ieee80211_set_tim(struct ieee80211_node *ni, int set); 
    5354 
     
    316317#else 
    317318                skb->dev = vap->iv_dev;         /* XXX? unnecessary */ 
    318319#endif 
    319                 dev_queue_xmit(skb); 
     320                 
     321                ieee80211_parent_queue_xmit(skb); 
    320322        } 
    321323        vap->iv_set_tim(ni, 0); 
    322324} 
  • net80211/ieee80211_proto.h

    old new  
    7272        int, int, u_int32_t); 
    7373void ieee80211_sta_pwrsave(struct ieee80211vap *, int); 
    7474int ieee80211_hardstart(struct sk_buff *, struct net_device *); 
     75void ieee80211_parent_queue_xmit(struct sk_buff *); 
    7576int ieee80211_send_nulldata(struct ieee80211_node *); 
    7677int ieee80211_send_qosnulldata(struct ieee80211_node *, int); 
    7778int ieee80211_send_mgmt(struct ieee80211_node *, int, int);