staging:rtl8192u: Refactor ht_capability_ele - Style
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
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
@@ -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
@@ -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
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?
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
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
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.hfile.
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.
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.hfile.
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.
Re: [PATCH 01/21] staging:rtl8192u: Rename AdvCoding - Style
In reply to John WhitmoreQuoted 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.
Signed-off-by John Whitmore <[email protected]>--- 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
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
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.
Signed-off-by John Whitmore <[email protected]>--- 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@@ -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
-1struct 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
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.
Signed-off-by John Whitmore <[email protected]>--- 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@@ -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
-1struct 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
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.
Signed-off-by John Whitmore <[email protected]>--- 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@@ -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
-1struct 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
Greg KH
maintainerRe: [PATCH 01/21] staging:rtl8192u: Rename AdvCoding - Style
In reply to John WhitmoreQuoted 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.
Signed-off-by John Whitmore <[email protected]>--- 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@@ -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
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
PATCH 2/21 staging:rtl8192u: Rename ChlWidth - Style
In reply to John WhitmoreRename '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
@@ -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
@@ -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
@@ -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
PATCH 3/21 staging:rtl8192u: Rename MimoPwrSave - Style
In reply to John WhitmoreRename 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
@@ -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
@@ -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
PATCH 4/21 staging:rtl8192u: Rename GreenField - Style
In reply to John WhitmoreRename 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
@@ -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
@@ -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
PATCH 5/21 staging:rtl8192u: Rename ShortGI20Mhz - Style
In reply to John WhitmoreRename 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
@@ -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
@@ -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
@@ -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
PATCH 6/21 staging:rtl8192u: Rename ShortGI40Mhz - Style
In reply to John WhitmoreRename 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
@@ -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
@@ -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
@@ -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
PATCH 7/21 staging:rtl8192u: Rename TxSTBC - Style
In reply to John WhitmoreRename 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
@@ -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
@@ -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
PATCH 8/21 staging:rtl8192u: Rename RxSTBC - Style
In reply to John WhitmoreRename 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
@@ -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
@@ -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
PATCH 9/21 staging:rtl8192u: Rename DelayBA - Style
In reply to John WhitmoreRename 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
@@ -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
@@ -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
PATCH 10/21 staging:rtl8192u: Rename MaxAMSDUSize - Style
In reply to John WhitmoreRename 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
@@ -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
@@ -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
PATCH 11/21 staging:rtl8192u: Rename DssCCk - Style
In reply to John WhitmoreRename 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
@@ -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
@@ -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
PATCH 12/21 staging:rtl8192u: Rename PSMP - Style
In reply to John WhitmoreRename 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
@@ -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
@@ -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
PATCH 13/21 staging:rtl8192u: Rename Rsvd1 - Style
In reply to John WhitmoreRename 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
@@ -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
PATCH 14/21 staging:rtl8192u: Rename LSigTxopProtect - Style
In reply to John WhitmoreRename 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
@@ -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
@@ -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
PATCH 15/21 staging:rtl8192u: Rename MaxRxAMPDUFactor - Style
In reply to John WhitmoreRename 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
@@ -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
@@ -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, uif (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
PATCH 16/21 staging:rtl8192u: Rename MPDUDensity - Style
In reply to John WhitmoreRename 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
@@ -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
@@ -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, uIEEE80211_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
PATCH 17/21 staging:rtl8192u: Rename Rsvd2 - Style
In reply to John WhitmoreRename 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
@@ -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
PATCH 18/21 staging:rtl8192u: Rename MCS - Style
In reply to John WhitmoreRename 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
@@ -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
@@ -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
@@ -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, uint 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
PATCH 19/21 staging:rtl8192u: Rename ExtHTCapInfo - Style
In reply to John WhitmoreRename 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
@@ -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
@@ -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
PATCH 20/21 staging:rtl8192u: Rename TxBFCap - Style
In reply to John WhitmoreRename 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
@@ -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
@@ -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
PATCH 21/21 staging:rtl8192u: Rename ASCap - Style
In reply to John WhitmoreRename 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
@@ -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
@@ -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