Hi Bryan, 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 ath6kl/ath-next v5.13-rc4 next-20210603] [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/Bryan-O-Donoghue/wcn36xx-Enable-downstream-consistent-Wake-on-Lan/20210601-231011 base: https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next.git master config: x86_64-randconfig-s022-20210604 (attached as .config) compiler: gcc-9 (Debian 9.3.0-22) 9.3.0 reproduce: # apt-get install sparse # sparse version: v0.6.3-341-g8af24329-dirty # https://github.com/0day-ci/linux/commit/8854b48adc6181a19c1410154f649a2bbb463a9d git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Bryan-O-Donoghue/wcn36xx-Enable-downstream-consistent-Wake-on-Lan/20210601-231011 git checkout 8854b48adc6181a19c1410154f649a2bbb463a9d # save the attached .config to linux build tree make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' W=1 ARCH=x86_64 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot sparse warnings: (new ones prefixed by >>) drivers/net/wireless/ath/wcn36xx/smd.c:2873:45: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long [addressable] [assigned] [usertype] key_replay_counter @@ got restricted __le64 [usertype] replay_ctr @@ drivers/net/wireless/ath/wcn36xx/smd.c:2873:45: sparse: expected unsigned long long [addressable] [assigned] [usertype] key_replay_counter drivers/net/wireless/ath/wcn36xx/smd.c:2873:45: sparse: got restricted __le64 [usertype] replay_ctr >> drivers/net/wireless/ath/wcn36xx/smd.c:2914:22: sparse: sparse: cast to restricted __le64 >> drivers/net/wireless/ath/wcn36xx/smd.c:2915:33: sparse: sparse: restricted __le64 degrades to integer >> drivers/net/wireless/ath/wcn36xx/smd.c:2916:49: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __le64 [usertype] replay_ctr @@ got unsigned long long [usertype] key_replay_counter @@ drivers/net/wireless/ath/wcn36xx/smd.c:2916:49: sparse: expected restricted __le64 [usertype] replay_ctr drivers/net/wireless/ath/wcn36xx/smd.c:2916:49: sparse: got unsigned long long [usertype] key_replay_counter vim +2914 drivers/net/wireless/ath/wcn36xx/smd.c 2858 2859 int wcn36xx_smd_gtk_offload(struct wcn36xx *wcn, struct ieee80211_vif *vif, 2860 bool enable) 2861 { 2862 struct wcn36xx_vif *vif_priv = wcn36xx_vif_to_priv(vif); 2863 struct wcn36xx_hal_gtk_offload_req_msg msg_body; 2864 int ret; 2865 2866 mutex_lock(&wcn->hal_mutex); 2867 2868 INIT_HAL_MSG(msg_body, WCN36XX_HAL_GTK_OFFLOAD_REQ); 2869 2870 if (enable) { 2871 memcpy(&msg_body.kek, vif_priv->rekey_data.kek, NL80211_KEK_LEN); 2872 memcpy(&msg_body.kck, vif_priv->rekey_data.kck, NL80211_KCK_LEN); > 2873 msg_body.key_replay_counter = vif_priv->rekey_data.replay_ctr; 2874 msg_body.bss_index = vif_priv->bss_index; 2875 } else { 2876 msg_body.flags = WCN36XX_HAL_GTK_OFFLOAD_FLAGS_DISABLE; 2877 } 2878 2879 PREPARE_HAL_BUF(wcn->hal_buf, msg_body); 2880 2881 ret = wcn36xx_smd_send_and_wait(wcn, msg_body.header.len); 2882 if (ret) { 2883 wcn36xx_err("Sending host_offload_arp failed\n"); 2884 goto out; 2885 } 2886 ret = wcn36xx_smd_rsp_status_check(wcn->hal_buf, wcn->hal_rsp_len); 2887 if (ret) { 2888 wcn36xx_err("host_offload_arp failed err=%d\n", ret); 2889 goto out; 2890 } 2891 out: 2892 mutex_unlock(&wcn->hal_mutex); 2893 return ret; 2894 } 2895 2896 static int wcn36xx_smd_gtk_offload_get_info_rsp(struct wcn36xx *wcn, 2897 struct ieee80211_vif *vif) 2898 { 2899 struct wcn36xx_vif *vif_priv = wcn36xx_vif_to_priv(vif); 2900 struct wcn36xx_hal_gtk_offload_get_info_rsp_msg *rsp; 2901 __be64 replay_ctr; 2902 2903 if (wcn36xx_smd_rsp_status_check(wcn->hal_buf, wcn->hal_rsp_len)) 2904 return -EIO; 2905 2906 rsp = (struct wcn36xx_hal_gtk_offload_get_info_rsp_msg *)wcn->hal_buf; 2907 2908 if (rsp->bss_index != vif_priv->bss_index) { 2909 wcn36xx_err("gtk_offload_info invalid response bss index %d\n", 2910 rsp->bss_index); 2911 return -ENOENT; 2912 } 2913 > 2914 replay_ctr = cpu_to_be64(le64_to_cpu(rsp->key_replay_counter)); > 2915 if (vif_priv->rekey_data.replay_ctr != rsp->key_replay_counter) { > 2916 vif_priv->rekey_data.replay_ctr = rsp->key_replay_counter; 2917 ieee80211_gtk_rekey_notify(vif, vif->bss_conf.bssid, 2918 (void *)&replay_ctr, GFP_KERNEL); 2919 wcn36xx_dbg(WCN36XX_DBG_HAL, 2920 "GTK replay counter increment %llu\n", 2921 rsp->key_replay_counter); 2922 } 2923 2924 wcn36xx_dbg(WCN36XX_DBG_HAL, 2925 "gtk offload info status %d last_rekey_status %d " 2926 "replay_counter %llu total_rekey_count %d gtk_rekey_count %d " 2927 "igtk_rekey_count %d bss_index %d\n", 2928 rsp->status, rsp->last_rekey_status, 2929 rsp->key_replay_counter, rsp->total_rekey_count, 2930 rsp->gtk_rekey_count, rsp->igtk_rekey_count, 2931 rsp->bss_index); 2932 2933 return 0; 2934 } 2935 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org