driverdev-devel.linuxdriverproject.org archive mirror
 help / color / mirror / Atom feed
From: Ross Schmidt <ross.schm.dev@gmail.com>
To: gregkh@linuxfoundation.org
Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
	Ross Schmidt <ross.schm.dev@gmail.com>
Subject: [PATCH v2 12/21] staging: rtl8723bs: replace _CHLGETXT_IE_
Date: Mon,  7 Dec 2020 22:07:24 -0600	[thread overview]
Message-ID: <20201208040733.379197-13-ross.schm.dev@gmail.com> (raw)
In-Reply-To: <20201208040733.379197-1-ross.schm.dev@gmail.com>

Replace unique _CHLGETXT_IE_ macro with kernel provided WLAN_EID_CHALLENGE
from linux/ieee80211.h.

Signed-off-by: Ross Schmidt <ross.schm.dev@gmail.com>
---
 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

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

  parent reply	other threads:[~2020-12-08  4:08 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-08  4:07 [PATCH v2 00/21] replace unique macros and ELEMENT_ID Ross Schmidt
2020-12-08  4:07 ` [PATCH v2 01/21] staging: rtl8723bs: use WLAN_EID_HT_CAPABILITY Ross Schmidt
2020-12-08  4:07 ` [PATCH v2 02/21] staging: rtl8723bs: use WLAN_EID_VENDOR_SPECIFIC Ross Schmidt
2020-12-08  4:07 ` [PATCH v2 03/21] staging: rtl8723bs: use WLAN_EID_RSN Ross Schmidt
2020-12-08  4:07 ` [PATCH v2 04/21] staging: rtl8723bs: use WLAN_EID_HT_OPERATION Ross Schmidt
2020-12-08  4:07 ` [PATCH v2 05/21] staging: rtl8723bs: replace WLAN_EID_VHT_OP_MODE_NOTIFY Ross Schmidt
2020-12-08  4:07 ` [PATCH v2 06/21] staging: rtl8723bs: replace _SSID_IE_ Ross Schmidt
2020-12-08  4:07 ` [PATCH v2 07/21] staging: rtl8723bs: replace _SUPPORTEDRATES_IE_ Ross Schmidt
2020-12-08  4:07 ` [PATCH v2 08/21] staging: rtl8723bs: replace _DSSET_IE_ Ross Schmidt
2020-12-08  4:07 ` [PATCH v2 09/21] staging: rtl8723bs: replace _TIM_IE_ Ross Schmidt
2020-12-08  4:07 ` [PATCH v2 10/21] staging: rtl8723bs: replace _IBSS_PARA_IE_ Ross Schmidt
2020-12-08  4:07 ` [PATCH v2 11/21] staging: rtl8723bs: replace _COUNTRY_IE_ Ross Schmidt
2020-12-08  4:07 ` Ross Schmidt [this message]
2020-12-08  4:07 ` [PATCH v2 13/21] staging: rtl8723bs: replace _ERPINFO_IE_ Ross Schmidt
2020-12-08  4:07 ` [PATCH v2 14/21] staging: rtl8723bs: replace _EXT_SUPPORTEDRATES_IE_ Ross Schmidt
2020-12-08  4:07 ` [PATCH v2 15/21] staging: rtl8723bs: replace _WAPI_IE_ Ross Schmidt
2020-12-08  4:07 ` [PATCH v2 16/21] staging: rtl8723bs: replace _MME_IE_ Ross Schmidt
2020-12-08  4:07 ` [PATCH v2 17/21] staging: rtl8723bs: replace EID_BSSCoexistence Ross Schmidt
2020-12-08  4:07 ` [PATCH v2 18/21] staging: rtl8723bs: replace EID_BSSIntolerantChlReport Ross Schmidt
2020-12-08  4:07 ` [PATCH v2 19/21] staging: rtl8723bs: replace EID_EXTCapability Ross Schmidt
2020-12-08  4:07 ` [PATCH v2 20/21] staging: rtl8723bs: remove unused macros Ross Schmidt
2020-12-08  4:07 ` [PATCH v2 21/21] staging: rtl8723bs: remove ELEMENT_ID enum Ross Schmidt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201208040733.379197-13-ross.schm.dev@gmail.com \
    --to=ross.schm.dev@gmail.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).