mac80211.c (9c68a57bc22d8c952688d54781b55e7cd9bea238) | mac80211.c (aee5b8cf2477bbb293cb84a4f726f5c0f91f587e) |
---|---|
1/* 2 * Copyright (C) 2016 Felix Fietkau <nbd@nbd.name> 3 * 4 * Permission to use, copy, modify, and/or distribute this software for any 5 * purpose with or without fee is hereby granted, provided that the above 6 * copyright notice and this permission notice appear in all copies. 7 * 8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES --- 370 unchanged lines hidden (view full) --- 379 survey->time = div_u64(state->cc_active, 1000); 380 survey->time_busy = div_u64(state->cc_busy, 1000); 381 spin_unlock_bh(&dev->cc_lock); 382 383 return ret; 384} 385EXPORT_SYMBOL_GPL(mt76_get_survey); 386 | 1/* 2 * Copyright (C) 2016 Felix Fietkau <nbd@nbd.name> 3 * 4 * Permission to use, copy, modify, and/or distribute this software for any 5 * purpose with or without fee is hereby granted, provided that the above 6 * copyright notice and this permission notice appear in all copies. 7 * 8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES --- 370 unchanged lines hidden (view full) --- 379 survey->time = div_u64(state->cc_active, 1000); 380 survey->time_busy = div_u64(state->cc_busy, 1000); 381 spin_unlock_bh(&dev->cc_lock); 382 383 return ret; 384} 385EXPORT_SYMBOL_GPL(mt76_get_survey); 386 |
387static struct ieee80211_sta * 388mt76_rx_convert(struct sk_buff *skb) | 387struct ieee80211_sta *mt76_rx_convert(struct sk_buff *skb) |
389{ 390 struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb); 391 struct mt76_rx_status mstat; 392 393 mstat = *((struct mt76_rx_status *) skb->cb); 394 memset(status, 0, sizeof(*status)); 395 396 status->flag = mstat.flag; --- 12 unchanged lines hidden (view full) --- 409 memcpy(status->chain_signal, mstat.chain_signal, sizeof(mstat.chain_signal)); 410 411 return wcid_to_sta(mstat.wcid); 412} 413 414void mt76_rx_complete(struct mt76_dev *dev, enum mt76_rxq_id q) 415{ 416 struct ieee80211_sta *sta; | 388{ 389 struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb); 390 struct mt76_rx_status mstat; 391 392 mstat = *((struct mt76_rx_status *) skb->cb); 393 memset(status, 0, sizeof(*status)); 394 395 status->flag = mstat.flag; --- 12 unchanged lines hidden (view full) --- 408 memcpy(status->chain_signal, mstat.chain_signal, sizeof(mstat.chain_signal)); 409 410 return wcid_to_sta(mstat.wcid); 411} 412 413void mt76_rx_complete(struct mt76_dev *dev, enum mt76_rxq_id q) 414{ 415 struct ieee80211_sta *sta; |
416 struct sk_buff_head frames; |
|
417 struct sk_buff *skb; 418 | 417 struct sk_buff *skb; 418 |
419 while ((skb = __skb_dequeue(&dev->rx_skb[q])) != NULL) { | 419 __skb_queue_head_init(&frames); 420 421 while ((skb = __skb_dequeue(&dev->rx_skb[q])) != NULL) 422 mt76_rx_aggr_reorder(skb, &frames); 423 424 while ((skb = __skb_dequeue(&frames)) != NULL) { |
420 sta = mt76_rx_convert(skb); 421 ieee80211_rx_napi(dev->hw, sta, skb, &dev->napi[q]); 422 } 423} | 425 sta = mt76_rx_convert(skb); 426 ieee80211_rx_napi(dev->hw, sta, skb, &dev->napi[q]); 427 } 428} |