1
0
Fork 0
Commit Graph

73 Commits (redonkable)

Author SHA1 Message Date
Nishka Dasgupta b7a40c32f1 staging: wlan-ng: Remove function prism2mib_excludeunencrypted()
Remove function prism2mib_excludeunencrypted as all it does is call
prism2mib_flag.
Modify call sites accordingly.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Link: https://lore.kernel.org/r/20190802060913.30241-1-nishkadg.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-02 13:55:38 +02:00
Tim Collier 98b3b71afc staging: wlan-ng: reformatting in prism2mib.c to fit 80 character limit
Reformat lines over 80 characters in prism2mib.c to resolve "line over
80 characters" warnings reported by checkpatch.

Signed-off-by: Tim Collier <osdevtc@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-08 03:59:47 -08:00
Tim Collier 27575665f3 staging: wlan-ng: make switch case block format consistent
For switch statements with case blocks make the format consistent by
applying K&R formatting, a space before the opening brace, single
indentation of contained code, break inside the block and closing
brace aligned with case.

Signed-off-by: Tim Collier <osdevtc@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-28 14:43:52 +02:00
Tim Collier 5df6baef4f staging: wlan-ng: rename DIDmib_p2_p2MAC_p2CurrentTxRate in p80211metadef.h
Rename DIDmib_p2_p2MAC_p2CurrentTxRate in p80211metadef.h to
DIDMIB_P2_MAC_CURRENTTXRATE to fix "Avoid CamelCase" message from
checkpatch and conform to the coding style guidelines. Also shorten
name by removing repeated use of "P2" to ease readability and reduce
long lines.

Signed-off-by: Tim Collier <osdevtc@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-28 14:42:43 +02:00
Tim Collier a4857d8b30 staging: wlan-ng: rename DIDmib_p2_p2Static_p2CnfPortType in p80211metadef.h
Rename DIDmib_p2_p2Static_p2CnfPortType in p80211metadef.h to
DIDMIB_P2_STATIC_CNFPORTTYPE to fix "Avoid CamelCase" message from
checkpatch and conform to the coding style guidelines. Also shorten
name by removing repeated use of "P2" to ease readability and reduce
long lines.

Signed-off-by: Tim Collier <osdevtc@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-28 14:42:42 +02:00
Tim Collier a3ac4591b6 staging: wlan-ng: rename DIDmib_lnx_lnxConfigTable_lnxRSNAIE in p80211metadef.h
Rename DIDmib_lnx_lnxConfigTable_lnxRSNAIE in p80211metadef.h to
DIDMIB_LNX_CONFIGTABLE_RSNAIE to fix "Avoid CamelCase" message from
checkpatch and conform to the coding style guidelines. Also shorten
name by removing repeated use of "LNX" to ease readability and reduce
long lines.

Signed-off-by: Tim Collier <osdevtc@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-28 14:42:42 +02:00
Tim Collier 93d5a1dce9 staging: wlan-ng: rename DIDmib_dot11phy_dot11PhyDSSSTable_dot11CurrentChannel in p80211metadef.h
Rename DIDmib_dot11phy_dot11PhyDSSSTable_dot11CurrentChannel in
p80211metadef.h to DIDMIB_DOT11PHY_DSSSTABLE_CURRENTCHANNEL to fix
"Avoid CamelCase" message from checkpatch and conform to the coding
style guidelines. Also shorten name by removing repeated use of
"DOT11" and "DOT11PHY" to ease readability and reduce long lines.

Signed-off-by: Tim Collier <osdevtc@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-28 14:42:42 +02:00
Tim Collier c9a89f4e7a staging: wlan-ng: rename DIDmib_dot11phy_dot11PhyTxPowerTable_dot11CurrentTxPowerLevel in p80211metadef.h
Rename DIDmib_dot11phy_dot11PhyTxPowerTable_dot11CurrentTxPowerLevel
in p80211metadef.h to DIDMIB_DOT11PHY_TXPOWERTABLE_CURRENTTXPOWERLEVEL
to fix "Avoid CamelCase" message from checkpatch and conform to the
coding style guidelines. Also shorten name by removing repeated use of
"DOT11" and "DOT11PHY" to ease readability and reduce long lines.

Signed-off-by: Tim Collier <osdevtc@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-28 14:42:42 +02:00
Tim Collier e1f3748dba staging: wlan-ng: rename DIDmib_dot11mac_dot11OperationTable_dot11MaxTransmitMSDULifetime in p80211metadef.h
Rename
DIDmib_dot11mac_dot11OperationTable_dot11MaxTransmitMSDULifetime in
p80211metadef.h to
DIDMIB_DOT11MAC_OPERATIONTABLE_MAXTRANSMITMSDULIFETIME to fix "Avoid
CamelCase" message from checkpatch and conform to the coding style
guidelines. Also shorten name by removing repeated use of "DOT11" to
ease readability and reduce long lines.

Signed-off-by: Tim Collier <osdevtc@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-28 14:42:42 +02:00
Tim Collier 04bbfc2ab0 staging: wlan-ng: rename DIDmib_dot11mac_dot11OperationTable_dot11FragmentationThreshold in p80211metadef.h
Rename DIDmib_dot11mac_dot11OperationTable_dot11FragmentationThreshold
in p80211metadef.h to
DIDMIB_DOT11MAC_OPERATIONTABLE_FRAGMENTATIONTHRESHOLD to fix "Avoid
CamelCase" message from checkpatch and conform to the coding style
guidelines. Also shorten name by removing repeated use of "DOT11" to
ease readability and reduce long lines.

Signed-off-by: Tim Collier <osdevtc@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-28 14:42:42 +02:00
Tim Collier 6bcf3b632e staging: wlan-ng: rename DIDmib_dot11mac_dot11OperationTable_dot11LongRetryLimit in p80211metadef.h
Rename DIDmib_dot11mac_dot11OperationTable_dot11LongRetryLimitin
p80211metadef.h to DIDMIB_DOT11MAC_OPERATIONTABLE_LONGRETRYLIMIT to
fix "Avoid CamelCase" message from checkpatch and conform to the
coding style guidelines. Also shorten name by removing repeated use of
"DOT11" to ease readability and reduce long lines.

Signed-off-by: Tim Collier <osdevtc@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-28 14:42:42 +02:00
Tim Collier 59db1438a0 staging: wlan-ng: rename DIDmib_dot11mac_dot11OperationTable_dot11ShortRetryLimit in p80211metadef.h
Rename DIDmib_dot11mac_dot11OperationTable_dot11ShortRetryLimit in
p80211metadef.h to DIDMIB_DOT11MAC_OPERATIONTABLE_SHORTRETRYLIMIT to
fix "Avoid CamelCase" message from checkpatch and conform to the
coding style guidelines. Also shorten name by removing repeated use of
"DOT11" to ease readability and reduce long lines.

Signed-off-by: Tim Collier <osdevtc@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-28 14:42:41 +02:00
Tim Collier 334e5e6809 staging: wlan-ng: DIDmib_dot11mac_dot11OperationTable_dot11RTSThreshold in p80211metadef.h
Rename DIDmib_dot11mac_dot11OperationTable_dot11RTSThreshold in
p80211metadef.h to DIDMIB_DOT11MAC_OPERATIONTABLE_RTSTHRESHOLD to fix
"Avoid CamelCase" message from checkpatch and conform to the coding
style guidelines. Also shorten name by removing repeated use of
"DOT11" to ease readability and reduce long lines.

Signed-off-by: Tim Collier <osdevtc@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-28 14:42:41 +02:00
Tim Collier 3b1a14e450 staging: wlan-ng: rename DIDmib_dot11mac_dot11OperationTable_dot11MACAddress in p80211metadef.h
Rename DIDmib_dot11mac_dot11OperationTable_dot11MACAddress in
p80211metadef.h to DIDMIB_DOT11MAC_OPERATIONTABLE_MACADDRESS to fix
"Avoid CamelCase" message from checkpatch and conform to the coding
style guidelines. Also shorten name by removing repeated use of
"DOT11" to ease readability and reduce long lines.

Signed-off-by: Tim Collier <osdevtc@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-28 14:42:41 +02:00
Tim Collier 2ddc995d05 staging: wlan-ng: rename DIDmib_dot11smt_dot11PrivacyTable_dot11ExcludeUnencrypted in p80211metadef.h
Rename DIDmib_dot11smt_dot11PrivacyTable_dot11ExcludeUnencrypted in
p80211metadef.h to DIDMIB_DOT11SMT_PRIVACYTABLE_EXCLUDEUNENCRYPTED to
fix "Avoid CamelCase" message from checkpatch and conform to the
coding style guidelines. Also shorten name by removing repeated use of
"DOT11" to ease readability and reduce long lines.

Signed-off-by: Tim Collier <osdevtc@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-28 14:42:41 +02:00
Tim Collier eeeeacd837 staging: wlan-ng: rename DIDmib_dot11smt_dot11PrivacyTable_dot11WEPDefaultKeyID in p80211metadef.h
Rename DIDmib_dot11smt_dot11PrivacyTable_dot11WEPDefaultKeyID in
p80211metadef.h to DIDMIB_DOT11SMT_PRIVACYTABLE_WEPDEFAULTKEYID to fix
"Avoid CamelCase" message from checkpatch and conform to the coding
style guidelines. Also shorten name by removing repeated use of
"DOT11" to ease readability and reduce long lines.

Signed-off-by: Tim Collier <osdevtc@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-28 14:42:41 +02:00
Tim Collier 184fcaa193 staging: wlan-ng: rename DIDmib_dot11smt_dot11PrivacyTable_dot11PrivacyInvoked in p80211metadef.h
Rename DIDmib_dot11smt_dot11PrivacyTable_dot11PrivacyInvoked to
DIDMIB_DOT11SMT_PRIVACYTABLE_PRIVACYINVOKED to fix "Avoid CamelCase"
message from checkpatch and conform to the coding style
guidelines. Also shorten name by removing repeated use of "DOT11" to
ease readability and reduce long lines.

Signed-off-by: Tim Collier <osdevtc@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-28 14:42:41 +02:00
Tim Collier ce0f34e4af staging: wlan-ng: rename DIDmib_dot11smt_dot11WEPDefaultKeysTable_key in p80211metadef.h
Rename DIDmib_dot11smt_dot11WEPDefaultKeysTable_key in p80211metadef.h
to didmib_dot11smt_wepdefaultkeystable_key to fix "Avoid CamelCase"
message from checkpatch and conform to the coding style
guidelines. Also shorten name by removing repeated use of "DOT11" to
ease readability and reduce long lines.

Signed-off-by: Tim Collier <osdevtc@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-28 14:42:41 +02:00
Tim Collier 08ac857363 staging: wlan-ng: rename DIDmsg_dot11req_mibget in p80211metadef.h
Rename DIDmsg_dot11req_mibget in p80211metadef.h to
DIDMSG_DOT11REQ_MIBGET to fix "Avoid CamelCase" message from
checkpatch and conform to the coding style guidelines.

Signed-off-by: Tim Collier <osdevtc@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-28 14:41:36 +02:00
Tim Collier a37545e5e5 staging: wlan-ng: fix coding style (indentation) in prism2mib.c
Fix "CHECK: Alignment should match open parenthesis" reported by
checkpatch.pl.

Signed-off-by: Tim Collier <osdevtc@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-06-28 22:12:50 +09:00
Greg Kroah-Hartman f7056d335d staging: wlan-ng: add SPDX identifiers to all wlan-ng driver files
It's good to have SPDX identifiers in all files to make it easier to
audit the kernel tree for correct licenses.

Update the wlan-ng driver files with the correct SPDX license identifier
based on the license text in the file itself.  The SPDX identifier is a
legally binding shorthand, which can be used instead of the full boiler
plate text.

This work is based on a script and data from Thomas Gleixner, Philippe
Ombredanne, and Kate Stewart.

Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Kate Stewart <kstewart@linuxfoundation.org>
Cc: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-28 13:20:47 +01:00
Olav Haugan 0a3bbcbdf2 staging: wlan-ng: prism2mib.c: Fix type cast issues
Fix the following sparse warnings:

prism2mib.c:717:45: warning: cast to restricted __le16
prism2mib.c:720:45: warning: incorrect type in assignment (different base types)
prism2mib.c:720:45:    expected unsigned short [unsigned] [addressable] [usertype] datalen
prism2mib.c:720:45:    got restricted __le16 [usertype] <noident>
prism2mib.c:755:22: warning: incorrect type in assignment (different base types)
prism2mib.c:755:22:    expected unsigned short [unsigned] [usertype] len
prism2mib.c:755:22:    got restricted __le16 [usertype] <noident>

Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-14 12:26:41 +02:00
Gargi Sharma f3fe2a8e60 staging: wlan-ng: remove space before tab
remove the space before the tab to fix the the checkpatch issue,
no spaces before tabs.

Signed-off-by: Gargi Sharma <gs051095@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-16 10:16:55 -08:00
Markus Buettner 168400d0e9 staging: wlan-ng: remove unnecessary blank lines
checkpatch.pl complained about two unnecessary blank lines after an
opening '{' in prism2mib.c. Those were removed in order to get rid
of those warnings.

There are more issues pointed out by checkpatch.pl. Those require
additional work to be done.

Signed-off-by: Markus Buettner <markus.buettner@fau.de>
Signed-off-by: Artur Wasinger <artur.wasinger@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-01-10 17:37:25 +01:00
Sergio Paracuellos 162da263c2 staging: wlan-ng: avoid CamelCase: hfa384x_WPAData
Replace CamelCase struct name with underscores to comply
with the standard kernel coding style.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-25 10:44:22 +02:00
Sergio Paracuellos 96da9e6436 staging: wlan-ng: fix block comment warnings in prism2mib.c
This patch fix the following checkpatch.pl warnings in prism2mib.c:
WARNING: Block comments should align the * on each line

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16 10:25:41 +02:00
Sergio Paracuellos 5a2214e2e0 staging: wlang-ng: avoid new typedef: hfa384x_t
This patch fixes the following checkpatch.pl warning in hfa384x.h:
WARNING: do not add new typedefs

It applies for typedef hfa384x_t

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-02 17:05:56 +02:00
Sergio Paracuellos a2a4480370 staging: wlang-ng: avoid new typedef: hfa384x_WPAData_t
This patch fixes the following checkpatch.pl warning in hfa384x.h:
WARNING: do not add new typedefs

It applies for typedef hfa384x_WPAData_t

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-02 17:00:47 +02:00
Sergio Paracuellos ac033ec9f7 staging: wlan-ng: avoid new typedef: p80211itemd_t
This patch fixes the following checkpatch.pl warning in p80211types.h:
WARNING: do not add new typedefs

It applies for typedef p80211itemd_t

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-25 19:53:06 +02:00
Sergio Paracuellos 3fd1e3fcb9 staging: wlan-ng: avoid new typedef: p80211pstrd_t
This patch fixes the following checkpatch.pl warning in p80211types.h:
WARNING: do not add new typedefs

It applies for typedef p80211pstrd_t

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-25 19:27:04 +02:00
Jannik Becher 0e21fa4602 staging: wlan-ng: remove unnecessary spaces before casts
Fixed a coding style issue by removing unnecessary spaces before casts.

Signed-off-by: Jannik Becher <Becher.Jannik@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-23 14:15:54 +02:00
sayli karnik c9573a8d19 staging: wlan-ng: Remove the typedef to the 'wlandevice' structure
This patch removes the typedef 'wlandevice_t' to the 'wlandevice'
structure.

Signed-off-by: sayli karnik <karniksayli1995@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-18 12:39:31 +02:00
Claudiu Beznea 17d9ff12c0 Staging: wlan-ng: uses DIDmib_dot11smt_dot11WEPDefaultKeysTable_key() macro instead of DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey3
This patch removes
DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey3
macro and uses DIDmib_dot11smt_dot11WEPDefaultKeysTable_key()
instead.

Signed-off-by: Claudiu Beznea <claudiu.beznea@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-12 13:19:10 +02:00
Claudiu Beznea 8d3a225251 Staging: wlan-ng: uses DIDmib_dot11smt_dot11WEPDefaultKeysTable_key() macro instead of DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey2
This patch removes
DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey2
macro and uses DIDmib_dot11smt_dot11WEPDefaultKeysTable_key()
instead.

