Linux wireless drivers development
 help / color / mirror / Atom feed
* [bug report] rtw88: coex: add feature to enhance HID coexistence performance
@ 2020-12-04 15:14 Dan Carpenter
  2020-12-04 17:41 ` Brian Norris
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2020-12-04 15:14 UTC (permalink / raw)
  To: ku920601; +Cc: linux-wireless

Hello Ching-Te Ku,

The patch 5b2e9a35e456: "rtw88: coex: add feature to enhance HID
coexistence performance" from Nov 26, 2020, leads to the following
static checker warning:

	drivers/net/wireless/realtek/rtw88/coex.c:2099 rtw_coex_action_bt_a2dp_hid()
	error: uninitialized symbol 'interval'.

drivers/net/wireless/realtek/rtw88/coex.c
  2047  static void rtw_coex_action_bt_a2dp_hid(struct rtw_dev *rtwdev)
  2048  {
  2049          struct rtw_coex *coex = &rtwdev->coex;
  2050          struct rtw_coex_stat *coex_stat = &coex->stat;
  2051          struct rtw_coex_dm *coex_dm = &coex->dm;
  2052          struct rtw_efuse *efuse = &rtwdev->efuse;
  2053          struct rtw_chip_info *chip = rtwdev->chip;
  2054          u8 table_case, tdma_case, interval;
                                          ^^^^^^^^
  2055          u32 slot_type = 0;
  2056          bool is_toggle_table = false;
  2057  
  2058          slot_type = TDMA_4SLOT;
  2059  
  2060          rtw_dbg(rtwdev, RTW_DBG_COEX, "[BTCoex], %s()\n", __func__);
  2061          rtw_coex_set_ant_path(rtwdev, false, COEX_SET_ANT_2G);
  2062          rtw_coex_set_rf_para(rtwdev, chip->wl_rf_para_rx[0]);
  2063  
  2064          if (efuse->share_ant) {
  2065                  /* Shared-Ant */
  2066                  if (coex_stat->bt_ble_exist) {
  2067                          table_case = 26; /* for RCU */
  2068                  } else if (coex_stat->bt_418_hid_exist) {
  2069                          table_case = 9;
  2070                          interval = 1;
                                ^^^^^^^^^^^^
The "interval" variable is only set here and not on the other paths.

  2071                  } else {
  2072                          table_case = 9;
  2073                  }
  2074  
  2075                  if (coex_stat->wl_connecting || !coex_stat->wl_gl_busy) {
  2076                          tdma_case = 14;
  2077                  } else if (coex_stat->bt_418_hid_exist) {
  2078                          is_toggle_table = true;
  2079                          tdma_case = 23;
  2080                  } else {
  2081                          tdma_case = 13;
  2082                  }
  2083          } else {
  2084                  /* Non-Shared-Ant */
  2085                  if (coex_stat->bt_ble_exist)
  2086                          table_case = 121;
  2087                  else
  2088                          table_case = 113;
  2089  
  2090                  if (COEX_RSSI_HIGH(coex_dm->wl_rssi_state[1]))
  2091                          tdma_case = 112;
  2092                  else
  2093                          tdma_case = 113;
  2094          }
  2095  
  2096          rtw_coex_table(rtwdev, false, table_case);
  2097          if (is_toggle_table) {
  2098                  rtw_btc_wltoggle_table_a(rtwdev, true, table_case);
  2099                  rtw_btc_wltoggle_table_b(rtwdev, false, interval, COEX_WL_SLOT_TOGLLE);
                                                                ^^^^^^^^

  2100          }
  2101          rtw_coex_tdma(rtwdev, false, tdma_case | slot_type);
  2102  }

regards,
dan carpenter

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [bug report] rtw88: coex: add feature to enhance HID coexistence performance
  2020-12-04 15:14 [bug report] rtw88: coex: add feature to enhance HID coexistence performance Dan Carpenter
@ 2020-12-04 17:41 ` Brian Norris
  0 siblings, 0 replies; 2+ messages in thread
From: Brian Norris @ 2020-12-04 17:41 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: ku920601, linux-wireless

On Fri, Dec 4, 2020 at 7:15 AM Dan Carpenter <dan.carpenter@oracle.com> wrote:
> The patch 5b2e9a35e456: "rtw88: coex: add feature to enhance HID
> coexistence performance" from Nov 26, 2020, leads to the following
> static checker warning:
>
>         drivers/net/wireless/realtek/rtw88/coex.c:2099 rtw_coex_action_bt_a2dp_hid()
>         error: uninitialized symbol 'interval'.

Patch is already proposed:
https://lore.kernel.org/linux-wireless/20201203175142.1071738-1-colin.king@canonical.com/
[PATCH][next] rtw88: coex: fix missing unitialization of variable 'interval'

Brian

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-12-04 17:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-12-04 15:14 [bug report] rtw88: coex: add feature to enhance HID coexistence performance Dan Carpenter
2020-12-04 17:41 ` Brian Norris

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox