staging: rtl8192u: make read-only array EWC11NHTCap static const
Subsystems (2)
PATCH 1/1 staging: rtl8192u: make read-only array EWC11NHTCap static const
Don't populate the read-only array EWC11NHTCap on the stack but instead make it static const. Also makes the object code a little smaller. Move comment to clean up checkpatch warning.
Signed-off-by Colin Ian King <[email protected]>
--- drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c +2 -1
@@ -480,7 +480,8 @@ void HTConstructCapabilityElement(struct ieee80211_device *ieee, u8 *posHTCap, u }memset (posHTCap,0 , *len);if (pHT->ePeerHTSpecVer ==HT_SPEC_VER_EWC ) { -u8 EWC11NHTCap[] = {0x00 ,0x90 ,0x4c ,0x33 };// For 11n EWC definition, 2007.07.17, by Emily +/* For 11n EWC definition, 2007.07.17, by Emily */ +static const u8 EWC11NHTCap[] = {0x00 ,0x90 ,0x4c ,0x33 };memcpy (posHTCap, EWC11NHTCap,sizeof (EWC11NHTCap)); pCapELE = (struct ht_capability_ele *)&posHTCap[4 ];
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerQuoted 14 lines · Colin Ian King
Don't populate the read-only array EWC11NHTCap on the stack but instead make it static const. Also makes the object code a little smaller. Move comment to clean up checkpatch warning.
Signed-off-by Colin Ian King <[email protected]>--- drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)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 483
Quoted 5 lines
drivers/staging/rtl8192u/ieee80211/rtl819x_HTProc.c +1
-1@@ -480,7 +480,8 @@ void HTConstructCapabilityElement(struct ieee80211_device *ieee, u8 *posHTCap, u }memset (posHTCap,0 , *len);if (pHT->ePeerHTSpecVer ==HT_SPEC_VER_EWC ) { -u8 EWC11NHTCap[] = {0x00 ,0x90 ,0x4c ,0x33 };// For 11n EWC definition, 2007.07.17, by Emily +/* For 11n EWC definition, 2007.07.17, by Emily */
This is not needed anymore, you know this...
Just delete it please.
thanks,
greg k-h