Signed-off-by: Claudiu Beznea <claudiu.beznea@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-12 13:19:10 +02:00
Claudiu Beznea 41e9b844cc Staging: wlan-ng: uses DIDmib_dot11smt_dot11WEPDefaultKeysTable_key() macro instead of DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey1
This patch removes
DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey1
macro and uses DIDmib_dot11smt_dot11WEPDefaultKeysTable_key()
instead.

Signed-off-by: Claudiu Beznea <claudiu.beznea@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-12 13:19:10 +02:00
Claudiu Beznea 152f04483d Staging: wlan-ng: uses DIDmib_dot11smt_dot11WEPDefaultKeysTable_key() macro instead of DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey0
This patch removes
DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey0
macro and uses DIDmib_dot11smt_dot11WEPDefaultKeysTable_key()
instead.

Signed-off-by: Claudiu Beznea <claudiu.beznea@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-12 13:19:10 +02:00
YU Bo 410478415c Staging: wlan-ng: Fix trailing */ in block comments.
Fix checkpatch.pl warning:

WARNING: Block comments use a trailing */ on a separate line.

Signed-off-by: Bo Yu <tsu.yubo@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-21 17:31:46 +02:00
Janani Ravichandran 3e83b0ab50 staging: wlan-ng: prism2mib.c: Drop void pointer cast
Void pointers don't need to be cast to other pointer types.
Semantic patch used:

@r@
expression x;
void* e;
type T;
identifier f;
@@

(
  *((T *)e)
|
  ((T *)x) [...]
|
  ((T *)x)->f
|
- (T *)
  e
)

Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-11 22:09:09 -08:00
Janani Ravichandran 0440107039 staging: wlan-ng: Drop void pointer cast
Void pointers need not be cast to other pointer types.
Semantic patch used:

@r@
expression x;
void* e;
type T;
identifier f;
@@

(
  *((T *)e)
|
  ((T *)x) [...]
|
  ((T *)x)->f
|
- (T *)
  e
)

Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-11 22:09:09 -08:00
Bhumika Goyal 2cfc7ba561 Staging: wlan-ng: Drop wrapper function
Drop the function prism2mgmt_pstr2bytearea and replace its function call
with the standard function memcpy that it wrapped.
The code becomes cleaner after this patch.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-14 16:34:08 -08:00
Amitoj Kaur Chawla d4f8455b12 staging: wlan-ng: prism2mib: Remove unnecessary variable
Drop unnecessary variable that can be replaced by a single line of
code.

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-15 20:02:47 -08:00
Aya Mahfouz c732041b72 staging: wlan-ng: remove unused variable
This patch removes variables that were simply used to
store the return value of a function call before
returning it.

The issue was detected and resolved using the following
coccinelle script:

@@
identifier len,f;
@@

-int len;
 ... when != len
     when strict
-len =
+return
        f(...);
