Skip to contentSkip to conversation

staging:rtl8192u: Refactor ht_capability_ele - Style

PATCH In review John Whitmore 6 participants 32 messages Aug 29, 2018 – Sep 10, 2018 Staging

lore
Share & tools
lore
#0 lore raw

cover staging:rtl8192u: Refactor ht_capability_ele - Style

This series of patchs is a coding style clean up of the structure ht_capability_ele. The changes are all simply changes of the member names, to remove the CamelCase naming.

A number of the member have been renamed with the prefix 'not_used...' to emphasise the fact that member is not used in code. At a future time the structure might be stripped of these member variables, but for the moment they have been left, as I'm not sure that the size of the structure is not significant, and possibly mapped to Hardware.

John Whitmore (21):
staging:rtl8192u: Rename AdvCoding - Style staging:rtl8192u: Rename ChlWidth - Style staging:rtl8192u: Rename MimoPwrSave - Style staging:rtl8192u: Rename GreenField - Style staging:rtl8192u: Rename ShortGI20Mhz - Style staging:rtl8192u: Rename ShortGI40Mhz - Style staging:rtl8192u: Rename TxSTBC - Style staging:rtl8192u: Rename RxSTBC - Style staging:rtl8192u: Rename DelayBA - Style staging:rtl8192u: Rename MaxAMSDUSize - Style staging:rtl8192u: Rename DssCCk - Style staging:rtl8192u: Rename PSMP - Style staging:rtl8192u: Rename Rsvd1 - Style staging:rtl8192u: Rename LSigTxopProtect - Style staging:rtl8192u: Rename MaxRxAMPDUFactor - Style staging:rtl8192u: Rename MPDUDensity - Style staging:rtl8192u: Rename Rsvd2 - Style staging:rtl8192u: Rename MCS - Style staging:rtl8192u: Rename ExtHTCapInfo - Style staging:rtl8192u: Rename TxBFCap - Style staging:rtl8192u: Rename ASCap - Style

 .../staging/rtl8192u/ieee80211/ieee80211_wx.c |  10 +-
 .../staging/rtl8192u/ieee80211/rtl819x_HT.h   |  42 +++----
 .../rtl8192u/ieee80211/rtl819x_HTProc.c       | 115 ++++++++----------
 3 files changed, 75 insertions(+), 92 deletions(-)
Signature · 1 line
2.18.0
#1 lore raw

PATCH 1/21 staging:rtl8192u: Rename AdvCoding - Style

Rename the bit field element AdvCoding, as it causes a checkpatch issue with CamelCase naming. As the element is not actually used in code it has been renamed to 'not_used_adv_coding'.

The single line of code which initialises the bit has been removed, as the field is unused.

This is a purely coding style change which should have no impact on runtime code execution.

---
 drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h     | 2 +-
 drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c | 1 -
 2 files changed, 1 insertion(+), 2 deletions(-)
drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h +1 -1
index 64d5359cf7e2..66a0274077d3 100644
@@ -39,7 +39,7 @@ enum ht_extension_chan_offset {
 
 struct ht_capability_ele {
 	//HT capability info
-	u8	AdvCoding:1;
+	u8	not_used_adv_coding:1;
 	u8	ChlWidth:1;
 	u8	MimoPwrSave:2;
 	u8	GreenField:1;
drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c +0 -1
index 9bf52cebe4cd..d7f73a5831da 100644
@@ -550,7 +550,6 @@ void HTConstructCapabilityElement(struct ieee80211_device *ieee, u8 *posHTCap, u
 	}
 
 	//HT capability info
-	pCapELE->AdvCoding		= 0; // This feature is not supported now!!
 	if (ieee->GetHalfNmodeSupportByAPsHandler(ieee->dev))
 		pCapELE->ChlWidth = 0;
 	else
Signature · 1 line
2.18.0
#2 lore raw

Re: [PATCH 01/21] staging:rtl8192u: Rename AdvCoding - Style

Quoted 9 lines · John Whitmore

Rename the bit field element AdvCoding, as it causes a checkpatch issue with CamelCase naming. As the element is not actually used in code it has been renamed to 'not_used_adv_coding'.

The single line of code which initialises the bit has been removed, as the field is unused.

This is a purely coding style change which should have no impact on runtime code execution.

Hi John.

Other than the somewhat useful code style cleanups, is there a point at which you will feel comfortable doing actual code changes to this driver?

Perhaps support for the chipset could be converted to use mac80211 and moved into the directory with the other realtek drivers in drivers/net/wireless/realtek/rtl8xxxu/...

Larry? What do you think?

#3 lore raw

Re: [PATCH 01/21] staging:rtl8192u: Rename AdvCoding - Style

Quoted 17 lines · Joe Perches
Quoted 9 lines · John Whitmore

Rename the bit field element AdvCoding, as it causes a checkpatch issue with CamelCase naming. As the element is not actually used in code it has been renamed to 'not_used_adv_coding'.

The single line of code which initialises the bit has been removed, as the field is unused.

This is a purely coding style change which should have no impact on runtime code execution.

Hi John.

Other than the somewhat useful code style cleanups, is there a point at which you will feel comfortable doing actual code changes to this driver?

Quoted 5 lines

Perhaps support for the chipset could be converted to use mac80211 and moved into the directory with the other realtek drivers in drivers/net/wireless/realtek/rtl8xxxu/...

Larry? What do you think?

First of all, if a variable is not used, then it should be removed, not merely renamed to satisfy checkpatch.

All the Realtek USB devices should be added to rtl8xxxu, not merely moved into that directory. Jes Sorensen created a well-designed driver the is structured to permit addition of different initialization routines, etc. That said, the conversion will not be easy. In addition, it will require having your hands on a real device - a requirement that I cannot meet for the RTL8192U.

Larry

#4 lore raw

Re: [PATCH 01/21] staging:rtl8192u: Rename AdvCoding - Style

Quoted 27 lines · Larry Finger
Quoted 17 lines · Joe Perches
Quoted 9 lines · John Whitmore

Rename the bit field element AdvCoding, as it causes a checkpatch issue with CamelCase naming. As the element is not actually used in code it has been renamed to 'not_used_adv_coding'.

The single line of code which initialises the bit has been removed, as the field is unused.

This is a purely coding style change which should have no impact on runtime code execution.

Hi John.

Other than the somewhat useful code style cleanups, is there a point at which you will feel comfortable doing actual code changes to this driver?

Quoted 5 lines

Perhaps support for the chipset could be converted to use mac80211 and moved into the directory with the other realtek drivers in drivers/net/wireless/realtek/rtl8xxxu/...

Larry? What do you think?

First of all, if a variable is not used, then it should be removed, not merely renamed to satisfy checkpatch.

Quoted 9 lines

All the Realtek USB devices should be added to rtl8xxxu, not merely moved into that directory. Jes Sorensen created a well-designed driver the is structured to permit addition of different initialization routines, etc. That said, the conversion will not be easy. In addition, it will require having your hands on a real device - a requirement that I cannot meet for the RTL8192U.

Larry

Oops... it probably doesn't look like it, at the moment, but 'actual code changes to this driver' was where I'm hoping to get to. There's a lot of stuff in the header files, including member variables, which are not used in the code. I was hoping to strip these out incrementally to minimise the amount of source code that has to be understood. I'm not familiar with the overall network, or 80211, subsystem architecture, but it's hard to see why this driver has it's own private ieee80211.h file.

I totally agree that the unused variables should be removed, and they will be, if we can accept that they are in fact unused && size doesn't matter. The structure in question 'struct ht_capability_ele' is used in, what I consider to be, a strange way in the file ieee80211_wx.c.

    struct ht_capability_ele *ht_cap = NULL;
    ...
    ht_cap = (struct ht_capability_ele *)&network->bssht.bdHTCapBuf[4];
    ...
    ht_cap = (struct ht_capability_ele *)&network->bssht.bdHTCapBuf[0];

I have been trying to find a datasheet for this device but to date me query strings haven't given me much joy. I must try and get my hands on the device in question.

Thank ye for your comments, and sorry for the "somewhat useful" changes to date, but doing these changes is letting me get the hang of this code, which I refuse to comment on because there are probably guidelines on using naughty language on here. ;) When I see lines like these two:

    ht_cap = (struct ht_capability_ele *)&network->bssht.bdHTCapBuf[4];
    ...
    ht_cap = (struct ht_capability_ele *)&network->bssht.bdHTCapBuf[0];

I think that size might very well matter for the moment. The BSS_HT structure is farther down the header file so when I clean up that struct things might be clearer. I can only hope.

jwhitmore

#5 lore raw

Re: [PATCH 01/21] staging:rtl8192u: Rename AdvCoding - Style

Quoted 2 lines · John Whitmore
Quoted 1 line · Larry Finger

On 08/29/2018 04:14 PM, Joe Perches wrote:

[]

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

Perhaps support for the chipset could be converted to use mac80211 and moved into the directory with the other realtek drivers in drivers/net/wireless/realtek/rtl8xxxu/...

[]

Quoted 6 lines
Quoted 6 lines

All the Realtek USB devices should be added to rtl8xxxu, not merely moved into that directory. Jes Sorensen created a well-designed driver the is structured to permit addition of different initialization routines, etc. That said, the conversion will not be easy. In addition, it will require having your hands on a real device - a requirement that I cannot meet for the RTL8192U.

[]

Quoted 7 lines
Quoted 1 line

Oops... it probably doesn't look like it, at the moment, but 'actual code

changes to this driver' was where I'm hoping to get to. There's a lot of stuff in the header files, including member variables, which are not used in the code. I was hoping to strip these out incrementally to minimise the amount of source code that has to be understood. I'm not familiar with the overall network, or 80211, subsystem architecture, but it's hard to see why this driver has it's own private ieee80211.h file.

That's true and the reason why this code should eventually be deleted if possible and its functionality integrated into the existing realtek/rtl8xxxxu code.

Quoted 1 line

I must try and get my hands on the device in question.

That'd be good, though likely this device is obsolete. Good luck finding one.

Quoted 4 lines

Thank ye for your comments, and sorry for the "somewhat useful" changes to date, but doing these changes is letting me get the hang of this code, which I refuse to comment on because there are probably guidelines on using naughty language on here. ;)

Feel free.

The one look I took at any existing multi-platform realtek code with all the #ifdefs made me not want look at it again.

https://github.com/hadess/rtl8723bs/

I said a naughty under my breath too.

#6 lore raw

Re: [PATCH 01/21] staging:rtl8192u: Rename AdvCoding - Style

Quoted 23 lines · Joe Perches
Quoted 2 lines · John Whitmore
Quoted 1 line · Larry Finger

On 08/29/2018 04:14 PM, Joe Perches wrote:

[]

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

Perhaps support for the chipset could be converted to use mac80211 and moved into the directory with the other realtek drivers in drivers/net/wireless/realtek/rtl8xxxu/...

[]

Quoted 6 lines
Quoted 6 lines

