linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Lorenzo Bianconi <lorenzo@kernel.org>, nbd@nbd.name
Cc: kbuild-all@lists.01.org, lorenzo.bianconi@redhat.com,
	sean.wang@mediatek.com, linux-wireless@vger.kernel.org
Subject: Re: [PATCH] mt76: do not inject packets if MT76_STATE_PM is set
Date: Thu, 30 Jul 2020 21:40:44 +0800	[thread overview]
Message-ID: <202007302140.7iZVgQ52%lkp@intel.com> (raw)
In-Reply-To: <a150b1f66bbc54518c2448eb65630fc4a8167c92.1596101190.git.lorenzo@kernel.org>

[-- Attachment #1: Type: text/plain, Size: 4758 bytes --]

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 <lkp@intel.com>

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 64442 bytes --]

      reply	other threads:[~2020-07-30 13:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-30  9:27 [PATCH] mt76: do not inject packets if MT76_STATE_PM is set Lorenzo Bianconi
2020-07-30 13:40 ` kernel test robot [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202007302140.7iZVgQ52%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=lorenzo.bianconi@redhat.com \
    --cc=lorenzo@kernel.org \
    --cc=nbd@nbd.name \
    --cc=sean.wang@mediatek.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).