Skip to content

Commit

Permalink
staging: rtl8723bs: remove typedefs in rtw_security.h
Browse files Browse the repository at this point in the history
This commit fixes the following checkpatch.pl warning:

    WARNING: do not add new typedefs
    torvalds#87: FILE: include/rtw_security.h:87:
    +typedef struct _RT_PMKID_LIST {

Signed-off-by: Marco Cesati <marco.cesati@gmail.com>
  • Loading branch information
Marco Cesati authored and intel-lab-lkp committed Mar 12, 2021
1 parent fa7870b commit 59dd13c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions drivers/staging/rtl8723bs/include/rtw_security.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,14 @@ union Keytype {
};


typedef struct _RT_PMKID_LIST {
struct RT_PMKID_LIST {
u8 bUsed;
u8 Bssid[6];
u8 PMKID[16];
u8 SsidBuf[33];
u8 *ssid_octet;
u16 ssid_length;
} RT_PMKID_LIST, *PRT_PMKID_LIST;
};


struct security_priv {
Expand Down Expand Up @@ -166,7 +166,7 @@ struct security_priv {
u32 btkip_countermeasure_time;

/* For WPA2 Pre-Authentication. */
RT_PMKID_LIST PMKIDList[NUM_PMKID_CACHE]; /* Renamed from PreAuthKey[NUM_PRE_AUTH_KEY]. Annie, 2006-10-13. */
struct RT_PMKID_LIST PMKIDList[NUM_PMKID_CACHE]; /* Renamed from PreAuthKey[NUM_PRE_AUTH_KEY]. Annie, 2006-10-13. */
u8 PMKIDIndex;

u8 bWepDefaultKeyIdxSet;
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -2346,7 +2346,7 @@ static int cfg80211_rtw_flush_pmksa(struct wiphy *wiphy,

DBG_871X(FUNC_NDEV_FMT"\n", FUNC_NDEV_ARG(ndev));

memset(&psecuritypriv->PMKIDList[0], 0x00, sizeof(RT_PMKID_LIST) * NUM_PMKID_CACHE);
memset(&psecuritypriv->PMKIDList[0], 0x00, sizeof(struct RT_PMKID_LIST) * NUM_PMKID_CACHE);
psecuritypriv->PMKIDIndex = 0;

return 0;
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -999,7 +999,7 @@ static int rtw_wx_set_pmkid(struct net_device *dev,
}
} else if (pPMK->cmd == IW_PMKSA_FLUSH) {
DBG_871X("[rtw_wx_set_pmkid] IW_PMKSA_FLUSH!\n");
memset(&psecuritypriv->PMKIDList[0], 0x00, sizeof(RT_PMKID_LIST) * NUM_PMKID_CACHE);
memset(&psecuritypriv->PMKIDList[0], 0x00, sizeof(struct RT_PMKID_LIST) * NUM_PMKID_CACHE);
psecuritypriv->PMKIDIndex = 0;
intReturn = true;
}
Expand Down
8 changes: 4 additions & 4 deletions drivers/staging/rtl8723bs/os_dep/mlme_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ void rtw_os_indicate_scan_done(struct adapter *padapter, bool aborted)
indicate_wx_scan_complete_event(padapter);
}

static RT_PMKID_LIST backupPMKIDList[NUM_PMKID_CACHE];
static struct RT_PMKID_LIST backupPMKIDList[NUM_PMKID_CACHE];
void rtw_reset_securitypriv(struct adapter *adapter)
{
u8 backupPMKIDIndex = 0;
Expand All @@ -84,7 +84,7 @@ void rtw_reset_securitypriv(struct adapter *adapter)
/* Backup the btkip_countermeasure information. */
/* When the countermeasure is trigger, the driver have to disconnect with AP for 60 seconds. */

memcpy(&backupPMKIDList[0], &adapter->securitypriv.PMKIDList[0], sizeof(RT_PMKID_LIST) * NUM_PMKID_CACHE);
memcpy(&backupPMKIDList[0], &adapter->securitypriv.PMKIDList[0], sizeof(struct RT_PMKID_LIST) * NUM_PMKID_CACHE);
backupPMKIDIndex = adapter->securitypriv.PMKIDIndex;
backupTKIPCountermeasure = adapter->securitypriv.btkip_countermeasure;
backupTKIPcountermeasure_time = adapter->securitypriv.btkip_countermeasure_time;
Expand All @@ -96,7 +96,7 @@ void rtw_reset_securitypriv(struct adapter *adapter)

/* Added by Albert 2009/02/18 */
/* Restore the PMK information to securitypriv structure for the following connection. */
memcpy(&adapter->securitypriv.PMKIDList[0], &backupPMKIDList[0], sizeof(RT_PMKID_LIST) * NUM_PMKID_CACHE);
memcpy(&adapter->securitypriv.PMKIDList[0], &backupPMKIDList[0], sizeof(struct RT_PMKID_LIST) * NUM_PMKID_CACHE);
adapter->securitypriv.PMKIDIndex = backupPMKIDIndex;
adapter->securitypriv.btkip_countermeasure = backupTKIPCountermeasure;
adapter->securitypriv.btkip_countermeasure_time = backupTKIPcountermeasure_time;
Expand Down Expand Up @@ -127,7 +127,7 @@ void rtw_reset_securitypriv(struct adapter *adapter)

void rtw_os_indicate_disconnect(struct adapter *adapter)
{
/* RT_PMKID_LIST backupPMKIDList[ NUM_PMKID_CACHE ]; */
/* struct RT_PMKID_LIST backupPMKIDList[ NUM_PMKID_CACHE ]; */

netif_carrier_off(adapter->pnetdev); /* Do it first for tx broadcast pkt after disconnection issue! */

Expand Down

0 comments on commit 59dd13c

Please sign in to comment.