All the Realtek USB devices should be added to rtl8xxxu, not merely moved into that directory. Jes Sorensen created a well-designed driver the is structured to permit addition of different initialization routines, etc. That said, the conversion will not be easy. In addition, it will require having your hands on a real device - a requirement that I cannot meet for the RTL8192U.

[]

Quoted 7 lines
Quoted 1 line

Oops... it probably doesn't look like it, at the moment, but 'actual code

changes to this driver' was where I'm hoping to get to. There's a lot of stuff in the header files, including member variables, which are not used in the code. I was hoping to strip these out incrementally to minimise the amount of source code that has to be understood. I'm not familiar with the overall network, or 80211, subsystem architecture, but it's hard to see why this driver has it's own private ieee80211.h file.

Quoted 9 lines

That's true and the reason why this code should eventually be deleted if possible and its functionality integrated into the existing realtek/rtl8xxxxu code.

Quoted 1 line

I must try and get my hands on the device in question.

That'd be good, though likely this device is obsolete. Good luck finding one.

Maybe if the whole driver was deleted nobody would notice ;) Thanks for your help. I'm afraid I carried on in the same vain cleaning stuff up but I do have to look at realtek/rtl8xxxxu, thanks for pointing out where the goalposts are, miles away ;)

Quoted 13 lines
Quoted 4 lines

Thank ye for your comments, and sorry for the "somewhat useful" changes to date, but doing these changes is letting me get the hang of this code, which I refuse to comment on because there are probably guidelines on using naughty language on here. ;)

Feel free.

The one look I took at any existing multi-platform realtek code with all the #ifdefs made me not want look at it again.

https://github.com/hadess/rtl8723bs/

I said a naughty under my breath too.

#7 lore raw

Re: [PATCH 01/21] staging:rtl8192u: Rename AdvCoding - Style

In reply to John Whitmore
Quoted 21 lines · John Whitmore

Rename the bit field element AdvCoding, as it causes a checkpatch issue with CamelCase naming. As the element is not actually used in code it has been renamed to 'not_used_adv_coding'.

The single line of code which initialises the bit has been removed, as the field is unused.

This is a purely coding style change which should have no impact on runtime code execution.

---
 drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h     | 2 +-
 drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c | 1 -
 2 files changed, 1 insertion(+), 2 deletions(-)
drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h +0 -0
index 64d5359cf7e2..66a0274077d3 100644

drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h enum ht_extension_chan_offset { · line 42

Quoted 5 lines
drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h +1 -1
@@ -39,7 +39,7 @@ enum ht_extension_chan_offset {
 
 struct ht_capability_ele {
 	//HT capability info
-	u8	AdvCoding:1;
+	u8	not_used_adv_coding:1;

I can't review any more of this patchset when this is the first line...

:(

regards,
dan carpenter

#8 lore raw

Re: [PATCH 01/21] staging:rtl8192u: Rename AdvCoding - Style

Quoted 23 lines · Dan Carpenter
Quoted 22 lines · John Whitmore

Rename the bit field element AdvCoding, as it causes a checkpatch issue with CamelCase naming. As the element is not actually used in code it has been renamed to 'not_used_adv_coding'.

The single line of code which initialises the bit has been removed, as the field is unused.

This is a purely coding style change which should have no impact on runtime code execution.

---
 drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h     | 2 +-
 drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c | 1 -
 2 files changed, 1 insertion(+), 2 deletions(-)
drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h +0 -0
index 64d5359cf7e2..66a0274077d3 100644
@@ -39,7 +39,7 @@ enum ht_extension_chan_offset {
 
Quoted 7 lines

drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h enum ht_extension_chan_offset { · line 42

Quoted 4 lines
drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h +1 -1
 struct ht_capability_ele {
 	//HT capability info
-	u8	AdvCoding:1;
+	u8	not_used_adv_coding:1;

I can't review any more of this patchset when this is the first line...

That email wasn't very clear. If you think some of your patches are going to be more controversial than others, put them at the very end so we can at least apply part of the patchset.

regards,
dan carpenter

#9 lore raw

Re: [PATCH 01/21] staging:rtl8192u: Rename AdvCoding - Style

Quoted 32 lines · Dan Carpenter
Quoted 23 lines · Dan Carpenter
Quoted 22 lines · John Whitmore

Rename the bit field element AdvCoding, as it causes a checkpatch issue with CamelCase naming. As the element is not actually used in code it has been renamed to 'not_used_adv_coding'.

The single line of code which initialises the bit has been removed, as the field is unused.

This is a purely coding style change which should have no impact on runtime code execution.

---
 drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h     | 2 +-
 drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c | 1 -
 2 files changed, 1 insertion(+), 2 deletions(-)
drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h +0 -0
index 64d5359cf7e2..66a0274077d3 100644
@@ -39,7 +39,7 @@ enum ht_extension_chan_offset {
 
Quoted 7 lines

drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h enum ht_extension_chan_offset { · line 42

Quoted 4 lines
drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h +1 -1
 struct ht_capability_ele {
 	//HT capability info
-	u8	AdvCoding:1;
+	u8	not_used_adv_coding:1;

I can't review any more of this patchset when this is the first line...

Quoted 7 lines

That email wasn't very clear. If you think some of your patches are going to be more controversial than others, put them at the very end so we can at least apply part of the patchset.

regards,
dan carpenter

Thanks for the clarification, I needed it ;)

I'm not sure I consider any of the patches in the series as being controversial. They are all just simple name changes of member variables. As a number of the variables are not used in code the names have been changed to reflect that fact. If I'd renamed them and left out the 'not_used_' prefix would the changes not be controversial? I don't think the fact that the members are unused is a biggy.

What might appear to be controversial is that I didn't simply remove the members. I haven't done that because I'm not yet satisfied that the structure's size is insignificant. As soon as I am happy that the size of the structure is not important, to runtime code execution, there'll be a patch which removes a number of 'not_used_...' members from a structure.

Alternatively if the size if important there might be a patch which renames a number of unused bitfield members to reserved_1, reserved_2, reserved_3....

Perhaps I should have held off this patch set until I had satisfied myself that the size either, does or does not, matter and combine all changes into one series of patches. On the other hand I've added an extra step which can be reviewed and clearly see the incremental changes. I'm happy enough for the whole patch set to be rejected for the moment, but I'd be even happier if on review somebody pointed out that a member which I have decided is unused in the code is actually used and a patch gets rejected on those grounds. If everybody accepts this series, that asserts that members are unused, the next step is easy either way.

jwhitmore

#10 lore raw

Re: [PATCH 01/21] staging:rtl8192u: Rename AdvCoding - Style

Quoted 41 lines · John Whitmore
Quoted 32 lines · Dan Carpenter
Quoted 23 lines · Dan Carpenter
Quoted 22 lines · John Whitmore

Rename the bit field element AdvCoding, as it causes a checkpatch issue with CamelCase naming. As the element is not actually used in code it has been renamed to 'not_used_adv_coding'.

The single line of code which initialises the bit has been removed, as the field is unused.

This is a purely coding style change which should have no impact on runtime code execution.

---
 drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h     | 2 +-
 drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c | 1 -
 2 files changed, 1 insertion(+), 2 deletions(-)
drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h +0 -0
index 64d5359cf7e2..66a0274077d3 100644
@@ -39,7 +39,7 @@ enum ht_extension_chan_offset {
 
Quoted 7 lines

drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h enum ht_extension_chan_offset { · line 42

Quoted 4 lines
drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h +1 -1
 struct ht_capability_ele {
 	//HT capability info
-	u8	AdvCoding:1;
+	u8	not_used_adv_coding:1;

I can't review any more of this patchset when this is the first line...

Quoted 7 lines

That email wasn't very clear. If you think some of your patches are going to be more controversial than others, put them at the very end so we can at least apply part of the patchset.

regards,
dan carpenter

Quoted 9 lines

Thanks for the clarification, I needed it ;)

I'm not sure I consider any of the patches in the series as being controversial. They are all just simple name changes of member variables. As a number of the variables are not used in code the names have been changed to reflect that fact. If I'd renamed them and left out the 'not_used_' prefix would the changes not be controversial? I don't think the fact that the members are unused is a biggy.

I didn't like the new name at all.

Quite often when I review these I just use a script to verify that we're only renaming variables and not doing code changes outside of that. But if I review it by hand I would have seen that the variable was not used and investigated what was going on.

Quoted 10 lines

What might appear to be controversial is that I didn't simply remove the members. I haven't done that because I'm not yet satisfied that the structure's size is insignificant. As soon as I am happy that the size of the structure is not important, to runtime code execution, there'll be a patch which removes a number of 'not_used_...' members from a structure.

Alternatively if the size if important there might be a patch which renames a number of unused bitfield members to reserved_1, reserved_2, reserved_3....

That's a good question. If a struct is part of the use space API or the network protocol or defined by the hardware then we can't change the layout.

One thing I look for is if the struct has pointers which aren't tagged as __user pointers then it's internal to the kernel. Unfortunately that doesn't help here. Network protocol is all endian specific and this struct is not. But again that doesn't help much because it could just be a bug. If the struct is __packed then obviously the layout matters.

So I don't know. I think you're right that actually we can't change the layout. The code is really a mess, so it's possible I have misread.

regards,
dan carpenter

maintainer
#11 lore raw

Re: [PATCH 01/21] staging:rtl8192u: Rename AdvCoding - Style

In reply to John Whitmore
Quoted 34 lines · John Whitmore

Rename the bit field element AdvCoding, as it causes a checkpatch issue with CamelCase naming. As the element is not actually used in code it has been renamed to 'not_used_adv_coding'.

The single line of code which initialises the bit has been removed, as the field is unused.

This is a purely coding style change which should have no impact on runtime code execution.

---
 drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h     | 2 +-
 drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c | 1 -
 2 files changed, 1 insertion(+), 2 deletions(-)
drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h +1 -1
index 64d5359cf7e2..66a0274077d3 100644
@@ -39,7 +39,7 @@ enum ht_extension_chan_offset {
 
 struct ht_capability_ele {
 	//HT capability info
-	u8	AdvCoding:1;
+	u8	not_used_adv_coding:1;
 	u8	ChlWidth:1;
 	u8	MimoPwrSave:2;
 	u8	GreenField:1;
drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c +0 -0
index 9bf52cebe4cd..d7f73a5831da 100644

drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c void HTConstructCapabilityElement(struct ieee80211_device *ieee, u8 *posHTCap, u · line 555

Quoted 7 lines
drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c +0 -1
@@ -550,7 +550,6 @@ void HTConstructCapabilityElement(struct ieee80211_device *ieee, u8 *posHTCap, u
 	}
 
 	//HT capability info
-	pCapELE->AdvCoding		= 0; // This feature is not supported now!!
 	if (ieee->GetHalfNmodeSupportByAPsHandler(ieee->dev))
 		pCapELE->ChlWidth = 0;
 	else

If a structure like this, which is not read/written to hardware directly, has fields that are not really used at all, just delete them. That's much easier than having to apply this patch, and a later patch which deletes the usage.

thanks,

greg k-h

#12 lore raw

PATCH 2/21 staging:rtl8192u: Rename ChlWidth - Style

In reply to John Whitmore

Rename 'ChlWidth', member variable of the structure ht_capability_ele. This change is to clear the checkpatch issue with CamelCase naming. The bitfield's name has been changed to 'chl_width'.

This is a coding style change which should have no impact on runtime code execution.

---
 .../staging/rtl8192u/ieee80211/ieee80211_wx.c    |  4 ++--
 drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h  |  2 +-
 .../staging/rtl8192u/ieee80211/rtl819x_HTProc.c  | 16 ++++++++--------
 3 files changed, 11 insertions(+), 11 deletions(-)
drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c +2 -2
index fa59c712c74b..514445dc542e 100644
@@ -154,8 +154,8 @@ static inline char *rtl819x_translate_scan(struct ieee80211_device *ieee,
 			ht_cap = (struct ht_capability_ele *)&network->bssht.bdHTCapBuf[4];
 		else
 			ht_cap = (struct ht_capability_ele *)&network->bssht.bdHTCapBuf[0];
-		is40M = (ht_cap->ChlWidth)?1:0;
-		isShortGI = (ht_cap->ChlWidth)?
+		is40M = (ht_cap->chl_width)?1:0;
+		isShortGI = (ht_cap->chl_width)?
 						((ht_cap->ShortGI40Mhz)?1:0):
 						((ht_cap->ShortGI20Mhz)?1:0);
 
drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h +1 -1
index 66a0274077d3..d79126853cd3 100644
@@ -40,7 +40,7 @@ enum ht_extension_chan_offset {
 struct ht_capability_ele {
 	//HT capability info
 	u8	not_used_adv_coding:1;
-	u8	ChlWidth:1;
+	u8	chl_width:1;
 	u8	MimoPwrSave:2;
 	u8	GreenField:1;
 	u8	ShortGI20Mhz:1;
drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c +8 -8
index d7f73a5831da..d9c2a2df8d0e 100644
@@ -142,7 +142,7 @@ void HTDebugHTCapability(u8 *CapIE, u8 *TitleString)
 	}
 	IEEE80211_DEBUG(IEEE80211_DL_HT, "<Log HT Capability>. Called by %s\n", TitleString);
 
-	IEEE80211_DEBUG(IEEE80211_DL_HT,  "\tSupported Channel Width = %s\n", (pCapELE->ChlWidth) ? "20MHz" : "20/40MHz");
+	IEEE80211_DEBUG(IEEE80211_DL_HT,  "\tSupported Channel Width = %s\n", (pCapELE->chl_width) ? "20MHz" : "20/40MHz");
 	IEEE80211_DEBUG(IEEE80211_DL_HT,  "\tSupport Short GI for 20M = %s\n", (pCapELE->ShortGI20Mhz) ? "YES" : "NO");
 	IEEE80211_DEBUG(IEEE80211_DL_HT,  "\tSupport Short GI for 40M = %s\n", (pCapELE->ShortGI40Mhz) ? "YES" : "NO");
 	IEEE80211_DEBUG(IEEE80211_DL_HT,  "\tSupport TX STBC = %s\n", (pCapELE->TxSTBC) ? "YES" : "NO");
@@ -230,7 +230,7 @@ static bool IsHTHalfNmode40Bandwidth(struct ieee80211_device *ieee)
 		retValue = false;
 	else if (!ieee->GetHalfNmodeSupportByAPsHandler(ieee->dev))	// station in half n mode
 		retValue = false;
-	else if (((struct ht_capability_ele *)(pHTInfo->PeerHTCapBuf))->ChlWidth) // ap support 40 bw
+	else if (((struct ht_capability_ele *)(pHTInfo->PeerHTCapBuf))->chl_width) // ap support 40 bw
 		retValue = true;
 	else
 		retValue = false;
@@ -551,17 +551,17 @@ void HTConstructCapabilityElement(struct ieee80211_device *ieee, u8 *posHTCap, u
 
 	//HT capability info
 	if (ieee->GetHalfNmodeSupportByAPsHandler(ieee->dev))
-		pCapELE->ChlWidth = 0;
+		pCapELE->chl_width = 0;
 	else
-		pCapELE->ChlWidth = (pHT->bRegBW40MHz ? 1 : 0);
+		pCapELE->chl_width = (pHT->bRegBW40MHz ? 1 : 0);
 
-//	pCapELE->ChlWidth		= (pHT->bRegBW40MHz?1:0);
+//	pCapELE->chl_width		= (pHT->bRegBW40MHz?1:0);
 	pCapELE->MimoPwrSave		= pHT->SelfMimoPs;
 	pCapELE->GreenField		= 0; // This feature is not supported now!!
 	pCapELE->ShortGI20Mhz		= 1; // We can receive Short GI!!
 	pCapELE->ShortGI40Mhz		= 1; // We can receive Short GI!!
 	//DbgPrint("TX HT cap/info ele BW=%d SG20=%d SG40=%d\n\r",
-	//pCapELE->ChlWidth, pCapELE->ShortGI20Mhz, pCapELE->ShortGI40Mhz);
+	//pCapELE->chl_width, pCapELE->ShortGI20Mhz, pCapELE->ShortGI40Mhz);
 	pCapELE->TxSTBC			= 1;
 	pCapELE->RxSTBC			= 0;
 	pCapELE->DelayBA		= 0;	// Do not support now!!
@@ -574,7 +574,7 @@ void HTConstructCapabilityElement(struct ieee80211_device *ieee, u8 *posHTCap, u
 	 * MAC HT parameters info
 	 * TODO: Nedd to take care of this part
 	 */
-	IEEE80211_DEBUG(IEEE80211_DL_HT, "TX HT cap/info ele BW=%d MaxAMSDUSize:%d DssCCk:%d\n", pCapELE->ChlWidth, pCapELE->MaxAMSDUSize, pCapELE->DssCCk);
+	IEEE80211_DEBUG(IEEE80211_DL_HT, "TX HT cap/info ele BW=%d MaxAMSDUSize:%d DssCCk:%d\n", pCapELE->chl_width, pCapELE->MaxAMSDUSize, pCapELE->DssCCk);
 
 	if (IsEncrypt) {
 		pCapELE->MPDUDensity	= 7; // 8us
@@ -935,7 +935,7 @@ void HTOnAssocRsp(struct ieee80211_device *ieee)
 //	IEEE80211_DEBUG_DATA(IEEE80211_DL_DATA|IEEE80211_DL_HT, pPeerHTInfo, sizeof(HT_INFORMATION_ELE));
 	// Config Supported Channel Width setting
 	//
-	HTSetConnectBwMode(ieee, (enum ht_channel_width)(pPeerHTCap->ChlWidth), (enum ht_extension_chan_offset)(pPeerHTInfo->ExtChlOffset));
+	HTSetConnectBwMode(ieee, (enum ht_channel_width)(pPeerHTCap->chl_width), (enum ht_extension_chan_offset)(pPeerHTInfo->ExtChlOffset));
 
 	pHTInfo->bCurTxBW40MHz = (pPeerHTInfo->RecommemdedTxWidth == 1);
 
Signature · 1 line
2.18.0
#13 lore raw

PATCH 3/21 staging:rtl8192u: Rename MimoPwrSave - Style

In reply to John Whitmore

Rename the bitfield name MimoPwrSave, to clear the checkpatch issue with CamelCase naming, to 'mimo_power_save'.

This is a coding style change which should have no impact on runtime code execution.

---
 drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h     | 2 +-
 drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h +1 -1
index d79126853cd3..069f93e77c46 100644
@@ -41,7 +41,7 @@ struct ht_capability_ele {
 	//HT capability info
 	u8	not_used_adv_coding:1;
 	u8	chl_width:1;
-	u8	MimoPwrSave:2;
+	u8	mimo_power_save:2;
 	u8	GreenField:1;
 	u8	ShortGI20Mhz:1;
 	u8	ShortGI40Mhz:1;
drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c +2 -2
index d9c2a2df8d0e..7cb18c2f6d93 100644
@@ -556,7 +556,7 @@ void HTConstructCapabilityElement(struct ieee80211_device *ieee, u8 *posHTCap, u
 		pCapELE->chl_width = (pHT->bRegBW40MHz ? 1 : 0);
 
 //	pCapELE->chl_width		= (pHT->bRegBW40MHz?1:0);
-	pCapELE->MimoPwrSave		= pHT->SelfMimoPs;
+	pCapELE->mimo_power_save        = pHT->SelfMimoPs;
 	pCapELE->GreenField		= 0; // This feature is not supported now!!
 	pCapELE->ShortGI20Mhz		= 1; // We can receive Short GI!!
 	pCapELE->ShortGI40Mhz		= 1; // We can receive Short GI!!
@@ -1052,7 +1052,7 @@ void HTOnAssocRsp(struct ieee80211_device *ieee)
 	/*
 	 * Config MIMO Power Save setting
 	 */
-	pHTInfo->PeerMimoPs = pPeerHTCap->MimoPwrSave;
+	pHTInfo->PeerMimoPs = pPeerHTCap->mimo_power_save;
 	if (pHTInfo->PeerMimoPs == MIMO_PS_STATIC)
 		pMcsFilter = MCS_FILTER_1SS;
 	else
Signature · 1 line
2.18.0
#14 lore raw

PATCH 4/21 staging:rtl8192u: Rename GreenField - Style

In reply to John Whitmore

Rename the bit field member GreenField, this change clears the checkpatch issue with CamelCase naming. As the member is no longer used the name has been changed to 'not_used_green_field', and the redundant line of initialisation code has been removed.

This is a coding style change which should have no impact on runtime code execution.

---
 drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h     | 2 +-
 drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c | 1 -
 2 files changed, 1 insertion(+), 2 deletions(-)
drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h +1 -1
index 069f93e77c46..705d811cbe01 100644
@@ -42,7 +42,7 @@ struct ht_capability_ele {
 	u8	not_used_adv_coding:1;
 	u8	chl_width:1;
 	u8	mimo_power_save:2;
-	u8	GreenField:1;
+	u8	not_used_green_field:1;
 	u8	ShortGI20Mhz:1;
 	u8	ShortGI40Mhz:1;
 	u8	TxSTBC:1;
drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c +0 -1
index 7cb18c2f6d93..73745d8406aa 100644
@@ -557,7 +557,6 @@ void HTConstructCapabilityElement(struct ieee80211_device *ieee, u8 *posHTCap, u
 
 //	pCapELE->chl_width		= (pHT->bRegBW40MHz?1:0);
 	pCapELE->mimo_power_save        = pHT->SelfMimoPs;
-	pCapELE->GreenField		= 0; // This feature is not supported now!!
 	pCapELE->ShortGI20Mhz		= 1; // We can receive Short GI!!
 	pCapELE->ShortGI40Mhz		= 1; // We can receive Short GI!!
 	//DbgPrint("TX HT cap/info ele BW=%d SG20=%d SG40=%d\n\r",
Signature · 1 line
2.18.0
#15 lore raw

PATCH 5/21 staging:rtl8192u: Rename ShortGI20Mhz - Style

In reply to John Whitmore

Rename the bitfield member 'ShortGI20Mhz' to 'short_gi20_mhz'. This change clears the checkpatch issue with CamelCase naming of variables.

The change if purely a coding style change which should have no impact on runtime code execution.

---
 drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c   |  2 +-
 drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h     |  2 +-
 drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c | 10 +++++-----
 3 files changed, 7 insertions(+), 7 deletions(-)
drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c +1 -1
index 514445dc542e..a0e91763e7f3 100644
@@ -157,7 +157,7 @@ static inline char *rtl819x_translate_scan(struct ieee80211_device *ieee,
 		is40M = (ht_cap->chl_width)?1:0;
 		isShortGI = (ht_cap->chl_width)?
 						((ht_cap->ShortGI40Mhz)?1:0):
-						((ht_cap->ShortGI20Mhz)?1:0);
+						((ht_cap->short_gi20_mhz)?1:0);
 
 		max_mcs = HTGetHighestMCSRate(ieee, ht_cap->MCS, MCS_FILTER_ALL);
 		rate = MCS_DATA_RATE[is40M][isShortGI][max_mcs&0x7f];
drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h +1 -1
index 705d811cbe01..64fd6a4f3bcd 100644
@@ -43,7 +43,7 @@ struct ht_capability_ele {
 	u8	chl_width:1;
 	u8	mimo_power_save:2;
 	u8	not_used_green_field:1;
-	u8	ShortGI20Mhz:1;
+	u8	short_gi20_mhz:1;
 	u8	ShortGI40Mhz:1;
 	u8	TxSTBC:1;
 	u8	RxSTBC:2;
drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c +5 -5
index 73745d8406aa..fe8d75d8bd96 100644
@@ -143,7 +143,7 @@ void HTDebugHTCapability(u8 *CapIE, u8 *TitleString)
 	IEEE80211_DEBUG(IEEE80211_DL_HT, "<Log HT Capability>. Called by %s\n", TitleString);
 
 	IEEE80211_DEBUG(IEEE80211_DL_HT,  "\tSupported Channel Width = %s\n", (pCapELE->chl_width) ? "20MHz" : "20/40MHz");
-	IEEE80211_DEBUG(IEEE80211_DL_HT,  "\tSupport Short GI for 20M = %s\n", (pCapELE->ShortGI20Mhz) ? "YES" : "NO");
+	IEEE80211_DEBUG(IEEE80211_DL_HT,  "\tSupport Short GI for 20M = %s\n", (pCapELE->short_gi20_mhz) ? "YES" : "NO");
 	IEEE80211_DEBUG(IEEE80211_DL_HT,  "\tSupport Short GI for 40M = %s\n", (pCapELE->ShortGI40Mhz) ? "YES" : "NO");
 	IEEE80211_DEBUG(IEEE80211_DL_HT,  "\tSupport TX STBC = %s\n", (pCapELE->TxSTBC) ? "YES" : "NO");
 	IEEE80211_DEBUG(IEEE80211_DL_HT,  "\tMax AMSDU Size = %s\n", (pCapELE->MaxAMSDUSize) ? "3839" : "7935");
@@ -253,7 +253,7 @@ static bool IsHTHalfNmodeSGI(struct ieee80211_device *ieee, bool is40MHz)
 		else
 			retValue = false;
 	} else {
-		if (((struct ht_capability_ele *)(pHTInfo->PeerHTCapBuf))->ShortGI20Mhz) // ap support 40 bw short GI
+		if (((struct ht_capability_ele *)(pHTInfo->PeerHTCapBuf))->short_gi20_mhz) // ap support 40 bw short GI
 			retValue = true;
 		else
 			retValue = false;
@@ -557,10 +557,10 @@ void HTConstructCapabilityElement(struct ieee80211_device *ieee, u8 *posHTCap, u
 
 //	pCapELE->chl_width		= (pHT->bRegBW40MHz?1:0);
 	pCapELE->mimo_power_save        = pHT->SelfMimoPs;
-	pCapELE->ShortGI20Mhz		= 1; // We can receive Short GI!!
+	pCapELE->short_gi20_mhz		= 1; // We can receive Short GI!!
 	pCapELE->ShortGI40Mhz		= 1; // We can receive Short GI!!
 	//DbgPrint("TX HT cap/info ele BW=%d SG20=%d SG40=%d\n\r",
-	//pCapELE->chl_width, pCapELE->ShortGI20Mhz, pCapELE->ShortGI40Mhz);
+	//pCapELE->chl_width, pCapELE->short_gi20_mhz, pCapELE->ShortGI40Mhz);
 	pCapELE->TxSTBC			= 1;
 	pCapELE->RxSTBC			= 0;
 	pCapELE->DelayBA		= 0;	// Do not support now!!
@@ -944,7 +944,7 @@ void HTOnAssocRsp(struct ieee80211_device *ieee)
 	 * TODO:
 	 */
 	pHTInfo->bCurShortGI20MHz = pHTInfo->bRegShortGI20MHz &&
-				    (pPeerHTCap->ShortGI20Mhz == 1);
+				    (pPeerHTCap->short_gi20_mhz == 1);
 	pHTInfo->bCurShortGI40MHz = pHTInfo->bRegShortGI40MHz &&
 				   (pPeerHTCap->ShortGI40Mhz == 1);
 
Signature · 1 line
2.18.0
#16 lore raw

PATCH 6/21 staging:rtl8192u: Rename ShortGI40Mhz - Style

In reply to John Whitmore

Rename the bitfield member 'ShortGI40Mhz' to 'short_gi40_mhz', this clears the checkpatch issue with CamelCase naming.

This change is a simple coding style change, which should have no impact on runtime code execution.

---
 drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c   |  2 +-
 drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h     |  2 +-
 drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c | 10 +++++-----
 3 files changed, 7 insertions(+), 7 deletions(-)
drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c +1 -1
index a0e91763e7f3..a6fe975902bb 100644
@@ -156,7 +156,7 @@ static inline char *rtl819x_translate_scan(struct ieee80211_device *ieee,
 			ht_cap = (struct ht_capability_ele *)&network->bssht.bdHTCapBuf[0];
 		is40M = (ht_cap->chl_width)?1:0;
 		isShortGI = (ht_cap->chl_width)?
-						((ht_cap->ShortGI40Mhz)?1:0):
+						((ht_cap->short_gi40_mhz)?1:0):
 						((ht_cap->short_gi20_mhz)?1:0);
 
 		max_mcs = HTGetHighestMCSRate(ieee, ht_cap->MCS, MCS_FILTER_ALL);
drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h +1 -1
index 64fd6a4f3bcd..23f8ee39e32d 100644
@@ -44,7 +44,7 @@ struct ht_capability_ele {
 	u8	mimo_power_save:2;
 	u8	not_used_green_field:1;
 	u8	short_gi20_mhz:1;
-	u8	ShortGI40Mhz:1;
+	u8	short_gi40_mhz:1;
 	u8	TxSTBC:1;
 	u8	RxSTBC:2;
 	u8	DelayBA:1;
drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c +5 -5
index fe8d75d8bd96..54c56cec612f 100644
@@ -144,7 +144,7 @@ void HTDebugHTCapability(u8 *CapIE, u8 *TitleString)
 
 	IEEE80211_DEBUG(IEEE80211_DL_HT,  "\tSupported Channel Width = %s\n", (pCapELE->chl_width) ? "20MHz" : "20/40MHz");
 	IEEE80211_DEBUG(IEEE80211_DL_HT,  "\tSupport Short GI for 20M = %s\n", (pCapELE->short_gi20_mhz) ? "YES" : "NO");
-	IEEE80211_DEBUG(IEEE80211_DL_HT,  "\tSupport Short GI for 40M = %s\n", (pCapELE->ShortGI40Mhz) ? "YES" : "NO");
+	IEEE80211_DEBUG(IEEE80211_DL_HT,  "\tSupport Short GI for 40M = %s\n", (pCapELE->short_gi40_mhz) ? "YES" : "NO");
 	IEEE80211_DEBUG(IEEE80211_DL_HT,  "\tSupport TX STBC = %s\n", (pCapELE->TxSTBC) ? "YES" : "NO");
 	IEEE80211_DEBUG(IEEE80211_DL_HT,  "\tMax AMSDU Size = %s\n", (pCapELE->MaxAMSDUSize) ? "3839" : "7935");
 	IEEE80211_DEBUG(IEEE80211_DL_HT,  "\tSupport CCK in 20/40 mode = %s\n", (pCapELE->DssCCk) ? "YES" : "NO");
@@ -248,7 +248,7 @@ static bool IsHTHalfNmodeSGI(struct ieee80211_device *ieee, bool is40MHz)
 	else if (!ieee->GetHalfNmodeSupportByAPsHandler(ieee->dev))	// station in half n mode
 		retValue = false;
 	else if (is40MHz) { // ap support 40 bw
-		if (((struct ht_capability_ele *)(pHTInfo->PeerHTCapBuf))->ShortGI40Mhz) // ap support 40 bw short GI
+		if (((struct ht_capability_ele *)(pHTInfo->PeerHTCapBuf))->short_gi40_mhz) // ap support 40 bw short GI
 			retValue = true;
 		else
 			retValue = false;
@@ -558,9 +558,9 @@ void HTConstructCapabilityElement(struct ieee80211_device *ieee, u8 *posHTCap, u
 //	pCapELE->chl_width		= (pHT->bRegBW40MHz?1:0);
 	pCapELE->mimo_power_save        = pHT->SelfMimoPs;
 	pCapELE->short_gi20_mhz		= 1; // We can receive Short GI!!
-	pCapELE->ShortGI40Mhz		= 1; // We can receive Short GI!!
+	pCapELE->short_gi40_mhz		= 1; // We can receive Short GI!!
 	//DbgPrint("TX HT cap/info ele BW=%d SG20=%d SG40=%d\n\r",
-	//pCapELE->chl_width, pCapELE->short_gi20_mhz, pCapELE->ShortGI40Mhz);
+	//pCapELE->chl_width, pCapELE->short_gi20_mhz, pCapELE->short_gi40_mhz);
 	pCapELE->TxSTBC			= 1;
 	pCapELE->RxSTBC			= 0;
 	pCapELE->DelayBA		= 0;	// Do not support now!!
@@ -946,7 +946,7 @@ void HTOnAssocRsp(struct ieee80211_device *ieee)
 	pHTInfo->bCurShortGI20MHz = pHTInfo->bRegShortGI20MHz &&
 				    (pPeerHTCap->short_gi20_mhz == 1);
 	pHTInfo->bCurShortGI40MHz = pHTInfo->bRegShortGI40MHz &&
-				   (pPeerHTCap->ShortGI40Mhz == 1);
+				   (pPeerHTCap->short_gi40_mhz == 1);
 
 	/*
 	 * Config TX STBC setting
Signature · 1 line
2.18.0
#17 lore raw

PATCH 7/21 staging:rtl8192u: Rename TxSTBC - Style

In reply to John Whitmore

Rename the bitfield member TxSTBC. As it stands the name causes a checkpatch issue due to its use of CamelCase naming style. Because the member is not actually used in the code the name has been changed to 'not_used_tx_stbc'. The two lines of code, one for initialisation and one for debug logging have been removed.

This is a coding style change which should have no impact on runtime code execution.

---
 drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h     | 2 +-
 drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c | 2 --
 2 files changed, 1 insertion(+), 3 deletions(-)
drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h +1 -1
index 23f8ee39e32d..ab61c9e81c2c 100644
@@ -45,7 +45,7 @@ struct ht_capability_ele {
 	u8	not_used_green_field:1;
 	u8	short_gi20_mhz:1;
 	u8	short_gi40_mhz:1;
-	u8	TxSTBC:1;
+	u8	not_used_tx_stbc:1;
 	u8	RxSTBC:2;
 	u8	DelayBA:1;
 	u8	MaxAMSDUSize:1;
drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c +0 -2
index 54c56cec612f..65c377094278 100644
@@ -145,7 +145,6 @@ void HTDebugHTCapability(u8 *CapIE, u8 *TitleString)
 	IEEE80211_DEBUG(IEEE80211_DL_HT,  "\tSupported Channel Width = %s\n", (pCapELE->chl_width) ? "20MHz" : "20/40MHz");
 	IEEE80211_DEBUG(IEEE80211_DL_HT,  "\tSupport Short GI for 20M = %s\n", (pCapELE->short_gi20_mhz) ? "YES" : "NO");
 	IEEE80211_DEBUG(IEEE80211_DL_HT,  "\tSupport Short GI for 40M = %s\n", (pCapELE->short_gi40_mhz) ? "YES" : "NO");
-	IEEE80211_DEBUG(IEEE80211_DL_HT,  "\tSupport TX STBC = %s\n", (pCapELE->TxSTBC) ? "YES" : "NO");
 	IEEE80211_DEBUG(IEEE80211_DL_HT,  "\tMax AMSDU Size = %s\n", (pCapELE->MaxAMSDUSize) ? "3839" : "7935");
 	IEEE80211_DEBUG(IEEE80211_DL_HT,  "\tSupport CCK in 20/40 mode = %s\n", (pCapELE->DssCCk) ? "YES" : "NO");
 	IEEE80211_DEBUG(IEEE80211_DL_HT,  "\tMax AMPDU Factor = %d\n", pCapELE->MaxRxAMPDUFactor);
@@ -561,7 +560,6 @@ void HTConstructCapabilityElement(struct ieee80211_device *ieee, u8 *posHTCap, u
 	pCapELE->short_gi40_mhz		= 1; // We can receive Short GI!!
 	//DbgPrint("TX HT cap/info ele BW=%d SG20=%d SG40=%d\n\r",
 	//pCapELE->chl_width, pCapELE->short_gi20_mhz, pCapELE->short_gi40_mhz);
-	pCapELE->TxSTBC			= 1;
 	pCapELE->RxSTBC			= 0;
 	pCapELE->DelayBA		= 0;	// Do not support now!!
 	pCapELE->MaxAMSDUSize	        = (MAX_RECEIVE_BUFFER_SIZE >= 7935) ? 1 : 0;
Signature · 1 line
2.18.0
#18 lore raw

PATCH 8/21 staging:rtl8192u: Rename RxSTBC - Style

In reply to John Whitmore

Rename the bitfield member RxSTBC, since its use of CamelCase naming causes a checkpatch issue. Because the member is not actually used in code the variable has been renamed to 'not_used_rx_stbc'. The single line of code which initialised the member has been removed.

This is a coding style change which should have no impact on runtime code execution.

---
 drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h     | 2 +-
 drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c | 1 -
 2 files changed, 1 insertion(+), 2 deletions(-)
drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h +1 -1
index ab61c9e81c2c..994ff0f30a07 100644
@@ -46,7 +46,7 @@ struct ht_capability_ele {
 	u8	short_gi20_mhz:1;
 	u8	short_gi40_mhz:1;
 	u8	not_used_tx_stbc:1;
-	u8	RxSTBC:2;
+	u8	not_used_rx_stbc:2;
 	u8	DelayBA:1;
 	u8	MaxAMSDUSize:1;
 	u8	DssCCk:1;
drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c +0 -1
index 65c377094278..c0789ddfd024 100644
@@ -560,7 +560,6 @@ void HTConstructCapabilityElement(struct ieee80211_device *ieee, u8 *posHTCap, u
 	pCapELE->short_gi40_mhz		= 1; // We can receive Short GI!!
 	//DbgPrint("TX HT cap/info ele BW=%d SG20=%d SG40=%d\n\r",
 	//pCapELE->chl_width, pCapELE->short_gi20_mhz, pCapELE->short_gi40_mhz);
-	pCapELE->RxSTBC			= 0;
 	pCapELE->DelayBA		= 0;	// Do not support now!!
 	pCapELE->MaxAMSDUSize	        = (MAX_RECEIVE_BUFFER_SIZE >= 7935) ? 1 : 0;
 	pCapELE->DssCCk			= ((pHT->bRegBW40MHz) ? (pHT->bRegSuppCCK ? 1 : 0) : 0);
Signature · 1 line
2.18.0
#19 lore raw

PATCH 9/21 staging:rtl8192u: Rename DelayBA - Style

In reply to John Whitmore

Rename the bitfield member DelayBA, since its use of CamelCase naming causes a checkpatch issue. Since the member is not actually used in code the name has been changed to 'not_used_delay_ba'. The one line of initialisation code has been removed.

This is a coding style change which should not impact on runtime code execution.

---
 drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h     | 2 +-
 drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c | 1 -
 2 files changed, 1 insertion(+), 2 deletions(-)
drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h +1 -1
index 994ff0f30a07..864bb9db2433 100644
@@ -47,7 +47,7 @@ struct ht_capability_ele {
 	u8	short_gi40_mhz:1;
 	u8	not_used_tx_stbc:1;
 	u8	not_used_rx_stbc:2;
-	u8	DelayBA:1;
+	u8	not_used_delay_ba:1;
 	u8	MaxAMSDUSize:1;
 	u8	DssCCk:1;
 	u8	PSMP:1;
drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c +0 -1
index c0789ddfd024..bc1d8e9221aa 100644
@@ -560,7 +560,6 @@ void HTConstructCapabilityElement(struct ieee80211_device *ieee, u8 *posHTCap, u
 	pCapELE->short_gi40_mhz		= 1; // We can receive Short GI!!
 	//DbgPrint("TX HT cap/info ele BW=%d SG20=%d SG40=%d\n\r",
 	//pCapELE->chl_width, pCapELE->short_gi20_mhz, pCapELE->short_gi40_mhz);
-	pCapELE->DelayBA		= 0;	// Do not support now!!
 	pCapELE->MaxAMSDUSize	        = (MAX_RECEIVE_BUFFER_SIZE >= 7935) ? 1 : 0;
 	pCapELE->DssCCk			= ((pHT->bRegBW40MHz) ? (pHT->bRegSuppCCK ? 1 : 0) : 0);
 	pCapELE->PSMP			= 0; // Do not support now!!
Signature · 1 line
2.18.0
#20 lore raw

PATCH 10/21 staging:rtl8192u: Rename MaxAMSDUSize - Style

In reply to John Whitmore

Rename the bitfield member variable 'MaxAMSDUSize' to 'max_amsdu_size', this clears the checkpatch issue with CamelCase naming.

This is a coding style change which should have no impact on runtime code execution.

---
 drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h     | 2 +-
 drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c | 9 ++++-----
 2 files changed, 5 insertions(+), 6 deletions(-)
drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h +1 -1
index 864bb9db2433..e4693832e1d6 100644
@@ -48,7 +48,7 @@ struct ht_capability_ele {
 	u8	not_used_tx_stbc:1;
 	u8	not_used_rx_stbc:2;
 	u8	not_used_delay_ba:1;
-	u8	MaxAMSDUSize:1;
+	u8	max_amsdu_size:1;
 	u8	DssCCk:1;
 	u8	PSMP:1;
 	u8	Rsvd1:1;
drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c +4 -5
index bc1d8e9221aa..7fb31638f60d 100644
@@ -145,7 +145,7 @@ void HTDebugHTCapability(u8 *CapIE, u8 *TitleString)
 	IEEE80211_DEBUG(IEEE80211_DL_HT,  "\tSupported Channel Width = %s\n", (pCapELE->chl_width) ? "20MHz" : "20/40MHz");
 	IEEE80211_DEBUG(IEEE80211_DL_HT,  "\tSupport Short GI for 20M = %s\n", (pCapELE->short_gi20_mhz) ? "YES" : "NO");
 	IEEE80211_DEBUG(IEEE80211_DL_HT,  "\tSupport Short GI for 40M = %s\n", (pCapELE->short_gi40_mhz) ? "YES" : "NO");
-	IEEE80211_DEBUG(IEEE80211_DL_HT,  "\tMax AMSDU Size = %s\n", (pCapELE->MaxAMSDUSize) ? "3839" : "7935");
+	IEEE80211_DEBUG(IEEE80211_DL_HT,  "\tMax AMSDU Size = %s\n", (pCapELE->max_amsdu_size) ? "3839" : "7935");
 	IEEE80211_DEBUG(IEEE80211_DL_HT,  "\tSupport CCK in 20/40 mode = %s\n", (pCapELE->DssCCk) ? "YES" : "NO");
 	IEEE80211_DEBUG(IEEE80211_DL_HT,  "\tMax AMPDU Factor = %d\n", pCapELE->MaxRxAMPDUFactor);
 	IEEE80211_DEBUG(IEEE80211_DL_HT,  "\tMPDU Density = %d\n", pCapELE->MPDUDensity);
@@ -560,7 +560,7 @@ void HTConstructCapabilityElement(struct ieee80211_device *ieee, u8 *posHTCap, u
 	pCapELE->short_gi40_mhz		= 1; // We can receive Short GI!!
 	//DbgPrint("TX HT cap/info ele BW=%d SG20=%d SG40=%d\n\r",
 	//pCapELE->chl_width, pCapELE->short_gi20_mhz, pCapELE->short_gi40_mhz);
-	pCapELE->MaxAMSDUSize	        = (MAX_RECEIVE_BUFFER_SIZE >= 7935) ? 1 : 0;
+	pCapELE->max_amsdu_size	        = (MAX_RECEIVE_BUFFER_SIZE >= 7935) ? 1 : 0;
 	pCapELE->DssCCk			= ((pHT->bRegBW40MHz) ? (pHT->bRegSuppCCK ? 1 : 0) : 0);
 	pCapELE->PSMP			= 0; // Do not support now!!
 	pCapELE->LSigTxopProtect	= 0; // Do not support now!!
@@ -569,7 +569,7 @@ void HTConstructCapabilityElement(struct ieee80211_device *ieee, u8 *posHTCap, u
 	 * MAC HT parameters info
 	 * TODO: Nedd to take care of this part
 	 */
-	IEEE80211_DEBUG(IEEE80211_DL_HT, "TX HT cap/info ele BW=%d MaxAMSDUSize:%d DssCCk:%d\n", pCapELE->chl_width, pCapELE->MaxAMSDUSize, pCapELE->DssCCk);
+	IEEE80211_DEBUG(IEEE80211_DL_HT, "TX HT cap/info ele BW=%d max_amsdu_size:%d DssCCk:%d\n", pCapELE->chl_width, pCapELE->max_amsdu_size, pCapELE->DssCCk);
 
 	if (IsEncrypt) {
 		pCapELE->MPDUDensity	= 7; // 8us
@@ -963,7 +963,7 @@ void HTOnAssocRsp(struct ieee80211_device *ieee)
 	 */
 	pHTInfo->bCurrent_AMSDU_Support = pHTInfo->bAMSDU_Support;
 
-	nMaxAMSDUSize = (pPeerHTCap->MaxAMSDUSize == 0) ? 3839 : 7935;
+	nMaxAMSDUSize = (pPeerHTCap->max_amsdu_size == 0) ? 3839 : 7935;
 
 	if (pHTInfo->nAMSDU_MaxSize > nMaxAMSDUSize)
 		pHTInfo->nCurrent_AMSDU_MaxSize = nMaxAMSDUSize;
@@ -1169,7 +1169,6 @@ void HTInitializeBssDesc(PBSS_HT pBssHT)
 void HTResetSelfAndSavePeerSetting(struct ieee80211_device *ieee,	struct ieee80211_network *pNetwork)
 {
 	PRT_HIGH_THROUGHPUT		pHTInfo = ieee->pHTInfo;
-//	u16						nMaxAMSDUSize;
 //	struct ht_capability_ele       *pPeerHTCap = (struct ht_capability_ele *)pNetwork->bssht.bdHTCapBuf;
 //	PHT_INFORMATION_ELE		pPeerHTInfo = (PHT_INFORMATION_ELE)pNetwork->bssht.bdHTInfoBuf;
 //	u8*	pMcsFilter;
Signature · 1 line
2.18.0
#21 lore raw

PATCH 11/21 staging:rtl8192u: Rename DssCCk - Style

In reply to John Whitmore

Rename the bitfield member 'DssCCk' to 'dss_cck', this clears the checkpatch issue with CamelCase naming.

This is a coding style change which should not impact on runtime code execution.

---
 drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h     | 2 +-
 drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)
drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h +1 -1
index e4693832e1d6..fd04461bcaf8 100644
@@ -49,7 +49,7 @@ struct ht_capability_ele {
 	u8	not_used_rx_stbc:2;
 	u8	not_used_delay_ba:1;
 	u8	max_amsdu_size:1;
-	u8	DssCCk:1;
+	u8	dss_cck:1;
 	u8	PSMP:1;
 	u8	Rsvd1:1;
 	u8	LSigTxopProtect:1;
drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c +4 -4
index 7fb31638f60d..299d486fad0d 100644
@@ -146,7 +146,7 @@ void HTDebugHTCapability(u8 *CapIE, u8 *TitleString)
 	IEEE80211_DEBUG(IEEE80211_DL_HT,  "\tSupport Short GI for 20M = %s\n", (pCapELE->short_gi20_mhz) ? "YES" : "NO");
 	IEEE80211_DEBUG(IEEE80211_DL_HT,  "\tSupport Short GI for 40M = %s\n", (pCapELE->short_gi40_mhz) ? "YES" : "NO");
 	IEEE80211_DEBUG(IEEE80211_DL_HT,  "\tMax AMSDU Size = %s\n", (pCapELE->max_amsdu_size) ? "3839" : "7935");
-	IEEE80211_DEBUG(IEEE80211_DL_HT,  "\tSupport CCK in 20/40 mode = %s\n", (pCapELE->DssCCk) ? "YES" : "NO");
+	IEEE80211_DEBUG(IEEE80211_DL_HT,  "\tSupport CCK in 20/40 mode = %s\n", (pCapELE->dss_cck) ? "YES" : "NO");
 	IEEE80211_DEBUG(IEEE80211_DL_HT,  "\tMax AMPDU Factor = %d\n", pCapELE->MaxRxAMPDUFactor);
 	IEEE80211_DEBUG(IEEE80211_DL_HT,  "\tMPDU Density = %d\n", pCapELE->MPDUDensity);
 	IEEE80211_DEBUG(IEEE80211_DL_HT,  "\tMCS Rate Set = [%x][%x][%x][%x][%x]\n", pCapELE->MCS[0],\
@@ -561,7 +561,7 @@ void HTConstructCapabilityElement(struct ieee80211_device *ieee, u8 *posHTCap, u
 	//DbgPrint("TX HT cap/info ele BW=%d SG20=%d SG40=%d\n\r",
 	//pCapELE->chl_width, pCapELE->short_gi20_mhz, pCapELE->short_gi40_mhz);
 	pCapELE->max_amsdu_size	        = (MAX_RECEIVE_BUFFER_SIZE >= 7935) ? 1 : 0;
-	pCapELE->DssCCk			= ((pHT->bRegBW40MHz) ? (pHT->bRegSuppCCK ? 1 : 0) : 0);
+	pCapELE->dss_cck		= ((pHT->bRegBW40MHz) ? (pHT->bRegSuppCCK ? 1 : 0) : 0);
 	pCapELE->PSMP			= 0; // Do not support now!!
 	pCapELE->LSigTxopProtect	= 0; // Do not support now!!
 
@@ -569,7 +569,7 @@ void HTConstructCapabilityElement(struct ieee80211_device *ieee, u8 *posHTCap, u
 	 * MAC HT parameters info
 	 * TODO: Nedd to take care of this part
 	 */
-	IEEE80211_DEBUG(IEEE80211_DL_HT, "TX HT cap/info ele BW=%d max_amsdu_size:%d DssCCk:%d\n", pCapELE->chl_width, pCapELE->max_amsdu_size, pCapELE->DssCCk);
+	IEEE80211_DEBUG(IEEE80211_DL_HT, "TX HT cap/info ele BW=%d max_amsdu_size:%d dss_cck:%d\n", pCapELE->chl_width, pCapELE->max_amsdu_size, pCapELE->dss_cck);
 
 	if (IsEncrypt) {
 		pCapELE->MPDUDensity	= 7; // 8us
@@ -956,7 +956,7 @@ void HTOnAssocRsp(struct ieee80211_device *ieee)
 	 * TODO:
 	 */
 	pHTInfo->bCurSuppCCK = pHTInfo->bRegSuppCCK &&
-			       (pPeerHTCap->DssCCk == 1);
+			       (pPeerHTCap->dss_cck == 1);
 
 	/*
 	 * Config and configure A-MSDU setting
Signature · 1 line
2.18.0
#22 lore raw

PATCH 12/21 staging:rtl8192u: Rename PSMP - Style

In reply to John Whitmore

Rename the bitfield member variable 'PSMP', since its uppercase name conflicts the coding standard on naming. Because the variable is not actually used in code it has been renamed to 'not_used_psmp'. The one line of initialisation code has been removed.

This is a coding style change which should not impact on runtime code execution.

---
 drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h     | 2 +-
 drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c | 1 -
 2 files changed, 1 insertion(+), 2 deletions(-)
drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h +1 -1
index fd04461bcaf8..7f11257e2675 100644
@@ -50,7 +50,7 @@ struct ht_capability_ele {
 	u8	not_used_delay_ba:1;
 	u8	max_amsdu_size:1;
 	u8	dss_cck:1;
-	u8	PSMP:1;
+	u8	not_used_psmp:1;
 	u8	Rsvd1:1;
 	u8	LSigTxopProtect:1;
 
drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c +0 -1
index 299d486fad0d..2ea9fa3b6e0a 100644
@@ -562,7 +562,6 @@ void HTConstructCapabilityElement(struct ieee80211_device *ieee, u8 *posHTCap, u
 	//pCapELE->chl_width, pCapELE->short_gi20_mhz, pCapELE->short_gi40_mhz);
 	pCapELE->max_amsdu_size	        = (MAX_RECEIVE_BUFFER_SIZE >= 7935) ? 1 : 0;
 	pCapELE->dss_cck		= ((pHT->bRegBW40MHz) ? (pHT->bRegSuppCCK ? 1 : 0) : 0);
-	pCapELE->PSMP			= 0; // Do not support now!!
 	pCapELE->LSigTxopProtect	= 0; // Do not support now!!
 
 	/*
Signature · 1 line
2.18.0
#23 lore raw

PATCH 13/21 staging:rtl8192u: Rename Rsvd1 - Style

In reply to John Whitmore

Rename the bitfield member 'Rsvd1', since its name causes a checkpatch issue due to the use of CamelCase naming. The name has been changed to 'not_used_rsvd1' since the variable is not actually used in code.

This is a coding style change which should have no impact on runtime code execution.

---
 drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h +1 -1
index 7f11257e2675..132a6da3bf51 100644
@@ -51,7 +51,7 @@ struct ht_capability_ele {
 	u8	max_amsdu_size:1;
 	u8	dss_cck:1;
 	u8	not_used_psmp:1;
-	u8	Rsvd1:1;
+	u8	not_used_rsvd1:1;
 	u8	LSigTxopProtect:1;
 
 	//MAC HT parameters info
Signature · 1 line
2.18.0
#24 lore raw

PATCH 14/21 staging:rtl8192u: Rename LSigTxopProtect - Style

In reply to John Whitmore

Rename the bitfield member 'LSigTxopProtect', since it currently causes a checkpatch issue due to its use of CamelCase naming. Since the member is not actually used in code it has been renamed to 'not_used_l_sig_txop_protect', and the singe initialisation line of code has been removed.

This is purely a coding style change which should have no impact on runtime code execution.

---
 drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h     | 2 +-
 drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c | 1 -
 2 files changed, 1 insertion(+), 2 deletions(-)
drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h +1 -1
index 132a6da3bf51..040660a46bca 100644
@@ -52,7 +52,7 @@ struct ht_capability_ele {
 	u8	dss_cck:1;
 	u8	not_used_psmp:1;
 	u8	not_used_rsvd1:1;
-	u8	LSigTxopProtect:1;
+	u8	not_used_l_sig_txop_protect:1;
 
 	//MAC HT parameters info
 	u8	MaxRxAMPDUFactor:2;
drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c +0 -1
index 2ea9fa3b6e0a..ec96e14a2bed 100644
@@ -562,7 +562,6 @@ void HTConstructCapabilityElement(struct ieee80211_device *ieee, u8 *posHTCap, u
 	//pCapELE->chl_width, pCapELE->short_gi20_mhz, pCapELE->short_gi40_mhz);
 	pCapELE->max_amsdu_size	        = (MAX_RECEIVE_BUFFER_SIZE >= 7935) ? 1 : 0;
 	pCapELE->dss_cck		= ((pHT->bRegBW40MHz) ? (pHT->bRegSuppCCK ? 1 : 0) : 0);
-	pCapELE->LSigTxopProtect	= 0; // Do not support now!!
 
 	/*
 	 * MAC HT parameters info
Signature · 1 line
2.18.0
#25 lore raw

PATCH 15/21 staging:rtl8192u: Rename MaxRxAMPDUFactor - Style

In reply to John Whitmore

Rename the bitfield member 'MaxRxAMPDUFactor' to 'max_rx_ampdu_factor', this clears the checkpatch issue with CamelCase naming.

The change is a coding style change which should not impact runtime code execution.

---
 drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h  |  2 +-
 .../staging/rtl8192u/ieee80211/rtl819x_HTProc.c  | 16 ++++++++--------
 2 files changed, 9 insertions(+), 9 deletions(-)
drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h +1 -1
index 040660a46bca..12db4ac9703b 100644
@@ -55,7 +55,7 @@ struct ht_capability_ele {
 	u8	not_used_l_sig_txop_protect:1;
 
 	//MAC HT parameters info
-	u8	MaxRxAMPDUFactor:2;
+	u8	max_rx_ampdu_factor:2;
 	u8	MPDUDensity:3;
 	u8	Rsvd2:3;
 
drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c +8 -8
index ec96e14a2bed..4fc919ebd10b 100644
@@ -147,7 +147,7 @@ void HTDebugHTCapability(u8 *CapIE, u8 *TitleString)
 	IEEE80211_DEBUG(IEEE80211_DL_HT,  "\tSupport Short GI for 40M = %s\n", (pCapELE->short_gi40_mhz) ? "YES" : "NO");
 	IEEE80211_DEBUG(IEEE80211_DL_HT,  "\tMax AMSDU Size = %s\n", (pCapELE->max_amsdu_size) ? "3839" : "7935");
 	IEEE80211_DEBUG(IEEE80211_DL_HT,  "\tSupport CCK in 20/40 mode = %s\n", (pCapELE->dss_cck) ? "YES" : "NO");
-	IEEE80211_DEBUG(IEEE80211_DL_HT,  "\tMax AMPDU Factor = %d\n", pCapELE->MaxRxAMPDUFactor);
+	IEEE80211_DEBUG(IEEE80211_DL_HT,  "\tMax AMPDU Factor = %d\n", pCapELE->max_rx_ampdu_factor);
 	IEEE80211_DEBUG(IEEE80211_DL_HT,  "\tMPDU Density = %d\n", pCapELE->MPDUDensity);
 	IEEE80211_DEBUG(IEEE80211_DL_HT,  "\tMCS Rate Set = [%x][%x][%x][%x][%x]\n", pCapELE->MCS[0],\
 				pCapELE->MCS[1], pCapELE->MCS[2], pCapELE->MCS[3], pCapELE->MCS[4]);
@@ -571,9 +571,9 @@ void HTConstructCapabilityElement(struct ieee80211_device *ieee, u8 *posHTCap, u
 
 	if (IsEncrypt) {
 		pCapELE->MPDUDensity	= 7; // 8us
-		pCapELE->MaxRxAMPDUFactor = 2; // 2 is for 32 K and 3 is 64K
+		pCapELE->max_rx_ampdu_factor = 2; // 2 is for 32 K and 3 is 64K
 	} else {
-		pCapELE->MaxRxAMPDUFactor = 3; // 2 is for 32 K and 3 is 64K
+		pCapELE->max_rx_ampdu_factor = 3; // 2 is for 32 K and 3 is 64K
 		pCapELE->MPDUDensity	= 0; // no density
 	}
 
@@ -978,8 +978,8 @@ void HTOnAssocRsp(struct ieee80211_device *ieee)
 	 */
 	if (!pHTInfo->bRegRT2RTAggregation) {
 		// Decide AMPDU Factor according to protocol handshake
-		if (pHTInfo->AMPDU_Factor > pPeerHTCap->MaxRxAMPDUFactor)
-			pHTInfo->CurrentAMPDUFactor = pPeerHTCap->MaxRxAMPDUFactor;
+		if (pHTInfo->AMPDU_Factor > pPeerHTCap->max_rx_ampdu_factor)
+			pHTInfo->CurrentAMPDUFactor = pPeerHTCap->max_rx_ampdu_factor;
 		else
 			pHTInfo->CurrentAMPDUFactor = pHTInfo->AMPDU_Factor;
 	} else {
@@ -990,12 +990,12 @@ void HTOnAssocRsp(struct ieee80211_device *ieee)
 		if (ieee->current_network.bssht.bdRT2RTAggregation) {
 			if (ieee->pairwise_key_type != KEY_TYPE_NA)
 				// Realtek may set 32k in security mode and 64k for others
-				pHTInfo->CurrentAMPDUFactor = pPeerHTCap->MaxRxAMPDUFactor;
+				pHTInfo->CurrentAMPDUFactor = pPeerHTCap->max_rx_ampdu_factor;
 			else
 				pHTInfo->CurrentAMPDUFactor = HT_AGG_SIZE_64K;
 		} else {
-			if (pPeerHTCap->MaxRxAMPDUFactor < HT_AGG_SIZE_32K)
-				pHTInfo->CurrentAMPDUFactor = pPeerHTCap->MaxRxAMPDUFactor;
+			if (pPeerHTCap->max_rx_ampdu_factor < HT_AGG_SIZE_32K)
+				pHTInfo->CurrentAMPDUFactor = pPeerHTCap->max_rx_ampdu_factor;
 			else
 				pHTInfo->CurrentAMPDUFactor = HT_AGG_SIZE_32K;
 		}
Signature · 1 line
2.18.0
#26 lore raw

PATCH 16/21 staging:rtl8192u: Rename MPDUDensity - Style

In reply to John Whitmore

Rename the bitfield member 'MPDUDensity' to 'mpdu_density', this clears the checkpatch issue with CamelCase naming.

This is a coding style change which should not have an impact on runtime code execution.

---
 drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h    |  2 +-
 .../staging/rtl8192u/ieee80211/rtl819x_HTProc.c    | 14 +++++++-------
 2 files changed, 8 insertions(+), 8 deletions(-)
drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h +1 -1
index 12db4ac9703b..9066f309bac9 100644
@@ -56,7 +56,7 @@ struct ht_capability_ele {
 
 	//MAC HT parameters info
 	u8	max_rx_ampdu_factor:2;
-	u8	MPDUDensity:3;
+	u8	mpdu_density:3;
 	u8	Rsvd2:3;
 
 	//Supported MCS set
drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c +7 -7
index 4fc919ebd10b..19c4903b572f 100644
@@ -99,9 +99,9 @@ void HTUpdateDefaultSetting(struct ieee80211_device *ieee)
 #endif
 	/*
 	 * 8190 only, Realtek proprietary aggregation mode
-	 * Set MPDUDensity=2,   1: Set MPDUDensity=2(32k)  for Realtek AP and set MPDUDensity=0(8k) for others
+	 * Set mpdu_density=2,   1: Set mpdu_density=2(32k)  for Realtek AP and set mpdu_density=0(8k) for others
 	 */
-	pHTInfo->bRegRT2RTAggregation = 1;//0: Set MPDUDensity=2,   1: Set MPDUDensity=2(32k)  for Realtek AP and set MPDUDensity=0(8k) for others
+	pHTInfo->bRegRT2RTAggregation = 1;//0: Set mpdu_density=2,   1: Set mpdu_density=2(32k)  for Realtek AP and set mpdu_density=0(8k) for others
 
 	// For Rx Reorder Control
 	pHTInfo->bRegRxReorderEnable = 1;
@@ -148,7 +148,7 @@ void HTDebugHTCapability(u8 *CapIE, u8 *TitleString)
 	IEEE80211_DEBUG(IEEE80211_DL_HT,  "\tMax AMSDU Size = %s\n", (pCapELE->max_amsdu_size) ? "3839" : "7935");
 	IEEE80211_DEBUG(IEEE80211_DL_HT,  "\tSupport CCK in 20/40 mode = %s\n", (pCapELE->dss_cck) ? "YES" : "NO");
 	IEEE80211_DEBUG(IEEE80211_DL_HT,  "\tMax AMPDU Factor = %d\n", pCapELE->max_rx_ampdu_factor);
-	IEEE80211_DEBUG(IEEE80211_DL_HT,  "\tMPDU Density = %d\n", pCapELE->MPDUDensity);
+	IEEE80211_DEBUG(IEEE80211_DL_HT,  "\tMPDU Density = %d\n", pCapELE->mpdu_density);
 	IEEE80211_DEBUG(IEEE80211_DL_HT,  "\tMCS Rate Set = [%x][%x][%x][%x][%x]\n", pCapELE->MCS[0],\
 				pCapELE->MCS[1], pCapELE->MCS[2], pCapELE->MCS[3], pCapELE->MCS[4]);
 }
@@ -570,11 +570,11 @@ void HTConstructCapabilityElement(struct ieee80211_device *ieee, u8 *posHTCap, u
 	IEEE80211_DEBUG(IEEE80211_DL_HT, "TX HT cap/info ele BW=%d max_amsdu_size:%d dss_cck:%d\n", pCapELE->chl_width, pCapELE->max_amsdu_size, pCapELE->dss_cck);
 
 	if (IsEncrypt) {
-		pCapELE->MPDUDensity	= 7; // 8us
+		pCapELE->mpdu_density	= 7; // 8us
 		pCapELE->max_rx_ampdu_factor = 2; // 2 is for 32 K and 3 is 64K
 	} else {
 		pCapELE->max_rx_ampdu_factor = 3; // 2 is for 32 K and 3 is 64K
-		pCapELE->MPDUDensity	= 0; // no density
+		pCapELE->mpdu_density	= 0; // no density
 	}
 
 	//Supported MCS set
@@ -1005,10 +1005,10 @@ void HTOnAssocRsp(struct ieee80211_device *ieee)
 	 * <2> Set AMPDU Minimum MPDU Start Spacing
 	 * 802.11n 3.0 section 9.7d.3
 	 */
-	if (pHTInfo->MPDU_Density > pPeerHTCap->MPDUDensity)
+	if (pHTInfo->MPDU_Density > pPeerHTCap->mpdu_density)
 		pHTInfo->CurrentMPDUDensity = pHTInfo->MPDU_Density;
 	else
-		pHTInfo->CurrentMPDUDensity = pPeerHTCap->MPDUDensity;
+		pHTInfo->CurrentMPDUDensity = pPeerHTCap->mpdu_density;
 	if (ieee->pairwise_key_type != KEY_TYPE_NA)
 		pHTInfo->CurrentMPDUDensity	= 7; // 8us
 	// Force TX AMSDU
Signature · 1 line
2.18.0
#27 lore raw

PATCH 17/21 staging:rtl8192u: Rename Rsvd2 - Style

In reply to John Whitmore

Rename the bitfield member 'Rsvd2', since it causes a checkpatch issue due to it's use of CamelCase naming. The member has been renamed to 'not_used_rsvd2', since it is not actually used in the code.

This is a coding style change which should not impact on runtime code execution.

---
 drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h +1 -1
index 9066f309bac9..2b73279b45d8 100644
@@ -57,7 +57,7 @@ struct ht_capability_ele {
 	//MAC HT parameters info
 	u8	max_rx_ampdu_factor:2;
 	u8	mpdu_density:3;
-	u8	Rsvd2:3;
+	u8	not_used_rsvd2:3;
 
 	//Supported MCS set
 	u8	MCS[16];
Signature · 1 line
2.18.0
#28 lore raw

PATCH 18/21 staging:rtl8192u: Rename MCS - Style

In reply to John Whitmore

Rename the member 'MCS' to 'cap_mcs', since the uppercase name conflicts with the coding standard. The 'cap' has been prepended to make the variable easier to find in the code.

This is a coding style change which should have no impact on runtime code execution.

---
 .../staging/rtl8192u/ieee80211/ieee80211_wx.c |  2 +-
 .../staging/rtl8192u/ieee80211/rtl819x_HT.h   |  2 +-
 .../rtl8192u/ieee80211/rtl819x_HTProc.c       | 20 +++++++++----------
 3 files changed, 12 insertions(+), 12 deletions(-)
drivers/staging/rtl8192u/ieee80211/ieee80211_wx.c +1 -1
index a6fe975902bb..a96cc5c01b10 100644
@@ -159,7 +159,7 @@ static inline char *rtl819x_translate_scan(struct ieee80211_device *ieee,
 						((ht_cap->short_gi40_mhz)?1:0):
 						((ht_cap->short_gi20_mhz)?1:0);
 
-		max_mcs = HTGetHighestMCSRate(ieee, ht_cap->MCS, MCS_FILTER_ALL);
+		max_mcs = HTGetHighestMCSRate(ieee, ht_cap->cap_mcs, MCS_FILTER_ALL);
 		rate = MCS_DATA_RATE[is40M][isShortGI][max_mcs&0x7f];
 		if (rate > max_rate)
 			max_rate = rate;
drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h +1 -1
index 2b73279b45d8..edd0c00307bf 100644
@@ -60,7 +60,7 @@ struct ht_capability_ele {
 	u8	not_used_rsvd2:3;
 
 	//Supported MCS set
-	u8	MCS[16];
+	u8	cap_mcs[16];
 
 	//Extended HT Capability Info
 	u16	ExtHTCapInfo;
drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c +10 -10
index 19c4903b572f..625d117e5a8f 100644
@@ -149,8 +149,8 @@ void HTDebugHTCapability(u8 *CapIE, u8 *TitleString)
 	IEEE80211_DEBUG(IEEE80211_DL_HT,  "\tSupport CCK in 20/40 mode = %s\n", (pCapELE->dss_cck) ? "YES" : "NO");
 	IEEE80211_DEBUG(IEEE80211_DL_HT,  "\tMax AMPDU Factor = %d\n", pCapELE->max_rx_ampdu_factor);
 	IEEE80211_DEBUG(IEEE80211_DL_HT,  "\tMPDU Density = %d\n", pCapELE->mpdu_density);
-	IEEE80211_DEBUG(IEEE80211_DL_HT,  "\tMCS Rate Set = [%x][%x][%x][%x][%x]\n", pCapELE->MCS[0],\
-				pCapELE->MCS[1], pCapELE->MCS[2], pCapELE->MCS[3], pCapELE->MCS[4]);
+	IEEE80211_DEBUG(IEEE80211_DL_HT,  "\tMCS Rate Set = [%x][%x][%x][%x][%x]\n", pCapELE->cap_mcs[0],\
+				pCapELE->cap_mcs[1], pCapELE->cap_mcs[2], pCapELE->cap_mcs[3], pCapELE->cap_mcs[4]);
 }
 
 /*
@@ -578,15 +578,15 @@ void HTConstructCapabilityElement(struct ieee80211_device *ieee, u8 *posHTCap, u
 	}
 
 	//Supported MCS set
-	memcpy(pCapELE->MCS, ieee->Regdot11HTOperationalRateSet, 16);
+	memcpy(pCapELE->cap_mcs, ieee->Regdot11HTOperationalRateSet, 16);
 	if (pHT->IOTAction & HT_IOT_ACT_DISABLE_MCS15)
-		pCapELE->MCS[1] &= 0x7f;
+		pCapELE->cap_mcs[1] &= 0x7f;
 
 	if (pHT->IOTAction & HT_IOT_ACT_DISABLE_MCS14)
-		pCapELE->MCS[1] &= 0xbf;
+		pCapELE->cap_mcs[1] &= 0xbf;
 
 	if (pHT->IOTAction & HT_IOT_ACT_DISABLE_ALL_2SS)
-		pCapELE->MCS[1] &= 0x00;
+		pCapELE->cap_mcs[1] &= 0x00;
 
 	/*
 	 * 2008.06.12
@@ -596,7 +596,7 @@ void HTConstructCapabilityElement(struct ieee80211_device *ieee, u8 *posHTCap, u
 		int i;
 
 		for (i = 1; i < 16; i++)
-			pCapELE->MCS[i] = 0;
+			pCapELE->cap_mcs[i] = 0;
 	}
 
 	//Extended HT Capability Info
@@ -1037,10 +1037,10 @@ void HTOnAssocRsp(struct ieee80211_device *ieee)
 	 * Handle Ralink AP bad MCS rate set condition. Joseph.
 	 * This fix the bug of Ralink AP. This may be removed in the future.
 	 */
-	if (pPeerHTCap->MCS[0] == 0)
-		pPeerHTCap->MCS[0] = 0xff;
+	if (pPeerHTCap->cap_mcs[0] == 0)
+		pPeerHTCap->cap_mcs[0] = 0xff;
 
-	HTFilterMCSRate(ieee, pPeerHTCap->MCS, ieee->dot11HTOperationalRateSet);
+	HTFilterMCSRate(ieee, pPeerHTCap->cap_mcs, ieee->dot11HTOperationalRateSet);
 
 	/*
 	 * Config MIMO Power Save setting
Signature · 1 line
2.18.0
#29 lore raw

PATCH 19/21 staging:rtl8192u: Rename ExtHTCapInfo - Style

In reply to John Whitmore

Rename the member variable 'ExtHTCapInfo', since it causes a checkpatch issue, due to its use of CamelCase naming. The name has been changed to 'not_used_ext_ht_cap_info' since the member variable is not actually used, apart from an initialisation which has been removed.

This is a coding style change which should have no impact on runtime code execution.

---
 drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h     | 2 +-
 drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c | 3 ---
 2 files changed, 1 insertion(+), 4 deletions(-)
drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h +1 -1
index edd0c00307bf..b4a412d8f61c 100644
@@ -63,7 +63,7 @@ struct ht_capability_ele {
 	u8	cap_mcs[16];
 
 	//Extended HT Capability Info
-	u16	ExtHTCapInfo;
+	u16	not_used_ext_ht_cap_info;
 
 	//TXBF Capabilities
 	u8	TxBFCap[4];
drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c +0 -3
index 625d117e5a8f..fe7682d8e258 100644
@@ -599,9 +599,6 @@ void HTConstructCapabilityElement(struct ieee80211_device *ieee, u8 *posHTCap, u
 			pCapELE->cap_mcs[i] = 0;
 	}
 
-	//Extended HT Capability Info
-	memset(&pCapELE->ExtHTCapInfo, 0, 2);
-
 	//TXBF Capabilities
 	memset(pCapELE->TxBFCap, 0, 4);
 
Signature · 1 line
2.18.0
#30 lore raw

PATCH 20/21 staging:rtl8192u: Rename TxBFCap - Style

In reply to John Whitmore

Rename the member variable 'TxBFCap', since it causes a checkpatch issue with CamelCase naming. The variable has been renamed to 'not_used_tx_bf_cap', since the member is not actually used, apart from initialisation, which has been removed.

This is a coding style change which should not have an impact on runtime code execution.

---
 drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h     | 2 +-
 drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c | 3 ---
 2 files changed, 1 insertion(+), 4 deletions(-)
drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h +1 -1
index b4a412d8f61c..fa4c0ab43703 100644
@@ -66,7 +66,7 @@ struct ht_capability_ele {
 	u16	not_used_ext_ht_cap_info;
 
 	//TXBF Capabilities
-	u8	TxBFCap[4];
+	u8	not_used_tx_bf_cap[4];
 
 	//Antenna Selection Capabilities
 	u8	ASCap;
drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c +0 -3
index fe7682d8e258..3e2172b6008b 100644
@@ -599,9 +599,6 @@ void HTConstructCapabilityElement(struct ieee80211_device *ieee, u8 *posHTCap, u
 			pCapELE->cap_mcs[i] = 0;
 	}
 
-	//TXBF Capabilities
-	memset(pCapELE->TxBFCap, 0, 4);
-
 	//Antenna Selection Capabilities
 	pCapELE->ASCap = 0;
 //add 2 to give space for element ID and len when construct frames
Signature · 1 line
2.18.0
#31 lore raw

PATCH 21/21 staging:rtl8192u: Rename ASCap - Style

In reply to John Whitmore

Rename the member variable ASCap, as it causes a checkpatch issue with CamelCase naming. The member has been renamed to 'not_used_as_cap', since it is not actually used in code, apart from initialisation, which has been removed.

This is a coding style change which should have no impact on runtime code execution.

---
 drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h     | 2 +-
 drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c | 2 --
 2 files changed, 1 insertion(+), 3 deletions(-)
drivers/staging/rtl8192u/ieee80211/rtl819x_HT.h +1 -1
index fa4c0ab43703..f46d7f3ed7e4 100644
@@ -69,7 +69,7 @@ struct ht_capability_ele {
 	u8	not_used_tx_bf_cap[4];
 
 	//Antenna Selection Capabilities
-	u8	ASCap;
+	u8	not_used_as_cap;
 
 } __packed;
 
drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c +0 -2
index 3e2172b6008b..a1fb971f737c 100644
@@ -599,8 +599,6 @@ void HTConstructCapabilityElement(struct ieee80211_device *ieee, u8 *posHTCap, u
 			pCapELE->cap_mcs[i] = 0;
 	}
 
-	//Antenna Selection Capabilities
-	pCapELE->ASCap = 0;
 //add 2 to give space for element ID and len when construct frames
 	if (pHT->ePeerHTSpecVer == HT_SPEC_VER_EWC)
 		*len = 30 + 2;
Signature · 1 line
2.18.0