Search Linux Wireless

Re: [PATCH 12/19] mt76: add mt76x2_tx_common to mt76x2-common module

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Lorenzo,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on wireless-drivers-next/master]
[also build test WARNING on v4.18-rc3 next-20180629]
[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/Lorenzo-Bianconi/add-mt76x2u-support-to-mt76-driver/20180701-221609
base:   https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next.git master

smatch warnings:
drivers/net/wireless/mediatek/mt76/mt76x2_tx_common.c:35 mt76x2_tx() warn: always true condition '(wcid->hw_key_idx != -1) => (0-255 != (-1))'

vim +35 drivers/net/wireless/mediatek/mt76/mt76x2_tx_common.c

    20	
    21	void mt76x2_tx(struct ieee80211_hw *hw, struct ieee80211_tx_control *control,
    22		       struct sk_buff *skb)
    23	{
    24		struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
    25		struct mt76x2_dev *dev = hw->priv;
    26		struct ieee80211_vif *vif = info->control.vif;
    27		struct mt76_wcid *wcid = &dev->global_wcid;
    28	
    29		if (control->sta) {
    30			struct mt76x2_sta *msta;
    31	
    32			msta = (struct mt76x2_sta *)control->sta->drv_priv;
    33			wcid = &msta->wcid;
    34			/* sw encrypted frames */
  > 35			if (!info->control.hw_key && wcid->hw_key_idx != -1)
    36				control->sta = NULL;
    37		}
    38	
    39		if (vif && !control->sta) {
    40			struct mt76x2_vif *mvif;
    41	
    42			mvif = (struct mt76x2_vif *)vif->drv_priv;
    43			wcid = &mvif->group_wcid;
    44		}
    45	
    46		mt76_tx(&dev->mt76, control->sta, wcid, skb);
    47	}
    48	EXPORT_SYMBOL_GPL(mt76x2_tx);
    49	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation



[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux