From: kernel test robot <lkp@intel.com>
To: Ping-Ke Shih <pkshih@realtek.com>, kvalo@codeaurora.org
Cc: clang-built-linux@googlegroups.com, kbuild-all@lists.01.org,
linux-wireless@vger.kernel.org
Subject: Re: [PATCH v6 24/24] rtw89: add Kconfig and Makefile
Date: Sun, 22 Aug 2021 11:43:26 +0800 [thread overview]
Message-ID: <202108221143.6tdhCMqC-lkp@intel.com> (raw)
In-Reply-To: <20210820043538.12424-25-pkshih@realtek.com>
[-- Attachment #1: Type: text/plain, Size: 10198 bytes --]
Hi Ping-Ke,
I love your patch! Perhaps something to improve:
[auto build test WARNING on wireless-drivers-next/master]
[also build test WARNING on wireless-drivers/master v5.14-rc6 next-20210820]
[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/Ping-Ke-Shih/rtw89-add-Realtek-802-11ax-driver/20210820-124025
base: https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next.git master
config: i386-randconfig-a015-20210822 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 9e9d70591e72fc6762b4b9a226b68ed1307419bf)
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
# https://github.com/0day-ci/linux/commit/6c4e6c23950c253389ad130ffe0367bbca3af99e
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Ping-Ke-Shih/rtw89-add-Realtek-802-11ax-driver/20210820-124025
git checkout 6c4e6c23950c253389ad130ffe0367bbca3af99e
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> drivers/net/wireless/realtek/rtw89/phy.c:1522:6: warning: variable 'active_entry' set but not used [-Wunused-but-set-variable]
u64 active_entry = 0;
^
1 warning generated.
vim +/active_entry +1522 drivers/net/wireless/realtek/rtw89/phy.c
32d97af0af9324 Ping-Ke Shih 2021-08-20 1507
32d97af0af9324 Ping-Ke Shih 2021-08-20 1508 static s32 rtw89_phy_multi_sta_cfo_calc(struct rtw89_dev *rtwdev)
32d97af0af9324 Ping-Ke Shih 2021-08-20 1509 {
32d97af0af9324 Ping-Ke Shih 2021-08-20 1510 struct rtw89_cfo_tracking_info *cfo = &rtwdev->cfo_tracking;
32d97af0af9324 Ping-Ke Shih 2021-08-20 1511 struct rtw89_traffic_stats *stats = &rtwdev->stats;
32d97af0af9324 Ping-Ke Shih 2021-08-20 1512 s32 target_cfo = 0;
32d97af0af9324 Ping-Ke Shih 2021-08-20 1513 s32 cfo_khz_all = 0;
32d97af0af9324 Ping-Ke Shih 2021-08-20 1514 s32 cfo_khz_all_tp_wgt = 0;
32d97af0af9324 Ping-Ke Shih 2021-08-20 1515 s32 cfo_avg = 0;
32d97af0af9324 Ping-Ke Shih 2021-08-20 1516 s32 max_cfo_lb = BIT(31);
32d97af0af9324 Ping-Ke Shih 2021-08-20 1517 s32 min_cfo_ub = GENMASK(30, 0);
32d97af0af9324 Ping-Ke Shih 2021-08-20 1518 u16 cfo_cnt_all = 0;
32d97af0af9324 Ping-Ke Shih 2021-08-20 1519 u8 active_entry_cnt = 0;
32d97af0af9324 Ping-Ke Shih 2021-08-20 1520 u8 sta_cnt = 0;
32d97af0af9324 Ping-Ke Shih 2021-08-20 1521 u32 tp_all = 0;
32d97af0af9324 Ping-Ke Shih 2021-08-20 @1522 u64 active_entry = 0;
32d97af0af9324 Ping-Ke Shih 2021-08-20 1523 u8 i;
32d97af0af9324 Ping-Ke Shih 2021-08-20 1524 u8 cfo_tol = 0;
32d97af0af9324 Ping-Ke Shih 2021-08-20 1525
32d97af0af9324 Ping-Ke Shih 2021-08-20 1526 rtw89_debug(rtwdev, RTW89_DBG_CFO, "Multi entry cfo_trk\n");
32d97af0af9324 Ping-Ke Shih 2021-08-20 1527 if (cfo->rtw89_multi_cfo_mode == RTW89_PKT_BASED_AVG_MODE) {
32d97af0af9324 Ping-Ke Shih 2021-08-20 1528 rtw89_debug(rtwdev, RTW89_DBG_CFO, "Pkt based avg mode\n");
32d97af0af9324 Ping-Ke Shih 2021-08-20 1529 for (i = 0; i < CFO_TRACK_MAX_USER; i++) {
32d97af0af9324 Ping-Ke Shih 2021-08-20 1530 if (cfo->cfo_cnt[i] == 0)
32d97af0af9324 Ping-Ke Shih 2021-08-20 1531 continue;
32d97af0af9324 Ping-Ke Shih 2021-08-20 1532 cfo_khz_all += cfo->cfo_tail[i];
32d97af0af9324 Ping-Ke Shih 2021-08-20 1533 cfo_cnt_all += cfo->cfo_cnt[i];
32d97af0af9324 Ping-Ke Shih 2021-08-20 1534 cfo_avg = phy_div(cfo_khz_all, (s32)cfo_cnt_all);
32d97af0af9324 Ping-Ke Shih 2021-08-20 1535 rtw89_debug(rtwdev, RTW89_DBG_CFO,
32d97af0af9324 Ping-Ke Shih 2021-08-20 1536 "Msta cfo=%d, pkt_cnt=%d, avg_cfo=%d\n",
32d97af0af9324 Ping-Ke Shih 2021-08-20 1537 cfo_khz_all, cfo_cnt_all, cfo_avg);
32d97af0af9324 Ping-Ke Shih 2021-08-20 1538 target_cfo = cfo_avg;
32d97af0af9324 Ping-Ke Shih 2021-08-20 1539 }
32d97af0af9324 Ping-Ke Shih 2021-08-20 1540 } else if (cfo->rtw89_multi_cfo_mode == RTW89_ENTRY_BASED_AVG_MODE) {
32d97af0af9324 Ping-Ke Shih 2021-08-20 1541 rtw89_debug(rtwdev, RTW89_DBG_CFO, "Entry based avg mode\n");
32d97af0af9324 Ping-Ke Shih 2021-08-20 1542 for (i = 0; i < CFO_TRACK_MAX_USER; i++) {
32d97af0af9324 Ping-Ke Shih 2021-08-20 1543 if (cfo->cfo_cnt[i] == 0)
32d97af0af9324 Ping-Ke Shih 2021-08-20 1544 continue;
32d97af0af9324 Ping-Ke Shih 2021-08-20 1545 active_entry |= BIT_ULL(i);
32d97af0af9324 Ping-Ke Shih 2021-08-20 1546 cfo->cfo_avg[i] = phy_div(cfo->cfo_tail[i],
32d97af0af9324 Ping-Ke Shih 2021-08-20 1547 (s32)cfo->cfo_cnt[i]);
32d97af0af9324 Ping-Ke Shih 2021-08-20 1548 cfo_khz_all += cfo->cfo_avg[i];
32d97af0af9324 Ping-Ke Shih 2021-08-20 1549 rtw89_debug(rtwdev, RTW89_DBG_CFO,
32d97af0af9324 Ping-Ke Shih 2021-08-20 1550 "Macid=%d, cfo_avg=%d\n", i,
32d97af0af9324 Ping-Ke Shih 2021-08-20 1551 cfo->cfo_avg[i]);
32d97af0af9324 Ping-Ke Shih 2021-08-20 1552 }
32d97af0af9324 Ping-Ke Shih 2021-08-20 1553 sta_cnt = rtwdev->total_sta_assoc;
32d97af0af9324 Ping-Ke Shih 2021-08-20 1554 cfo_avg = phy_div(cfo_khz_all, (s32)sta_cnt);
32d97af0af9324 Ping-Ke Shih 2021-08-20 1555 rtw89_debug(rtwdev, RTW89_DBG_CFO,
32d97af0af9324 Ping-Ke Shih 2021-08-20 1556 "Msta cfo_acc=%d, ent_cnt=%d, avg_cfo=%d\n",
32d97af0af9324 Ping-Ke Shih 2021-08-20 1557 cfo_khz_all, sta_cnt, cfo_avg);
32d97af0af9324 Ping-Ke Shih 2021-08-20 1558 target_cfo = cfo_avg;
32d97af0af9324 Ping-Ke Shih 2021-08-20 1559 } else if (cfo->rtw89_multi_cfo_mode == RTW89_TP_BASED_AVG_MODE) {
32d97af0af9324 Ping-Ke Shih 2021-08-20 1560 rtw89_debug(rtwdev, RTW89_DBG_CFO, "TP based avg mode\n");
32d97af0af9324 Ping-Ke Shih 2021-08-20 1561 cfo_tol = cfo->sta_cfo_tolerance;
32d97af0af9324 Ping-Ke Shih 2021-08-20 1562 for (i = 0; i < CFO_TRACK_MAX_USER; i++) {
32d97af0af9324 Ping-Ke Shih 2021-08-20 1563 sta_cnt++;
32d97af0af9324 Ping-Ke Shih 2021-08-20 1564 if (cfo->cfo_cnt[i] != 0) {
32d97af0af9324 Ping-Ke Shih 2021-08-20 1565 cfo->cfo_avg[i] = phy_div(cfo->cfo_tail[i],
32d97af0af9324 Ping-Ke Shih 2021-08-20 1566 (s32)cfo->cfo_cnt[i]);
32d97af0af9324 Ping-Ke Shih 2021-08-20 1567 active_entry_cnt++;
32d97af0af9324 Ping-Ke Shih 2021-08-20 1568 } else {
32d97af0af9324 Ping-Ke Shih 2021-08-20 1569 cfo->cfo_avg[i] = cfo->pre_cfo_avg[i];
32d97af0af9324 Ping-Ke Shih 2021-08-20 1570 }
32d97af0af9324 Ping-Ke Shih 2021-08-20 1571 max_cfo_lb = max(cfo->cfo_avg[i] - cfo_tol, max_cfo_lb);
32d97af0af9324 Ping-Ke Shih 2021-08-20 1572 min_cfo_ub = min(cfo->cfo_avg[i] + cfo_tol, min_cfo_ub);
32d97af0af9324 Ping-Ke Shih 2021-08-20 1573 cfo_khz_all += cfo->cfo_avg[i];
32d97af0af9324 Ping-Ke Shih 2021-08-20 1574 /* need tp for each entry */
32d97af0af9324 Ping-Ke Shih 2021-08-20 1575 rtw89_debug(rtwdev, RTW89_DBG_CFO,
32d97af0af9324 Ping-Ke Shih 2021-08-20 1576 "[%d] cfo_avg=%d, tp=tbd\n",
32d97af0af9324 Ping-Ke Shih 2021-08-20 1577 i, cfo->cfo_avg[i]);
32d97af0af9324 Ping-Ke Shih 2021-08-20 1578 if (sta_cnt >= rtwdev->total_sta_assoc)
32d97af0af9324 Ping-Ke Shih 2021-08-20 1579 break;
32d97af0af9324 Ping-Ke Shih 2021-08-20 1580 }
32d97af0af9324 Ping-Ke Shih 2021-08-20 1581 tp_all = stats->rx_throughput; /* need tp for each entry */
32d97af0af9324 Ping-Ke Shih 2021-08-20 1582 cfo_avg = phy_div(cfo_khz_all_tp_wgt, (s32)tp_all);
32d97af0af9324 Ping-Ke Shih 2021-08-20 1583
32d97af0af9324 Ping-Ke Shih 2021-08-20 1584 rtw89_debug(rtwdev, RTW89_DBG_CFO, "Assoc sta cnt=%d\n",
32d97af0af9324 Ping-Ke Shih 2021-08-20 1585 sta_cnt);
32d97af0af9324 Ping-Ke Shih 2021-08-20 1586 rtw89_debug(rtwdev, RTW89_DBG_CFO, "Active sta cnt=%d\n",
32d97af0af9324 Ping-Ke Shih 2021-08-20 1587 active_entry_cnt);
32d97af0af9324 Ping-Ke Shih 2021-08-20 1588 rtw89_debug(rtwdev, RTW89_DBG_CFO,
32d97af0af9324 Ping-Ke Shih 2021-08-20 1589 "Msta cfo with tp_wgt=%d, avg_cfo=%d\n",
32d97af0af9324 Ping-Ke Shih 2021-08-20 1590 cfo_khz_all_tp_wgt, cfo_avg);
32d97af0af9324 Ping-Ke Shih 2021-08-20 1591 rtw89_debug(rtwdev, RTW89_DBG_CFO, "cfo_lb=%d,cfo_ub=%d\n",
32d97af0af9324 Ping-Ke Shih 2021-08-20 1592 max_cfo_lb, min_cfo_ub);
32d97af0af9324 Ping-Ke Shih 2021-08-20 1593 if (max_cfo_lb <= min_cfo_ub) {
32d97af0af9324 Ping-Ke Shih 2021-08-20 1594 rtw89_debug(rtwdev, RTW89_DBG_CFO,
32d97af0af9324 Ping-Ke Shih 2021-08-20 1595 "cfo win_size=%d\n",
32d97af0af9324 Ping-Ke Shih 2021-08-20 1596 min_cfo_ub - max_cfo_lb);
32d97af0af9324 Ping-Ke Shih 2021-08-20 1597 target_cfo = clamp(cfo_avg, max_cfo_lb, min_cfo_ub);
32d97af0af9324 Ping-Ke Shih 2021-08-20 1598 } else {
32d97af0af9324 Ping-Ke Shih 2021-08-20 1599 rtw89_debug(rtwdev, RTW89_DBG_CFO,
32d97af0af9324 Ping-Ke Shih 2021-08-20 1600 "No intersection of cfo torlence windows\n");
32d97af0af9324 Ping-Ke Shih 2021-08-20 1601 target_cfo = phy_div(cfo_khz_all, (s32)sta_cnt);
32d97af0af9324 Ping-Ke Shih 2021-08-20 1602 }
32d97af0af9324 Ping-Ke Shih 2021-08-20 1603 for (i = 0; i < CFO_TRACK_MAX_USER; i++)
32d97af0af9324 Ping-Ke Shih 2021-08-20 1604 cfo->pre_cfo_avg[i] = cfo->cfo_avg[i];
32d97af0af9324 Ping-Ke Shih 2021-08-20 1605 }
32d97af0af9324 Ping-Ke Shih 2021-08-20 1606 rtw89_debug(rtwdev, RTW89_DBG_CFO, "Target cfo=%d\n", target_cfo);
32d97af0af9324 Ping-Ke Shih 2021-08-20 1607 return target_cfo;
32d97af0af9324 Ping-Ke Shih 2021-08-20 1608 }
32d97af0af9324 Ping-Ke Shih 2021-08-20 1609
---
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: 34324 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH v6 24/24] rtw89: add Kconfig and Makefile
Date: Sun, 22 Aug 2021 11:43:26 +0800 [thread overview]
Message-ID: <202108221143.6tdhCMqC-lkp@intel.com> (raw)
In-Reply-To: <20210820043538.12424-25-pkshih@realtek.com>
[-- Attachment #1: Type: text/plain, Size: 10344 bytes --]
Hi Ping-Ke,
I love your patch! Perhaps something to improve:
[auto build test WARNING on wireless-drivers-next/master]
[also build test WARNING on wireless-drivers/master v5.14-rc6 next-20210820]
[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/Ping-Ke-Shih/rtw89-add-Realtek-802-11ax-driver/20210820-124025
base: https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next.git master
config: i386-randconfig-a015-20210822 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 9e9d70591e72fc6762b4b9a226b68ed1307419bf)
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
# https://github.com/0day-ci/linux/commit/6c4e6c23950c253389ad130ffe0367bbca3af99e
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Ping-Ke-Shih/rtw89-add-Realtek-802-11ax-driver/20210820-124025
git checkout 6c4e6c23950c253389ad130ffe0367bbca3af99e
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> drivers/net/wireless/realtek/rtw89/phy.c:1522:6: warning: variable 'active_entry' set but not used [-Wunused-but-set-variable]
u64 active_entry = 0;
^
1 warning generated.
vim +/active_entry +1522 drivers/net/wireless/realtek/rtw89/phy.c
32d97af0af9324 Ping-Ke Shih 2021-08-20 1507
32d97af0af9324 Ping-Ke Shih 2021-08-20 1508 static s32 rtw89_phy_multi_sta_cfo_calc(struct rtw89_dev *rtwdev)
32d97af0af9324 Ping-Ke Shih 2021-08-20 1509 {
32d97af0af9324 Ping-Ke Shih 2021-08-20 1510 struct rtw89_cfo_tracking_info *cfo = &rtwdev->cfo_tracking;
32d97af0af9324 Ping-Ke Shih 2021-08-20 1511 struct rtw89_traffic_stats *stats = &rtwdev->stats;
32d97af0af9324 Ping-Ke Shih 2021-08-20 1512 s32 target_cfo = 0;
32d97af0af9324 Ping-Ke Shih 2021-08-20 1513 s32 cfo_khz_all = 0;
32d97af0af9324 Ping-Ke Shih 2021-08-20 1514 s32 cfo_khz_all_tp_wgt = 0;
32d97af0af9324 Ping-Ke Shih 2021-08-20 1515 s32 cfo_avg = 0;
32d97af0af9324 Ping-Ke Shih 2021-08-20 1516 s32 max_cfo_lb = BIT(31);
32d97af0af9324 Ping-Ke Shih 2021-08-20 1517 s32 min_cfo_ub = GENMASK(30, 0);
32d97af0af9324 Ping-Ke Shih 2021-08-20 1518 u16 cfo_cnt_all = 0;
32d97af0af9324 Ping-Ke Shih 2021-08-20 1519 u8 active_entry_cnt = 0;
32d97af0af9324 Ping-Ke Shih 2021-08-20 1520 u8 sta_cnt = 0;
32d97af0af9324 Ping-Ke Shih 2021-08-20 1521 u32 tp_all = 0;
32d97af0af9324 Ping-Ke Shih 2021-08-20 @1522 u64 active_entry = 0;
32d97af0af9324 Ping-Ke Shih 2021-08-20 1523 u8 i;
32d97af0af9324 Ping-Ke Shih 2021-08-20 1524 u8 cfo_tol = 0;
32d97af0af9324 Ping-Ke Shih 2021-08-20 1525
32d97af0af9324 Ping-Ke Shih 2021-08-20 1526 rtw89_debug(rtwdev, RTW89_DBG_CFO, "Multi entry cfo_trk\n");
32d97af0af9324 Ping-Ke Shih 2021-08-20 1527 if (cfo->rtw89_multi_cfo_mode == RTW89_PKT_BASED_AVG_MODE) {
32d97af0af9324 Ping-Ke Shih 2021-08-20 1528 rtw89_debug(rtwdev, RTW89_DBG_CFO, "Pkt based avg mode\n");
32d97af0af9324 Ping-Ke Shih 2021-08-20 1529 for (i = 0; i < CFO_TRACK_MAX_USER; i++) {
32d97af0af9324 Ping-Ke Shih 2021-08-20 1530 if (cfo->cfo_cnt[i] == 0)
32d97af0af9324 Ping-Ke Shih 2021-08-20 1531 continue;
32d97af0af9324 Ping-Ke Shih 2021-08-20 1532 cfo_khz_all += cfo->cfo_tail[i];
32d97af0af9324 Ping-Ke Shih 2021-08-20 1533 cfo_cnt_all += cfo->cfo_cnt[i];
32d97af0af9324 Ping-Ke Shih 2021-08-20 1534 cfo_avg = phy_div(cfo_khz_all, (s32)cfo_cnt_all);
32d97af0af9324 Ping-Ke Shih 2021-08-20 1535 rtw89_debug(rtwdev, RTW89_DBG_CFO,
32d97af0af9324 Ping-Ke Shih 2021-08-20 1536 "Msta cfo=%d, pkt_cnt=%d, avg_cfo=%d\n",
32d97af0af9324 Ping-Ke Shih 2021-08-20 1537 cfo_khz_all, cfo_cnt_all, cfo_avg);
32d97af0af9324 Ping-Ke Shih 2021-08-20 1538 target_cfo = cfo_avg;
32d97af0af9324 Ping-Ke Shih 2021-08-20 1539 }
32d97af0af9324 Ping-Ke Shih 2021-08-20 1540 } else if (cfo->rtw89_multi_cfo_mode == RTW89_ENTRY_BASED_AVG_MODE) {
32d97af0af9324 Ping-Ke Shih 2021-08-20 1541 rtw89_debug(rtwdev, RTW89_DBG_CFO, "Entry based avg mode\n");
32d97af0af9324 Ping-Ke Shih 2021-08-20 1542 for (i = 0; i < CFO_TRACK_MAX_USER; i++) {
32d97af0af9324 Ping-Ke Shih 2021-08-20 1543 if (cfo->cfo_cnt[i] == 0)
32d97af0af9324 Ping-Ke Shih 2021-08-20 1544 continue;
32d97af0af9324 Ping-Ke Shih 2021-08-20 1545 active_entry |= BIT_ULL(i);
32d97af0af9324 Ping-Ke Shih 2021-08-20 1546 cfo->cfo_avg[i] = phy_div(cfo->cfo_tail[i],
32d97af0af9324 Ping-Ke Shih 2021-08-20 1547 (s32)cfo->cfo_cnt[i]);
32d97af0af9324 Ping-Ke Shih 2021-08-20 1548 cfo_khz_all += cfo->cfo_avg[i];
32d97af0af9324 Ping-Ke Shih 2021-08-20 1549 rtw89_debug(rtwdev, RTW89_DBG_CFO,
32d97af0af9324 Ping-Ke Shih 2021-08-20 1550 "Macid=%d, cfo_avg=%d\n", i,
32d97af0af9324 Ping-Ke Shih 2021-08-20 1551 cfo->cfo_avg[i]);
32d97af0af9324 Ping-Ke Shih 2021-08-20 1552 }
32d97af0af9324 Ping-Ke Shih 2021-08-20 1553 sta_cnt = rtwdev->total_sta_assoc;
32d97af0af9324 Ping-Ke Shih 2021-08-20 1554 cfo_avg = phy_div(cfo_khz_all, (s32)sta_cnt);
32d97af0af9324 Ping-Ke Shih 2021-08-20 1555 rtw89_debug(rtwdev, RTW89_DBG_CFO,
32d97af0af9324 Ping-Ke Shih 2021-08-20 1556 "Msta cfo_acc=%d, ent_cnt=%d, avg_cfo=%d\n",
32d97af0af9324 Ping-Ke Shih 2021-08-20 1557 cfo_khz_all, sta_cnt, cfo_avg);
32d97af0af9324 Ping-Ke Shih 2021-08-20 1558 target_cfo = cfo_avg;
32d97af0af9324 Ping-Ke Shih 2021-08-20 1559 } else if (cfo->rtw89_multi_cfo_mode == RTW89_TP_BASED_AVG_MODE) {
32d97af0af9324 Ping-Ke Shih 2021-08-20 1560 rtw89_debug(rtwdev, RTW89_DBG_CFO, "TP based avg mode\n");
32d97af0af9324 Ping-Ke Shih 2021-08-20 1561 cfo_tol = cfo->sta_cfo_tolerance;
32d97af0af9324 Ping-Ke Shih 2021-08-20 1562 for (i = 0; i < CFO_TRACK_MAX_USER; i++) {
32d97af0af9324 Ping-Ke Shih 2021-08-20 1563 sta_cnt++;
32d97af0af9324 Ping-Ke Shih 2021-08-20 1564 if (cfo->cfo_cnt[i] != 0) {
32d97af0af9324 Ping-Ke Shih 2021-08-20 1565 cfo->cfo_avg[i] = phy_div(cfo->cfo_tail[i],
32d97af0af9324 Ping-Ke Shih 2021-08-20 1566 (s32)cfo->cfo_cnt[i]);
32d97af0af9324 Ping-Ke Shih 2021-08-20 1567 active_entry_cnt++;
32d97af0af9324 Ping-Ke Shih 2021-08-20 1568 } else {
32d97af0af9324 Ping-Ke Shih 2021-08-20 1569 cfo->cfo_avg[i] = cfo->pre_cfo_avg[i];
32d97af0af9324 Ping-Ke Shih 2021-08-20 1570 }
32d97af0af9324 Ping-Ke Shih 2021-08-20 1571 max_cfo_lb = max(cfo->cfo_avg[i] - cfo_tol, max_cfo_lb);
32d97af0af9324 Ping-Ke Shih 2021-08-20 1572 min_cfo_ub = min(cfo->cfo_avg[i] + cfo_tol, min_cfo_ub);
32d97af0af9324 Ping-Ke Shih 2021-08-20 1573 cfo_khz_all += cfo->cfo_avg[i];
32d97af0af9324 Ping-Ke Shih 2021-08-20 1574 /* need tp for each entry */
32d97af0af9324 Ping-Ke Shih 2021-08-20 1575 rtw89_debug(rtwdev, RTW89_DBG_CFO,
32d97af0af9324 Ping-Ke Shih 2021-08-20 1576 "[%d] cfo_avg=%d, tp=tbd\n",
32d97af0af9324 Ping-Ke Shih 2021-08-20 1577 i, cfo->cfo_avg[i]);
32d97af0af9324 Ping-Ke Shih 2021-08-20 1578 if (sta_cnt >= rtwdev->total_sta_assoc)
32d97af0af9324 Ping-Ke Shih 2021-08-20 1579 break;
32d97af0af9324 Ping-Ke Shih 2021-08-20 1580 }
32d97af0af9324 Ping-Ke Shih 2021-08-20 1581 tp_all = stats->rx_throughput; /* need tp for each entry */
32d97af0af9324 Ping-Ke Shih 2021-08-20 1582 cfo_avg = phy_div(cfo_khz_all_tp_wgt, (s32)tp_all);
32d97af0af9324 Ping-Ke Shih 2021-08-20 1583
32d97af0af9324 Ping-Ke Shih 2021-08-20 1584 rtw89_debug(rtwdev, RTW89_DBG_CFO, "Assoc sta cnt=%d\n",
32d97af0af9324 Ping-Ke Shih 2021-08-20 1585 sta_cnt);
32d97af0af9324 Ping-Ke Shih 2021-08-20 1586 rtw89_debug(rtwdev, RTW89_DBG_CFO, "Active sta cnt=%d\n",
32d97af0af9324 Ping-Ke Shih 2021-08-20 1587 active_entry_cnt);
32d97af0af9324 Ping-Ke Shih 2021-08-20 1588 rtw89_debug(rtwdev, RTW89_DBG_CFO,
32d97af0af9324 Ping-Ke Shih 2021-08-20 1589 "Msta cfo with tp_wgt=%d, avg_cfo=%d\n",
32d97af0af9324 Ping-Ke Shih 2021-08-20 1590 cfo_khz_all_tp_wgt, cfo_avg);
32d97af0af9324 Ping-Ke Shih 2021-08-20 1591 rtw89_debug(rtwdev, RTW89_DBG_CFO, "cfo_lb=%d,cfo_ub=%d\n",
32d97af0af9324 Ping-Ke Shih 2021-08-20 1592 max_cfo_lb, min_cfo_ub);
32d97af0af9324 Ping-Ke Shih 2021-08-20 1593 if (max_cfo_lb <= min_cfo_ub) {
32d97af0af9324 Ping-Ke Shih 2021-08-20 1594 rtw89_debug(rtwdev, RTW89_DBG_CFO,
32d97af0af9324 Ping-Ke Shih 2021-08-20 1595 "cfo win_size=%d\n",
32d97af0af9324 Ping-Ke Shih 2021-08-20 1596 min_cfo_ub - max_cfo_lb);
32d97af0af9324 Ping-Ke Shih 2021-08-20 1597 target_cfo = clamp(cfo_avg, max_cfo_lb, min_cfo_ub);
32d97af0af9324 Ping-Ke Shih 2021-08-20 1598 } else {
32d97af0af9324 Ping-Ke Shih 2021-08-20 1599 rtw89_debug(rtwdev, RTW89_DBG_CFO,
32d97af0af9324 Ping-Ke Shih 2021-08-20 1600 "No intersection of cfo torlence windows\n");
32d97af0af9324 Ping-Ke Shih 2021-08-20 1601 target_cfo = phy_div(cfo_khz_all, (s32)sta_cnt);
32d97af0af9324 Ping-Ke Shih 2021-08-20 1602 }
32d97af0af9324 Ping-Ke Shih 2021-08-20 1603 for (i = 0; i < CFO_TRACK_MAX_USER; i++)
32d97af0af9324 Ping-Ke Shih 2021-08-20 1604 cfo->pre_cfo_avg[i] = cfo->cfo_avg[i];
32d97af0af9324 Ping-Ke Shih 2021-08-20 1605 }
32d97af0af9324 Ping-Ke Shih 2021-08-20 1606 rtw89_debug(rtwdev, RTW89_DBG_CFO, "Target cfo=%d\n", target_cfo);
32d97af0af9324 Ping-Ke Shih 2021-08-20 1607 return target_cfo;
32d97af0af9324 Ping-Ke Shih 2021-08-20 1608 }
32d97af0af9324 Ping-Ke Shih 2021-08-20 1609
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 34324 bytes --]
next prev parent reply other threads:[~2021-08-22 3:44 UTC|newest]
Thread overview: 57+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-20 4:35 [PATCH v6 00/24] rtw89: add Realtek 802.11ax driver Ping-Ke Shih
2021-08-20 4:35 ` [PATCH v6 01/24] rtw89: add CAM files Ping-Ke Shih
2021-10-01 14:46 ` Kalle Valo
2021-08-20 4:35 ` [PATCH v6 02/24] rtw89: add BT coexistence files Ping-Ke Shih
2021-10-01 15:26 ` Kalle Valo
2021-10-01 17:40 ` Small driver submissions and long feedback cycles Brian Norris
2021-08-20 4:35 ` [PATCH v6 03/24] rtw89: add core and trx files Ping-Ke Shih
2021-10-01 16:26 ` Kalle Valo
2021-10-05 7:16 ` Pkshih
2021-10-05 7:46 ` Kalle Valo
2021-10-05 8:42 ` Arnd Bergmann
2021-10-05 9:32 ` Pkshih
2021-10-05 9:59 ` Arnd Bergmann
2021-10-06 1:35 ` Pkshih
2021-10-06 7:32 ` Arnd Bergmann
2021-10-06 8:19 ` Pkshih
2021-08-20 4:35 ` [PATCH v6 04/24] rtw89: add debug files Ping-Ke Shih
2021-08-20 4:35 ` [PATCH v6 05/24] rtw89: add efuse files Ping-Ke Shih
2021-08-20 4:35 ` [PATCH v6 06/24] rtw89: add files to download and communicate with firmware Ping-Ke Shih
2021-10-01 15:55 ` Kalle Valo
2021-08-20 4:35 ` [PATCH v6 07/24] rtw89: add MAC files Ping-Ke Shih
2021-10-01 16:13 ` Kalle Valo
2021-08-20 4:35 ` [PATCH v6 08/24] rtw89: implement mac80211 ops Ping-Ke Shih
2021-08-20 4:35 ` [PATCH v6 09/24] rtw89: add pci files Ping-Ke Shih
2021-08-20 4:35 ` [PATCH v6 10/24] rtw89: add phy files Ping-Ke Shih
2021-08-20 4:35 ` [PATCH v6 11/24] rtw89: define register names Ping-Ke Shih
2021-08-20 4:35 ` [PATCH v6 12/24] rtw89: add regulatory support Ping-Ke Shih
2021-08-20 4:35 ` [PATCH v6 13/24] rtw89: 8852a: add 8852a specific files Ping-Ke Shih
2021-10-01 16:20 ` Kalle Valo
2021-08-20 4:35 ` [PATCH v6 14/24] rtw89: 8852a: add 8852a RFK files Ping-Ke Shih
2021-08-20 4:35 ` [PATCH v6 15/24] rtw89: 8852a: add 8852a RFK tables Ping-Ke Shih
2021-08-20 4:35 ` [PATCH v6 16/24] rtw89: 8852a: add 8852a tables (1 of 5) Ping-Ke Shih
2021-08-20 4:35 ` [PATCH v6 17/24] rtw89: 8852a: add 8852a tables (2 " Ping-Ke Shih
2021-08-20 4:35 ` [PATCH v6 18/24] rtw89: 8852a: add 8852a tables (3 " Ping-Ke Shih
2021-08-20 4:35 ` [PATCH v6 19/24] rtw89: 8852a: add 8852a tables (4 " Ping-Ke Shih
2021-08-20 4:35 ` [PATCH v6 20/24] rtw89: 8852a: add 8852a tables (5 " Ping-Ke Shih
2021-08-20 4:35 ` [PATCH v6 21/24] rtw89: add ser to recover error reported by firmware Ping-Ke Shih
2021-08-20 4:35 ` [PATCH v6 22/24] rtw89: add PS files Ping-Ke Shih
2021-08-20 4:35 ` [PATCH v6 23/24] rtw89: add SAR files Ping-Ke Shih
2021-08-20 4:35 ` [PATCH v6 24/24] rtw89: add Kconfig and Makefile Ping-Ke Shih
2021-08-22 3:43 ` kernel test robot [this message]
2021-08-22 3:43 ` kernel test robot
2021-08-23 1:37 ` Pkshih
2021-08-23 1:37 ` Pkshih
2021-10-01 15:57 ` Kalle Valo
2021-10-01 16:34 ` [PATCH v6 00/24] rtw89: add Realtek 802.11ax driver Kalle Valo
2021-10-01 16:42 ` Larry Finger
2021-10-01 16:46 ` Kalle Valo
2021-10-01 17:18 ` Larry Finger
2021-10-05 5:46 ` Kalle Valo
2021-10-04 6:46 ` Pkshih
2021-10-05 5:52 ` Kalle Valo
2021-10-06 0:10 ` Brian Norris
2021-10-08 4:14 ` Pkshih
2021-10-08 4:11 ` Pkshih
2021-10-09 8:28 ` Kalle Valo
2021-10-12 1:53 ` Pkshih
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=202108221143.6tdhCMqC-lkp@intel.com \
--to=lkp@intel.com \
--cc=clang-built-linux@googlegroups.com \
--cc=kbuild-all@lists.01.org \
--cc=kvalo@codeaurora.org \
--cc=linux-wireless@vger.kernel.org \
--cc=pkshih@realtek.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.