Received: by 10.213.65.68 with SMTP id h4csp285894imn; Fri, 16 Mar 2018 03:08:10 -0700 (PDT) X-Google-Smtp-Source: AG47ELsmWcgz+kzVTK0qwfVclThm+/BpiR8Jte9O7SDvL8Tdf6jebhP/2xIdy0P/eXWUDV2xasYz X-Received: by 2002:a17:902:30f:: with SMTP id 15-v6mr1414395pld.365.1521194890036; Fri, 16 Mar 2018 03:08:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521194889; cv=none; d=google.com; s=arc-20160816; b=KRzVXIqf1/9nmujTI0YJzNBUHuY4rP2pz8vbFdYqOLNEbXA5+UaOWXlB1BAP2Twf90 CecLi6yCXj29T+IYK+rfMsqTKoYo93Vsz5aGC+WEjliV5CacyNugMB2dLUA9GFWSAgnm 3c4auUKKVEeX8fTo6cLYBhKXTAQ5jhfX/DESAWIV1iB0u/9a91QcuL/gYFAd3DqjTrek pMUpEyQOb45wQHG012gvcu8wcAGY+SyiIbE9dMW90F/EH0/xW8X2U8gxb3kVUw0k+AV0 UBW0Y2fEJyRYzpM3p4EPVCNI3xz0HjDNgLt2slUrjIu9Bb79zlAIm0IBUzjQ5vsJMm3V w/jQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=ByO10LIZ6JDqmPf9feOC26FKNy6Zdc+vPaHs0Fqwyy4=; b=zlcIWAJbHFJqgZcugjgNEoH65T6TAv2QiikB+orPBUXRQBOwh4ML+VqFPuleZROQPU AjmS4+A8VpNg0gb22oWc5qgStzFR3nvA40m85iFPfu9uNTA3r/iIEgVE5hSsNfTSE1oW yv6FujImuW2EE+AxtcN0GZ6S/zdaJuABVaC1xJ4/BFrR9kuC7obGDdyyL4CTAdf8wQia a0FKpW2pf5wIarIRd0BFVp+howB/K+dnczK+UTtyrvWLDh2ElIGISxouv6gSKAq4R7Ns Yy+mGngiJHtmix36PDEv4szUGiiY4975nUy80R0uBseuPGKJQUf7La/BJs18g91G+RYf bjpA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h2si4782691pgv.201.2018.03.16.03.07.55; Fri, 16 Mar 2018 03:08:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753066AbeCPKGV (ORCPT + 99 others); Fri, 16 Mar 2018 06:06:21 -0400 Received: from mga11.intel.com ([192.55.52.93]:31071 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752988AbeCPKGT (ORCPT ); Fri, 16 Mar 2018 06:06:19 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Mar 2018 03:05:53 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,315,1517904000"; d="scan'208";a="183348672" Received: from bee.sh.intel.com (HELO bee) ([10.239.97.14]) by orsmga004.jf.intel.com with ESMTP; 16 Mar 2018 03:05:51 -0700 Received: from kbuild by bee with local (Exim 4.84_2) (envelope-from ) id 1ewmE8-000NtP-1B; Fri, 16 Mar 2018 18:04:44 +0800 Date: Fri, 16 Mar 2018 18:18:54 +0800 From: kbuild test robot To: hariprasath.elango@gmail.com Cc: kbuild-all@01.org, aditya.shankar@microchip.com, gregkh@linuxfoundation.org, ganesh.krishna@microchip.com, devel@driverdev.osuosl.org, linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, hariprasath.elango@gmail.com Subject: Re: [PATCH 7/7] staging: wilc1000: use kmemdup to replace kmalloc/memcpy Message-ID: <201803161829.tgpTJelQ%fengguang.wu@intel.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: fengguang.wu@intel.com X-SA-Exim-Scanned: No (on bee); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi HariPrasath, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on next-20180309] [cannot apply to v4.16-rc4 v4.16-rc3 v4.16-rc2 v4.16-rc5] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/hariprasath-elango-gmail-com/staging-wilc1000-Fix-code-block-alignment/20180316-104440 coccinelle warnings: (new ones prefixed by >>) >> drivers/staging/wilc1000/host_interface.c:943:2-29: alloc with no test, possible model on line 995 drivers/staging/wilc1000/host_interface.c:949:2-28: alloc with no test, possible model on line 995 drivers/staging/wilc1000/host_interface.c:958:2-27: alloc with no test, possible model on line 995 vim +943 drivers/staging/wilc1000/host_interface.c c5c77ba18 Johnny Kim 2015-05-11 917 e554a3055 Leo Kim 2015-11-19 918 u8 wilc_connected_ssid[6] = {0}; 3ccff3322 Ajay Singh 2018-02-19 919 static s32 handle_connect(struct wilc_vif *vif, 120ae5938 Tony Cho 2015-09-21 920 struct connect_attr *pstrHostIFconnectAttr) c5c77ba18 Johnny Kim 2015-05-11 921 { 31390eec7 Leo Kim 2015-10-19 922 s32 result = 0; 173508b82 Ajay Singh 2018-01-30 923 struct wid wid_list[8]; cdbdae15d Ajay Singh 2018-01-30 924 u32 wid_cnt = 0, dummyval = 0; e33ff51ef Ajay Singh 2018-01-30 925 u8 *cur_byte = NULL; 24701563e Ajay Singh 2018-02-20 926 struct join_bss_param *bss_param; 71130e812 Glen Lee 2015-12-21 927 struct host_if_drv *hif_drv = vif->hif_drv; c5c77ba18 Johnny Kim 2015-05-11 928 e554a3055 Leo Kim 2015-11-19 929 if (memcmp(pstrHostIFconnectAttr->bssid, wilc_connected_ssid, ETH_ALEN) == 0) { 31390eec7 Leo Kim 2015-10-19 930 result = 0; b92f9304a Chris Park 2016-02-22 931 netdev_err(vif->ndev, "Discard connect request\n"); 31390eec7 Leo Kim 2015-10-19 932 return result; c5c77ba18 Johnny Kim 2015-05-11 933 } c5c77ba18 Johnny Kim 2015-05-11 934 24701563e Ajay Singh 2018-02-20 935 bss_param = pstrHostIFconnectAttr->params; 24701563e Ajay Singh 2018-02-20 936 if (!bss_param) { b92f9304a Chris Park 2016-02-22 937 netdev_err(vif->ndev, "Required BSSID not found\n"); 31390eec7 Leo Kim 2015-10-19 938 result = -ENOENT; 24db713fe Leo Kim 2015-09-16 939 goto ERRORHANDLER; c5c77ba18 Johnny Kim 2015-05-11 940 } c5c77ba18 Johnny Kim 2015-05-11 941 91109e113 Leo Kim 2015-10-19 942 if (pstrHostIFconnectAttr->bssid) { 788f6fc08 Chaehyun Lim 2016-02-12 @943 hif_drv->usr_conn_req.bssid = kmalloc(6, GFP_KERNEL); 788f6fc08 Chaehyun Lim 2016-02-12 944 memcpy(hif_drv->usr_conn_req.bssid, pstrHostIFconnectAttr->bssid, 6); c5c77ba18 Johnny Kim 2015-05-11 945 } c5c77ba18 Johnny Kim 2015-05-11 946 74ab5e45e Leo Kim 2015-10-29 947 hif_drv->usr_conn_req.ssid_len = pstrHostIFconnectAttr->ssid_len; 91109e113 Leo Kim 2015-10-19 948 if (pstrHostIFconnectAttr->ssid) { 72216411b Chaehyun Lim 2016-02-12 949 hif_drv->usr_conn_req.ssid = kmalloc(pstrHostIFconnectAttr->ssid_len + 1, GFP_KERNEL); 72216411b Chaehyun Lim 2016-02-12 950 memcpy(hif_drv->usr_conn_req.ssid, 8c8360b3f Leo Kim 2015-10-19 951 pstrHostIFconnectAttr->ssid, 8b3c9fa68 Leo Kim 2015-10-13 952 pstrHostIFconnectAttr->ssid_len); 72216411b Chaehyun Lim 2016-02-12 953 hif_drv->usr_conn_req.ssid[pstrHostIFconnectAttr->ssid_len] = '\0'; c5c77ba18 Johnny Kim 2015-05-11 954 } c5c77ba18 Johnny Kim 2015-05-11 955 331ed0800 Leo Kim 2015-10-29 956 hif_drv->usr_conn_req.ies_len = pstrHostIFconnectAttr->ies_len; 91109e113 Leo Kim 2015-10-19 957 if (pstrHostIFconnectAttr->ies) { a3b2f4b91 Leo Kim 2015-10-29 958 hif_drv->usr_conn_req.ies = kmalloc(pstrHostIFconnectAttr->ies_len, GFP_KERNEL); a3b2f4b91 Leo Kim 2015-10-29 959 memcpy(hif_drv->usr_conn_req.ies, 8c8360b3f Leo Kim 2015-10-19 960 pstrHostIFconnectAttr->ies, b59d5c5b5 Leo Kim 2015-10-13 961 pstrHostIFconnectAttr->ies_len); c5c77ba18 Johnny Kim 2015-05-11 962 } c5c77ba18 Johnny Kim 2015-05-11 963 a0942c579 Chaehyun Lim 2016-02-12 964 hif_drv->usr_conn_req.security = pstrHostIFconnectAttr->security; 7d0697282 Leo Kim 2015-10-29 965 hif_drv->usr_conn_req.auth_type = pstrHostIFconnectAttr->auth_type; 33bfb198f Leo Kim 2015-10-29 966 hif_drv->usr_conn_req.conn_result = pstrHostIFconnectAttr->result; 73abaa490 Leo Kim 2015-10-29 967 hif_drv->usr_conn_req.arg = pstrHostIFconnectAttr->arg; c5c77ba18 Johnny Kim 2015-05-11 968 cdbdae15d Ajay Singh 2018-01-30 969 wid_list[wid_cnt].id = WID_SUCCESS_FRAME_COUNT; cdbdae15d Ajay Singh 2018-01-30 970 wid_list[wid_cnt].type = WID_INT; cdbdae15d Ajay Singh 2018-01-30 971 wid_list[wid_cnt].size = sizeof(u32); cdbdae15d Ajay Singh 2018-01-30 972 wid_list[wid_cnt].val = (s8 *)(&(dummyval)); cdbdae15d Ajay Singh 2018-01-30 973 wid_cnt++; c5c77ba18 Johnny Kim 2015-05-11 974 cdbdae15d Ajay Singh 2018-01-30 975 wid_list[wid_cnt].id = WID_RECEIVED_FRAGMENT_COUNT; cdbdae15d Ajay Singh 2018-01-30 976 wid_list[wid_cnt].type = WID_INT; cdbdae15d Ajay Singh 2018-01-30 977 wid_list[wid_cnt].size = sizeof(u32); cdbdae15d Ajay Singh 2018-01-30 978 wid_list[wid_cnt].val = (s8 *)(&(dummyval)); cdbdae15d Ajay Singh 2018-01-30 979 wid_cnt++; c5c77ba18 Johnny Kim 2015-05-11 980 cdbdae15d Ajay Singh 2018-01-30 981 wid_list[wid_cnt].id = WID_FAILED_COUNT; cdbdae15d Ajay Singh 2018-01-30 982 wid_list[wid_cnt].type = WID_INT; cdbdae15d Ajay Singh 2018-01-30 983 wid_list[wid_cnt].size = sizeof(u32); cdbdae15d Ajay Singh 2018-01-30 984 wid_list[wid_cnt].val = (s8 *)(&(dummyval)); cdbdae15d Ajay Singh 2018-01-30 985 wid_cnt++; c5c77ba18 Johnny Kim 2015-05-11 986 cdbdae15d Ajay Singh 2018-01-30 987 wid_list[wid_cnt].id = WID_INFO_ELEMENT_ASSOCIATE; cdbdae15d Ajay Singh 2018-01-30 988 wid_list[wid_cnt].type = WID_BIN_DATA; cdbdae15d Ajay Singh 2018-01-30 989 wid_list[wid_cnt].val = hif_drv->usr_conn_req.ies; cdbdae15d Ajay Singh 2018-01-30 990 wid_list[wid_cnt].size = hif_drv->usr_conn_req.ies_len; cdbdae15d Ajay Singh 2018-01-30 991 wid_cnt++; c5c77ba18 Johnny Kim 2015-05-11 992 f7bbd9cf9 Leo Kim 2015-10-13 993 if (memcmp("DIRECT-", pstrHostIFconnectAttr->ssid, 7)) { 331ed0800 Leo Kim 2015-10-29 994 info_element_size = hif_drv->usr_conn_req.ies_len; 8b38942e3 HariPrasath Elango 2018-03-14 @995 info_element = kmemdup(hif_drv->usr_conn_req.ies, 8b38942e3 HariPrasath Elango 2018-03-14 996 info_element_size, 8b38942e3 HariPrasath Elango 2018-03-14 997 GFP_KERNEL); 8b38942e3 HariPrasath Elango 2018-03-14 998 if (!info_element) { 8b38942e3 HariPrasath Elango 2018-03-14 999 result = -ENOMEM; 8b38942e3 HariPrasath Elango 2018-03-14 1000 goto ERRORHANDLER; 8b38942e3 HariPrasath Elango 2018-03-14 1001 } c5c77ba18 Johnny Kim 2015-05-11 1002 } 06ea0cb65 HariPrasath Elango 2018-03-14 1003 cdbdae15d Ajay Singh 2018-01-30 1004 wid_list[wid_cnt].id = (u16)WID_11I_MODE; cdbdae15d Ajay Singh 2018-01-30 1005 wid_list[wid_cnt].type = WID_CHAR; cdbdae15d Ajay Singh 2018-01-30 1006 wid_list[wid_cnt].size = sizeof(char); cdbdae15d Ajay Singh 2018-01-30 1007 wid_list[wid_cnt].val = (s8 *)&hif_drv->usr_conn_req.security; cdbdae15d Ajay Singh 2018-01-30 1008 wid_cnt++; c5c77ba18 Johnny Kim 2015-05-11 1009 f7bbd9cf9 Leo Kim 2015-10-13 1010 if (memcmp("DIRECT-", pstrHostIFconnectAttr->ssid, 7)) a0942c579 Chaehyun Lim 2016-02-12 1011 mode_11i = hif_drv->usr_conn_req.security; c5c77ba18 Johnny Kim 2015-05-11 1012 cdbdae15d Ajay Singh 2018-01-30 1013 wid_list[wid_cnt].id = (u16)WID_AUTH_TYPE; cdbdae15d Ajay Singh 2018-01-30 1014 wid_list[wid_cnt].type = WID_CHAR; cdbdae15d Ajay Singh 2018-01-30 1015 wid_list[wid_cnt].size = sizeof(char); cdbdae15d Ajay Singh 2018-01-30 1016 wid_list[wid_cnt].val = (s8 *)&hif_drv->usr_conn_req.auth_type; cdbdae15d Ajay Singh 2018-01-30 1017 wid_cnt++; c5c77ba18 Johnny Kim 2015-05-11 1018 f7bbd9cf9 Leo Kim 2015-10-13 1019 if (memcmp("DIRECT-", pstrHostIFconnectAttr->ssid, 7)) 7d0697282 Leo Kim 2015-10-29 1020 auth_type = (u8)hif_drv->usr_conn_req.auth_type; c5c77ba18 Johnny Kim 2015-05-11 1021 cdbdae15d Ajay Singh 2018-01-30 1022 wid_list[wid_cnt].id = (u16)WID_JOIN_REQ_EXTENDED; cdbdae15d Ajay Singh 2018-01-30 1023 wid_list[wid_cnt].type = WID_STR; cdbdae15d Ajay Singh 2018-01-30 1024 wid_list[wid_cnt].size = 112; cdbdae15d Ajay Singh 2018-01-30 1025 wid_list[wid_cnt].val = kmalloc(wid_list[wid_cnt].size, GFP_KERNEL); c5c77ba18 Johnny Kim 2015-05-11 1026 f7bbd9cf9 Leo Kim 2015-10-13 1027 if (memcmp("DIRECT-", pstrHostIFconnectAttr->ssid, 7)) { cdbdae15d Ajay Singh 2018-01-30 1028 join_req_size = wid_list[wid_cnt].size; 0626baaac Leo Kim 2015-10-15 1029 join_req = kmalloc(join_req_size, GFP_KERNEL); c5c77ba18 Johnny Kim 2015-05-11 1030 } cdbdae15d Ajay Singh 2018-01-30 1031 if (!wid_list[wid_cnt].val) { 31390eec7 Leo Kim 2015-10-19 1032 result = -EFAULT; 24db713fe Leo Kim 2015-09-16 1033 goto ERRORHANDLER; 24db713fe Leo Kim 2015-09-16 1034 } c5c77ba18 Johnny Kim 2015-05-11 1035 e33ff51ef Ajay Singh 2018-01-30 1036 cur_byte = wid_list[wid_cnt].val; c5c77ba18 Johnny Kim 2015-05-11 1037 91109e113 Leo Kim 2015-10-19 1038 if (pstrHostIFconnectAttr->ssid) { e33ff51ef Ajay Singh 2018-01-30 1039 memcpy(cur_byte, pstrHostIFconnectAttr->ssid, pstrHostIFconnectAttr->ssid_len); e33ff51ef Ajay Singh 2018-01-30 1040 cur_byte[pstrHostIFconnectAttr->ssid_len] = '\0'; c5c77ba18 Johnny Kim 2015-05-11 1041 } e33ff51ef Ajay Singh 2018-01-30 1042 cur_byte += MAX_SSID_LEN; e33ff51ef Ajay Singh 2018-01-30 1043 *(cur_byte++) = INFRASTRUCTURE; ae4dfa572 Leo Kim 2015-10-13 1044 7bf0242a7 Ajay Singh 2018-01-22 1045 if (pstrHostIFconnectAttr->ch >= 1 && pstrHostIFconnectAttr->ch <= 14) { e33ff51ef Ajay Singh 2018-01-30 1046 *(cur_byte++) = pstrHostIFconnectAttr->ch; c5c77ba18 Johnny Kim 2015-05-11 1047 } else { b92f9304a Chris Park 2016-02-22 1048 netdev_err(vif->ndev, "Channel out of range\n"); e33ff51ef Ajay Singh 2018-01-30 1049 *(cur_byte++) = 0xFF; c5c77ba18 Johnny Kim 2015-05-11 1050 } 24701563e Ajay Singh 2018-02-20 1051 *(cur_byte++) = (bss_param->cap_info) & 0xFF; 24701563e Ajay Singh 2018-02-20 1052 *(cur_byte++) = ((bss_param->cap_info) >> 8) & 0xFF; c5c77ba18 Johnny Kim 2015-05-11 1053 91109e113 Leo Kim 2015-10-19 1054 if (pstrHostIFconnectAttr->bssid) e33ff51ef Ajay Singh 2018-01-30 1055 memcpy(cur_byte, pstrHostIFconnectAttr->bssid, 6); e33ff51ef Ajay Singh 2018-01-30 1056 cur_byte += 6; c5c77ba18 Johnny Kim 2015-05-11 1057 c0f52fbac Tony Cho 2015-10-20 1058 if (pstrHostIFconnectAttr->bssid) e33ff51ef Ajay Singh 2018-01-30 1059 memcpy(cur_byte, pstrHostIFconnectAttr->bssid, 6); e33ff51ef Ajay Singh 2018-01-30 1060 cur_byte += 6; c0f52fbac Tony Cho 2015-10-20 1061 24701563e Ajay Singh 2018-02-20 1062 *(cur_byte++) = (bss_param->beacon_period) & 0xFF; 24701563e Ajay Singh 2018-02-20 1063 *(cur_byte++) = ((bss_param->beacon_period) >> 8) & 0xFF; 24701563e Ajay Singh 2018-02-20 1064 *(cur_byte++) = bss_param->dtim_period; ae4dfa572 Leo Kim 2015-10-13 1065 24701563e Ajay Singh 2018-02-20 1066 memcpy(cur_byte, bss_param->supp_rates, MAX_RATES_SUPPORTED + 1); e33ff51ef Ajay Singh 2018-01-30 1067 cur_byte += (MAX_RATES_SUPPORTED + 1); c5c77ba18 Johnny Kim 2015-05-11 1068 24701563e Ajay Singh 2018-02-20 1069 *(cur_byte++) = bss_param->wmm_cap; 24701563e Ajay Singh 2018-02-20 1070 *(cur_byte++) = bss_param->uapsd_cap; c5c77ba18 Johnny Kim 2015-05-11 1071 24701563e Ajay Singh 2018-02-20 1072 *(cur_byte++) = bss_param->ht_capable; 24701563e Ajay Singh 2018-02-20 1073 hif_drv->usr_conn_req.ht_capable = bss_param->ht_capable; c5c77ba18 Johnny Kim 2015-05-11 1074 24701563e Ajay Singh 2018-02-20 1075 *(cur_byte++) = bss_param->rsn_found; 24701563e Ajay Singh 2018-02-20 1076 *(cur_byte++) = bss_param->rsn_grp_policy; 24701563e Ajay Singh 2018-02-20 1077 *(cur_byte++) = bss_param->mode_802_11i; ae4dfa572 Leo Kim 2015-10-13 1078 24701563e Ajay Singh 2018-02-20 1079 memcpy(cur_byte, bss_param->rsn_pcip_policy, sizeof(bss_param->rsn_pcip_policy)); 24701563e Ajay Singh 2018-02-20 1080 cur_byte += sizeof(bss_param->rsn_pcip_policy); c5c77ba18 Johnny Kim 2015-05-11 1081 24701563e Ajay Singh 2018-02-20 1082 memcpy(cur_byte, bss_param->rsn_auth_policy, sizeof(bss_param->rsn_auth_policy)); 24701563e Ajay Singh 2018-02-20 1083 cur_byte += sizeof(bss_param->rsn_auth_policy); c5c77ba18 Johnny Kim 2015-05-11 1084 24701563e Ajay Singh 2018-02-20 1085 memcpy(cur_byte, bss_param->rsn_cap, sizeof(bss_param->rsn_cap)); 24701563e Ajay Singh 2018-02-20 1086 cur_byte += sizeof(bss_param->rsn_cap); c5c77ba18 Johnny Kim 2015-05-11 1087 e33ff51ef Ajay Singh 2018-01-30 1088 *(cur_byte++) = REAL_JOIN_REQ; 24701563e Ajay Singh 2018-02-20 1089 *(cur_byte++) = bss_param->noa_enabled; c5c77ba18 Johnny Kim 2015-05-11 1090 24701563e Ajay Singh 2018-02-20 1091 if (bss_param->noa_enabled) { 24701563e Ajay Singh 2018-02-20 1092 *(cur_byte++) = (bss_param->tsf) & 0xFF; 24701563e Ajay Singh 2018-02-20 1093 *(cur_byte++) = ((bss_param->tsf) >> 8) & 0xFF; 24701563e Ajay Singh 2018-02-20 1094 *(cur_byte++) = ((bss_param->tsf) >> 16) & 0xFF; 24701563e Ajay Singh 2018-02-20 1095 *(cur_byte++) = ((bss_param->tsf) >> 24) & 0xFF; c5c77ba18 Johnny Kim 2015-05-11 1096 24701563e Ajay Singh 2018-02-20 1097 *(cur_byte++) = bss_param->opp_enabled; 24701563e Ajay Singh 2018-02-20 1098 *(cur_byte++) = bss_param->idx; c5c77ba18 Johnny Kim 2015-05-11 1099 24701563e Ajay Singh 2018-02-20 1100 if (bss_param->opp_enabled) 24701563e Ajay Singh 2018-02-20 1101 *(cur_byte++) = bss_param->ct_window; c5c77ba18 Johnny Kim 2015-05-11 1102 24701563e Ajay Singh 2018-02-20 1103 *(cur_byte++) = bss_param->cnt; c5c77ba18 Johnny Kim 2015-05-11 1104 24701563e Ajay Singh 2018-02-20 1105 memcpy(cur_byte, bss_param->duration, sizeof(bss_param->duration)); 24701563e Ajay Singh 2018-02-20 1106 cur_byte += sizeof(bss_param->duration); c5c77ba18 Johnny Kim 2015-05-11 1107 24701563e Ajay Singh 2018-02-20 1108 memcpy(cur_byte, bss_param->interval, sizeof(bss_param->interval)); 24701563e Ajay Singh 2018-02-20 1109 cur_byte += sizeof(bss_param->interval); c5c77ba18 Johnny Kim 2015-05-11 1110 24701563e Ajay Singh 2018-02-20 1111 memcpy(cur_byte, bss_param->start_time, sizeof(bss_param->start_time)); 24701563e Ajay Singh 2018-02-20 1112 cur_byte += sizeof(bss_param->start_time); c4f97526a Chris Park 2016-02-04 1113 } c5c77ba18 Johnny Kim 2015-05-11 1114 e33ff51ef Ajay Singh 2018-01-30 1115 cur_byte = wid_list[wid_cnt].val; cdbdae15d Ajay Singh 2018-01-30 1116 wid_cnt++; c5c77ba18 Johnny Kim 2015-05-11 1117 f7bbd9cf9 Leo Kim 2015-10-13 1118 if (memcmp("DIRECT-", pstrHostIFconnectAttr->ssid, 7)) { e33ff51ef Ajay Singh 2018-01-30 1119 memcpy(join_req, cur_byte, join_req_size); 7036c6244 Glen Lee 2015-12-21 1120 join_req_vif = vif; c5c77ba18 Johnny Kim 2015-05-11 1121 } c5c77ba18 Johnny Kim 2015-05-11 1122 e3f16965c Chris Park 2016-02-04 1123 if (pstrHostIFconnectAttr->bssid) e554a3055 Leo Kim 2015-11-19 1124 memcpy(wilc_connected_ssid, e554a3055 Leo Kim 2015-11-19 1125 pstrHostIFconnectAttr->bssid, ETH_ALEN); c5c77ba18 Johnny Kim 2015-05-11 1126 173508b82 Ajay Singh 2018-01-30 1127 result = wilc_send_config_pkt(vif, SET_CFG, wid_list, cdbdae15d Ajay Singh 2018-01-30 1128 wid_cnt, eb9939b76 Glen Lee 2015-12-21 1129 wilc_get_vif_idx(vif)); 31390eec7 Leo Kim 2015-10-19 1130 if (result) { b92f9304a Chris Park 2016-02-22 1131 netdev_err(vif->ndev, "failed to send config packet\n"); 31390eec7 Leo Kim 2015-10-19 1132 result = -EFAULT; 24db713fe Leo Kim 2015-09-16 1133 goto ERRORHANDLER; c5c77ba18 Johnny Kim 2015-05-11 1134 } else { b60005a8c Leo Kim 2015-10-29 1135 hif_drv->hif_state = HOST_IF_WAITING_CONN_RESP; c5c77ba18 Johnny Kim 2015-05-11 1136 } c5c77ba18 Johnny Kim 2015-05-11 1137 24db713fe Leo Kim 2015-09-16 1138 ERRORHANDLER: 31390eec7 Leo Kim 2015-10-19 1139 if (result) { 3b0437e18 Chaehyun Lim 2016-02-25 1140 struct connect_info strConnectInfo; c5c77ba18 Johnny Kim 2015-05-11 1141 81a59506f Leo Kim 2015-10-29 1142 del_timer(&hif_drv->connect_timer); c5c77ba18 Johnny Kim 2015-05-11 1143 3b0437e18 Chaehyun Lim 2016-02-25 1144 memset(&strConnectInfo, 0, sizeof(struct connect_info)); c5c77ba18 Johnny Kim 2015-05-11 1145 91109e113 Leo Kim 2015-10-19 1146 if (pstrHostIFconnectAttr->result) { 91109e113 Leo Kim 2015-10-19 1147 if (pstrHostIFconnectAttr->bssid) d4a24e082 Chaehyun Lim 2016-02-25 1148 memcpy(strConnectInfo.bssid, pstrHostIFconnectAttr->bssid, 6); c5c77ba18 Johnny Kim 2015-05-11 1149 91109e113 Leo Kim 2015-10-19 1150 if (pstrHostIFconnectAttr->ies) { 4607f9ccb Chaehyun Lim 2016-02-25 1151 strConnectInfo.req_ies_len = pstrHostIFconnectAttr->ies_len; 4ff485707 Chaehyun Lim 2016-02-25 1152 strConnectInfo.req_ies = kmalloc(pstrHostIFconnectAttr->ies_len, GFP_KERNEL); 4ff485707 Chaehyun Lim 2016-02-25 1153 memcpy(strConnectInfo.req_ies, 2ea158c47 Leo Kim 2015-10-13 1154 pstrHostIFconnectAttr->ies, b59d5c5b5 Leo Kim 2015-10-13 1155 pstrHostIFconnectAttr->ies_len); c5c77ba18 Johnny Kim 2015-05-11 1156 } c5c77ba18 Johnny Kim 2015-05-11 1157 6abcc11db Leo Kim 2015-10-13 1158 pstrHostIFconnectAttr->result(CONN_DISCONN_EVENT_CONN_RESP, c5c77ba18 Johnny Kim 2015-05-11 1159 &strConnectInfo, c5c77ba18 Johnny Kim 2015-05-11 1160 MAC_DISCONNECTED, c5c77ba18 Johnny Kim 2015-05-11 1161 NULL, 8f38db897 Leo Kim 2015-10-13 1162 pstrHostIFconnectAttr->arg); b60005a8c Leo Kim 2015-10-29 1163 hif_drv->hif_state = HOST_IF_IDLE; 4ff485707 Chaehyun Lim 2016-02-25 1164 kfree(strConnectInfo.req_ies); 4ff485707 Chaehyun Lim 2016-02-25 1165 strConnectInfo.req_ies = NULL; c5c77ba18 Johnny Kim 2015-05-11 1166 c5c77ba18 Johnny Kim 2015-05-11 1167 } else { b92f9304a Chris Park 2016-02-22 1168 netdev_err(vif->ndev, "Connect callback is NULL\n"); c5c77ba18 Johnny Kim 2015-05-11 1169 } c5c77ba18 Johnny Kim 2015-05-11 1170 } c5c77ba18 Johnny Kim 2015-05-11 1171 9254db077 Leo Kim 2015-10-13 1172 kfree(pstrHostIFconnectAttr->bssid); 9254db077 Leo Kim 2015-10-13 1173 pstrHostIFconnectAttr->bssid = NULL; c5c77ba18 Johnny Kim 2015-05-11 1174 f7bbd9cf9 Leo Kim 2015-10-13 1175 kfree(pstrHostIFconnectAttr->ssid); f7bbd9cf9 Leo Kim 2015-10-13 1176 pstrHostIFconnectAttr->ssid = NULL; c5c77ba18 Johnny Kim 2015-05-11 1177 2ea158c47 Leo Kim 2015-10-13 1178 kfree(pstrHostIFconnectAttr->ies); 2ea158c47 Leo Kim 2015-10-13 1179 pstrHostIFconnectAttr->ies = NULL; c5c77ba18 Johnny Kim 2015-05-11 1180 e33ff51ef Ajay Singh 2018-01-30 1181 kfree(cur_byte); 31390eec7 Leo Kim 2015-10-19 1182 return result; c5c77ba18 Johnny Kim 2015-05-11 1183 } c5c77ba18 Johnny Kim 2015-05-11 1184 :::::: The code at line 943 was first introduced by commit :::::: 788f6fc0810f35add6077f1cfd40b7f030e955ba staging: wilc1000: rename pu8bssid in struct user_conn_req :::::: TO: Chaehyun Lim :::::: CC: Greg Kroah-Hartman --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation