[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <202111022135.B8TpALyf-lkp@intel.com>
Date: Tue, 2 Nov 2021 21:56:46 +0800
From: kernel test robot <lkp@...el.com>
To: Benjamin Li <benl@...areup.com>
Cc: kbuild-all@...ts.01.org, Kalle Valo <kvalo@...eaurora.org>,
ath10k@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: [kvalo-ath:pending 53/53]
drivers/net/wireless/ath/wcn36xx/txrx.c:275:42: error: variable 'sband' set
but not used
tree: https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git pending
head: 1619f62ef8c1766f887eeef36f4d03f01c16b4c9
commit: 1619f62ef8c1766f887eeef36f4d03f01c16b4c9 [53/53] wcn36xx: fix RX BD rate mapping for 5GHz legacy rates
config: arc-allyesconfig (attached as .config)
compiler: arceb-elf-gcc (GCC) 11.2.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
# https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/commit/?id=1619f62ef8c1766f887eeef36f4d03f01c16b4c9
git remote add kvalo-ath https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git
git fetch --no-tags kvalo-ath pending
git checkout 1619f62ef8c1766f887eeef36f4d03f01c16b4c9
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=arc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
All errors (new ones prefixed by >>):
drivers/net/wireless/ath/wcn36xx/txrx.c: In function 'wcn36xx_rx_skb':
>> drivers/net/wireless/ath/wcn36xx/txrx.c:275:42: error: variable 'sband' set but not used [-Werror=unused-but-set-variable]
275 | struct ieee80211_supported_band *sband;
| ^~~~~
cc1: all warnings being treated as errors
vim +/sband +275 drivers/net/wireless/ath/wcn36xx/txrx.c
a224b47ab36d7db Loic Poulain 2021-10-25 268
8e84c25821698bd Eugene Krasnikov 2013-10-08 269 int wcn36xx_rx_skb(struct wcn36xx *wcn, struct sk_buff *skb)
8e84c25821698bd Eugene Krasnikov 2013-10-08 270 {
8e84c25821698bd Eugene Krasnikov 2013-10-08 271 struct ieee80211_rx_status status;
0aa90483f23e792 Loic Poulain 2020-06-15 272 const struct wcn36xx_rate *rate;
8e84c25821698bd Eugene Krasnikov 2013-10-08 273 struct ieee80211_hdr *hdr;
8e84c25821698bd Eugene Krasnikov 2013-10-08 274 struct wcn36xx_rx_bd *bd;
6ea131acea98026 Loic Poulain 2020-08-29 @275 struct ieee80211_supported_band *sband;
8e84c25821698bd Eugene Krasnikov 2013-10-08 276 u16 fc, sn;
8e84c25821698bd Eugene Krasnikov 2013-10-08 277
8e84c25821698bd Eugene Krasnikov 2013-10-08 278 /*
8e84c25821698bd Eugene Krasnikov 2013-10-08 279 * All fields must be 0, otherwise it can lead to
8e84c25821698bd Eugene Krasnikov 2013-10-08 280 * unexpected consequences.
8e84c25821698bd Eugene Krasnikov 2013-10-08 281 */
8e84c25821698bd Eugene Krasnikov 2013-10-08 282 memset(&status, 0, sizeof(status));
8e84c25821698bd Eugene Krasnikov 2013-10-08 283
8e84c25821698bd Eugene Krasnikov 2013-10-08 284 bd = (struct wcn36xx_rx_bd *)skb->data;
8e84c25821698bd Eugene Krasnikov 2013-10-08 285 buff_to_be((u32 *)bd, sizeof(*bd)/sizeof(u32));
8e84c25821698bd Eugene Krasnikov 2013-10-08 286 wcn36xx_dbg_dump(WCN36XX_DBG_RX_DUMP,
8e84c25821698bd Eugene Krasnikov 2013-10-08 287 "BD <<< ", (char *)bd,
8e84c25821698bd Eugene Krasnikov 2013-10-08 288 sizeof(struct wcn36xx_rx_bd));
8e84c25821698bd Eugene Krasnikov 2013-10-08 289
a224b47ab36d7db Loic Poulain 2021-10-25 290 if (bd->pdu.mpdu_data_off <= bd->pdu.mpdu_header_off ||
a224b47ab36d7db Loic Poulain 2021-10-25 291 bd->pdu.mpdu_len < bd->pdu.mpdu_header_len)
a224b47ab36d7db Loic Poulain 2021-10-25 292 goto drop;
a224b47ab36d7db Loic Poulain 2021-10-25 293
a224b47ab36d7db Loic Poulain 2021-10-25 294 if (bd->asf && !bd->esf) { /* chained A-MSDU chunks */
a224b47ab36d7db Loic Poulain 2021-10-25 295 /* Sanity check */
a224b47ab36d7db Loic Poulain 2021-10-25 296 if (bd->pdu.mpdu_data_off + bd->pdu.mpdu_len > WCN36XX_PKT_SIZE)
a224b47ab36d7db Loic Poulain 2021-10-25 297 goto drop;
a224b47ab36d7db Loic Poulain 2021-10-25 298
a224b47ab36d7db Loic Poulain 2021-10-25 299 skb_put(skb, bd->pdu.mpdu_data_off + bd->pdu.mpdu_len);
a224b47ab36d7db Loic Poulain 2021-10-25 300 skb_pull(skb, bd->pdu.mpdu_data_off);
a224b47ab36d7db Loic Poulain 2021-10-25 301
a224b47ab36d7db Loic Poulain 2021-10-25 302 /* Only set status for first chained BD (with mac header) */
a224b47ab36d7db Loic Poulain 2021-10-25 303 goto done;
a224b47ab36d7db Loic Poulain 2021-10-25 304 }
a224b47ab36d7db Loic Poulain 2021-10-25 305
a224b47ab36d7db Loic Poulain 2021-10-25 306 if (bd->pdu.mpdu_header_off < sizeof(*bd) ||
a224b47ab36d7db Loic Poulain 2021-10-25 307 bd->pdu.mpdu_header_off + bd->pdu.mpdu_len > WCN36XX_PKT_SIZE)
a224b47ab36d7db Loic Poulain 2021-10-25 308 goto drop;
a224b47ab36d7db Loic Poulain 2021-10-25 309
8e84c25821698bd Eugene Krasnikov 2013-10-08 310 skb_put(skb, bd->pdu.mpdu_header_off + bd->pdu.mpdu_len);
8e84c25821698bd Eugene Krasnikov 2013-10-08 311 skb_pull(skb, bd->pdu.mpdu_header_off);
8e84c25821698bd Eugene Krasnikov 2013-10-08 312
886039036c20041 Bjorn Andersson 2017-01-11 313 hdr = (struct ieee80211_hdr *) skb->data;
886039036c20041 Bjorn Andersson 2017-01-11 314 fc = __le16_to_cpu(hdr->frame_control);
886039036c20041 Bjorn Andersson 2017-01-11 315 sn = IEEE80211_SEQ_TO_SN(__le16_to_cpu(hdr->seq_ctrl));
886039036c20041 Bjorn Andersson 2017-01-11 316
886039036c20041 Bjorn Andersson 2017-01-11 317 status.mactime = 10;
8e84c25821698bd Eugene Krasnikov 2013-10-08 318 status.signal = -get_rssi0(bd);
8e84c25821698bd Eugene Krasnikov 2013-10-08 319 status.antenna = 1;
8e84c25821698bd Eugene Krasnikov 2013-10-08 320 status.flag = 0;
8e84c25821698bd Eugene Krasnikov 2013-10-08 321 status.rx_flags = 0;
8e84c25821698bd Eugene Krasnikov 2013-10-08 322 status.flag |= RX_FLAG_IV_STRIPPED |
8e84c25821698bd Eugene Krasnikov 2013-10-08 323 RX_FLAG_MMIC_STRIPPED |
8e84c25821698bd Eugene Krasnikov 2013-10-08 324 RX_FLAG_DECRYPTED;
8e84c25821698bd Eugene Krasnikov 2013-10-08 325
7fdd69c5af21602 Johannes Berg 2017-04-26 326 wcn36xx_dbg(WCN36XX_DBG_RX, "status.flags=%x\n", status.flag);
8e84c25821698bd Eugene Krasnikov 2013-10-08 327
3cfc3e7f392dde0 Benjamin Li 2021-10-28 328 if (bd->scan_learn) {
3cfc3e7f392dde0 Benjamin Li 2021-10-28 329 /* If packet originate from hardware scanning, extract the
3cfc3e7f392dde0 Benjamin Li 2021-10-28 330 * band/channel from bd descriptor.
3cfc3e7f392dde0 Benjamin Li 2021-10-28 331 */
3cfc3e7f392dde0 Benjamin Li 2021-10-28 332 u8 hwch = (bd->reserved0 << 4) + bd->rx_ch;
3cfc3e7f392dde0 Benjamin Li 2021-10-28 333
3cfc3e7f392dde0 Benjamin Li 2021-10-28 334 if (bd->rf_band != 1 && hwch <= sizeof(ab_rx_ch_map) && hwch >= 1) {
3cfc3e7f392dde0 Benjamin Li 2021-10-28 335 status.band = NL80211_BAND_5GHZ;
3cfc3e7f392dde0 Benjamin Li 2021-10-28 336 status.freq = ieee80211_channel_to_frequency(ab_rx_ch_map[hwch - 1],
3cfc3e7f392dde0 Benjamin Li 2021-10-28 337 status.band);
3cfc3e7f392dde0 Benjamin Li 2021-10-28 338 } else {
3cfc3e7f392dde0 Benjamin Li 2021-10-28 339 status.band = NL80211_BAND_2GHZ;
3cfc3e7f392dde0 Benjamin Li 2021-10-28 340 status.freq = ieee80211_channel_to_frequency(hwch, status.band);
3cfc3e7f392dde0 Benjamin Li 2021-10-28 341 }
3cfc3e7f392dde0 Benjamin Li 2021-10-28 342 } else {
3cfc3e7f392dde0 Benjamin Li 2021-10-28 343 status.band = WCN36XX_BAND(wcn);
3cfc3e7f392dde0 Benjamin Li 2021-10-28 344 status.freq = WCN36XX_CENTER_FREQ(wcn);
3cfc3e7f392dde0 Benjamin Li 2021-10-28 345 }
3cfc3e7f392dde0 Benjamin Li 2021-10-28 346
0aa90483f23e792 Loic Poulain 2020-06-15 347 if (bd->rate_id < ARRAY_SIZE(wcn36xx_rate_table)) {
0aa90483f23e792 Loic Poulain 2020-06-15 348 rate = &wcn36xx_rate_table[bd->rate_id];
0aa90483f23e792 Loic Poulain 2020-06-15 349 status.encoding = rate->encoding;
0aa90483f23e792 Loic Poulain 2020-06-15 350 status.enc_flags = rate->encoding_flags;
0aa90483f23e792 Loic Poulain 2020-06-15 351 status.bw = rate->bw;
0aa90483f23e792 Loic Poulain 2020-06-15 352 status.rate_idx = rate->mcs_or_legacy_index;
6ea131acea98026 Loic Poulain 2020-08-29 353 sband = wcn->hw->wiphy->bands[status.band];
1af05d43b9bef43 Bryan O'Donoghue 2020-08-29 354 status.nss = 1;
6ea131acea98026 Loic Poulain 2020-08-29 355
6ea131acea98026 Loic Poulain 2020-08-29 356 if (status.band == NL80211_BAND_5GHZ &&
1619f62ef8c1766 Benjamin Li 2021-10-28 357 status.encoding == RX_ENC_LEGACY) {
6ea131acea98026 Loic Poulain 2020-08-29 358 /* no dsss rates in 5Ghz rates table */
6ea131acea98026 Loic Poulain 2020-08-29 359 status.rate_idx -= 4;
6ea131acea98026 Loic Poulain 2020-08-29 360 }
0aa90483f23e792 Loic Poulain 2020-06-15 361 } else {
0aa90483f23e792 Loic Poulain 2020-06-15 362 status.encoding = 0;
0aa90483f23e792 Loic Poulain 2020-06-15 363 status.bw = 0;
0aa90483f23e792 Loic Poulain 2020-06-15 364 status.enc_flags = 0;
0aa90483f23e792 Loic Poulain 2020-06-15 365 status.rate_idx = 0;
0aa90483f23e792 Loic Poulain 2020-06-15 366 }
0aa90483f23e792 Loic Poulain 2020-06-15 367
8678fd31f2d3eb1 Loic Poulain 2021-08-26 368 if (ieee80211_is_beacon(hdr->frame_control) ||
8678fd31f2d3eb1 Loic Poulain 2021-08-26 369 ieee80211_is_probe_resp(hdr->frame_control))
8678fd31f2d3eb1 Loic Poulain 2021-08-26 370 status.boottime_ns = ktime_get_boottime_ns();
8678fd31f2d3eb1 Loic Poulain 2021-08-26 371
8e84c25821698bd Eugene Krasnikov 2013-10-08 372 memcpy(IEEE80211_SKB_RXCB(skb), &status, sizeof(status));
8e84c25821698bd Eugene Krasnikov 2013-10-08 373
8e84c25821698bd Eugene Krasnikov 2013-10-08 374 if (ieee80211_is_beacon(hdr->frame_control)) {
8e84c25821698bd Eugene Krasnikov 2013-10-08 375 wcn36xx_dbg(WCN36XX_DBG_BEACON, "beacon skb %p len %d fc %04x sn %d\n",
8e84c25821698bd Eugene Krasnikov 2013-10-08 376 skb, skb->len, fc, sn);
8e84c25821698bd Eugene Krasnikov 2013-10-08 377 wcn36xx_dbg_dump(WCN36XX_DBG_BEACON_DUMP, "SKB <<< ",
8e84c25821698bd Eugene Krasnikov 2013-10-08 378 (char *)skb->data, skb->len);
8e84c25821698bd Eugene Krasnikov 2013-10-08 379 } else {
8e84c25821698bd Eugene Krasnikov 2013-10-08 380 wcn36xx_dbg(WCN36XX_DBG_RX, "rx skb %p len %d fc %04x sn %d\n",
8e84c25821698bd Eugene Krasnikov 2013-10-08 381 skb, skb->len, fc, sn);
8e84c25821698bd Eugene Krasnikov 2013-10-08 382 wcn36xx_dbg_dump(WCN36XX_DBG_RX_DUMP, "SKB <<< ",
8e84c25821698bd Eugene Krasnikov 2013-10-08 383 (char *)skb->data, skb->len);
8e84c25821698bd Eugene Krasnikov 2013-10-08 384 }
8e84c25821698bd Eugene Krasnikov 2013-10-08 385
a224b47ab36d7db Loic Poulain 2021-10-25 386 done:
a224b47ab36d7db Loic Poulain 2021-10-25 387 /* Chained AMSDU ? slow path */
a224b47ab36d7db Loic Poulain 2021-10-25 388 if (unlikely(bd->asf && !(bd->lsf && bd->esf))) {
a224b47ab36d7db Loic Poulain 2021-10-25 389 if (bd->esf && !skb_queue_empty(&wcn->amsdu)) {
a224b47ab36d7db Loic Poulain 2021-10-25 390 wcn36xx_err("Discarding non complete chain");
a224b47ab36d7db Loic Poulain 2021-10-25 391 __skb_queue_purge_irq(&wcn->amsdu);
a224b47ab36d7db Loic Poulain 2021-10-25 392 }
a224b47ab36d7db Loic Poulain 2021-10-25 393
a224b47ab36d7db Loic Poulain 2021-10-25 394 __skb_queue_tail(&wcn->amsdu, skb);
a224b47ab36d7db Loic Poulain 2021-10-25 395
a224b47ab36d7db Loic Poulain 2021-10-25 396 if (!bd->lsf)
a224b47ab36d7db Loic Poulain 2021-10-25 397 return 0; /* Not the last AMSDU, wait for more */
a224b47ab36d7db Loic Poulain 2021-10-25 398
a224b47ab36d7db Loic Poulain 2021-10-25 399 skb = wcn36xx_unchain_msdu(&wcn->amsdu);
a224b47ab36d7db Loic Poulain 2021-10-25 400 if (!skb)
a224b47ab36d7db Loic Poulain 2021-10-25 401 goto drop;
a224b47ab36d7db Loic Poulain 2021-10-25 402 }
a224b47ab36d7db Loic Poulain 2021-10-25 403
8e84c25821698bd Eugene Krasnikov 2013-10-08 404 ieee80211_rx_irqsafe(wcn->hw, skb);
8e84c25821698bd Eugene Krasnikov 2013-10-08 405
8e84c25821698bd Eugene Krasnikov 2013-10-08 406 return 0;
a224b47ab36d7db Loic Poulain 2021-10-25 407
:::::: The code at line 275 was first introduced by commit
:::::: 6ea131acea98026f144f64fb2d8ea7dbb95d3049 wcn36xx: Fix warning due to bad rate_idx
:::::: TO: Loic Poulain <loic.poulain@...aro.org>
:::::: CC: Kalle Valo <kvalo@...eaurora.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Download attachment ".config.gz" of type "application/gzip" (69216 bytes)
Powered by blists - more mailing lists