Commit b87b2108 authored by William Durand's avatar William Durand Committed by Greg Kroah-Hartman

staging: rtl8192e: rename bdHTCapBuf to bd_ht_cap_buf in bss_ht struct

Rename bdHTCapBuf to bd_ht_cap_buf to silence a checkpatch warning about
CamelCase.
Reviewed-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarWilliam Durand <will+git@drnd.me>
Link: https://lore.kernel.org/r/20210220172909.15812-4-will+git@drnd.meSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b3b55bd7
...@@ -181,7 +181,7 @@ struct rt_hi_throughput { ...@@ -181,7 +181,7 @@ struct rt_hi_throughput {
struct bss_ht { struct bss_ht {
u8 bd_support_ht; u8 bd_support_ht;
u8 bdHTCapBuf[32]; u8 bd_ht_cap_buf[32];
u16 bdHTCapLen; u16 bdHTCapLen;
u8 bdHTInfoBuf[32]; u8 bdHTInfoBuf[32];
u16 bdHTInfoLen; u16 bdHTInfoLen;
......
...@@ -690,7 +690,7 @@ void HTInitializeBssDesc(struct bss_ht *pBssHT) ...@@ -690,7 +690,7 @@ void HTInitializeBssDesc(struct bss_ht *pBssHT)
{ {
pBssHT->bd_support_ht = false; pBssHT->bd_support_ht = false;
memset(pBssHT->bdHTCapBuf, 0, sizeof(pBssHT->bdHTCapBuf)); memset(pBssHT->bd_ht_cap_buf, 0, sizeof(pBssHT->bd_ht_cap_buf));
pBssHT->bdHTCapLen = 0; pBssHT->bdHTCapLen = 0;
memset(pBssHT->bdHTInfoBuf, 0, sizeof(pBssHT->bdHTInfoBuf)); memset(pBssHT->bdHTInfoBuf, 0, sizeof(pBssHT->bdHTInfoBuf));
pBssHT->bdHTInfoLen = 0; pBssHT->bdHTInfoLen = 0;
...@@ -719,7 +719,7 @@ void HTResetSelfAndSavePeerSetting(struct rtllib_device *ieee, ...@@ -719,7 +719,7 @@ void HTResetSelfAndSavePeerSetting(struct rtllib_device *ieee,
if (pNetwork->bssht.bdHTCapLen > 0 && if (pNetwork->bssht.bdHTCapLen > 0 &&
pNetwork->bssht.bdHTCapLen <= sizeof(pHTInfo->PeerHTCapBuf)) pNetwork->bssht.bdHTCapLen <= sizeof(pHTInfo->PeerHTCapBuf))
memcpy(pHTInfo->PeerHTCapBuf, memcpy(pHTInfo->PeerHTCapBuf,
pNetwork->bssht.bdHTCapBuf, pNetwork->bssht.bd_ht_cap_buf,
pNetwork->bssht.bdHTCapLen); pNetwork->bssht.bdHTCapLen);
if (pNetwork->bssht.bdHTInfoLen > 0 && if (pNetwork->bssht.bdHTInfoLen > 0 &&
......
...@@ -1851,15 +1851,16 @@ static void rtllib_parse_mife_generic(struct rtllib_device *ieee, ...@@ -1851,15 +1851,16 @@ static void rtllib_parse_mife_generic(struct rtllib_device *ieee,
MAX_IE_LEN); MAX_IE_LEN);
if (*tmp_htcap_len != 0) { if (*tmp_htcap_len != 0) {
network->bssht.bdHTSpecVer = HT_SPEC_VER_EWC; network->bssht.bdHTSpecVer = HT_SPEC_VER_EWC;
network->bssht.bdHTCapLen = min_t(u16, *tmp_htcap_len, sizeof(network->bssht.bdHTCapBuf)); network->bssht.bdHTCapLen = min_t(u16, *tmp_htcap_len,
memcpy(network->bssht.bdHTCapBuf, sizeof(network->bssht.bd_ht_cap_buf));
memcpy(network->bssht.bd_ht_cap_buf,
info_element->data, info_element->data,
network->bssht.bdHTCapLen); network->bssht.bdHTCapLen);
} }
} }
if (*tmp_htcap_len != 0) { if (*tmp_htcap_len != 0) {
network->bssht.bd_support_ht = true; network->bssht.bd_support_ht = true;
network->bssht.bdHT1R = ((((struct ht_capab_ele *)(network->bssht.bdHTCapBuf))->MCS[1]) == 0); network->bssht.bdHT1R = ((((struct ht_capab_ele *)(network->bssht.bd_ht_cap_buf))->MCS[1]) == 0);
} else { } else {
network->bssht.bd_support_ht = false; network->bssht.bd_support_ht = false;
network->bssht.bdHT1R = false; network->bssht.bdHT1R = false;
...@@ -2022,16 +2023,16 @@ static void rtllib_parse_mfie_ht_cap(struct rtllib_info_element *info_element, ...@@ -2022,16 +2023,16 @@ static void rtllib_parse_mfie_ht_cap(struct rtllib_info_element *info_element,
if (*tmp_htcap_len != 0) { if (*tmp_htcap_len != 0) {
ht->bdHTSpecVer = HT_SPEC_VER_EWC; ht->bdHTSpecVer = HT_SPEC_VER_EWC;
ht->bdHTCapLen = min_t(u16, *tmp_htcap_len, ht->bdHTCapLen = min_t(u16, *tmp_htcap_len,
sizeof(ht->bdHTCapBuf)); sizeof(ht->bd_ht_cap_buf));
memcpy(ht->bdHTCapBuf, info_element->data, ht->bdHTCapLen); memcpy(ht->bd_ht_cap_buf, info_element->data, ht->bdHTCapLen);
ht->bd_support_ht = true; ht->bd_support_ht = true;
ht->bdHT1R = ((((struct ht_capab_ele *) ht->bdHT1R = ((((struct ht_capab_ele *)
ht->bdHTCapBuf))->MCS[1]) == 0; ht->bd_ht_cap_buf))->MCS[1]) == 0;
ht->bdBandWidth = (enum ht_channel_width) ht->bdBandWidth = (enum ht_channel_width)
(((struct ht_capab_ele *) (((struct ht_capab_ele *)
(ht->bdHTCapBuf))->ChlWidth); (ht->bd_ht_cap_buf))->ChlWidth);
} else { } else {
ht->bd_support_ht = false; ht->bd_support_ht = false;
ht->bdHT1R = false; ht->bdHT1R = false;
...@@ -2459,7 +2460,7 @@ static inline void update_network(struct rtllib_device *ieee, ...@@ -2459,7 +2460,7 @@ static inline void update_network(struct rtllib_device *ieee,
dst->bssht.bd_support_ht = src->bssht.bd_support_ht; dst->bssht.bd_support_ht = src->bssht.bd_support_ht;
dst->bssht.bdRT2RTAggregation = src->bssht.bdRT2RTAggregation; dst->bssht.bdRT2RTAggregation = src->bssht.bdRT2RTAggregation;
dst->bssht.bdHTCapLen = src->bssht.bdHTCapLen; dst->bssht.bdHTCapLen = src->bssht.bdHTCapLen;
memcpy(dst->bssht.bdHTCapBuf, src->bssht.bdHTCapBuf, memcpy(dst->bssht.bd_ht_cap_buf, src->bssht.bd_ht_cap_buf,
src->bssht.bdHTCapLen); src->bssht.bdHTCapLen);
dst->bssht.bdHTInfoLen = src->bssht.bdHTInfoLen; dst->bssht.bdHTInfoLen = src->bssht.bdHTInfoLen;
memcpy(dst->bssht.bdHTInfoBuf, src->bssht.bdHTInfoBuf, memcpy(dst->bssht.bdHTInfoBuf, src->bssht.bdHTInfoBuf,
......
...@@ -2238,7 +2238,7 @@ rtllib_rx_assoc_resp(struct rtllib_device *ieee, struct sk_buff *skb, ...@@ -2238,7 +2238,7 @@ rtllib_rx_assoc_resp(struct rtllib_device *ieee, struct sk_buff *skb,
return 1; return 1;
} }
memcpy(ieee->pHTInfo->PeerHTCapBuf, memcpy(ieee->pHTInfo->PeerHTCapBuf,
network->bssht.bdHTCapBuf, network->bssht.bd_ht_cap_buf,
network->bssht.bdHTCapLen); network->bssht.bdHTCapLen);
memcpy(ieee->pHTInfo->PeerHTInfoBuf, memcpy(ieee->pHTInfo->PeerHTInfoBuf,
network->bssht.bdHTInfoBuf, network->bssht.bdHTInfoBuf,
......
...@@ -140,12 +140,12 @@ static inline char *rtl819x_translate_scan(struct rtllib_device *ieee, ...@@ -140,12 +140,12 @@ static inline char *rtl819x_translate_scan(struct rtllib_device *ieee,
bool is40M = false, isShortGI = false; bool is40M = false, isShortGI = false;
u8 max_mcs = 0; u8 max_mcs = 0;
if (!memcmp(network->bssht.bdHTCapBuf, EWC11NHTCap, 4)) if (!memcmp(network->bssht.bd_ht_cap_buf, EWC11NHTCap, 4))
ht_cap = (struct ht_capab_ele *) ht_cap = (struct ht_capab_ele *)
&network->bssht.bdHTCapBuf[4]; &network->bssht.bd_ht_cap_buf[4];
else else
ht_cap = (struct ht_capab_ele *) ht_cap = (struct ht_capab_ele *)
&network->bssht.bdHTCapBuf[0]; &network->bssht.bd_ht_cap_buf[0];
is40M = (ht_cap->ChlWidth) ? 1 : 0; is40M = (ht_cap->ChlWidth) ? 1 : 0;
isShortGI = (ht_cap->ChlWidth) ? isShortGI = (ht_cap->ChlWidth) ?
((ht_cap->ShortGI40Mhz) ? 1 : 0) : ((ht_cap->ShortGI40Mhz) ? 1 : 0) :
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment