tree:   https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git pending
head:   24030e6e2fb932ab9817c146a2835b4333e1b3c9
commit: b6891b9b2aee2de7d2f3b28907484c12b19c9f58 [13/22] ath10k: Fill rx 
duration for each peer in fw_stats for WCN3990
config: xtensa-allyesconfig (attached as .config)
compiler: xtensa-linux-gcc (GCC) 8.2.0
reproduce:
        wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout b6891b9b2aee2de7d2f3b28907484c12b19c9f58
        # save the attached .config to linux build tree
        GCC_VERSION=8.2.0 make.cross ARCH=xtensa 

All warnings (new ones prefixed by >>):

   drivers/net/wireless/ath/ath10k/wmi-tlv.c: In function 
'ath10k_wmi_tlv_op_pull_fw_stats':
>> drivers/net/wireless/ath/ath10k/wmi-tlv.c:1423:42: warning: left shift count 
>> >= width of type [-Wshift-count-overflow]
        dst->rx_duration |= rx_duration_high <<
                                             ^~

vim +1423 drivers/net/wireless/ath/ath10k/wmi-tlv.c

  1295  
  1296  static int ath10k_wmi_tlv_op_pull_fw_stats(struct ath10k *ar,
  1297                                             struct sk_buff *skb,
  1298                                             struct ath10k_fw_stats 
*stats)
  1299  {
  1300          const void **tb;
  1301          const struct wmi_tlv_stats_ev *ev;
  1302          u32 num_peer_stats_extd;
  1303          const void *data;
  1304          u32 num_pdev_stats;
  1305          u32 num_vdev_stats;
  1306          u32 num_peer_stats;
  1307          u32 num_bcnflt_stats;
  1308          u32 num_chan_stats;
  1309          size_t data_len;
  1310          u32 stats_id;
  1311          int ret;
  1312          int i;
  1313  
  1314          tb = ath10k_wmi_tlv_parse_alloc(ar, skb->data, skb->len, 
GFP_ATOMIC);
  1315          if (IS_ERR(tb)) {
  1316                  ret = PTR_ERR(tb);
  1317                  ath10k_warn(ar, "failed to parse tlv: %d\n", ret);
  1318                  return ret;
  1319          }
  1320  
  1321          ev = tb[WMI_TLV_TAG_STRUCT_STATS_EVENT];
  1322          data = tb[WMI_TLV_TAG_ARRAY_BYTE];
  1323  
  1324          if (!ev || !data) {
  1325                  kfree(tb);
  1326                  return -EPROTO;
  1327          }
  1328  
  1329          data_len = ath10k_wmi_tlv_len(data);
  1330          num_pdev_stats = __le32_to_cpu(ev->num_pdev_stats);
  1331          num_vdev_stats = __le32_to_cpu(ev->num_vdev_stats);
  1332          num_peer_stats = __le32_to_cpu(ev->num_peer_stats);
  1333          num_bcnflt_stats = __le32_to_cpu(ev->num_bcnflt_stats);
  1334          num_chan_stats = __le32_to_cpu(ev->num_chan_stats);
  1335          stats_id = __le32_to_cpu(ev->stats_id);
  1336          num_peer_stats_extd = __le32_to_cpu(ev->num_peer_stats_extd);
  1337  
  1338          ath10k_dbg(ar, ATH10K_DBG_WMI,
  1339                     "wmi tlv stats update pdev %i vdev %i peer %i bcnflt 
%i chan %i peer_extd %i\n",
  1340                     num_pdev_stats, num_vdev_stats, num_peer_stats,
  1341                     num_bcnflt_stats, num_chan_stats, 
num_peer_stats_extd);
  1342  
  1343          for (i = 0; i < num_pdev_stats; i++) {
  1344                  const struct wmi_pdev_stats *src;
  1345                  struct ath10k_fw_stats_pdev *dst;
  1346  
  1347                  src = data;
  1348                  if (data_len < sizeof(*src)) {
  1349                          kfree(tb);
  1350                          return -EPROTO;
  1351                  }
  1352  
  1353                  data += sizeof(*src);
  1354                  data_len -= sizeof(*src);
  1355  
  1356                  dst = kzalloc(sizeof(*dst), GFP_ATOMIC);
  1357                  if (!dst)
  1358                          continue;
  1359  
  1360                  ath10k_wmi_pull_pdev_stats_base(&src->base, dst);
  1361                  ath10k_wmi_pull_pdev_stats_tx(&src->tx, dst);
  1362                  ath10k_wmi_pull_pdev_stats_rx(&src->rx, dst);
  1363                  list_add_tail(&dst->list, &stats->pdevs);
  1364          }
  1365  
  1366          for (i = 0; i < num_vdev_stats; i++) {
  1367                  const struct wmi_tlv_vdev_stats *src;
  1368                  struct ath10k_fw_stats_vdev *dst;
  1369  
  1370                  src = data;
  1371                  if (data_len < sizeof(*src)) {
  1372                          kfree(tb);
  1373                          return -EPROTO;
  1374                  }
  1375  
  1376                  data += sizeof(*src);
  1377                  data_len -= sizeof(*src);
  1378  
  1379                  dst = kzalloc(sizeof(*dst), GFP_ATOMIC);
  1380                  if (!dst)
  1381                          continue;
  1382  
  1383                  ath10k_wmi_tlv_pull_vdev_stats(src, dst);
  1384                  list_add_tail(&dst->list, &stats->vdevs);
  1385          }
  1386  
  1387          for (i = 0; i < num_peer_stats; i++) {
  1388                  const struct wmi_10x_peer_stats *src;
  1389                  struct ath10k_fw_stats_peer *dst;
  1390  
  1391                  src = data;
  1392                  if (data_len < sizeof(*src)) {
  1393                          kfree(tb);
  1394                          return -EPROTO;
  1395                  }
  1396  
  1397                  data += sizeof(*src);
  1398                  data_len -= sizeof(*src);
  1399  
  1400                  dst = kzalloc(sizeof(*dst), GFP_ATOMIC);
  1401                  if (!dst)
  1402                          continue;
  1403  
  1404                  ath10k_wmi_pull_peer_stats(&src->old, dst);
  1405                  dst->peer_rx_rate = __le32_to_cpu(src->peer_rx_rate);
  1406  
  1407                  if (stats_id & WMI_TLV_STAT_PEER_EXTD) {
  1408                          const struct wmi_tlv_peer_stats_extd *extd;
  1409                          unsigned long rx_duration_high;
  1410  
  1411                          extd = data + sizeof(*src) * (num_peer_stats - 
i - 1)
  1412                                 + sizeof(*extd) * i;
  1413  
  1414                          dst->rx_duration = 
__le32_to_cpu(extd->rx_duration);
  1415                          rx_duration_high = __le32_to_cpu
  1416                                                  
(extd->rx_duration_high);
  1417  
  1418                          if 
(test_bit(WMI_TLV_PEER_RX_DURATION_HIGH_VALID_BIT,
  1419                                       &rx_duration_high)) {
  1420                                  rx_duration_high =
  1421                                          
FIELD_GET(WMI_TLV_PEER_RX_DURATION_HIGH_MASK,
  1422                                                    rx_duration_high);
> 1423                                  dst->rx_duration |= rx_duration_high <<
  1424                                                      
WMI_TLV_PEER_RX_DURATION_SHIFT;
  1425                          }
  1426                  }
  1427  
  1428                  list_add_tail(&dst->list, &stats->peers);
  1429          }
  1430  
  1431          kfree(tb);
  1432          return 0;
  1433  }
  1434  

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

Attachment: .config.gz
Description: application/gzip

_______________________________________________
ath10k mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/ath10k

Reply via email to