[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1497205677-19665-3-git-send-email-jayad@cdac.in>
Date: Sun, 11 Jun 2017 23:57:57 +0530
From: Jaya Durga <jayad@...c.in>
To: gregkh@...uxfoundation.org
Cc: Larry.Finger@...inger.net, florian.c.schilhabel@...glemail.com,
driverdev-devel@...uxdriverproject.org, devel@...verdev.osuosl.org,
linux-kernel@...r.kernel.org, Jaya Durga <jayad@...c.in>
Subject: [PATCH 9/9] Staging: rtl8712: ieee80211: fixed camelcase coding style issue
Fixed coding style issue
Renamed Ssid to ssid
Renamed Ssid_Length to ssid_length
Signed-off-by: Jaya Durga <jayad@...c.in>
---
drivers/staging/rtl8712/ieee80211.c | 4 ++--
drivers/staging/rtl8712/os_intfs.c | 4 ++--
drivers/staging/rtl8712/rtl871x_cmd.c | 8 +++----
drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 30 ++++++++++++-------------
drivers/staging/rtl8712/rtl871x_ioctl_set.c | 14 ++++++------
drivers/staging/rtl8712/rtl871x_mlme.c | 32 +++++++++++++--------------
drivers/staging/rtl8712/rtl871x_mp_ioctl.c | 6 ++---
drivers/staging/rtl8712/wlan_bssdef.h | 6 ++---
8 files changed, 52 insertions(+), 52 deletions(-)
diff --git a/drivers/staging/rtl8712/ieee80211.c b/drivers/staging/rtl8712/ieee80211.c
index 5956fd4..6e673c1 100644
--- a/drivers/staging/rtl8712/ieee80211.c
+++ b/drivers/staging/rtl8712/ieee80211.c
@@ -188,8 +188,8 @@ int r8712_generate_ie(struct registry_priv *pregistrypriv)
sz += 2;
ie += 2;
/*SSID*/
- ie = r8712_set_ie(ie, _SSID_IE_, pdev_network->Ssid.SsidLength,
- pdev_network->Ssid.Ssid, &sz);
+ ie = r8712_set_ie(ie, _SSID_IE_, pdev_network->ssid.ssid_length,
+ pdev_network->ssid.ssid, &sz);
/*supported rates*/
set_supported_rate(pdev_network->rates, pregistrypriv->wireless_mode);
rate_len = r8712_get_rateset_len(pdev_network->rates);
diff --git a/drivers/staging/rtl8712/os_intfs.c b/drivers/staging/rtl8712/os_intfs.c
index cbe4de0..15a6b05 100644
--- a/drivers/staging/rtl8712/os_intfs.c
+++ b/drivers/staging/rtl8712/os_intfs.c
@@ -134,8 +134,8 @@ static void loadparam(struct _adapter *padapter, struct net_device *pnetdev)
registry_par->lbkmode = (u8)lbkmode;
registry_par->hci = (u8)hci;
registry_par->network_mode = (u8)network_mode;
- memcpy(registry_par->ssid.Ssid, "ANY", 3);
- registry_par->ssid.SsidLength = 3;
+ memcpy(registry_par->ssid.ssid, "ANY", 3);
+ registry_par->ssid.ssid_length = 3;
registry_par->channel = (u8)channel;
registry_par->wireless_mode = (u8)wireless_mode;
registry_par->vrtl_carrier_sense = (u8)vrtl_carrier_sense;
diff --git a/drivers/staging/rtl8712/rtl871x_cmd.c b/drivers/staging/rtl8712/rtl871x_cmd.c
index 640723b..2696645 100644
--- a/drivers/staging/rtl8712/rtl871x_cmd.c
+++ b/drivers/staging/rtl8712/rtl871x_cmd.c
@@ -241,9 +241,9 @@ u8 r8712_sitesurvey_cmd(struct _adapter *padapter,
psurveyPara->passive_mode = cpu_to_le32(pmlmepriv->passive_mode);
psurveyPara->ss_ssidlen = 0;
memset(psurveyPara->ss_ssid, 0, IW_ESSID_MAX_SIZE + 1);
- if ((pssid != NULL) && (pssid->SsidLength)) {
- memcpy(psurveyPara->ss_ssid, pssid->Ssid, pssid->SsidLength);
- psurveyPara->ss_ssidlen = cpu_to_le32(pssid->SsidLength);
+ if ((pssid != NULL) && (pssid->ssid_length)) {
+ memcpy(psurveyPara->ss_ssid, pssid->ssid, pssid->ssid_length);
+ psurveyPara->ss_ssidlen = cpu_to_le32(pssid->ssid_length);
}
set_fwstate(pmlmepriv, _FW_UNDER_SURVEY);
r8712_enqueue_cmd(pcmdpriv, ph2c);
@@ -441,7 +441,7 @@ u8 r8712_createbss_cmd(struct _adapter *padapter)
/* notes: translate IELength & Length after assign to cmdsz; */
pdev_network->Length = pcmd->cmdsz;
pdev_network->IELength = pdev_network->IELength;
- pdev_network->Ssid.SsidLength = pdev_network->Ssid.SsidLength;
+ pdev_network->ssid.ssid_length = pdev_network->ssid.ssid_length;
r8712_enqueue_cmd(pcmdpriv, pcmd);
return _SUCCESS;
}
diff --git a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
index 7b2cef3..212d98b 100644
--- a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
+++ b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
@@ -165,9 +165,9 @@ static noinline_for_stack char *translate_scan(struct _adapter *padapter,
/* Add the ESSID */
iwe.cmd = SIOCGIWESSID;
iwe.u.data.flags = 1;
- iwe.u.data.length = min_t(u32, pnetwork->network.Ssid.SsidLength, 32);
+ iwe.u.data.length = min_t(u32, pnetwork->network.ssid.ssid_length, 32);
start = iwe_stream_add_point(info, start, stop, &iwe,
- pnetwork->network.Ssid.Ssid);
+ pnetwork->network.ssid.ssid);
/* parsing HT_CAP_IE */
p = r8712_get_ie(&pnetwork->network.ie_s[12], _HT_CAPABILITY_IE_,
&ht_ielen, pnetwork->network.IELength - 12);
@@ -236,7 +236,7 @@ static noinline_for_stack char *translate_scan(struct _adapter *padapter,
iwe.u.data.flags = (u16)(IW_ENCODE_DISABLED);
iwe.u.data.length = (u16)0;
start = iwe_stream_add_point(info, start, stop, &iwe,
- pnetwork->network.Ssid.Ssid);
+ pnetwork->network.ssid.ssid);
/*Add basic and extended rates */
current_val = start + iwe_stream_lcp_len(info);
iwe.cmd = SIOCGIWRATE;
@@ -946,7 +946,7 @@ static int r871x_wx_set_priv(struct net_device *dev,
/*static u8 xxxx; */
if (check_fwstate(pmlmepriv, _FW_LINKED)) {
sprintf(ext, "%s rssi %d",
- pcur_network->network.Ssid.Ssid,
+ pcur_network->network.ssid.ssid,
/*(xxxx=xxxx+10) */
((padapter->recvpriv.fw_rssi) >> 1) - 95
/*pcur_network->network.Rssi */
@@ -1163,8 +1163,8 @@ static int r8711_wx_set_scan(struct net_device *dev,
memset((unsigned char *)&ssid, 0,
sizeof(struct ndis_802_11_ssid));
- memcpy(ssid.Ssid, req->essid, len);
- ssid.SsidLength = len;
+ memcpy(ssid.ssid, req->essid, len);
+ ssid.ssid_length = len;
spin_lock_irqsave(&pmlmepriv->lock, irqL);
if ((check_fwstate(pmlmepriv, _FW_UNDER_SURVEY |
_FW_UNDER_LINKING)) ||
@@ -1264,9 +1264,9 @@ static int r8711_wx_set_essid(struct net_device *dev,
len = (wrqu->essid.length < IW_ESSID_MAX_SIZE) ?
wrqu->essid.length : IW_ESSID_MAX_SIZE;
memset(&ndis_ssid, 0, sizeof(struct ndis_802_11_ssid));
- ndis_ssid.SsidLength = len;
- memcpy(ndis_ssid.Ssid, extra, len);
- src_ssid = ndis_ssid.Ssid;
+ ndis_ssid.ssid_length = len;
+ memcpy(ndis_ssid.ssid, extra, len);
+ src_ssid = ndis_ssid.ssid;
phead = &queue->queue;
pmlmepriv->pscanned = phead->next;
while (1) {
@@ -1275,10 +1275,10 @@ static int r8711_wx_set_essid(struct net_device *dev,
pnetwork = container_of(pmlmepriv->pscanned,
struct wlan_network, list);
pmlmepriv->pscanned = pmlmepriv->pscanned->next;
- dst_ssid = pnetwork->network.Ssid.Ssid;
- if ((!memcmp(dst_ssid, src_ssid, ndis_ssid.SsidLength))
- && (pnetwork->network.Ssid.SsidLength ==
- ndis_ssid.SsidLength)) {
+ dst_ssid = pnetwork->network.ssid.ssid;
+ if ((!memcmp(dst_ssid, src_ssid, ndis_ssid.ssid_length))
+ && (pnetwork->network.ssid.ssid_length ==
+ ndis_ssid.ssid_length)) {
if (check_fwstate(pmlmepriv,
WIFI_ADHOC_STATE)) {
if (pnetwork->network.
@@ -1312,9 +1312,9 @@ static int r8711_wx_get_essid(struct net_device *dev,
u32 len, ret = 0;
if (check_fwstate(pmlmepriv, _FW_LINKED | WIFI_ADHOC_MASTER_STATE)) {
- len = pcur_bss->Ssid.SsidLength;
+ len = pcur_bss->ssid.ssid_length;
wrqu->essid.length = len;
- memcpy(extra, pcur_bss->Ssid.Ssid, len);
+ memcpy(extra, pcur_bss->ssid.ssid, len);
wrqu->essid.flags = 1;
} else {
ret = -ENOLINK;
diff --git a/drivers/staging/rtl8712/rtl871x_ioctl_set.c b/drivers/staging/rtl8712/rtl871x_ioctl_set.c
index 01a1504..018fa43 100644
--- a/drivers/staging/rtl8712/rtl871x_ioctl_set.c
+++ b/drivers/staging/rtl8712/rtl871x_ioctl_set.c
@@ -39,11 +39,11 @@ static u8 validate_ssid(struct ndis_802_11_ssid *ssid)
{
u8 i;
- if (ssid->SsidLength > 32)
+ if (ssid->ssid_length > 32)
return false;
- for (i = 0; i < ssid->SsidLength; i++) {
+ for (i = 0; i < ssid->ssid_length; i++) {
/* wifi, printable ascii code must be supported */
- if (!((ssid->Ssid[i] >= 0x20) && (ssid->Ssid[i] <= 0x7e)))
+ if (!((ssid->ssid[i] >= 0x20) && (ssid->ssid[i] <= 0x7e)))
return false;
}
return true;
@@ -92,7 +92,7 @@ static u8 do_join(struct _adapter *padapter)
pmlmepriv->fw_state = WIFI_ADHOC_MASTER_STATE;
pibss = padapter->registrypriv.dev_network.
MacAddress;
- memcpy(&pdev_network->Ssid,
+ memcpy(&pdev_network->ssid,
&pmlmepriv->assoc_ssid,
sizeof(struct ndis_802_11_ssid));
r8712_update_registrypriv_dev_network(padapter);
@@ -181,9 +181,9 @@ void r8712_set_802_11_ssid(struct _adapter *padapter,
goto _Abort_Set_SSID;
}
if (check_fwstate(pmlmepriv, _FW_LINKED | WIFI_ADHOC_MASTER_STATE)) {
- if ((pmlmepriv->assoc_ssid.SsidLength == ssid->SsidLength) &&
- (!memcmp(&pmlmepriv->assoc_ssid.Ssid, ssid->Ssid,
- ssid->SsidLength))) {
+ if ((pmlmepriv->assoc_ssid.ssid_length == ssid->ssid_length) &&
+ (!memcmp(&pmlmepriv->assoc_ssid.ssid, ssid->ssid,
+ ssid->ssid_length))) {
if (!check_fwstate(pmlmepriv, WIFI_STATION_STATE)) {
if (!r8712_is_same_ibss(padapter,
pnetwork)) {
diff --git a/drivers/staging/rtl8712/rtl871x_mlme.c b/drivers/staging/rtl8712/rtl871x_mlme.c
index 9d647c4..8fd32d8 100644
--- a/drivers/staging/rtl8712/rtl871x_mlme.c
+++ b/drivers/staging/rtl8712/rtl871x_mlme.c
@@ -275,14 +275,14 @@ static int is_same_network(struct wlan_bssid_ex *src,
memcpy((u8 *)&s_cap, r8712_get_capability_from_ie(src->ie_s), 2);
memcpy((u8 *)&d_cap, r8712_get_capability_from_ie(dst->ie_s), 2);
- return (src->Ssid.SsidLength == dst->Ssid.SsidLength) &&
+ return (src->ssid.ssid_length == dst->ssid.ssid_length) &&
(src->configuration.ds_config ==
dst->configuration.ds_config) &&
((!memcmp(src->MacAddress, dst->MacAddress,
ETH_ALEN))) &&
- ((!memcmp(src->Ssid.Ssid,
- dst->Ssid.Ssid,
- src->Ssid.SsidLength))) &&
+ ((!memcmp(src->ssid.ssid,
+ dst->ssid.ssid,
+ src->ssid.ssid_length))) &&
((s_cap & WLAN_CAPABILITY_IBSS) ==
(d_cap & WLAN_CAPABILITY_IBSS)) &&
((s_cap & WLAN_CAPABILITY_BSS) ==
@@ -543,11 +543,11 @@ void r8712_survey_event_callback(struct _adapter *adapter, u8 *pbuf)
}
/* lock pmlmepriv->lock when you accessing network_q */
if (!check_fwstate(pmlmepriv, _FW_UNDER_LINKING)) {
- if (pnetwork->Ssid.Ssid[0] != 0) {
+ if (pnetwork->ssid.ssid[0] != 0) {
rtl8711_add_network(adapter, pnetwork);
} else {
- pnetwork->Ssid.SsidLength = 8;
- memcpy(pnetwork->Ssid.Ssid, "<hidden>", 8);
+ pnetwork->ssid.ssid_length = 8;
+ memcpy(pnetwork->ssid.ssid, "<hidden>", 8);
rtl8711_add_network(adapter, pnetwork);
}
}
@@ -584,7 +584,7 @@ void r8712_surveydone_event_callback(struct _adapter *adapter, u8 *pbuf)
adapter->registrypriv.
dev_network.MacAddress;
pmlmepriv->fw_state ^= _FW_UNDER_SURVEY;
- memcpy(&pdev_network->Ssid,
+ memcpy(&pdev_network->ssid,
&pmlmepriv->assoc_ssid,
sizeof(struct
ndis_802_11_ssid));
@@ -987,7 +987,7 @@ void r8712_stadel_event_callback(struct _adapter *adapter, u8 *pbuf)
memcpy(pdev_network, &tgt_network->network,
r8712_get_wlan_bssid_ex_sz(&tgt_network->
network));
- memcpy(&pdev_network->Ssid,
+ memcpy(&pdev_network->ssid,
&pmlmepriv->assoc_ssid,
sizeof(struct ndis_802_11_ssid));
r8712_update_registrypriv_dev_network(adapter);
@@ -1158,15 +1158,15 @@ int r8712_select_and_join_from_scan(struct mlme_priv *pmlmepriv)
}
goto ask_for_joinbss;
}
- } else if (pmlmepriv->assoc_ssid.SsidLength == 0) {
+ } else if (pmlmepriv->assoc_ssid.ssid_length == 0) {
goto ask_for_joinbss;
}
- dst_ssid = pnetwork->network.Ssid.Ssid;
- src_ssid = pmlmepriv->assoc_ssid.Ssid;
- if ((pnetwork->network.Ssid.SsidLength ==
- pmlmepriv->assoc_ssid.SsidLength) &&
+ dst_ssid = pnetwork->network.ssid.ssid;
+ src_ssid = pmlmepriv->assoc_ssid.ssid;
+ if ((pnetwork->network.ssid.ssid_length ==
+ pmlmepriv->assoc_ssid.ssid_length) &&
(!memcmp(dst_ssid, src_ssid,
- pmlmepriv->assoc_ssid.SsidLength))) {
+ pmlmepriv->assoc_ssid.ssid_length))) {
if (pmlmepriv->assoc_by_rssi) {
/* if the ssid is the same, select the bss
* which has the max rssi
@@ -1613,7 +1613,7 @@ void r8712_init_registrypriv_dev_network(struct _adapter *adapter)
u8 *myhwaddr = myid(peepriv);
memcpy(pdev_network->MacAddress, myhwaddr, ETH_ALEN);
- memcpy(&pdev_network->Ssid, &pregistrypriv->ssid,
+ memcpy(&pdev_network->ssid, &pregistrypriv->ssid,
sizeof(struct ndis_802_11_ssid));
pdev_network->configuration.Length =
sizeof(struct NDIS_802_11_CONFIGURATION);
diff --git a/drivers/staging/rtl8712/rtl871x_mp_ioctl.c b/drivers/staging/rtl8712/rtl871x_mp_ioctl.c
index 6e264a8..4838e74 100644
--- a/drivers/staging/rtl8712/rtl871x_mp_ioctl.c
+++ b/drivers/staging/rtl8712/rtl871x_mp_ioctl.c
@@ -169,9 +169,9 @@ static int mp_start_test(struct _adapter *padapter)
/* 3 1. initialize a new struct wlan_bssid_ex */
memcpy(bssid.MacAddress, pmppriv->network_macaddr, ETH_ALEN);
- bssid.Ssid.SsidLength = 16;
- memcpy(bssid.Ssid.Ssid, (unsigned char *)"mp_pseudo_adhoc",
- bssid.Ssid.SsidLength);
+ bssid.ssid.ssid_length = 16;
+ memcpy(bssid.ssid.ssid, (unsigned char *)"mp_pseudo_adhoc",
+ bssid.ssid.ssid_length);
bssid.InfrastructureMode = Ndis802_11IBSS;
bssid.NetworkTypeInUse = Ndis802_11DS;
bssid.IELength = 0;
diff --git a/drivers/staging/rtl8712/wlan_bssdef.h b/drivers/staging/rtl8712/wlan_bssdef.h
index 6354fc2..71d2df7 100644
--- a/drivers/staging/rtl8712/wlan_bssdef.h
+++ b/drivers/staging/rtl8712/wlan_bssdef.h
@@ -33,8 +33,8 @@
#define NDIS_802_11_LENGTH_RATES_EX 16
struct ndis_802_11_ssid {
- u32 SsidLength;
- u8 Ssid[32];
+ u32 ssid_length;
+ u8 ssid[32];
};
enum NDIS_802_11_NETWORK_TYPE {
@@ -82,7 +82,7 @@ struct wlan_bssid_ex {
u32 Length;
unsigned char MacAddress[6];
u8 Reserved[2];
- struct ndis_802_11_ssid Ssid;
+ struct ndis_802_11_ssid ssid;
__le32 privacy;
s32 Rssi;
enum NDIS_802_11_NETWORK_TYPE NetworkTypeInUse;
--
1.9.1
Powered by blists - more mailing lists