Message ID | 20170724084643.90789-1-nbd@nbd.name (mailing list archive) |
---|---|
State | Changes Requested |
Delegated to: | Kalle Valo |
Headers | show |
Hi Felix, [auto build test ERROR on wireless-drivers-next/master] [also build test ERROR on v4.13-rc2 next-20170725] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Felix-Fietkau/ath9k-fix-more-data-flag-for-buffered-multicast-packets/20170726-054105 base: https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next.git master config: xtensa-allyesconfig (attached as .config) compiler: xtensa-linux-gcc (GCC) 4.9.0 reproduce: wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree make.cross ARCH=xtensa All errors (new ones prefixed by >>): drivers/net/wireless/ath/ath9k/xmit.c: In function 'ath_tx_cabq': >> drivers/net/wireless/ath/ath9k/xmit.c:2454:2: error: implicit declaration of function 'ath9k_set_moredata' [-Werror=implicit-function-declaration] ath9k_set_moredata(sc, bf, false); ^ cc1: some warnings being treated as errors vim +/ath9k_set_moredata +2454 drivers/net/wireless/ath/ath9k/xmit.c 2401 2402 void ath_tx_cabq(struct ieee80211_hw *hw, struct ieee80211_vif *vif, 2403 struct sk_buff *skb) 2404 { 2405 struct ath_softc *sc = hw->priv; 2406 struct ath_tx_control txctl = { 2407 .txq = sc->beacon.cabq 2408 }; 2409 struct ath_tx_info info = {}; 2410 struct ath_buf *bf_tail = NULL; 2411 struct ath_buf *bf; 2412 LIST_HEAD(bf_q); 2413 int duration = 0; 2414 int max_duration; 2415 2416 max_duration = 2417 sc->cur_chan->beacon.beacon_interval * 1000 * 2418 sc->cur_chan->beacon.dtim_period / ATH_BCBUF; 2419 2420 do { 2421 struct ath_frame_info *fi = get_frame_info(skb); 2422 2423 if (ath_tx_prepare(hw, skb, &txctl)) 2424 break; 2425 2426 bf = ath_tx_setup_buffer(sc, txctl.txq, NULL, skb); 2427 if (!bf) 2428 break; 2429 2430 bf->bf_lastbf = bf; 2431 ath_set_rates(vif, NULL, bf); 2432 ath_buf_set_rate(sc, bf, &info, fi->framelen, false); 2433 duration += info.rates[0].PktDuration; 2434 if (bf_tail) 2435 bf_tail->bf_next = bf; 2436 2437 list_add_tail(&bf->list, &bf_q); 2438 bf_tail = bf; 2439 skb = NULL; 2440 2441 if (duration > max_duration) 2442 break; 2443 2444 skb = ieee80211_get_buffered_bc(hw, vif); 2445 } while(skb); 2446 2447 if (skb) 2448 ieee80211_free_txskb(hw, skb); 2449 2450 if (list_empty(&bf_q)) 2451 return; 2452 2453 bf = list_last_entry(&bf_q, struct ath_buf, list); > 2454 ath9k_set_moredata(sc, bf, false); 2455 2456 ath_txq_lock(sc, txctl.txq); 2457 ath_tx_fill_desc(sc, bf, txctl.txq, 0); 2458 ath_tx_txqaddbuf(sc, txctl.txq, &bf_q, false); 2459 TX_STAT_INC(txctl.txq->axq_qnum, queued); 2460 ath_txq_unlock(sc, txctl.txq); 2461 } 2462 --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c index 30efe79e9d89..2f663e19f2b9 100644 --- a/drivers/net/wireless/ath/ath9k/xmit.c +++ b/drivers/net/wireless/ath/ath9k/xmit.c @@ -2451,7 +2451,6 @@ void ath_tx_cabq(struct ieee80211_hw *hw, struct ieee80211_vif *vif, .txq = sc->beacon.cabq }; struct ath_tx_info info = {}; - struct ieee80211_hdr *hdr; struct ath_buf *bf_tail = NULL; struct ath_buf *bf; LIST_HEAD(bf_q); @@ -2495,14 +2494,8 @@ void ath_tx_cabq(struct ieee80211_hw *hw, struct ieee80211_vif *vif, if (list_empty(&bf_q)) return; - bf = list_first_entry(&bf_q, struct ath_buf, list); - hdr = (struct ieee80211_hdr *) bf->bf_mpdu->data; - - if (hdr->frame_control & cpu_to_le16(IEEE80211_FCTL_MOREDATA)) { - hdr->frame_control &= ~cpu_to_le16(IEEE80211_FCTL_MOREDATA); - dma_sync_single_for_device(sc->dev, bf->bf_buf_addr, - sizeof(*hdr), DMA_TO_DEVICE); - } + bf = list_last_entry(&bf_q, struct ath_buf, list); + ath9k_set_moredata(sc, bf, false); ath_txq_lock(sc, txctl.txq); ath_tx_fill_desc(sc, bf, txctl.txq, 0);
The flag needs to be cleared for the last packet in the list, not the first one. Fixes some issues with multicast packet loss for powersave clients connected to an ath9k AP. Signed-off-by: Felix Fietkau <nbd@nbd.name> --- drivers/net/wireless/ath/ath9k/xmit.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-)