Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp2895410pxu; Mon, 7 Dec 2020 20:15:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJz9/VI5Lg7Mo5JVyMmdnuIEvyaGwFc6JMTRt9GFWP++gX+lTKjIRtZXqc46YKV/+Cv7Xa+6 X-Received: by 2002:a05:6402:1d15:: with SMTP id dg21mr22609563edb.280.1607400936770; Mon, 07 Dec 2020 20:15:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607400936; cv=none; d=google.com; s=arc-20160816; b=yYTDWaaU/L8nEDzdoOc5Kmm+Z9XZUoOfTjg9jRPOw9mtln1f+/yIGL7m+rsxnsA3Ba n9bDauYUoOziGF/aRf5tcgEOeCjrLvVSpI0ToClsFDR2fBZzrIpF9DK6a1RfCKuxKOf0 TaurzV94EvS/vXucm2Qj0t+Ti9eo14DhcKYby01y9yqS6Nh3qGxXSFYFLaTAyS+NH+NY mx65BSXMrT4QKa6Sd01m+kT/uDj0EFU3pCgAYk/q1a7Mlc1H8vRuSEmxRqKUYKvlhjj9 jz2t6MT6eaTFRpm+XMN4rHnFW/riHOoqClgQJyYRARThaP1Eg3d2F0LmYd2tn5+wi2WT oRlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=JOKh3pIHcLV6hwl3hlWvC1AlmNEfQsVeH0itWK9SLyo=; b=Rw3UCpdVLsiHDtat0Lli9VEo5J9NcPsEtuP8FUptwdo/CevaKWpagEGNZpj5W+XvfA x4U506IhTVzmd7kLVZhoGt9MLkOFT+ZxTwZSku2pA/Qllbu0hYT4TysmRLnA6dH0AEar IWGSfhAvrLU7iSaluXcDdNbTxmyyd/wjJpIXSPnXHJLIVtEx7vZ/gA4x3DvpmWIXr1i4 27DSeB8fxbTAeF3L8sx1qXy7GKm5rB9POfY0TCms5xOH/tb05GrREpr+8zmt4sGJNMIN lA6zS5g39YT2xW873QH+VBswHh8e+7OvA4Z95zNR67bcMjWusQ9A/x+7gjqLDLD6xNJx /lFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="P77/YpIB"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v8si7724318ejj.305.2020.12.07.20.15.14; Mon, 07 Dec 2020 20:15:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="P77/YpIB"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727774AbgLHEJL (ORCPT + 99 others); Mon, 7 Dec 2020 23:09:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54778 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727569AbgLHEJD (ORCPT ); Mon, 7 Dec 2020 23:09:03 -0500 Received: from mail-io1-xd42.google.com (mail-io1-xd42.google.com [IPv6:2607:f8b0:4864:20::d42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 106E0C0611CA for ; Mon, 7 Dec 2020 20:07:52 -0800 (PST) Received: by mail-io1-xd42.google.com with SMTP id q137so15636917iod.9 for ; Mon, 07 Dec 2020 20:07:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=JOKh3pIHcLV6hwl3hlWvC1AlmNEfQsVeH0itWK9SLyo=; b=P77/YpIBjnMJhnXe+tUjkJioKMu/B+nUL+sICUo7K/dReW/izbDrd1WnY34jQUB6LE j9GF6RHxlVXR9vdfHtCkunz+EKcGkjneL17TdYp3HHlynHpqqQuQEabsxwPktVRZ/eVk Zu8G2v29UZ6Y/KPKgrSrCR2aCZmwUweH7le9RQfmSLStKrx+zR2/lwx/lrmlSKYw5m48 WenafGOrlKO/koSE0kdFiaSukw/FaTmatsjvowBIyuMlZc4oCtgsBBbtZQspEBlcQwWi facn2gjvYayhSKwi9eWD0/pobCIrnO5rnALUjwlxD0YXkTvLy94QKvKb6aSN1Y3Abctu DVWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=JOKh3pIHcLV6hwl3hlWvC1AlmNEfQsVeH0itWK9SLyo=; b=ATUjvSc5UnLUHT9h0vQt2Akj9rGHHo3y+FSuaj9BgURn55s3VfSNvbEzbfsNHcOzWu 8QmAWvfGTH2SwaZVdPhZAis44qsMTxN/nDH/Xcf3j4lUdSGT38AOevtFVVj7GyDmpmA1 RqeWM5qLeCRBKpJcE/EfhoIfJZqfEfsbDZVrN26g9ayUTfmtVIGK8dexzkwbF8Ub8+0e SFHnZMHvcoGcMlv1gQoBwMP5Hi4UUveJKXV/jL0OKm179qGqTGvLTDP3/iOyeU5vyzIP LBqAcHem6UXdUd+C42maz9gS4rkgH4HEx7pTP8NuAFAvXTir6lHBwjz7RC0xHwOPxUhs pj3g== X-Gm-Message-State: AOAM532cva94oRqlsa0vtkenkA8QT4B7DMfj8WkaRFr/QxKzWZMwaEJY hrktg9mKQb6MslHITJ8PE0E= X-Received: by 2002:a05:6602:2c48:: with SMTP id x8mr22739836iov.24.1607400471511; Mon, 07 Dec 2020 20:07:51 -0800 (PST) Received: from localhost.localdomain (c-73-242-81-227.hsd1.mn.comcast.net. [73.242.81.227]) by smtp.gmail.com with ESMTPSA id g2sm8630390ilh.41.2020.12.07.20.07.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Dec 2020 20:07:50 -0800 (PST) From: Ross Schmidt To: gregkh@linuxfoundation.org Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, Ross Schmidt Subject: [PATCH v2 12/21] staging: rtl8723bs: replace _CHLGETXT_IE_ Date: Mon, 7 Dec 2020 22:07:24 -0600 Message-Id: <20201208040733.379197-13-ross.schm.dev@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201208040733.379197-1-ross.schm.dev@gmail.com> References: <20201208040733.379197-1-ross.schm.dev@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Replace unique _CHLGETXT_IE_ macro with kernel provided WLAN_EID_CHALLENGE from linux/ieee80211.h. Signed-off-by: Ross Schmidt --- drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 8 ++++---- drivers/staging/rtl8723bs/include/wifi.h | 1 - 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c index 319a99833a49..93380493e8dc 100644 --- a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c +++ b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c @@ -1028,7 +1028,7 @@ unsigned int OnAuth(struct adapter *padapter, union recv_frame *precv_frame) /* checking for challenging txt... */ DBG_871X("checking for challenging txt...\n"); - p = rtw_get_ie(pframe + WLAN_HDR_A3_LEN + 4 + _AUTH_IE_OFFSET_, _CHLGETXT_IE_, (int *)&ie_len, + p = rtw_get_ie(pframe + WLAN_HDR_A3_LEN + 4 + _AUTH_IE_OFFSET_, WLAN_EID_CHALLENGE, (int *)&ie_len, len - WLAN_HDR_A3_LEN - _AUTH_IE_OFFSET_ - 4); if ((p == NULL) || (ie_len <= 0)) { @@ -1124,7 +1124,7 @@ unsigned int OnAuthClient(struct adapter *padapter, union recv_frame *precv_fram if (seq == 2) { if (pmlmeinfo->auth_algo == dot11AuthAlgrthm_Shared) { /* legendary shared system */ - p = rtw_get_ie(pframe + WLAN_HDR_A3_LEN + _AUTH_IE_OFFSET_, _CHLGETXT_IE_, (int *)&len, + p = rtw_get_ie(pframe + WLAN_HDR_A3_LEN + _AUTH_IE_OFFSET_, WLAN_EID_CHALLENGE, (int *)&len, pkt_len - WLAN_HDR_A3_LEN - _AUTH_IE_OFFSET_); if (p == NULL) { @@ -3026,7 +3026,7 @@ void issue_auth(struct adapter *padapter, struct sta_info *psta, unsigned short /* added challenging text... */ if ((psta->auth_seq == 2) && (psta->state & WIFI_FW_AUTH_STATE) && (use_shared_key == 1)) - pframe = rtw_set_ie(pframe, _CHLGETXT_IE_, 128, psta->chg_txt, &(pattrib->pktlen)); + pframe = rtw_set_ie(pframe, WLAN_EID_CHALLENGE, 128, psta->chg_txt, &(pattrib->pktlen)); } else { memcpy(pwlanhdr->addr1, get_my_bssid(&pmlmeinfo->network), ETH_ALEN); @@ -3066,7 +3066,7 @@ void issue_auth(struct adapter *padapter, struct sta_info *psta, unsigned short /* then checking to see if sending challenging text... */ if ((pmlmeinfo->auth_seq == 3) && (pmlmeinfo->state & WIFI_FW_AUTH_STATE) && (use_shared_key == 1)) { - pframe = rtw_set_ie(pframe, _CHLGETXT_IE_, 128, pmlmeinfo->chg_txt, &(pattrib->pktlen)); + pframe = rtw_set_ie(pframe, WLAN_EID_CHALLENGE, 128, pmlmeinfo->chg_txt, &(pattrib->pktlen)); SetPrivacy(fctrl); diff --git a/drivers/staging/rtl8723bs/include/wifi.h b/drivers/staging/rtl8723bs/include/wifi.h index 6df50468200e..2f13bbe38f74 100644 --- a/drivers/staging/rtl8723bs/include/wifi.h +++ b/drivers/staging/rtl8723bs/include/wifi.h @@ -387,7 +387,6 @@ static inline int IsFrameTypeCtrl(unsigned char *pframe) #define _FIXED_IE_LENGTH_ _BEACON_IE_OFFSET_ -#define _CHLGETXT_IE_ 16 #define _SUPPORTED_CH_IE_ 36 #define _CH_SWTICH_ANNOUNCE_ 37 /* Secondary Channel Offset */ #define _ERPINFO_IE_ 42 -- 2.25.1