-return len;

Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-01 16:23:55 -08:00
Grzegorz Swirski 9b4c8cfaff staging: wlan-ng: remove unused 'result' var
Signed-off-by: Grzegorz Swirski <grzegorz@swirski.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 23:42:39 -07:00
Modestas Stankus 6f8eee65a3 staging: wlan-ng: fixing coding style problems
WARNING: Unnecessary space before function pointer arguments
+       int (*func) (struct mibrec *mib,

WARNING: Missing a blank line after declarations
+                       hfa384x_WPAData_t wpa;
+                       if (isget) {

Signed-off-by: Modestas Stankus <stankus.modestas@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-01 15:00:18 -07:00
Johannes Stadlinger 5a69d9212d wlan-ng/prism2mib:checkpatch: Fix string split
This patch fixes a warning of checkpatch about string splitting.

Signed-off-by: Johannes Stadlinger <Johannes.Stadlinger@fau.de>
Signed-off-by: Maximilian Eschenbacher <maximilian@eschenbacher.email>
CC: linux-kernel@i4.cs.fau.de
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
CC: Vitaly Osipov <vitaly.osipov@gmail.com>
CC: Himangi Saraogi <himangi774@gmail.com>
CC: devel@driverdev.osuosl.org
CC: linux-kernel@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-19 17:30:13 -07:00
Vitaly Osipov 02d9b1eb4b staging: wlan-ng: use netdev_() instead of printk()
Replaced all uses of printk() in wlan-ng with netdev_err / _warn
where a netdev exists. If a few cases where a netdev does not yet
exist, dev_ or pr_ was used.

Checkpatch complains about lines over 80 chars or split string
constants - the messages are just too long, keeping it completely
happy would make the code less readable.

Signed-off-by: Vitaly Osipov <vitaly.osipov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-24 02:08:16 +09:00
Himangi Saraogi b21199116a staging:wlan-ng:hfa384x.h: remove typedef struct hfa384x_bytestr __packed hfa384x_bytestr_t
This patch removes the checkpatch.pl warning "do not add new typedefs"
and changes all source files that use that typedef. Also lines were
shortened to 80 characters to do away with the checkpatch.pl warning
"line over 80 characters" generated due to replacement of the
hfa384x_bytestr_t by struct hfa384x_bytestr in prism2mgmt.c,
prism2mgmt.h, prism2mib.c, prism2sta.c.

Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-11-10 11:49:00 -08:00
Edgardo Hames b6bb56e6aa Staging: wlan-ng: fix checkpatch issues in headers.
This patch fix errors and warnings reported by checkpatch
in p80211meta.h and p80211metstruct.h.

Signed-off-by: Edgardo Hames <ehames@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-08-02 18:20:04 -07:00
Tejun Heo 5a0e3ad6af include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files.  percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.

percpu.h -> slab.h dependency is about to be removed.  Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability.  As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.

  http://userweb.kernel.org/~tj/misc/slabh-sweep.py

The script does the followings.

* Scan files for gfp and slab usages and update includes such that
  only the necessary includes are there.  ie. if only gfp is used,
  gfp.h, if slab is used, slab.h.

* When the script inserts a new include, it looks at the include
  blocks and try to put the new include such that its order conforms
  to its surrounding.  It's put in the include block which contains
  core kernel includes, in the same order that the rest are ordered -
  alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
  doesn't seem to be any matching order.

* If the script can't find a place to put a new include (mostly
  because the file doesn't have fitting include block), it prints out
  an error message indicating which .h file needs to be added to the
  file.

The conversion was done in the following steps.

1. The initial automatic conversion of all .c files updated slightly
   over 4000 files, deleting around 700 includes and adding ~480 gfp.h
   and ~3000 slab.h inclusions.  The script emitted errors for ~400
   files.

2. Each error was manually checked.  Some didn't need the inclusion,
   some needed manual addition while adding it to implementation .h or
   embedding .c file was more appropriate for others.  This step added
   inclusions to around 150 files.

3. The script was run again and the output was compared to the edits
   from #2 to make sure no file was left behind.

4. Several build tests were done and a couple of problems were fixed.
   e.g. lib/decompress_*.c used malloc/free() wrappers around slab
   APIs requiring slab.h to be added manually.

5. The script was run on all .h files but without automatically
   editing them as sprinkling gfp.h and slab.h inclusions around .h
   files could easily lead to inclusion dependency hell.  Most gfp.h
   inclusion directives were ignored as stuff from gfp.h was usually
   wildly available and often used in preprocessor macros.  Each
   slab.h inclusion directive was examined and added manually as
   necessary.

6. percpu.h was updated not to include slab.h.

7. Build test were done on the following configurations and failures
   were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
   distributed build env didn't work with gcov compiles) and a few
   more options had to be turned off depending on archs to make things
   build (like ipr on powerpc/64 which failed due to missing writeq).

   * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
   * powerpc and powerpc64 SMP allmodconfig
   * sparc and sparc64 SMP allmodconfig
   * ia64 SMP allmodconfig
   * s390 SMP allmodconfig
   * alpha SMP allmodconfig
   * um on x86_64 SMP allmodconfig

8. percpu.h modifications were reverted so that it could be applied as
   a separate patch and serve as bisection point.

Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.

Signed-off-by: Tejun Heo <tj@kernel.org>
Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
2010-03-30 22:02:32 +09:00
Greg Kroah-Hartman b02957d58a Staging: Merge two branches of coding style fixes together
Turns out that multiple people sent pretty much the same patch
for the same staging drivers.  Commit these in two different
branches and merge them together to get a more complete coverage
of the cleanup and properly credit everyone for the work that they
did.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-04 08:14:54 -08:00