source: trunk/package/mac80211/patches/561-mac80211_tx_status.patch @ 28245

Last change on this file since 28245 was 28245, checked in by nbd, 5 years ago

mac80211: update to wireless-testing 2011-09-14

File size: 3.3 KB
  • include/net/mac80211.h

    a b static inline int ieee80211_sta_ps_trans 
    23702370void ieee80211_sta_set_tim(struct ieee80211_sta *sta); 
    23712371 
    23722372/** 
     2373 * ieee80211_tx_status_sta - transmit status callback 
     2374 * 
     2375 * Call this function for all transmitted frames after they have been 
     2376 * transmitted. It is permissible to not call this function for 
     2377 * multicast frames but this can affect statistics. 
     2378 * 
     2379 * This function may not be called in IRQ context. Calls to this function 
     2380 * for a single hardware must be synchronized against each other. Calls 
     2381 * to this function, ieee80211_tx_status_ni() and ieee80211_tx_status_irqsafe() 
     2382 * may not be mixed for a single hardware. 
     2383 * 
     2384 * @hw: the hardware the frame was transmitted by 
     2385 * @skb: the frame that was transmitted, owned by mac80211 after this call 
     2386 * @sta: station for which the tx status is provided 
     2387 */ 
     2388void ieee80211_tx_status_sta(struct ieee80211_hw *hw, struct sk_buff *skb, 
     2389                             struct ieee80211_sta *sta); 
     2390 
     2391/** 
    23732392 * ieee80211_tx_status - transmit status callback 
    23742393 * 
    23752394 * Call this function for all transmitted frames after they have been 
    void ieee80211_sta_set_tim(struct ieee80 
    23842403 * @hw: the hardware the frame was transmitted by 
    23852404 * @skb: the frame that was transmitted, owned by mac80211 after this call 
    23862405 */ 
    2387 void ieee80211_tx_status(struct ieee80211_hw *hw, 
    2388                          struct sk_buff *skb); 
     2406static inline void ieee80211_tx_status(struct ieee80211_hw *hw, 
     2407                                       struct sk_buff *skb) 
     2408{ 
     2409        ieee80211_tx_status_sta(hw, skb, NULL); 
     2410} 
    23892411 
    23902412/** 
    23912413 * ieee80211_tx_status_ni - transmit status callback (in process context) 
  • net/mac80211/status.c

    a b static void ieee80211_set_bar_pending(st 
    202202 */ 
    203203#define STA_LOST_PKT_THRESHOLD  50 
    204204 
    205 void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb) 
     205void ieee80211_tx_status_sta(struct ieee80211_hw *hw, struct sk_buff *skb, 
     206                             struct ieee80211_sta *pubsta) 
    206207{ 
    207208        struct sk_buff *skb2; 
    208209        struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data; 
    void ieee80211_tx_status(struct ieee8021 
    214215        struct ieee80211_tx_status_rtap_hdr *rthdr; 
    215216        struct ieee80211_sub_if_data *sdata; 
    216217        struct net_device *prev_dev = NULL; 
    217         struct sta_info *sta, *tmp; 
     218        struct sta_info *sta = NULL, *tmp, *tmp2; 
    218219        int retry_count = -1, i; 
    219220        int rates_idx = -1; 
    220221        bool send_to_cooked; 
    void ieee80211_tx_status(struct ieee8021 
    244245        sband = local->hw.wiphy->bands[info->band]; 
    245246        fc = hdr->frame_control; 
    246247 
    247         for_each_sta_info(local, hdr->addr1, sta, tmp) { 
    248                 /* skip wrong virtual interface */ 
    249                 if (memcmp(hdr->addr2, sta->sdata->vif.addr, ETH_ALEN)) 
    250                         continue; 
     248        if (!pubsta) { 
     249                for_each_sta_info(local, hdr->addr1, tmp, tmp2) { 
     250                        /* skip wrong virtual interface */ 
     251                        if (memcmp(hdr->addr2, tmp->sdata->vif.addr, ETH_ALEN)) 
     252                                continue; 
     253 
     254                        sta = tmp; 
     255                } 
     256        } else { 
     257                sta = container_of(pubsta, struct sta_info, sta); 
     258        } 
    251259 
     260        if (sta) { 
    252261                acked = !!(info->flags & IEEE80211_TX_STAT_ACK); 
    253262                if (!acked && test_sta_flags(sta, WLAN_STA_PS_STA)) { 
    254263                        /* 
    void ieee80211_tx_status(struct ieee8021 
    497506        rcu_read_unlock(); 
    498507        dev_kfree_skb(skb); 
    499508} 
    500 EXPORT_SYMBOL(ieee80211_tx_status); 
     509EXPORT_SYMBOL(ieee80211_tx_status_sta); 
    501510 
    502511void ieee80211_report_low_ack(struct ieee80211_sta *pubsta, u32 num_packets) 
    503512{ 
Note: See TracBrowser for help on using the repository browser.