This is v2 of series renaming camelcase variables to meet style
guide requirements. Thank you in advance to reviewers.
~ Tree
Changes:
#16 Renamed plist to list
#17 Renamed npadding_length to pad_len
#19 Deleted ChkLength variable
Tree Davies (31):
Staging: rtl8192e: Rename variable IsPassiveChannel
Staging: rtl8192e: Rename variable CountryIeBuf
Staging: rtl8192e: Rename variable CountryIeLen
Staging: rtl8192e: Rename variable bWithAironetIE
Staging: rtl8192e: Rename variable bContainHTC
Staging: rtl8192e: Rename variable MBssid
Staging: rtl8192e: Rename variable MBssidMask
Staging: rtl8192e: Rename variable elementID
Staging: rtl8192e: Rename variable rtllib_rx_Monitor
Staging: rtl8192e: Rename variable rtllib_rx_InfraAdhoc
Staging: rtl8192e: Rename variable IsLegacyDataFrame
Staging: rtl8192e: Rename variable RxReorderIndicatePacket
Staging: rtl8192e: Rename variable RfdArray
Staging: rtl8192e: Rename variable Decrypted
Staging: rtl8192e: Rename variable AddReorderEntry
Staging: rtl8192e: Rename variable pList
Staging: rtl8192e: Rename variable nPadding_Length
Staging: rtl8192e: Rename variable LLCOffset
Staging: rtl8192e: Remove variable ChkLength
Staging: rtl8192e: Rename variable WinEnd
Staging: rtl8192e: Rename variable WinSize
Staging: rtl8192e: Rename variable IsDataFrame
Staging: rtl8192e: Rename variable bMatchWinStart
Staging: rtl8192e: Rename variable bMBssidValid
Staging: rtl8192e: Rename variable bWithCcxVerNum
Staging: rtl8192e: Rename variable Frame_QoSTID
Staging: rtl8192e: Rename variable CcxRmState
Staging: rtl8192e: Rename variable IsQoSDataFrame
Staging: rtl8192e: Rename variable RfdCnt
Staging: rtl8192e: Rename variable prxbIndicateArray
Staging: rtl8192e: Rename variable bPktInBuf
.../staging/rtl8192e/rtl8192e/r8192E_dev.c | 2 +-
drivers/staging/rtl8192e/rtl819x_HTProc.c | 2 +-
drivers/staging/rtl8192e/rtl819x_TSProc.c | 8 +-
drivers/staging/rtl8192e/rtllib.h | 36 ++--
drivers/staging/rtl8192e/rtllib_rx.c | 183 +++++++++---------
drivers/staging/rtl8192e/rtllib_tx.c | 4 +-
6 files changed, 116 insertions(+), 119 deletions(-)
--
2.30.2
Rename variable MBssidMask to mb_ssid_mask
to fix checkpatch warning Avoid CamelCase.
Signed-off-by: Tree Davies <[email protected]>
---
v2: No change.
drivers/staging/rtl8192e/rtllib.h | 2 +-
drivers/staging/rtl8192e/rtllib_rx.c | 12 ++++++------
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index 7f1c2f49227e..3722fc0cae1d 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -915,7 +915,7 @@ struct rtllib_network {
bool ccx_rm_enable;
u8 CcxRmState[2];
bool bMBssidValid;
- u8 MBssidMask;
+ u8 mb_ssid_mask;
u8 mb_ssid[ETH_ALEN];
bool bWithCcxVerNum;
u8 bss_ccx_ver_number;
diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c
index c29efa3eef6f..19cb717df3bb 100644
--- a/drivers/staging/rtl8192e/rtllib_rx.c
+++ b/drivers/staging/rtl8192e/rtllib_rx.c
@@ -1818,14 +1818,14 @@ static void rtllib_parse_mife_generic(struct rtllib_device *ieee,
network->ccx_rm_enable = true;
else
network->ccx_rm_enable = false;
- network->MBssidMask = network->CcxRmState[1] & 0x07;
- if (network->MBssidMask != 0) {
+ network->mb_ssid_mask = network->CcxRmState[1] & 0x07;
+ if (network->mb_ssid_mask != 0) {
network->bMBssidValid = true;
- network->MBssidMask = 0xff <<
- (network->MBssidMask);
+ network->mb_ssid_mask = 0xff <<
+ (network->mb_ssid_mask);
ether_addr_copy(network->mb_ssid,
network->bssid);
- network->mb_ssid[5] &= network->MBssidMask;
+ network->mb_ssid[5] &= network->mb_ssid_mask;
} else {
network->bMBssidValid = false;
}
@@ -2349,7 +2349,7 @@ static inline void update_network(struct rtllib_device *ieee,
dst->ckip_supported = src->ckip_supported;
memcpy(dst->CcxRmState, src->CcxRmState, 2);
dst->ccx_rm_enable = src->ccx_rm_enable;
- dst->MBssidMask = src->MBssidMask;
+ dst->mb_ssid_mask = src->mb_ssid_mask;
dst->bMBssidValid = src->bMBssidValid;
memcpy(dst->mb_ssid, src->mb_ssid, 6);
dst->bWithCcxVerNum = src->bWithCcxVerNum;
--
2.30.2
Rename variable elementID to element_id
to fix checkpatch warning Avoid CamelCase.
Signed-off-by: Tree Davies <[email protected]>
---
v2: No change.
drivers/staging/rtl8192e/rtllib.h | 2 +-
drivers/staging/rtl8192e/rtllib_rx.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index 3722fc0cae1d..4645fe803a15 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -728,7 +728,7 @@ union frameqos {
#define QOS_VERSION_1 1
struct rtllib_qos_information_element {
- u8 elementID;
+ u8 element_id;
u8 length;
u8 qui[QOS_OUI_LEN];
u8 qui_type;
diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c
index 19cb717df3bb..76389aef53ee 100644
--- a/drivers/staging/rtl8192e/rtllib_rx.c
+++ b/drivers/staging/rtl8192e/rtllib_rx.c
@@ -1456,7 +1456,7 @@ static u8 qos_oui[QOS_OUI_LEN] = { 0x00, 0x50, 0xF2 };
static int rtllib_verify_qos_info(struct rtllib_qos_information_element
*info_element, int sub_type)
{
- if (info_element->elementID != QOS_ELEMENT_ID)
+ if (info_element->element_id != QOS_ELEMENT_ID)
return -1;
if (info_element->qui_subtype != sub_type)
return -1;
--
2.30.2
Rename variable rtllib_rx_InfraAdhoc to rtllib_rx_infra_adhoc
to fix checkpatch warning Avoid CamelCase.
Signed-off-by: Tree Davies <[email protected]>
---
v2: No change.
drivers/staging/rtl8192e/rtllib_rx.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c
index 108fe1520cf9..ea8cab9707bc 100644
--- a/drivers/staging/rtl8192e/rtllib_rx.c
+++ b/drivers/staging/rtl8192e/rtllib_rx.c
@@ -1223,7 +1223,7 @@ static void rtllib_rx_indicate_pkt_legacy(struct rtllib_device *ieee,
kfree(rxb);
}
-static int rtllib_rx_InfraAdhoc(struct rtllib_device *ieee, struct sk_buff *skb,
+static int rtllib_rx_infra_adhoc(struct rtllib_device *ieee, struct sk_buff *skb,
struct rtllib_rx_stats *rx_stats)
{
struct net_device *dev = ieee->dev;
@@ -1431,7 +1431,7 @@ int rtllib_rx(struct rtllib_device *ieee, struct sk_buff *skb,
switch (ieee->iw_mode) {
case IW_MODE_INFRA:
- ret = rtllib_rx_InfraAdhoc(ieee, skb, rx_stats);
+ ret = rtllib_rx_infra_adhoc(ieee, skb, rx_stats);
break;
case IW_MODE_MONITOR:
ret = rtllib_rx_monitor(ieee, skb, rx_stats);
--
2.30.2
Rename variable IsLegacyDataFrame to is_legacy_data_frame
to fix checkpatch warning Avoid CamelCase.
Signed-off-by: Tree Davies <[email protected]>
---
v2: No change.
drivers/staging/rtl8192e/rtllib.h | 2 +-
drivers/staging/rtl8192e/rtllib_rx.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index 4645fe803a15..cdb3ebc77a53 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -339,7 +339,7 @@ enum rt_op_mode {
#define FC_QOS_BIT BIT(7)
#define IsDataFrame(pdu) (((pdu[0] & 0x0C) == 0x08) ? true : false)
-#define IsLegacyDataFrame(pdu) (IsDataFrame(pdu) && (!(pdu[0]&FC_QOS_BIT)))
+#define is_legacy_data_frame(pdu) (IsDataFrame(pdu) && (!(pdu[0]&FC_QOS_BIT)))
#define IsQoSDataFrame(pframe) \
((*(u16 *)pframe&(IEEE80211_STYPE_QOS_DATA|RTLLIB_FTYPE_DATA)) == \
(IEEE80211_STYPE_QOS_DATA|RTLLIB_FTYPE_DATA))
diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c
index ea8cab9707bc..24136bba64b6 100644
--- a/drivers/staging/rtl8192e/rtllib_rx.c
+++ b/drivers/staging/rtl8192e/rtllib_rx.c
@@ -882,7 +882,7 @@ static int rtllib_rx_check_duplicate(struct rtllib_device *ieee,
if (!ieee->ht_info->cur_rx_reorder_enable ||
!ieee->current_network.qos_data.active ||
!IsDataFrame(skb->data) ||
- IsLegacyDataFrame(skb->data)) {
+ is_legacy_data_frame(skb->data)) {
if (!ieee80211_is_beacon(hdr->frame_control)) {
if (is_duplicate_packet(ieee, hdr))
return -1;
--
2.30.2
Rename variable bContainHTC to contain_htc
to fix checkpatch warning Avoid CamelCase.
Signed-off-by: Tree Davies <[email protected]>
---
v2: No change.
drivers/staging/rtl8192e/rtllib.h | 2 +-
drivers/staging/rtl8192e/rtllib_rx.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index 40ec29434d68..ce0cd1f557c3 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -489,7 +489,7 @@ struct rtllib_rx_stats {
u8 RxBufShift;
bool bIsAMPDU;
bool bFirstMPDU;
- bool bContainHTC;
+ bool contain_htc;
u32 RxPWDBAll;
u8 RxMIMOSignalStrength[4];
s8 RxMIMOSignalQuality[2];
diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c
index d4dbf8052c30..4e7c491c0aaf 100644
--- a/drivers/staging/rtl8192e/rtllib_rx.c
+++ b/drivers/staging/rtl8192e/rtllib_rx.c
@@ -743,7 +743,7 @@ static u8 parse_subframe(struct rtllib_device *ieee, struct sk_buff *skb,
if (RTLLIB_QOS_HAS_SEQ(fc))
LLCOffset += 2;
- if (rx_stats->bContainHTC)
+ if (rx_stats->contain_htc)
LLCOffset += sHTCLng;
ChkLength = LLCOffset;
@@ -862,7 +862,7 @@ static size_t rtllib_rx_get_hdrlen(struct rtllib_device *ieee,
netdev_info(ieee->dev, "%s: find HTCControl!\n",
__func__);
hdrlen += 4;
- rx_stats->bContainHTC = true;
+ rx_stats->contain_htc = true;
}
return hdrlen;
--
2.30.2
Rename variable RfdArray to rfd_array
to fix checkpatch warning Avoid CamelCase.
Signed-off-by: Tree Davies <[email protected]>
---
v2: No change.
drivers/staging/rtl8192e/rtllib.h | 2 +-
drivers/staging/rtl8192e/rtllib_rx.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index cdb3ebc77a53..996662a06e3f 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -1407,7 +1407,7 @@ struct rtllib_device {
struct work_struct wx_sync_scan_wq;
union {
- struct rtllib_rxb *RfdArray[REORDER_WIN_SIZE];
+ struct rtllib_rxb *rfd_array[REORDER_WIN_SIZE];
struct rtllib_rxb *stats_IndicateArray[REORDER_WIN_SIZE];
struct rtllib_rxb *prxbIndicateArray[REORDER_WIN_SIZE];
struct {
diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c
index a30945f30e14..4c8cfa40927c 100644
--- a/drivers/staging/rtl8192e/rtllib_rx.c
+++ b/drivers/staging/rtl8192e/rtllib_rx.c
@@ -509,13 +509,13 @@ void rtllib_flush_rx_ts_pending_pkts(struct rtllib_device *ieee,
pRxReorderEntry->SeqNum);
list_del_init(&pRxReorderEntry->list);
- ieee->RfdArray[RfdCnt] = pRxReorderEntry->prxb;
+ ieee->rfd_array[RfdCnt] = pRxReorderEntry->prxb;
RfdCnt = RfdCnt + 1;
list_add_tail(&pRxReorderEntry->list,
&ieee->RxReorder_Unused_List);
}
- rtllib_indicate_packets(ieee, ieee->RfdArray, RfdCnt);
+ rtllib_indicate_packets(ieee, ieee->rfd_array, RfdCnt);
ts->rx_indicate_seq = 0xffff;
}
--
2.30.2
Rename variable Decrypted to decrypted
to fix checkpatch warning Avoid CamelCase.
Signed-off-by: Tree Davies <[email protected]>
---
v2: No change.
drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 2 +-
drivers/staging/rtl8192e/rtllib.h | 2 +-
drivers/staging/rtl8192e/rtllib_rx.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
index fdf8fc66939d..1901a319316b 100644
--- a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
+++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
@@ -1646,7 +1646,7 @@ bool rtl92e_get_rx_stats(struct net_device *dev, struct rtllib_rx_stats *stats,
stats->RxDrvInfoSize = pdesc->RxDrvInfoSize;
stats->RxBufShift = (pdesc->Shift) & 0x03;
- stats->Decrypted = !pdesc->SWDec;
+ stats->decrypted = !pdesc->SWDec;
pDrvInfo = (struct rx_fwinfo *)(skb->data + stats->RxBufShift);
diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index 996662a06e3f..f69f4ca39fd5 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -481,7 +481,7 @@ struct rtllib_rx_stats {
u16 bHwError:1;
u16 bCRC:1;
u16 bICV:1;
- u16 Decrypted:1;
+ u16 decrypted:1;
u32 time_stamp_low;
u32 time_stamp_high;
diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c
index 4c8cfa40927c..3afce436a5d8 100644
--- a/drivers/staging/rtl8192e/rtllib_rx.c
+++ b/drivers/staging/rtl8192e/rtllib_rx.c
@@ -1025,7 +1025,7 @@ static int rtllib_rx_decrypt(struct rtllib_device *ieee, struct sk_buff *skb,
sc = le16_to_cpu(hdr->seq_ctrl);
frag = WLAN_GET_SEQ_FRAG(sc);
- if ((!rx_stats->Decrypted))
+ if ((!rx_stats->decrypted))
ieee->need_sw_enc = 1;
else
ieee->need_sw_enc = 0;
--
2.30.2
Rename variable rtllib_rx_Monitor to rtllib_rx_monit
to fix checkpatch warning Avoid CamelCase.
Signed-off-by: Tree Davies <[email protected]>
---
v2: No change.
drivers/staging/rtl8192e/rtllib_rx.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c
index 76389aef53ee..108fe1520cf9 100644
--- a/drivers/staging/rtl8192e/rtllib_rx.c
+++ b/drivers/staging/rtl8192e/rtllib_rx.c
@@ -1383,7 +1383,7 @@ static int rtllib_rx_InfraAdhoc(struct rtllib_device *ieee, struct sk_buff *skb,
return 0;
}
-static int rtllib_rx_Monitor(struct rtllib_device *ieee, struct sk_buff *skb,
+static int rtllib_rx_monitor(struct rtllib_device *ieee, struct sk_buff *skb,
struct rtllib_rx_stats *rx_stats)
{
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
@@ -1434,7 +1434,7 @@ int rtllib_rx(struct rtllib_device *ieee, struct sk_buff *skb,
ret = rtllib_rx_InfraAdhoc(ieee, skb, rx_stats);
break;
case IW_MODE_MONITOR:
- ret = rtllib_rx_Monitor(ieee, skb, rx_stats);
+ ret = rtllib_rx_monitor(ieee, skb, rx_stats);
break;
default:
netdev_info(ieee->dev, "%s: ERR iw mode!!!\n", __func__);
--
2.30.2
Rename variable nPadding_Length to pad_len
to fix checkpatch warning Avoid CamelCase.
Signed-off-by: Tree Davies <[email protected]>
---
v2: Rename npadding_length to pad_len
drivers/staging/rtl8192e/rtllib_rx.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c
index b1cb73c2177d..c32eec733373 100644
--- a/drivers/staging/rtl8192e/rtllib_rx.c
+++ b/drivers/staging/rtl8192e/rtllib_rx.c
@@ -732,7 +732,7 @@ static u8 parse_subframe(struct rtllib_device *ieee, struct sk_buff *skb,
u16 ChkLength;
bool is_aggregate_frame = false;
u16 nSubframe_Length;
- u8 nPadding_Length = 0;
+ u8 pad_len = 0;
u16 SeqNum = 0;
struct sk_buff *sub_skb;
/* just for debug purpose */
@@ -833,15 +833,15 @@ static u8 parse_subframe(struct rtllib_device *ieee, struct sk_buff *skb,
skb_pull(skb, nSubframe_Length);
if (skb->len != 0) {
- nPadding_Length = 4 - ((nSubframe_Length +
+ pad_len = 4 - ((nSubframe_Length +
ETHERNET_HEADER_SIZE) % 4);
- if (nPadding_Length == 4)
- nPadding_Length = 0;
+ if (pad_len == 4)
+ pad_len = 0;
- if (skb->len < nPadding_Length)
+ if (skb->len < pad_len)
return 0;
- skb_pull(skb, nPadding_Length);
+ skb_pull(skb, pad_len);
}
}
--
2.30.2
Rename variable pList to list
to fix checkpatch warning Avoid CamelCase.
Signed-off-by: Tree Davies <[email protected]>
---
v2: Rename plist to list
drivers/staging/rtl8192e/rtllib_rx.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c
index 30bd6f49e915..b1cb73c2177d 100644
--- a/drivers/staging/rtl8192e/rtllib_rx.c
+++ b/drivers/staging/rtl8192e/rtllib_rx.c
@@ -406,24 +406,24 @@ static int is_duplicate_packet(struct rtllib_device *ieee,
static bool add_reorder_entry(struct rx_ts_record *ts,
struct rx_reorder_entry *pReorderEntry)
{
- struct list_head *pList = &ts->rx_pending_pkt_list;
+ struct list_head *list = &ts->rx_pending_pkt_list;
- while (pList->next != &ts->rx_pending_pkt_list) {
+ while (list->next != &ts->rx_pending_pkt_list) {
if (SN_LESS(pReorderEntry->SeqNum, ((struct rx_reorder_entry *)
- list_entry(pList->next, struct rx_reorder_entry,
+ list_entry(list->next, struct rx_reorder_entry,
list))->SeqNum))
- pList = pList->next;
+ list = list->next;
else if (SN_EQUAL(pReorderEntry->SeqNum,
- ((struct rx_reorder_entry *)list_entry(pList->next,
+ ((struct rx_reorder_entry *)list_entry(list->next,
struct rx_reorder_entry, list))->SeqNum))
return false;
else
break;
}
- pReorderEntry->list.next = pList->next;
+ pReorderEntry->list.next = list->next;
pReorderEntry->list.next->prev = &pReorderEntry->list;
- pReorderEntry->list.prev = pList;
- pList->next = &pReorderEntry->list;
+ pReorderEntry->list.prev = list;
+ list->next = &pReorderEntry->list;
return true;
}
--
2.30.2
Rename variable LLCOffset to llc_offset
to fix checkpatch warning Avoid CamelCase.
Signed-off-by: Tree Davies <[email protected]>
---
v2: No change.
drivers/staging/rtl8192e/rtllib_rx.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c
index c32eec733373..52fbbbaf30b0 100644
--- a/drivers/staging/rtl8192e/rtllib_rx.c
+++ b/drivers/staging/rtl8192e/rtllib_rx.c
@@ -728,7 +728,7 @@ static u8 parse_subframe(struct rtllib_device *ieee, struct sk_buff *skb,
struct ieee80211_hdr_3addr *hdr = (struct ieee80211_hdr_3addr *)skb->data;
u16 fc = le16_to_cpu(hdr->frame_control);
- u16 LLCOffset = sizeof(struct ieee80211_hdr_3addr);
+ u16 llc_offset = sizeof(struct ieee80211_hdr_3addr);
u16 ChkLength;
bool is_aggregate_frame = false;
u16 nSubframe_Length;
@@ -742,16 +742,16 @@ static u8 parse_subframe(struct rtllib_device *ieee, struct sk_buff *skb,
is_aggregate_frame = true;
if (RTLLIB_QOS_HAS_SEQ(fc))
- LLCOffset += 2;
+ llc_offset += 2;
if (rx_stats->contain_htc)
- LLCOffset += sHTCLng;
+ llc_offset += sHTCLng;
- ChkLength = LLCOffset;
+ ChkLength = llc_offset;
if (skb->len <= ChkLength)
return 0;
- skb_pull(skb, LLCOffset);
+ skb_pull(skb, llc_offset);
ieee->is_aggregate_frame = is_aggregate_frame;
if (!is_aggregate_frame) {
rxb->nr_subframes = 1;
--
2.30.2
Remove variable ChkLength which fixes warning Avoid CamelCase,
and use llc_offset in its place.
Signed-off-by: Tree Davies <[email protected]>
---
v2: Delete ChkLength, and use llc_offset instead.
drivers/staging/rtl8192e/rtllib_rx.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c
index 52fbbbaf30b0..3a637731506c 100644
--- a/drivers/staging/rtl8192e/rtllib_rx.c
+++ b/drivers/staging/rtl8192e/rtllib_rx.c
@@ -729,7 +729,6 @@ static u8 parse_subframe(struct rtllib_device *ieee, struct sk_buff *skb,
u16 fc = le16_to_cpu(hdr->frame_control);
u16 llc_offset = sizeof(struct ieee80211_hdr_3addr);
- u16 ChkLength;
bool is_aggregate_frame = false;
u16 nSubframe_Length;
u8 pad_len = 0;
@@ -746,9 +745,7 @@ static u8 parse_subframe(struct rtllib_device *ieee, struct sk_buff *skb,
if (rx_stats->contain_htc)
llc_offset += sHTCLng;
- ChkLength = llc_offset;
-
- if (skb->len <= ChkLength)
+ if (skb->len <= llc_offset)
return 0;
skb_pull(skb, llc_offset);
--
2.30.2
Rename variable IsDataFrame to is_data_frame
to fix checkpatch warning Avoid CamelCase.
Signed-off-by: Tree Davies <[email protected]>
---
v2: No change.
drivers/staging/rtl8192e/rtllib.h | 4 ++--
drivers/staging/rtl8192e/rtllib_rx.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index f69f4ca39fd5..0914ba37f42f 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -338,8 +338,8 @@ enum rt_op_mode {
#define RTLLIB_QCTL_TID 0x000F
#define FC_QOS_BIT BIT(7)
-#define IsDataFrame(pdu) (((pdu[0] & 0x0C) == 0x08) ? true : false)
-#define is_legacy_data_frame(pdu) (IsDataFrame(pdu) && (!(pdu[0]&FC_QOS_BIT)))
+#define is_data_frame(pdu) (((pdu[0] & 0x0C) == 0x08) ? true : false)
+#define is_legacy_data_frame(pdu) (is_data_frame(pdu) && (!(pdu[0]&FC_QOS_BIT)))
#define IsQoSDataFrame(pframe) \
((*(u16 *)pframe&(IEEE80211_STYPE_QOS_DATA|RTLLIB_FTYPE_DATA)) == \
(IEEE80211_STYPE_QOS_DATA|RTLLIB_FTYPE_DATA))
diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c
index 50687f3dce47..9741d351363e 100644
--- a/drivers/staging/rtl8192e/rtllib_rx.c
+++ b/drivers/staging/rtl8192e/rtllib_rx.c
@@ -878,7 +878,7 @@ static int rtllib_rx_check_duplicate(struct rtllib_device *ieee,
if (!ieee->ht_info->cur_rx_reorder_enable ||
!ieee->current_network.qos_data.active ||
- !IsDataFrame(skb->data) ||
+ !is_data_frame(skb->data) ||
is_legacy_data_frame(skb->data)) {
if (!ieee80211_is_beacon(hdr->frame_control)) {
if (is_duplicate_packet(ieee, hdr))
--
2.30.2
Rename variable bMatchWinStart to match_win_start
to fix checkpatch warning Avoid CamelCase.
Signed-off-by: Tree Davies <[email protected]>
---
v2: No change.
drivers/staging/rtl8192e/rtllib_rx.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c
index 9741d351363e..7e41519d997a 100644
--- a/drivers/staging/rtl8192e/rtllib_rx.c
+++ b/drivers/staging/rtl8192e/rtllib_rx.c
@@ -529,7 +529,7 @@ static void rx_reorder_indicate_packet(struct rtllib_device *ieee,
u8 win_size = ht_info->rx_reorder_win_size;
u16 win_end = 0;
u8 index = 0;
- bool bMatchWinStart = false, bPktInBuf = false;
+ bool match_win_start = false, bPktInBuf = false;
unsigned long flags;
netdev_dbg(ieee->dev,
@@ -567,7 +567,7 @@ static void rx_reorder_indicate_packet(struct rtllib_device *ieee,
*/
if (SN_EQUAL(SeqNum, ts->rx_indicate_seq)) {
ts->rx_indicate_seq = (ts->rx_indicate_seq + 1) % 4096;
- bMatchWinStart = true;
+ match_win_start = true;
} else if (SN_LESS(win_end, SeqNum)) {
if (SeqNum >= (win_size - 1))
ts->rx_indicate_seq = SeqNum + 1 - win_size;
@@ -589,7 +589,7 @@ static void rx_reorder_indicate_packet(struct rtllib_device *ieee,
* 2. All packets with SeqNum larger than or equal to
* WinStart => Buffer it.
*/
- if (bMatchWinStart) {
+ if (match_win_start) {
/* Current packet is going to be indicated.*/
netdev_dbg(ieee->dev,
"Packets indication! IndicateSeq: %d, NewSeq: %d\n",
--
2.30.2
Rename variable bMBssidValid to mb_ssid_valid
to fix checkpatch warning Avoid CamelCase.
Signed-off-by: Tree Davies <[email protected]>
---
v2: No change.
drivers/staging/rtl8192e/rtllib.h | 2 +-
drivers/staging/rtl8192e/rtllib_rx.c | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index 0914ba37f42f..91164a3b01aa 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -914,7 +914,7 @@ struct rtllib_network {
bool ckip_supported;
bool ccx_rm_enable;
u8 CcxRmState[2];
- bool bMBssidValid;
+ bool mb_ssid_valid;
u8 mb_ssid_mask;
u8 mb_ssid[ETH_ALEN];
bool bWithCcxVerNum;
diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c
index 7e41519d997a..480d4bf8df4f 100644
--- a/drivers/staging/rtl8192e/rtllib_rx.c
+++ b/drivers/staging/rtl8192e/rtllib_rx.c
@@ -1817,14 +1817,14 @@ static void rtllib_parse_mife_generic(struct rtllib_device *ieee,
network->ccx_rm_enable = false;
network->mb_ssid_mask = network->CcxRmState[1] & 0x07;
if (network->mb_ssid_mask != 0) {
- network->bMBssidValid = true;
+ network->mb_ssid_valid = true;
network->mb_ssid_mask = 0xff <<
(network->mb_ssid_mask);
ether_addr_copy(network->mb_ssid,
network->bssid);
network->mb_ssid[5] &= network->mb_ssid_mask;
} else {
- network->bMBssidValid = false;
+ network->mb_ssid_valid = false;
}
} else {
network->ccx_rm_enable = false;
@@ -2347,7 +2347,7 @@ static inline void update_network(struct rtllib_device *ieee,
memcpy(dst->CcxRmState, src->CcxRmState, 2);
dst->ccx_rm_enable = src->ccx_rm_enable;
dst->mb_ssid_mask = src->mb_ssid_mask;
- dst->bMBssidValid = src->bMBssidValid;
+ dst->mb_ssid_valid = src->mb_ssid_valid;
memcpy(dst->mb_ssid, src->mb_ssid, 6);
dst->bWithCcxVerNum = src->bWithCcxVerNum;
dst->bss_ccx_ver_number = src->bss_ccx_ver_number;
--
2.30.2
Rename variable bWithCcxVerNum to with_ccx_ver_num
to fix checkpatch warning Avoid CamelCase.
Signed-off-by: Tree Davies <[email protected]>
---
v2: No change.
drivers/staging/rtl8192e/rtllib.h | 2 +-
drivers/staging/rtl8192e/rtllib_rx.c | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index 91164a3b01aa..4fec36cfa2fc 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -917,7 +917,7 @@ struct rtllib_network {
bool mb_ssid_valid;
u8 mb_ssid_mask;
u8 mb_ssid[ETH_ALEN];
- bool bWithCcxVerNum;
+ bool with_ccx_ver_num;
u8 bss_ccx_ver_number;
/* These are network statistics */
struct rtllib_rx_stats stats;
diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c
index 480d4bf8df4f..2d0a0efedc97 100644
--- a/drivers/staging/rtl8192e/rtllib_rx.c
+++ b/drivers/staging/rtl8192e/rtllib_rx.c
@@ -1836,10 +1836,10 @@ static void rtllib_parse_mife_generic(struct rtllib_device *ieee,
info_element->data[2] == 0x96 &&
info_element->data[3] == 0x03) {
if (info_element->len == 5) {
- network->bWithCcxVerNum = true;
+ network->with_ccx_ver_num = true;
network->bss_ccx_ver_number = info_element->data[4];
} else {
- network->bWithCcxVerNum = false;
+ network->with_ccx_ver_num = false;
network->bss_ccx_ver_number = 0;
}
}
@@ -2349,7 +2349,7 @@ static inline void update_network(struct rtllib_device *ieee,
dst->mb_ssid_mask = src->mb_ssid_mask;
dst->mb_ssid_valid = src->mb_ssid_valid;
memcpy(dst->mb_ssid, src->mb_ssid, 6);
- dst->bWithCcxVerNum = src->bWithCcxVerNum;
+ dst->with_ccx_ver_num = src->with_ccx_ver_num;
dst->bss_ccx_ver_number = src->bss_ccx_ver_number;
}
--
2.30.2
Rename variable RxReorderIndicatePacket to
rx_reorder_indicate_packet to fix checkpatch warning
Avoid CamelCase.
Signed-off-by: Tree Davies <[email protected]>
---
v2: No change.
drivers/staging/rtl8192e/rtllib_rx.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c
index 24136bba64b6..a30945f30e14 100644
--- a/drivers/staging/rtl8192e/rtllib_rx.c
+++ b/drivers/staging/rtl8192e/rtllib_rx.c
@@ -520,7 +520,7 @@ void rtllib_flush_rx_ts_pending_pkts(struct rtllib_device *ieee,
ts->rx_indicate_seq = 0xffff;
}
-static void RxReorderIndicatePacket(struct rtllib_device *ieee,
+static void rx_reorder_indicate_packet(struct rtllib_device *ieee,
struct rtllib_rxb *prxb,
struct rx_ts_record *ts, u16 SeqNum)
{
@@ -1366,7 +1366,7 @@ static int rtllib_rx_infra_adhoc(struct rtllib_device *ieee, struct sk_buff *skb
if (!ieee->ht_info->cur_rx_reorder_enable || !ts)
rtllib_rx_indicate_pkt_legacy(ieee, rx_stats, rxb, dst, src);
else
- RxReorderIndicatePacket(ieee, rxb, ts, SeqNum);
+ rx_reorder_indicate_packet(ieee, rxb, ts, SeqNum);
dev_kfree_skb(skb);
--
2.30.2
Rename variable Frame_QoSTID to frame_qos_tid
to fix checkpatch warning Avoid CamelCase.
Signed-off-by: Tree Davies <[email protected]>
---
v2: No change.
drivers/staging/rtl8192e/rtllib.h | 2 +-
drivers/staging/rtl8192e/rtllib_rx.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index 4fec36cfa2fc..b88c7cd399fb 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -799,7 +799,7 @@ static inline const char *eap_get_type(int type)
eap_types[type];
}
-static inline u8 Frame_QoSTID(u8 *buf)
+static inline u8 frame_qos_tid(u8 *buf)
{
struct ieee80211_hdr_3addr *hdr;
u16 fc;
diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c
index 2d0a0efedc97..22c04f37bb40 100644
--- a/drivers/staging/rtl8192e/rtllib_rx.c
+++ b/drivers/staging/rtl8192e/rtllib_rx.c
@@ -888,7 +888,7 @@ static int rtllib_rx_check_duplicate(struct rtllib_device *ieee,
struct rx_ts_record *ts = NULL;
if (rtllib_get_ts(ieee, (struct ts_common_info **)&ts, hdr->addr2,
- (u8)Frame_QoSTID((u8 *)(skb->data)), RX_DIR, true)) {
+ (u8)frame_qos_tid((u8 *)(skb->data)), RX_DIR, true)) {
if ((fc & (1 << 11)) && (frag == ts->rx_last_frag_num) &&
(WLAN_GET_SEQ_SEQ(sc) == ts->rx_last_seq_num))
return -1;
@@ -1321,7 +1321,7 @@ static int rtllib_rx_infra_adhoc(struct rtllib_device *ieee, struct sk_buff *skb
hdr = (struct ieee80211_hdr *)skb->data;
if (ieee->current_network.qos_data.active && IsQoSDataFrame(skb->data)
&& !is_multicast_ether_addr(hdr->addr1)) {
- TID = Frame_QoSTID(skb->data);
+ TID = frame_qos_tid(skb->data);
SeqNum = WLAN_GET_SEQ_SEQ(sc);
rtllib_get_ts(ieee, (struct ts_common_info **)&ts, hdr->addr2, TID,
RX_DIR, true);
--
2.30.2
Rename variable CcxRmState to ccx_rm_state
to fix checkpatch warning Avoid CamelCase.
Signed-off-by: Tree Davies <[email protected]>
---
v2: No change.
drivers/staging/rtl8192e/rtllib.h | 2 +-
drivers/staging/rtl8192e/rtllib_rx.c | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index b88c7cd399fb..ca69bb0965ba 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -913,7 +913,7 @@ struct rtllib_network {
bool with_aironet_ie;
bool ckip_supported;
bool ccx_rm_enable;
- u8 CcxRmState[2];
+ u8 ccx_rm_state[2];
bool mb_ssid_valid;
u8 mb_ssid_mask;
u8 mb_ssid[ETH_ALEN];
diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c
index 22c04f37bb40..3e8ee1335c24 100644
--- a/drivers/staging/rtl8192e/rtllib_rx.c
+++ b/drivers/staging/rtl8192e/rtllib_rx.c
@@ -1810,12 +1810,12 @@ static void rtllib_parse_mife_generic(struct rtllib_device *ieee,
info_element->data[2] == 0x96 &&
info_element->data[3] == 0x01) {
if (info_element->len == 6) {
- memcpy(network->CcxRmState, &info_element->data[4], 2);
- if (network->CcxRmState[0] != 0)
+ memcpy(network->ccx_rm_state, &info_element->data[4], 2);
+ if (network->ccx_rm_state[0] != 0)
network->ccx_rm_enable = true;
else
network->ccx_rm_enable = false;
- network->mb_ssid_mask = network->CcxRmState[1] & 0x07;
+ network->mb_ssid_mask = network->ccx_rm_state[1] & 0x07;
if (network->mb_ssid_mask != 0) {
network->mb_ssid_valid = true;
network->mb_ssid_mask = 0xff <<
@@ -2344,7 +2344,7 @@ static inline void update_network(struct rtllib_device *ieee,
dst->with_aironet_ie = src->with_aironet_ie;
dst->ckip_supported = src->ckip_supported;
- memcpy(dst->CcxRmState, src->CcxRmState, 2);
+ memcpy(dst->ccx_rm_state, src->ccx_rm_state, 2);
dst->ccx_rm_enable = src->ccx_rm_enable;
dst->mb_ssid_mask = src->mb_ssid_mask;
dst->mb_ssid_valid = src->mb_ssid_valid;
--
2.30.2
Rename variable AddReorderEntry to add_reorder_entry
to fix checkpatch warning Avoid CamelCase.
Signed-off-by: Tree Davies <[email protected]>
---
v2: No change.
drivers/staging/rtl8192e/rtllib_rx.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c
index 3afce436a5d8..30bd6f49e915 100644
--- a/drivers/staging/rtl8192e/rtllib_rx.c
+++ b/drivers/staging/rtl8192e/rtllib_rx.c
@@ -403,7 +403,7 @@ static int is_duplicate_packet(struct rtllib_device *ieee,
return 1;
}
-static bool AddReorderEntry(struct rx_ts_record *ts,
+static bool add_reorder_entry(struct rx_ts_record *ts,
struct rx_reorder_entry *pReorderEntry)
{
struct list_head *pList = &ts->rx_pending_pkt_list;
@@ -610,7 +610,7 @@ static void rx_reorder_indicate_packet(struct rtllib_device *ieee,
pReorderEntry->SeqNum = SeqNum;
pReorderEntry->prxb = prxb;
- if (!AddReorderEntry(ts, pReorderEntry)) {
+ if (!add_reorder_entry(ts, pReorderEntry)) {
int i;
netdev_dbg(ieee->dev,
--
2.30.2
Rename variable IsQoSDataFrame to is_qos_data_frame
to fix checkpatch warning Avoid CamelCase.
Signed-off-by: Tree Davies <[email protected]>
---
v2: No change.
drivers/staging/rtl8192e/rtl819x_HTProc.c | 2 +-
drivers/staging/rtl8192e/rtllib.h | 2 +-
drivers/staging/rtl8192e/rtllib_rx.c | 2 +-
drivers/staging/rtl8192e/rtllib_tx.c | 4 ++--
4 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtl819x_HTProc.c b/drivers/staging/rtl8192e/rtl819x_HTProc.c
index 9b0a981f6f22..36a734ded7dc 100644
--- a/drivers/staging/rtl8192e/rtl819x_HTProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_HTProc.c
@@ -625,7 +625,7 @@ EXPORT_SYMBOL(HT_update_self_and_peer_setting);
u8 ht_c_check(struct rtllib_device *ieee, u8 *pFrame)
{
if (ieee->ht_info->current_ht_support) {
- if ((IsQoSDataFrame(pFrame) && frame_order(pFrame)) == 1) {
+ if ((is_qos_data_frame(pFrame) && frame_order(pFrame)) == 1) {
netdev_dbg(ieee->dev, "HT CONTROL FILED EXIST!!\n");
return true;
}
diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index ca69bb0965ba..e2695beaf582 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -340,7 +340,7 @@ enum rt_op_mode {
#define FC_QOS_BIT BIT(7)
#define is_data_frame(pdu) (((pdu[0] & 0x0C) == 0x08) ? true : false)
#define is_legacy_data_frame(pdu) (is_data_frame(pdu) && (!(pdu[0]&FC_QOS_BIT)))
-#define IsQoSDataFrame(pframe) \
+#define is_qos_data_frame(pframe) \
((*(u16 *)pframe&(IEEE80211_STYPE_QOS_DATA|RTLLIB_FTYPE_DATA)) == \
(IEEE80211_STYPE_QOS_DATA|RTLLIB_FTYPE_DATA))
#define frame_order(pframe) (*(u16 *)pframe&IEEE80211_FCTL_ORDER)
diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c
index 3e8ee1335c24..4d4a4a830470 100644
--- a/drivers/staging/rtl8192e/rtllib_rx.c
+++ b/drivers/staging/rtl8192e/rtllib_rx.c
@@ -1319,7 +1319,7 @@ static int rtllib_rx_infra_adhoc(struct rtllib_device *ieee, struct sk_buff *skb
/* Get TS for Rx Reorder */
hdr = (struct ieee80211_hdr *)skb->data;
- if (ieee->current_network.qos_data.active && IsQoSDataFrame(skb->data)
+ if (ieee->current_network.qos_data.active && is_qos_data_frame(skb->data)
&& !is_multicast_ether_addr(hdr->addr1)) {
TID = frame_qos_tid(skb->data);
SeqNum = WLAN_GET_SEQ_SEQ(sc);
diff --git a/drivers/staging/rtl8192e/rtllib_tx.c b/drivers/staging/rtl8192e/rtllib_tx.c
index 1aeb207a3fee..b1bde5c0050a 100644
--- a/drivers/staging/rtl8192e/rtllib_tx.c
+++ b/drivers/staging/rtl8192e/rtllib_tx.c
@@ -275,7 +275,7 @@ static void rtllib_tx_query_agg_cap(struct rtllib_device *ieee,
if (!ht_info->current_ht_support || !ht_info->enable_ht)
return;
- if (!IsQoSDataFrame(skb->data))
+ if (!is_qos_data_frame(skb->data))
return;
if (is_multicast_ether_addr(hdr->addr1))
return;
@@ -472,7 +472,7 @@ static u16 rtllib_query_seqnum(struct rtllib_device *ieee, struct sk_buff *skb,
if (is_multicast_ether_addr(dst))
return 0;
- if (IsQoSDataFrame(skb->data)) {
+ if (is_qos_data_frame(skb->data)) {
struct tx_ts_record *ts = NULL;
if (!rtllib_get_ts(ieee, (struct ts_common_info **)(&ts), dst,
--
2.30.2
Rename variable RfdCnt to rfd_cnt
to fix checkpatch warning Avoid CamelCase.
Signed-off-by: Tree Davies <[email protected]>
---
v2: No change.
drivers/staging/rtl8192e/rtllib_rx.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c
index 4d4a4a830470..124fa5d54a23 100644
--- a/drivers/staging/rtl8192e/rtllib_rx.c
+++ b/drivers/staging/rtl8192e/rtllib_rx.c
@@ -491,13 +491,13 @@ void rtllib_flush_rx_ts_pending_pkts(struct rtllib_device *ieee,
struct rx_ts_record *ts)
{
struct rx_reorder_entry *pRxReorderEntry;
- u8 RfdCnt = 0;
+ u8 rfd_cnt = 0;
del_timer_sync(&ts->rx_pkt_pending_timer);
while (!list_empty(&ts->rx_pending_pkt_list)) {
- if (RfdCnt >= REORDER_WIN_SIZE) {
+ if (rfd_cnt >= REORDER_WIN_SIZE) {
netdev_info(ieee->dev,
- "-------------->%s() error! RfdCnt >= REORDER_WIN_SIZE\n",
+ "-------------->%s() error! rfd_cnt >= REORDER_WIN_SIZE\n",
__func__);
break;
}
@@ -509,13 +509,13 @@ void rtllib_flush_rx_ts_pending_pkts(struct rtllib_device *ieee,
pRxReorderEntry->SeqNum);
list_del_init(&pRxReorderEntry->list);
- ieee->rfd_array[RfdCnt] = pRxReorderEntry->prxb;
+ ieee->rfd_array[rfd_cnt] = pRxReorderEntry->prxb;
- RfdCnt = RfdCnt + 1;
+ rfd_cnt = rfd_cnt + 1;
list_add_tail(&pRxReorderEntry->list,
&ieee->RxReorder_Unused_List);
}
- rtllib_indicate_packets(ieee, ieee->rfd_array, RfdCnt);
+ rtllib_indicate_packets(ieee, ieee->rfd_array, rfd_cnt);
ts->rx_indicate_seq = 0xffff;
}
--
2.30.2
Rename variable bPktInBuf to pkt_in_buf
to fix checkpatch warning Avoid CamelCase.
Signed-off-by: Tree Davies <[email protected]>
---
v2: No change.
drivers/staging/rtl8192e/rtl819x_TSProc.c | 8 ++++----
drivers/staging/rtl8192e/rtllib_rx.c | 10 +++++-----
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtl819x_TSProc.c b/drivers/staging/rtl8192e/rtl819x_TSProc.c
index 9903fe3f3c77..7cdeca7ed8c2 100644
--- a/drivers/staging/rtl8192e/rtl819x_TSProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_TSProc.c
@@ -18,7 +18,7 @@ static void RxPktPendingTimeout(struct timer_list *t)
unsigned long flags = 0;
u8 index = 0;
- bool bPktInBuf = false;
+ bool pkt_in_buf = false;
spin_lock_irqsave(&(ieee->reorder_spinlock), flags);
if (ts->rx_timeout_indicate_seq != 0xffff) {
@@ -50,7 +50,7 @@ static void RxPktPendingTimeout(struct timer_list *t)
list_add_tail(&pReorderEntry->list,
&ieee->RxReorder_Unused_List);
} else {
- bPktInBuf = true;
+ pkt_in_buf = true;
break;
}
}
@@ -68,10 +68,10 @@ static void RxPktPendingTimeout(struct timer_list *t)
return;
}
rtllib_indicate_packets(ieee, ieee->stats_IndicateArray, index);
- bPktInBuf = false;
+ pkt_in_buf = false;
}
- if (bPktInBuf && (ts->rx_timeout_indicate_seq == 0xffff)) {
+ if (pkt_in_buf && (ts->rx_timeout_indicate_seq == 0xffff)) {
ts->rx_timeout_indicate_seq = ts->rx_indicate_seq;
mod_timer(&ts->rx_pkt_pending_timer, jiffies +
msecs_to_jiffies(ieee->ht_info->rx_reorder_pending_time)
diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c
index 0cbd130e946a..86b8d342ac80 100644
--- a/drivers/staging/rtl8192e/rtllib_rx.c
+++ b/drivers/staging/rtl8192e/rtllib_rx.c
@@ -529,7 +529,7 @@ static void rx_reorder_indicate_packet(struct rtllib_device *ieee,
u8 win_size = ht_info->rx_reorder_win_size;
u16 win_end = 0;
u8 index = 0;
- bool match_win_start = false, bPktInBuf = false;
+ bool match_win_start = false, pkt_in_buf = false;
unsigned long flags;
netdev_dbg(ieee->dev,
@@ -665,7 +665,7 @@ static void rx_reorder_indicate_packet(struct rtllib_device *ieee,
netdev_err(ieee->dev,
"%s(): Buffer overflow!\n",
__func__);
- bPktInBuf = true;
+ pkt_in_buf = true;
break;
}
@@ -683,7 +683,7 @@ static void rx_reorder_indicate_packet(struct rtllib_device *ieee,
list_add_tail(&pReorderEntry->list,
&ieee->RxReorder_Unused_List);
} else {
- bPktInBuf = true;
+ pkt_in_buf = true;
break;
}
}
@@ -707,10 +707,10 @@ static void rx_reorder_indicate_packet(struct rtllib_device *ieee,
return;
}
rtllib_indicate_packets(ieee, ieee->prxb_indicate_array, index);
- bPktInBuf = false;
+ pkt_in_buf = false;
}
- if (bPktInBuf && ts->rx_timeout_indicate_seq == 0xffff) {
+ if (pkt_in_buf && ts->rx_timeout_indicate_seq == 0xffff) {
netdev_dbg(ieee->dev, "%s(): SET rx timeout timer\n", __func__);
ts->rx_timeout_indicate_seq = ts->rx_indicate_seq;
spin_unlock_irqrestore(&ieee->reorder_spinlock, flags);
--
2.30.2
Rename variable WinSize to win_size
to fix checkpatch warning Avoid CamelCase.
Signed-off-by: Tree Davies <[email protected]>
---
v2: No change.
drivers/staging/rtl8192e/rtllib_rx.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c
index ab2aa1a86c51..50687f3dce47 100644
--- a/drivers/staging/rtl8192e/rtllib_rx.c
+++ b/drivers/staging/rtl8192e/rtllib_rx.c
@@ -526,19 +526,19 @@ static void rx_reorder_indicate_packet(struct rtllib_device *ieee,
{
struct rt_hi_throughput *ht_info = ieee->ht_info;
struct rx_reorder_entry *pReorderEntry = NULL;
- u8 WinSize = ht_info->rx_reorder_win_size;
+ u8 win_size = ht_info->rx_reorder_win_size;
u16 win_end = 0;
u8 index = 0;
bool bMatchWinStart = false, bPktInBuf = false;
unsigned long flags;
netdev_dbg(ieee->dev,
- "%s(): Seq is %d, ts->rx_indicate_seq is %d, WinSize is %d\n",
- __func__, SeqNum, ts->rx_indicate_seq, WinSize);
+ "%s(): Seq is %d, ts->rx_indicate_seq is %d, win_size is %d\n",
+ __func__, SeqNum, ts->rx_indicate_seq, win_size);
spin_lock_irqsave(&(ieee->reorder_spinlock), flags);
- win_end = (ts->rx_indicate_seq + WinSize - 1) % 4096;
+ win_end = (ts->rx_indicate_seq + win_size - 1) % 4096;
/* Rx Reorder initialize condition.*/
if (ts->rx_indicate_seq == 0xffff)
ts->rx_indicate_seq = SeqNum;
@@ -569,11 +569,11 @@ static void rx_reorder_indicate_packet(struct rtllib_device *ieee,
ts->rx_indicate_seq = (ts->rx_indicate_seq + 1) % 4096;
bMatchWinStart = true;
} else if (SN_LESS(win_end, SeqNum)) {
- if (SeqNum >= (WinSize - 1))
- ts->rx_indicate_seq = SeqNum + 1 - WinSize;
+ if (SeqNum >= (win_size - 1))
+ ts->rx_indicate_seq = SeqNum + 1 - win_size;
else
ts->rx_indicate_seq = 4095 -
- (WinSize - (SeqNum + 1)) + 1;
+ (win_size - (SeqNum + 1)) + 1;
netdev_dbg(ieee->dev,
"Window Shift! IndicateSeq: %d, NewSeq: %d\n",
ts->rx_indicate_seq, SeqNum);
--
2.30.2
Rename variable WinEnd to win_end
to fix checkpatch warning Avoid CamelCase.
Signed-off-by: Tree Davies <[email protected]>
---
v2: No change.
drivers/staging/rtl8192e/rtllib_rx.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c
index 3a637731506c..ab2aa1a86c51 100644
--- a/drivers/staging/rtl8192e/rtllib_rx.c
+++ b/drivers/staging/rtl8192e/rtllib_rx.c
@@ -527,7 +527,7 @@ static void rx_reorder_indicate_packet(struct rtllib_device *ieee,
struct rt_hi_throughput *ht_info = ieee->ht_info;
struct rx_reorder_entry *pReorderEntry = NULL;
u8 WinSize = ht_info->rx_reorder_win_size;
- u16 WinEnd = 0;
+ u16 win_end = 0;
u8 index = 0;
bool bMatchWinStart = false, bPktInBuf = false;
unsigned long flags;
@@ -538,7 +538,7 @@ static void rx_reorder_indicate_packet(struct rtllib_device *ieee,
spin_lock_irqsave(&(ieee->reorder_spinlock), flags);
- WinEnd = (ts->rx_indicate_seq + WinSize - 1) % 4096;
+ win_end = (ts->rx_indicate_seq + WinSize - 1) % 4096;
/* Rx Reorder initialize condition.*/
if (ts->rx_indicate_seq == 0xffff)
ts->rx_indicate_seq = SeqNum;
@@ -563,12 +563,12 @@ static void rx_reorder_indicate_packet(struct rtllib_device *ieee,
/* Sliding window manipulation. Conditions includes:
* 1. Incoming SeqNum is equal to WinStart =>Window shift 1
- * 2. Incoming SeqNum is larger than the WinEnd => Window shift N
+ * 2. Incoming SeqNum is larger than the win_end => Window shift N
*/
if (SN_EQUAL(SeqNum, ts->rx_indicate_seq)) {
ts->rx_indicate_seq = (ts->rx_indicate_seq + 1) % 4096;
bMatchWinStart = true;
- } else if (SN_LESS(WinEnd, SeqNum)) {
+ } else if (SN_LESS(win_end, SeqNum)) {
if (SeqNum >= (WinSize - 1))
ts->rx_indicate_seq = SeqNum + 1 - WinSize;
else
--
2.30.2
Rename variable prxbIndicateArray to prxb_indicate_array
to fix checkpatch warning Avoid CamelCase.
Signed-off-by: Tree Davies <[email protected]>
---
v2: No change.
drivers/staging/rtl8192e/rtllib.h | 4 ++--
drivers/staging/rtl8192e/rtllib_rx.c | 10 +++++-----
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index e2695beaf582..62af48c20229 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -1409,7 +1409,7 @@ struct rtllib_device {
union {
struct rtllib_rxb *rfd_array[REORDER_WIN_SIZE];
struct rtllib_rxb *stats_IndicateArray[REORDER_WIN_SIZE];
- struct rtllib_rxb *prxbIndicateArray[REORDER_WIN_SIZE];
+ struct rtllib_rxb *prxb_indicate_array[REORDER_WIN_SIZE];
struct {
struct sw_chnl_cmd PreCommonCmd[MAX_PRECMD_CNT];
struct sw_chnl_cmd PostCommonCmd[MAX_POSTCMD_CNT];
@@ -1803,7 +1803,7 @@ int rtllib_parse_info_param(struct rtllib_device *ieee,
struct rtllib_rx_stats *stats);
void rtllib_indicate_packets(struct rtllib_device *ieee,
- struct rtllib_rxb **prxbIndicateArray, u8 index);
+ struct rtllib_rxb **prxb_indicate_array, u8 index);
#define RT_ASOC_RETRY_LIMIT 5
u8 mgnt_query_tx_rate_exclude_cck_rates(struct rtllib_device *ieee);
diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c
index 124fa5d54a23..0cbd130e946a 100644
--- a/drivers/staging/rtl8192e/rtllib_rx.c
+++ b/drivers/staging/rtl8192e/rtllib_rx.c
@@ -429,14 +429,14 @@ static bool add_reorder_entry(struct rx_ts_record *ts,
}
void rtllib_indicate_packets(struct rtllib_device *ieee,
- struct rtllib_rxb **prxbIndicateArray, u8 index)
+ struct rtllib_rxb **prxb_indicate_array, u8 index)
{
struct net_device_stats *stats = &ieee->stats;
u8 i = 0, j = 0;
u16 ethertype;
for (j = 0; j < index; j++) {
- struct rtllib_rxb *prxb = prxbIndicateArray[j];
+ struct rtllib_rxb *prxb = prxb_indicate_array[j];
for (i = 0; i < prxb->nr_subframes; i++) {
struct sk_buff *sub_skb = prxb->subframes[i];
@@ -594,7 +594,7 @@ static void rx_reorder_indicate_packet(struct rtllib_device *ieee,
netdev_dbg(ieee->dev,
"Packets indication! IndicateSeq: %d, NewSeq: %d\n",
ts->rx_indicate_seq, SeqNum);
- ieee->prxbIndicateArray[0] = prxb;
+ ieee->prxb_indicate_array[0] = prxb;
index = 1;
} else {
/* Current packet is going to be inserted into pending list.*/
@@ -675,7 +675,7 @@ static void rx_reorder_indicate_packet(struct rtllib_device *ieee,
ts->rx_indicate_seq = (ts->rx_indicate_seq + 1) %
4096;
- ieee->prxbIndicateArray[index] = pReorderEntry->prxb;
+ ieee->prxb_indicate_array[index] = pReorderEntry->prxb;
netdev_dbg(ieee->dev, "%s(): Indicate SeqNum %d!\n",
__func__, pReorderEntry->SeqNum);
index++;
@@ -706,7 +706,7 @@ static void rx_reorder_indicate_packet(struct rtllib_device *ieee,
flags);
return;
}
- rtllib_indicate_packets(ieee, ieee->prxbIndicateArray, index);
+ rtllib_indicate_packets(ieee, ieee->prxb_indicate_array, index);
bPktInBuf = false;
}
--
2.30.2
On 5/21/24 05:16, Tree Davies wrote:
> This is v2 of series renaming camelcase variables to meet style
> guide requirements. Thank you in advance to reviewers.
> ~ Tree
>
> Changes:
> #16 Renamed plist to list
> #17 Renamed npadding_length to pad_len
> #19 Deleted ChkLength variable
>
> Tree Davies (31):
> Staging: rtl8192e: Rename variable IsPassiveChannel
> Staging: rtl8192e: Rename variable CountryIeBuf
> Staging: rtl8192e: Rename variable CountryIeLen
> Staging: rtl8192e: Rename variable bWithAironetIE
> Staging: rtl8192e: Rename variable bContainHTC
> Staging: rtl8192e: Rename variable MBssid
> Staging: rtl8192e: Rename variable MBssidMask
> Staging: rtl8192e: Rename variable elementID
> Staging: rtl8192e: Rename variable rtllib_rx_Monitor
> Staging: rtl8192e: Rename variable rtllib_rx_InfraAdhoc
> Staging: rtl8192e: Rename variable IsLegacyDataFrame
> Staging: rtl8192e: Rename variable RxReorderIndicatePacket
> Staging: rtl8192e: Rename variable RfdArray
> Staging: rtl8192e: Rename variable Decrypted
> Staging: rtl8192e: Rename variable AddReorderEntry
> Staging: rtl8192e: Rename variable pList
> Staging: rtl8192e: Rename variable nPadding_Length
> Staging: rtl8192e: Rename variable LLCOffset
> Staging: rtl8192e: Remove variable ChkLength
> Staging: rtl8192e: Rename variable WinEnd
> Staging: rtl8192e: Rename variable WinSize
> Staging: rtl8192e: Rename variable IsDataFrame
> Staging: rtl8192e: Rename variable bMatchWinStart
> Staging: rtl8192e: Rename variable bMBssidValid
> Staging: rtl8192e: Rename variable bWithCcxVerNum
> Staging: rtl8192e: Rename variable Frame_QoSTID
> Staging: rtl8192e: Rename variable CcxRmState
> Staging: rtl8192e: Rename variable IsQoSDataFrame
> Staging: rtl8192e: Rename variable RfdCnt
> Staging: rtl8192e: Rename variable prxbIndicateArray
> Staging: rtl8192e: Rename variable bPktInBuf
>
> .../staging/rtl8192e/rtl8192e/r8192E_dev.c | 2 +-
> drivers/staging/rtl8192e/rtl819x_HTProc.c | 2 +-
> drivers/staging/rtl8192e/rtl819x_TSProc.c | 8 +-
> drivers/staging/rtl8192e/rtllib.h | 36 ++--
> drivers/staging/rtl8192e/rtllib_rx.c | 183 +++++++++---------
> drivers/staging/rtl8192e/rtllib_tx.c | 4 +-
> 6 files changed, 116 insertions(+), 119 deletions(-)
>
Tested-by: Philipp Hortmann <[email protected]>
On Mon, May 20, 2024 at 08:16:47PM -0700, Tree Davies wrote:
> This is v2 of series renaming camelcase variables to meet style
> guide requirements. Thank you in advance to reviewers.
> ~ Tree
>
> Changes:
> #16 Renamed plist to list
> #17 Renamed npadding_length to pad_len
> #19 Deleted ChkLength variable
>
Thanks!
Reviewed-by: Dan Carpenter <[email protected]>
regards,
dan carpenter