Hi Carl,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on 76680d49b5e0e661bc4abcdaf13fb7e124b4ca08]
url:
https://github.com/0day-ci/linux/commits/Carl-Huang/ath11k-support-WoW-fu...
base: 76680d49b5e0e661bc4abcdaf13fb7e124b4ca08
config: csky-buildonly-randconfig-r002-20220208
(
https://download.01.org/0day-ci/archive/20220208/202202082043.aWCCxhQm-lk...)
compiler: csky-linux-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://github.com/0day-ci/linux/commit/e2f5c30ed6c6deadc01bfdd0210ce36ef...
git remote add linux-review
https://github.com/0day-ci/linux
git fetch --no-tags linux-review
Carl-Huang/ath11k-support-WoW-functionalities/20220208-161634
git checkout e2f5c30ed6c6deadc01bfdd0210ce36ef2fbdf41
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir
ARCH=csky SHELL=/bin/bash drivers/net/wireless/ath/ath11k/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All error/warnings (new ones prefixed by >>):
> drivers/net/wireless/ath/ath11k/wow.c:356:5: warning: no previous
prototype for 'ath11k_wow_op_suspend' [-Wmissing-prototypes]
356 | int
ath11k_wow_op_suspend(struct ieee80211_hw *hw,
| ^~~~~~~~~~~~~~~~~~~~~
> drivers/net/wireless/ath/ath11k/wow.c:415:6: warning: no previous
prototype for 'ath11k_wow_op_set_wakeup' [-Wmissing-prototypes]
415 |
void ath11k_wow_op_set_wakeup(struct ieee80211_hw *hw, bool enabled)
| ^~~~~~~~~~~~~~~~~~~~~~~~
> drivers/net/wireless/ath/ath11k/wow.c:424:5: warning: no previous
prototype for 'ath11k_wow_op_resume' [-Wmissing-prototypes]
424 | int
ath11k_wow_op_resume(struct ieee80211_hw *hw)
| ^~~~~~~~~~~~~~~~~~~~
> drivers/net/wireless/ath/ath11k/wow.c:466:5: error: redefinition
of 'ath11k_wow_init'
466 | int ath11k_wow_init(struct ath11k *ar)
| ^~~~~~~~~~~~~~~
In file included from drivers/net/wireless/ath/ath11k/core.h:26,
from drivers/net/wireless/ath/ath11k/wow.c:11:
drivers/net/wireless/ath/ath11k/wow.h:40:19: note: previous definition of
'ath11k_wow_init' with type 'int(struct ath11k *)'
40 | static inline int ath11k_wow_init(struct ath11k *ar)
| ^~~~~~~~~~~~~~~
drivers/net/wireless/ath/ath11k/wow.c: In function 'ath11k_wow_init':
> drivers/net/wireless/ath/ath11k/wow.c:481:22: error: 'struct
wiphy' has no member named 'wowlan'
481 |
ar->hw->wiphy->wowlan = &ar->wow.wowlan_support;
| ^~
vim +/ath11k_wow_init +466 drivers/net/wireless/ath/ath11k/wow.c
355
356 int ath11k_wow_op_suspend(struct ieee80211_hw *hw,
357 struct cfg80211_wowlan *wowlan)
358 {
359 struct ath11k *ar = hw->priv;
360 int ret;
361
362 mutex_lock(&ar->conf_mutex);
363
364 ret = ath11k_wow_cleanup(ar);
365 if (ret) {
366 ath11k_warn(ar->ab, "failed to clear wow wakeup events: %d\n",
367 ret);
368 goto exit;
369 }
370
371 ret = ath11k_wow_set_wakeups(ar, wowlan);
372 if (ret) {
373 ath11k_warn(ar->ab, "failed to set wow wakeup events: %d\n",
374 ret);
375 goto cleanup;
376 }
377
378 ret = ath11k_mac_wait_tx_complete(ar);
379 if (ret) {
380 ath11k_warn(ar->ab, "failed to wait tx complete: %d\n", ret);
381 goto cleanup;
382 }
383
384 ret = ath11k_wow_enable(ar->ab);
385 if (ret) {
386 ath11k_warn(ar->ab, "failed to start wow: %d\n", ret);
387 goto cleanup;
388 }
389
390 ath11k_ce_stop_shadow_timers(ar->ab);
391 ath11k_dp_stop_shadow_timers(ar->ab);
392
393 ath11k_hif_irq_disable(ar->ab);
394 ath11k_hif_ce_irq_disable(ar->ab);
395
396 ret = ath11k_hif_suspend(ar->ab);
397 if (ret) {
398 ath11k_warn(ar->ab, "failed to suspend hif: %d\n", ret);
399 goto wakeup;
400 }
401
402 goto exit;
403
404 wakeup:
405 ath11k_wow_wakeup(ar->ab);
406
407 cleanup:
408 ath11k_wow_cleanup(ar);
409
410 exit:
411 mutex_unlock(&ar->conf_mutex);
412 return ret ? 1 : 0;
413 }
414
415 void ath11k_wow_op_set_wakeup(struct ieee80211_hw *hw, bool
enabled)
416 {
417 struct ath11k *ar = hw->priv;
418
419 mutex_lock(&ar->conf_mutex);
420 device_set_wakeup_enable(ar->ab->dev, enabled);
421 mutex_unlock(&ar->conf_mutex);
422 }
423
424 int ath11k_wow_op_resume(struct ieee80211_hw *hw)
425 {
426 struct ath11k *ar = hw->priv;
427 int ret;
428
429 mutex_lock(&ar->conf_mutex);
430
431 ret = ath11k_hif_resume(ar->ab);
432 if (ret) {
433 ath11k_warn(ar->ab, "failed to resume hif: %d\n", ret);
434 goto exit;
435 }
436
437 ath11k_hif_ce_irq_enable(ar->ab);
438 ath11k_hif_irq_enable(ar->ab);
439
440 ret = ath11k_wow_wakeup(ar->ab);
441 if (ret)
442 ath11k_warn(ar->ab, "failed to wakeup from wow: %d\n", ret);
443
444 exit:
445 if (ret) {
446 switch (ar->state) {
447 case ATH11K_STATE_ON:
448 ar->state = ATH11K_STATE_RESTARTING;
449 ret = 1;
450 break;
451 case ATH11K_STATE_OFF:
452 case ATH11K_STATE_RESTARTING:
453 case ATH11K_STATE_RESTARTED:
454 case ATH11K_STATE_WEDGED:
455 ath11k_warn(ar->ab, "encountered unexpected device state %d on resume,
cannot recover\n",
456 ar->state);
457 ret = -EIO;
458 break;
459 }
460 }
461
462 mutex_unlock(&ar->conf_mutex);
463 return ret;
464 }
465
466 int ath11k_wow_init(struct ath11k *ar)
467 {
468 if (WARN_ON(!test_bit(WMI_TLV_SERVICE_WOW, ar->wmi->wmi_ab->svc_map)))
469 return -EINVAL;
470
471 ar->wow.wowlan_support = ath11k_wowlan_support;
472
473 if (ar->wmi->wmi_ab->wlan_resource_config.rx_decap_mode ==
474 ATH11K_HW_TXRX_NATIVE_WIFI) {
475 ar->wow.wowlan_support.pattern_max_len -= WOW_MAX_REDUCE;
476 ar->wow.wowlan_support.max_pkt_offset -= WOW_MAX_REDUCE;
477 }
478
479 ar->wow.max_num_patterns = ATH11K_WOW_PATTERNS;
480 ar->wow.wowlan_support.n_patterns = ar->wow.max_num_patterns;
481 ar->hw->wiphy->wowlan = &ar->wow.wowlan_support;
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org