staging: rtl8723bs: os_dep: ioctl_linux.c: Fix formatting issues
v2 cover staging: rtl8723bs: os_dep: ioctl_linux.c: Fix formatting issues
This patchset:
-Removes spaces and adds right number of tabs. -Removes spaces before square brackets. -Avoids camelcase variable names. -Removes space before semicolon. -Aligns to open parenthesis.
Changes in v2:
-Variable name “bl_inserted” changed to “inserted”. -Variable name “PMK” changed to “pmk”. -Spelling corrected to “inserted” in log message.
Payal Kshirsagar (9):
staging: rtl8723bs: os_dep: ioctl_linux.c: Fix indentation issue.
staging: rtl8723bs: os_dep: ioctl_linux.c: space prohibited before
square brackets
staging: rtl8723bs: os_dep: ioctl_linux.c: "foo* bar" should be "foo
*bar"
staging: rtl8723bs: os_dep: ioctl_linux.c: "(foo*)" should be "(foo
*)" staging: rtl8723bs: os_dep: ioctl_linux.c: Avoid CamelCase
"blInserted"
staging: rtl8723bs: os_dep: ioctl_linux.c: Avoid CamelCase "intReturn”
staging: rtl8723bs: os_dep: ioctl_linux.c: space prohibited before
semicolon
staging: rtl8723bs: os_dep: ioctl_linux.c: Avoid CamelCase "pPMK"
staging: rtl8723bs: os_dep: ioctl_linux.c: Alignment should match open
parenthesis
drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 103 ++++++++++++------------- 1 file changed, 50 insertions(+), 53 deletions(-)
Signature · 1 line
2.7.4
PATCH v2 1/9 staging: rtl8723bs: os_dep: ioctl_linux.c: Fix indentation issue.
To fix the indentation issue remove spaces and add tabs.
--- drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 85 +++++++++++++------------- 1 file changed, 41 insertions(+), 44 deletions(-)
drivers/staging/rtl8723bs/os_dep/ioctl_linux.c +41 -44
@@ -939,30 +939,30 @@ static int rtw_wx_get_mode(struct net_device *dev, struct iw_request_info *a,static int rtw_wx_set_pmkid (struct net_device *dev, -struct iw_request_info *a, -union iwreq_data *wrqu,char *extra) +struct iw_request_info *a, +union iwreq_data *wrqu,char *extra) {struct adapter *padapter = (struct adapter *)rtw_netdev_priv (dev); -u8 j, blInserted = false; -int intReturn = false; +u8 j, blInserted = false; +int intReturn = false;struct security_priv *psecuritypriv = &padapter->securitypriv; -struct iw_pmksa * pPMK = (struct iw_pmksa *)extra; -u8 strZeroMacAddress[ETH_ALEN ] = {0x00 }; -u8 strIssueBssid[ETH_ALEN ] = {0x00 }; +struct iw_pmksa * pPMK = (struct iw_pmksa *)extra; +u8 strZeroMacAddress[ETH_ALEN ] = {0x00 }; +u8 strIssueBssid[ETH_ALEN ] = {0x00 };/* -There are the BSSID information in the bssid.sa_data array. -If cmd is IW_PMKSA_FLUSH, it means the wpa_suppplicant wants to clear all the PMKID information. -If cmd is IW_PMKSA_ADD, it means the wpa_supplicant wants to add a PMKID/BSSID to driver. -If cmd is IW_PMKSA_REMOVE, it means the wpa_supplicant wants to remove a PMKID/BSSID from driver. -*/ +There are the BSSID information in the bssid.sa_data array. +If cmd is IW_PMKSA_FLUSH, it means the wpa_suppplicant wants to clear all the PMKID information. +If cmd is IW_PMKSA_ADD, it means the wpa_supplicant wants to add a PMKID/BSSID to driver. +If cmd is IW_PMKSA_REMOVE, it means the wpa_supplicant wants to remove a PMKID/BSSID from driver. +*/ memcpy (strIssueBssid, pPMK->bssid.sa_data,ETH_ALEN ); -if (pPMK->cmd ==IW_PMKSA_ADD ) { -DBG_871X ("[rtw_wx_set_pmkid] IW_PMKSA_ADD!\n" ); -if (!memcmp (strIssueBssid, strZeroMacAddress,ETH_ALEN )) +if (pPMK->cmd ==IW_PMKSA_ADD ) { +DBG_871X ("[rtw_wx_set_pmkid] IW_PMKSA_ADD!\n" ); +if (!memcmp (strIssueBssid, strZeroMacAddress,ETH_ALEN ))return intReturn; -else +else intReturn = true; blInserted = false;
@@ -971,46 +971,43 @@ static int rtw_wx_set_pmkid(struct net_device *dev,for (j =0 ; j<NUM_PMKID_CACHE ; j++) {if (!memcmp (psecuritypriv->PMKIDList[j].Bssid, strIssueBssid,ETH_ALEN )) {/* BSSID is matched, the same AP => rewrite with new PMKID. */ -DBG_871X ("[rtw_wx_set_pmkid] BSSID exists in the PMKList.\n" ); - +DBG_871X ("[rtw_wx_set_pmkid] BSSID exists in the PMKList.\n" );memcpy (psecuritypriv->PMKIDList[j].PMKID, pPMK->pmkid,IW_PMKID_LEN ); - psecuritypriv->PMKIDList[ j ].bUsed = true; + psecuritypriv->PMKIDList[ j ].bUsed = true; psecuritypriv->PMKIDIndex = j+1 ; blInserted = true;break ; } - } - -if (!blInserted) { -/* Find a new entry */ -DBG_871X ("[rtw_wx_set_pmkid] Use the new entry index = %d for this PMKID.\n" , - psecuritypriv->PMKIDIndex); - -memcpy (psecuritypriv->PMKIDList[psecuritypriv->PMKIDIndex].Bssid, strIssueBssid,ETH_ALEN ); -memcpy (psecuritypriv->PMKIDList[psecuritypriv->PMKIDIndex].PMKID, pPMK->pmkid,IW_PMKID_LEN ); + } - psecuritypriv->PMKIDList[ psecuritypriv->PMKIDIndex ].bUsed = true; - psecuritypriv->PMKIDIndex++ ; -if (psecuritypriv->PMKIDIndex ==16 ) - psecuritypriv->PMKIDIndex =0 ; +if (!blInserted) { +/* Find a new entry */ +DBG_871X ("[rtw_wx_set_pmkid] Use the new entry index = %d for this PMKID.\n" , + psecuritypriv->PMKIDIndex); +memcpy (psecuritypriv->PMKIDList[psecuritypriv->PMKIDIndex].Bssid, strIssueBssid,ETH_ALEN ); +memcpy (psecuritypriv->PMKIDList[psecuritypriv->PMKIDIndex].PMKID, pPMK->pmkid,IW_PMKID_LEN ); + psecuritypriv->PMKIDList[ psecuritypriv->PMKIDIndex ].bUsed = true; + psecuritypriv->PMKIDIndex++ ; +if (psecuritypriv->PMKIDIndex ==16 ) + psecuritypriv->PMKIDIndex =0 ; } - }else if (pPMK->cmd ==IW_PMKSA_REMOVE ) { -DBG_871X ("[rtw_wx_set_pmkid] IW_PMKSA_REMOVE!\n" ); - intReturn = true; + }else if (pPMK->cmd ==IW_PMKSA_REMOVE ) { +DBG_871X ("[rtw_wx_set_pmkid] IW_PMKSA_REMOVE!\n" ); + intReturn = true;for (j =0 ; j<NUM_PMKID_CACHE ; j++) {if (!memcmp (psecuritypriv->PMKIDList[j].Bssid, strIssueBssid,ETH_ALEN )) {/* BSSID is matched, the same AP => Remove this PMKID information and reset it. */ -eth_zero_addr (psecuritypriv->PMKIDList[j].Bssid); - psecuritypriv->PMKIDList[ j ].bUsed = false; +eth_zero_addr (psecuritypriv->PMKIDList[j].Bssid); + psecuritypriv->PMKIDList[ j ].bUsed = false;break ; } - } - }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 ); - psecuritypriv->PMKIDIndex =0 ; - intReturn = true; - } + } + }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 ); + psecuritypriv->PMKIDIndex =0 ; + intReturn = true; + }return intReturn; }
Signature · 1 line
2.7.4
PATCH v2 2/9 staging: rtl8723bs: os_dep: ioctl_linux.c: space prohibited before square brackets
In reply to Payal KshirsagarRemove space before square open and close bracket to fix issue - space prohibited before square brackets.
--- drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/staging/rtl8723bs/os_dep/ioctl_linux.c +6 -6
@@ -947,8 +947,8 @@ static int rtw_wx_set_pmkid(struct net_device *dev,int intReturn = false;struct security_priv *psecuritypriv = &padapter->securitypriv;struct iw_pmksa * pPMK = (struct iw_pmksa *)extra; -u8 strZeroMacAddress[ETH_ALEN ] = {0x00 }; -u8 strIssueBssid[ETH_ALEN ] = {0x00 }; +u8 strZeroMacAddress[ETH_ALEN ] = {0x00 }; +u8 strIssueBssid[ETH_ALEN ] = {0x00 };/* There are the BSSID information in the bssid.sa_data array.
@@ -973,7 +973,7 @@ static int rtw_wx_set_pmkid(struct net_device *dev,/* BSSID is matched, the same AP => rewrite with new PMKID. */ DBG_871X ("[rtw_wx_set_pmkid] BSSID exists in the PMKList.\n" );memcpy (psecuritypriv->PMKIDList[j].PMKID, pPMK->pmkid,IW_PMKID_LEN ); - psecuritypriv->PMKIDList[ j ].bUsed = true; + psecuritypriv->PMKIDList[j].bUsed = true; psecuritypriv->PMKIDIndex = j+1 ; blInserted = true;break ;
@@ -986,7 +986,7 @@ static int rtw_wx_set_pmkid(struct net_device *dev, psecuritypriv->PMKIDIndex);memcpy (psecuritypriv->PMKIDList[psecuritypriv->PMKIDIndex].Bssid, strIssueBssid,ETH_ALEN );memcpy (psecuritypriv->PMKIDList[psecuritypriv->PMKIDIndex].PMKID, pPMK->pmkid,IW_PMKID_LEN ); - psecuritypriv->PMKIDList[ psecuritypriv->PMKIDIndex ].bUsed = true; + psecuritypriv->PMKIDList[psecuritypriv->PMKIDIndex].bUsed = true; psecuritypriv->PMKIDIndex++ ;if (psecuritypriv->PMKIDIndex ==16 ) psecuritypriv->PMKIDIndex =0 ;
@@ -998,13 +998,13 @@ static int rtw_wx_set_pmkid(struct net_device *dev,if (!memcmp (psecuritypriv->PMKIDList[j].Bssid, strIssueBssid,ETH_ALEN )) {/* BSSID is matched, the same AP => Remove this PMKID information and reset it. */ eth_zero_addr (psecuritypriv->PMKIDList[j].Bssid); - psecuritypriv->PMKIDList[ j ].bUsed = false; + psecuritypriv->PMKIDList[j].bUsed = false;break ; } } }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 (RT_PMKID_LIST ) *NUM_PMKID_CACHE ); psecuritypriv->PMKIDIndex =0 ; intReturn = true; }
Signature · 1 line
2.7.4
PATCH v2 3/9 staging: rtl8723bs: os_dep: ioctl_linux.c: "foo* bar" should be "foo *bar"
In reply to Payal KshirsagarFix issue - "foo* bar" should be "foo *bar".
--- drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8723bs/os_dep/ioctl_linux.c +1 -1
@@ -946,7 +946,7 @@ static int rtw_wx_set_pmkid(struct net_device *dev,u8 j, blInserted = false;int intReturn = false;struct security_priv *psecuritypriv = &padapter->securitypriv; -struct iw_pmksa * pPMK = (struct iw_pmksa *)extra; +struct iw_pmksa *pPMK = (struct iw_pmksa *)extra;u8 strZeroMacAddress[ETH_ALEN ] = {0x00 };u8 strIssueBssid[ETH_ALEN ] = {0x00 };
Signature · 1 line
2.7.4
PATCH v2 4/9 staging: rtl8723bs: os_dep: ioctl_linux.c: "(foo*)" should be "(foo *)"
In reply to Payal KshirsagarFix issue - "(foo*)" should be "(foo *)".
--- drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8723bs/os_dep/ioctl_linux.c +1 -1
@@ -946,7 +946,7 @@ static int rtw_wx_set_pmkid(struct net_device *dev,u8 j, blInserted = false;int intReturn = false;struct security_priv *psecuritypriv = &padapter->securitypriv; -struct iw_pmksa *pPMK = (struct iw_pmksa *)extra; +struct iw_pmksa *pPMK = (struct iw_pmksa *)extra;u8 strZeroMacAddress[ETH_ALEN ] = {0x00 };u8 strIssueBssid[ETH_ALEN ] = {0x00 };
Signature · 1 line
2.7.4
PATCH v2 5/9 staging: rtl8723bs: os_dep: ioctl_linux.c: Avoid CamelCase "blInserted"
In reply to Payal KshirsagarChange variable name "blInserted" to “inserted”
to avoid camelcase style issue.
--- drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/staging/rtl8723bs/os_dep/ioctl_linux.c +4 -4
@@ -943,7 +943,7 @@ static int rtw_wx_set_pmkid(struct net_device *dev, union iwreq_data *wrqu, char *extra) { struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev); -u8 j, blInserted = false; +u8 j, inserted = false;int intReturn = false;struct security_priv *psecuritypriv = &padapter->securitypriv;struct iw_pmksa *pPMK = (struct iw_pmksa *)extra;
@@ -965,7 +965,7 @@ static int rtw_wx_set_pmkid(struct net_device *dev,else intReturn = true; - blInserted = false; + inserted = false;/* overwrite PMKID */ for (j =0 ; j<NUM_PMKID_CACHE ; j++) {
@@ -975,12 +975,12 @@ static int rtw_wx_set_pmkid(struct net_device *dev,memcpy (psecuritypriv->PMKIDList[j].PMKID, pPMK->pmkid,IW_PMKID_LEN ); psecuritypriv->PMKIDList[j].bUsed = true; psecuritypriv->PMKIDIndex = j+1 ; - blInserted = true; + inserted = true;break ; } } -if (!blInserted) { +if (!inserted) {/* Find a new entry */ DBG_871X ("[rtw_wx_set_pmkid] Use the new entry index = %d for this PMKID.\n" , psecuritypriv->PMKIDIndex);
Signature · 1 line
2.7.4
PATCH v2 6/9 staging: rtl8723bs: os_dep: ioctl_linux.c: Avoid CamelCase "intReturn"
In reply to Payal KshirsagarChange variable name "intReturn" to "ret" to avoid camelcase style issue.
--- drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/staging/rtl8723bs/os_dep/ioctl_linux.c +6 -6
@@ -944,7 +944,7 @@ static int rtw_wx_set_pmkid(struct net_device *dev, {struct adapter *padapter = (struct adapter *)rtw_netdev_priv (dev);u8 j, inserted = false; -int intReturn = false; +int ret = false;struct security_priv *psecuritypriv = &padapter->securitypriv;struct iw_pmksa *pPMK = (struct iw_pmksa *)extra;u8 strZeroMacAddress[ETH_ALEN ] = {0x00 };
@@ -961,9 +961,9 @@ static int rtw_wx_set_pmkid(struct net_device *dev,if (pPMK->cmd ==IW_PMKSA_ADD ) {DBG_871X ("[rtw_wx_set_pmkid] IW_PMKSA_ADD!\n" );if (!memcmp (strIssueBssid, strZeroMacAddress,ETH_ALEN )) -return intReturn; +return ret;else - intReturn = true; + ret = true; inserted = false;
@@ -993,7 +993,7 @@ static int rtw_wx_set_pmkid(struct net_device *dev, } }else if (pPMK->cmd ==IW_PMKSA_REMOVE ) {DBG_871X ("[rtw_wx_set_pmkid] IW_PMKSA_REMOVE!\n" ); - intReturn = true; + ret = true;for (j =0 ; j<NUM_PMKID_CACHE ; j++) {if (!memcmp (psecuritypriv->PMKIDList[j].Bssid, strIssueBssid,ETH_ALEN )) {/* BSSID is matched, the same AP => Remove this PMKID information and reset it. */
@@ -1006,9 +1006,9 @@ static int rtw_wx_set_pmkid(struct net_device *dev,DBG_871X ("[rtw_wx_set_pmkid] IW_PMKSA_FLUSH!\n" );memset (&psecuritypriv->PMKIDList[0 ],0x00 ,sizeof (RT_PMKID_LIST ) *NUM_PMKID_CACHE ); psecuritypriv->PMKIDIndex =0 ; - intReturn = true; + ret = true; } -return intReturn; +return ret; } static int rtw_wx_get_sens(struct net_device *dev,
Signature · 1 line
2.7.4
PATCH v2 7/9 staging: rtl8723bs: os_dep: ioctl_linux.c: space prohibited before semicolon
In reply to Payal KshirsagarRemove space before semicolon.
--- drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8723bs/os_dep/ioctl_linux.c +1 -1
@@ -987,7 +987,7 @@ static int rtw_wx_set_pmkid(struct net_device *dev,memcpy (psecuritypriv->PMKIDList[psecuritypriv->PMKIDIndex].Bssid, strIssueBssid,ETH_ALEN );memcpy (psecuritypriv->PMKIDList[psecuritypriv->PMKIDIndex].PMKID, pPMK->pmkid,IW_PMKID_LEN ); psecuritypriv->PMKIDList[psecuritypriv->PMKIDIndex].bUsed = true; - psecuritypriv->PMKIDIndex++ ; + psecuritypriv->PMKIDIndex++;if (psecuritypriv->PMKIDIndex ==16 ) psecuritypriv->PMKIDIndex =0 ; }
Signature · 1 line
2.7.4
PATCH v2 8/9 staging: rtl8723bs: os_dep: ioctl_linux.c: Avoid CamelCase "pPMK"
In reply to Payal KshirsagarChange variable name "pPMK" to "pmk" to avoid camelcase style issue.
--- drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
drivers/staging/rtl8723bs/os_dep/ioctl_linux.c +7 -7
@@ -946,7 +946,7 @@ static int rtw_wx_set_pmkid(struct net_device *dev,u8 j, inserted = false;int ret = false;struct security_priv *psecuritypriv = &padapter->securitypriv; -struct iw_pmksa *pPMK = (struct iw_pmksa *)extra; +struct iw_pmksa *pmk = (struct iw_pmksa *)extra;u8 strZeroMacAddress[ETH_ALEN ] = {0x00 };u8 strIssueBssid[ETH_ALEN ] = {0x00 };
@@ -957,8 +957,8 @@ static int rtw_wx_set_pmkid(struct net_device *dev,If cmd is IW_PMKSA_REMOVE, it means the wpa_supplicant wants to remove a PMKID/BSSID from driver. */ -memcpy (strIssueBssid, pPMK->bssid.sa_data,ETH_ALEN ); -if (pPMK->cmd ==IW_PMKSA_ADD ) { +memcpy (strIssueBssid, pmk->bssid.sa_data,ETH_ALEN ); +if (pmk->cmd ==IW_PMKSA_ADD ) {DBG_871X ("[rtw_wx_set_pmkid] IW_PMKSA_ADD!\n" );if (!memcmp (strIssueBssid, strZeroMacAddress,ETH_ALEN ))return ret;
@@ -972,7 +972,7 @@ static int rtw_wx_set_pmkid(struct net_device *dev,if (!memcmp (psecuritypriv->PMKIDList[j].Bssid, strIssueBssid,ETH_ALEN )) {/* BSSID is matched, the same AP => rewrite with new PMKID. */ DBG_871X ("[rtw_wx_set_pmkid] BSSID exists in the PMKList.\n" ); -memcpy (psecuritypriv->PMKIDList[j].PMKID, pPMK->pmkid,IW_PMKID_LEN ); +memcpy (psecuritypriv->PMKIDList[j].PMKID, pmk->pmkid,IW_PMKID_LEN ); psecuritypriv->PMKIDList[j].bUsed = true; psecuritypriv->PMKIDIndex = j+1 ; inserted = true;
@@ -985,13 +985,13 @@ static int rtw_wx_set_pmkid(struct net_device *dev,DBG_871X ("[rtw_wx_set_pmkid] Use the new entry index = %d for this PMKID.\n" , psecuritypriv->PMKIDIndex);memcpy (psecuritypriv->PMKIDList[psecuritypriv->PMKIDIndex].Bssid, strIssueBssid,ETH_ALEN ); -memcpy (psecuritypriv->PMKIDList[psecuritypriv->PMKIDIndex].PMKID, pPMK->pmkid,IW_PMKID_LEN ); +memcpy (psecuritypriv->PMKIDList[psecuritypriv->PMKIDIndex].PMKID, pmk->pmkid,IW_PMKID_LEN ); psecuritypriv->PMKIDList[psecuritypriv->PMKIDIndex].bUsed = true; psecuritypriv->PMKIDIndex++;if (psecuritypriv->PMKIDIndex ==16 ) psecuritypriv->PMKIDIndex =0 ; } - }else if (pPMK->cmd ==IW_PMKSA_REMOVE ) { + }else if (pmk->cmd ==IW_PMKSA_REMOVE ) {DBG_871X ("[rtw_wx_set_pmkid] IW_PMKSA_REMOVE!\n" ); ret = true;for (j =0 ; j<NUM_PMKID_CACHE ; j++) {
@@ -1002,7 +1002,7 @@ static int rtw_wx_set_pmkid(struct net_device *dev,break ; } } - }else if (pPMK->cmd ==IW_PMKSA_FLUSH ) { + }else if (pmk->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 ); psecuritypriv->PMKIDIndex =0 ;
Signature · 1 line
2.7.4
PATCH v2 9/9 staging: rtl8723bs: os_dep: ioctl_linux.c: Alignment should match open parenthesis
In reply to Payal KshirsagarAlign code to open parenthesis.
--- drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8723bs/os_dep/ioctl_linux.c +1 -1
@@ -983,7 +983,7 @@ static int rtw_wx_set_pmkid(struct net_device *dev,if (!inserted) {/* Find a new entry */ DBG_871X ("[rtw_wx_set_pmkid] Use the new entry index = %d for this PMKID.\n" , - psecuritypriv->PMKIDIndex); + psecuritypriv->PMKIDIndex);memcpy (psecuritypriv->PMKIDList[psecuritypriv->PMKIDIndex].Bssid, strIssueBssid,ETH_ALEN );memcpy (psecuritypriv->PMKIDList[psecuritypriv->PMKIDIndex].PMKID, pmk->pmkid,IW_PMKID_LEN ); psecuritypriv->PMKIDList[psecuritypriv->PMKIDIndex].bUsed = true;
Signature · 1 line
2.7.4
Re: [Outreachy kernel] [PATCH v2 1/9] staging: rtl8723bs: os_dep: ioctl_linux.c: Fix indentation issue.
In reply to Payal KshirsagarQuoted 34 lines · Payal Kshirsagar
To fix the indentation issue remove spaces and add tabs.
Signed-off-by Payal Kshirsagar <[email protected]>--- drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 85 +++++++++++++------------- 1 file changed, 41 insertions(+), 44 deletions(-)drivers/staging/rtl8723bs/os_dep/ioctl_linux.c +7
-7@@ -939,30 +939,30 @@ static int rtw_wx_get_mode(struct net_device *dev, struct iw_request_info *a,static int rtw_wx_set_pmkid (struct net_device *dev, -struct iw_request_info *a, -union iwreq_data *wrqu,char *extra) +struct iw_request_info *a, +union iwreq_data *wrqu,char *extra) {struct adapter *padapter = (struct adapter *)rtw_netdev_priv (dev); -u8 j, blInserted = false; -int intReturn = false; +u8 j, blInserted = false; +int intReturn = false;struct security_priv *psecuritypriv = &padapter->securitypriv; -struct iw_pmksa * pPMK = (struct iw_pmksa *)extra; -u8 strZeroMacAddress[ETH_ALEN ] = {0x00 }; -u8 strIssueBssid[ETH_ALEN ] = {0x00 }; +struct iw_pmksa * pPMK = (struct iw_pmksa *)extra; +u8 strZeroMacAddress[ETH_ALEN ] = {0x00 }; +u8 strIssueBssid[ETH_ALEN ] = {0x00 };/*
drivers/staging/rtl8723bs/os_dep/ioctl_linux.c static int rtw_wx_get_mode(struct net_device *dev, struct iw_request_info *a, · line 958
Quoted 10 lines
drivers/staging/rtl8723bs/os_dep/ioctl_linux.c +5
-5-There are the BSSID information in the bssid.sa_data array. -If cmd is IW_PMKSA_FLUSH, it means the wpa_suppplicant wants to clear all the PMKID information. -If cmd is IW_PMKSA_ADD, it means the wpa_supplicant wants to add a PMKID/BSSID to driver. -If cmd is IW_PMKSA_REMOVE, it means the wpa_supplicant wants to remove a PMKID/BSSID from driver. -*/ +There are the BSSID information in the bssid.sa_data array. +If cmd is IW_PMKSA_FLUSH, it means the wpa_suppplicant wants to clear all the PMKID information. +If cmd is IW_PMKSA_ADD, it means the wpa_supplicant wants to add a PMKID/BSSID to driver. +If cmd is IW_PMKSA_REMOVE, it means the wpa_supplicant wants to remove a PMKID/BSSID from driver. +*/
That is not the correct indentation to make :(
Quoted 11 lines · Payal Kshirsagar
This patchset:
-Removes spaces and adds right number of tabs. -Removes spaces before square brackets. -Avoids camelcase variable names. -Removes space before semicolon. -Aligns to open parenthesis.Changes in v2:
-Variable name “bl_inserted” changed to “inserted”. -Variable name “PMK” changed to “pmk”. -Spelling corrected to “inserted” in log message.
As I didn't take the 1st patch here, I couldn't take any of the others. Please fix up and resend the whole series.
thanks,
greg k-h
Quoted 8 lines · Greg KH
Quoted 7 lines · Payal Kshirsagar
This patchset:
-Removes spaces and adds right number of tabs. -Removes spaces before square brackets. -Avoids camelcase variable names. -Removes space before semicolon. -Aligns to open parenthesis.
Quoted 8 lines
Quoted 4 lines
Changes in v2:
-Variable name “bl_inserted” changed to “inserted”. -Variable name “PMK” changed to “pmk”. -Spelling corrected to “inserted” in log message.As I didn't take the 1st patch here, I couldn't take any of the others. Please fix up and resend the whole series.
Sure, I will do.
Thanks,
Payal
thanks,
Quoted 3 lines
greg k-h