Hi Lorenzo, I love your patch! Yet something to improve: [auto build test ERROR on wireless-drivers-next/master] [also build test ERROR on wireless-drivers/master v5.8-rc7 next-20200729] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Lorenzo-Bianconi/mt76-do-not-inject-packets-if-MT76_STATE_PM-is-set/20200730-173004 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) 9.3.0 reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=xtensa If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All errors (new ones prefixed by >>): drivers/net/wireless/mediatek/mt76/tx.c: In function 'mt76_txq_send_burst': >> drivers/net/wireless/mediatek/mt76/tx.c:443:16: error: 'MT76_STATE_PM' undeclared (first use in this function); did you mean 'MT76_STATE_ROC'? 443 | if (test_bit(MT76_STATE_PM, &phy->state) || | ^~~~~~~~~~~~~ | MT76_STATE_ROC drivers/net/wireless/mediatek/mt76/tx.c:443:16: note: each undeclared identifier is reported only once for each function it appears in drivers/net/wireless/mediatek/mt76/tx.c: In function 'mt76_txq_schedule_list': drivers/net/wireless/mediatek/mt76/tx.c:500:16: error: 'MT76_STATE_PM' undeclared (first use in this function); did you mean 'MT76_STATE_ROC'? 500 | if (test_bit(MT76_STATE_PM, &phy->state) || | ^~~~~~~~~~~~~ | MT76_STATE_ROC vim +443 drivers/net/wireless/mediatek/mt76/tx.c 394 395 static int 396 mt76_txq_send_burst(struct mt76_phy *phy, struct mt76_sw_queue *sq, 397 struct mt76_txq *mtxq) 398 { 399 struct mt76_dev *dev = phy->dev; 400 struct ieee80211_txq *txq = mtxq_to_txq(mtxq); 401 enum mt76_txq_id qid = mt76_txq_get_qid(txq); 402 struct mt76_wcid *wcid = mtxq->wcid; 403 struct mt76_queue *hwq = sq->q; 404 struct ieee80211_tx_info *info; 405 struct sk_buff *skb; 406 int n_frames = 1, limit; 407 struct ieee80211_tx_rate tx_rate; 408 bool ampdu; 409 bool probe; 410 int idx; 411 412 if (test_bit(MT_WCID_FLAG_PS, &wcid->flags)) 413 return 0; 414 415 skb = mt76_txq_dequeue(phy, mtxq, false); 416 if (!skb) 417 return 0; 418 419 info = IEEE80211_SKB_CB(skb); 420 if (!(wcid->tx_info & MT_WCID_TX_INFO_SET)) 421 ieee80211_get_tx_rates(txq->vif, txq->sta, skb, 422 info->control.rates, 1); 423 tx_rate = info->control.rates[0]; 424 425 probe = (info->flags & IEEE80211_TX_CTL_RATE_CTRL_PROBE); 426 ampdu = IEEE80211_SKB_CB(skb)->flags & IEEE80211_TX_CTL_AMPDU; 427 limit = ampdu ? 16 : 3; 428 429 if (ampdu) 430 mt76_check_agg_ssn(mtxq, skb); 431 432 idx = dev->queue_ops->tx_queue_skb(dev, qid, skb, wcid, txq->sta); 433 434 if (idx < 0) 435 return idx; 436 437 do { 438 bool cur_ampdu; 439 440 if (probe) 441 break; 442 > 443 if (test_bit(MT76_STATE_PM, &phy->state) || 444 test_bit(MT76_RESET, &phy->state)) 445 return -EBUSY; 446 447 skb = mt76_txq_dequeue(phy, mtxq, false); 448 if (!skb) 449 break; 450 451 info = IEEE80211_SKB_CB(skb); 452 cur_ampdu = info->flags & IEEE80211_TX_CTL_AMPDU; 453 454 if (ampdu != cur_ampdu || 455 (info->flags & IEEE80211_TX_CTL_RATE_CTRL_PROBE)) { 456 skb_queue_tail(&mtxq->retry_q, skb); 457 break; 458 } 459 460 info->control.rates[0] = tx_rate; 461 462 if (cur_ampdu) 463 mt76_check_agg_ssn(mtxq, skb); 464 465 idx = dev->queue_ops->tx_queue_skb(dev, qid, skb, wcid, 466 txq->sta); 467 if (idx < 0) 468 return idx; 469 470 n_frames++; 471 } while (n_frames < limit); 472 473 if (!probe) { 474 hwq->entry[idx].qid = sq - dev->q_tx; 475 hwq->entry[idx].schedule = true; 476 sq->swq_queued++; 477 } 478 479 dev->queue_ops->kick(dev, hwq); 480 481 return n_frames; 482 } 483 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org