summaryrefslogtreecommitdiff
path: root/drivers/staging/ks7010/ks_hostif.h
AgeCommit message (Collapse)Author
2017-05-18staging: ks7010: avoid CamelCase: receiveDTIMsJanusz Lisiecki
Replace CamelCase variable name with underscores to comply with the standard kernel coding style. Signed-off-by: Janusz Lisiecki <janusz.lisiecki@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-15staging: ks7010: hostif, u32 data types to __le32Tobin C. Harding
Target device is little endian. Host interface data structures used for building frames to pass to target device should use little endian data types. All u32 structure members in ks_hostif.h need to be changed to __le32. Change all u16 data types in host interface structures to be __le32. Signed-off-by: Tobin C. Harding <me@tobin.cc> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-15staging: ks7010: hostif, u16 data types to __le16Tobin C. Harding
Target device is little endian. Host interface data structures used for building frames to pass to target device should use little endian data types. All u16 structure members in ks_hostif.h need to be changed to __le16, Sparse can then be used to make sure we update all code that touches these data. Change all u16 data types in host interface structures to be __le16. Update all code that touches modified data types. Check using Sparse. Signed-off-by: Tobin C. Harding <me@tobin.cc> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-15staging: ks7010: avoid CamelCase: reqIEs_size and respIEs_sizeJanusz Lisiecki
Replace CamelCase association_request_t and association_response_t struct field names with underscores to comply with the standard kernel coding style. Signed-off-by: Janusz Lisiecki <janusz.lisiecki@gmail.com> Reviewed-by: Tobin C. Harding <me@tobin.cc> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-15staging: ks7010: avoid CamelCase: atimWindowJanusz Lisiecki
Replace CamelCase variable name with underscores to comply with the standard kernel coding style. Signed-off-by: Janusz Lisiecki <janusz.lisiecki@gmail.com> Reviewed-by: Tobin C. Harding <me@tobin.cc> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-15staging: ks7010: avoid CamelCase: CfParms_t fieldsJanusz Lisiecki
Replace CamelCase struct field names with underscores to comply with the standard kernel coding style. Changed: - maxDuration - durRemaining Signed-off-by: Janusz Lisiecki <janusz.lisiecki@gmail.com> Reviewed-by: Tobin C. Harding <me@tobin.cc> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-15staging: ks7010: avoid CamelCase: link_ap_info_t fieldsJanusz Lisiecki
Replace CamelCase struct field names with underscores to comply with the standard kernel coding style. Changed: - FhParms_t - DsParms_t - CfParms_t - IbssParms_t - ErpParams_t Signed-off-by: Janusz Lisiecki <janusz.lisiecki@gmail.com> Reviewed-by: Tobin C. Harding <me@tobin.cc> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-15staging: ks7010: avoid CamelCase: FhParms_t fieldsJanusz Lisiecki
Replace CamelCase struct field names with underscores to comply with the standard kernel coding style. Changed: - dwellTime - hopSet - hopPattern - hopIndex Signed-off-by: Janusz Lisiecki <janusz.lisiecki@gmail.com> Reviewed-by: Tobin C. Harding <me@tobin.cc> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-15staging/ks7010: Fix type assignment for struct hostif_hdrCezary Gapinski
Sparse spits out a warnings about __le16 and unsigned short assignment. Change the type of size and event members of struct hostif_hdr to __le16 and correct conversion to the proper cpu type. Signed-off-by: Cezary Gapinski <gapalinux@gmail.com> Reviewed-by: Tobin C. Harding <me@tobin.cc> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-28staging: ks7010: fix enumeration tagsTobin C. Harding
Driver header declares enumeration types without tags. Using informative tags makes the code easier to understand and eliminates the need to comment the enum. Add tags to enumeration types. Signed-off-by: Tobin C. Harding <me@tobin.cc> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-28staging: ks7010: add enum multicast_filter_typeTobin C. Harding
Driver uses preprocessor directives to define multicast filter constants. These can be defined using an enumeration type. Doing so adds to the readability and gives the assists the compiler. Add enumeration type multicast_filter_type to replace preprocessor defined constants. Signed-off-by: Tobin C. Harding <me@tobin.cc> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-28staging: ks7010: make abbreviation mgmt uniformTobin C. Harding
Driver currently uses abbreviations 'mgt' and 'mngmt' for 'management'. Also 'power' is sometimes abbreviated to 'pow' and other times not. It makes the code easier to read and easier to modify if one abbreviation is used throughout the driver. 'mgmt' is widely accepted as an abbreviation of 'management'. 'power' can be spelled out in full, the extra two characters aids readability without an excessive cost. Make abbreviation of 'management' uniform across the driver, function names, preprocessor defined constants, and enumeration types. Signed-off-by: Tobin C. Harding <me@tobin.cc> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-28staging: ks7010: add enum sleep_mode_typeTobin C. Harding
Driver uses preprocessor directives to define SLP_ASLEEP and SLP_ACTIVE. These can be defined using an enumeration type. Doing so adds to the readability and gives the usual compiler benefits of having an enum. Functions that currently accept integer types can now use the new enumeration type, further aiding readability. Add enumeration type sleep_mode_type. Update code that handles sleep mode to use the new enumeration type. Signed-off-by: Tobin C. Harding <me@tobin.cc> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-18staging: ks7010: fix complete_handlerTobin C. Harding
complete_handler() takes void * types as parameters. void * parameters are then cast to struct types. Call sites for this function either pass in NULL or pointers to the struct types cast to void *. This casting is unnecessary and can be removed. Struct tx_device_buffer (which contains a pointer member to the complete_handler() function) has as member 'ks_wlan_priv *priv' this is unnecessary, we always have a pointer to this struct there is no need to store it here. The complete_handler can be more clearly defined by using struct pointer types instead of void * types. The code is currently unnecessarily complex, storing and passing extraneous pointer parameters. Remove unnecessary parameters, unnecessary casting to/from 'void *'. Fix all call sites involving complete_handler(). Signed-off-by: Tobin C. Harding <me@tobin.cc> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-11staging: ks7010: rename identifier packet to skbTobin C. Harding
Kernel networking code predominately uses the identifier 'skb' for a struct sk_buff pointer. Of 8088 instances of 'struct sk_buff *' within net/ 6670 are named 'skb'. Following the principle of least surprise, new networking code should use the identifier 'skb' for variables of type 'struct sk_buff *'. Rename identifier 'packet' to 'skb'. Signed-off-by: Tobin C. Harding <me@tobin.cc> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-16staging: ks7010: fix checkpatch PARENTHESIS_ALIGNMENTTobin C. Harding
Checkpatch emits WARNING and CHECK for prototype declarations. WARNING: function definition argument 'void *' should also have an identifier name CHECK: Alignment should match open parenthesis Also prototype parameters wrap more than is necessary. Tidy up function prototypes. Fix 5 error/warning instances. Signed-off-by: Tobin C. Harding <me@tobin.cc> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-16staging: ks7010: fix checkpatch BLOCK_COMMENT_STYLETobin C. Harding
Checkpatch emits WARNING: Block comments use a trailing */ on a separate line. Move comments to (kernel doc format) struct comment. Signed-off-by: Tobin C. Harding <me@tobin.cc> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-12Staging: ks7010: ks_hostif.*: Use preferred 'u32' kernel type over 'uint32_t'Shiva Kerdel
Fix prefer kernel type 'u32' over 'uint32_t' checks. Signed-off-by: Shiva Kerdel <shiva@exdev.nl> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-12Staging: ks7010: ks_hostif.*: Use preferred 'u16' kernel type over 'uint16_t'Shiva Kerdel
Fix prefer kernel type 'u16' over 'uint16_t' checks. Signed-off-by: Shiva Kerdel <shiva@exdev.nl> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-12Staging: ks7010: ks_*: Use preferred 'u8' kernel type over 'uint8_t'Shiva Kerdel
Fix prefer kernel type 'u8' over 'uint8_t' checks. Signed-off-by: Shiva Kerdel <shiva@exdev.nl> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-09staging: ks7010: fix spelling mistakeTobin C. Harding
Comment contains misspelled work 'Adress'. Correct spelling: Adress -> Address Signed-off-by: Tobin C. Harding <me@tobin.cc> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-09staging: ks7010: fix checkpatch whitespace warningsTobin C. Harding
Checkpatch emits various warnings/errors pointing to misplaced spaces. - trailing whitespace - please, no spaces at the start of a line - please, no space before tabs - Unnecessary space before function pointer arguments - unnecessary whitespace before a quoted newline - code indent should use tabs where possible Remove all undesirable whitespace. Signed-off-by: Tobin C. Harding <me@tobin.cc> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-06Staging: ks7010: ks_*: Use the BIT macro for bitwise checksShiva Kerdel
Changed bit swifting operators to BIT macros (preferred), This change will also solve the preferred space surrounding the operator checks. Signed-off-by: Shiva Kerdel <shiva@exdev.nl> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-16Staging: ks7010: Add required and preferred spaces around operatorsShiva Kerdel
Spaces should be added around operators to improve readability and are required in some cases. Signed-off-by: Shiva Kerdel <shiva@exdev.nl> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-27staging: ks7010: Use __packed over __attribute__((packed))Matt Kilgore
This replaces uses of __attribute__((packed)) with __packed, which is recommended to be used over the direct __attribute__. This patch then includes <linux/compiler.h> as necessary to use __packed. Signed-off-by: Matthew Kilgore <mattkilgore12@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-17Staging: ks7010: Remove extern keyword from function declarationBhumika Goyal
Remove extern specifier from function declaration as they have it by default. Also move extern declaration from .c files to their respective header file 'ks_hostif.h'. Coccinelle was used to remove extern and other changes were done by hand. Script: @@ identifier func; type T; @@ - extern T func(...); Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-06-07staging: ks7010: cleanup file headersWolfram Sang
Remove svn-ids and fix typos in the licence declaration. Add my copyright to the sdio code which I worked on mainly. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-06-07staging: ks7010: indent ks_hostif.hWolfram Sang
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-06-07staging: ks7010: remove unecessary typedefWolfram Sang
Let's simply specify the struct to keep in sync with kernel coding style. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-06-07staging: ks7010: add driver from Nanonote extra-repositoryWolfram Sang
See the TODO for details where this driver came from. Only a few minor changes were made to make the driver suitable for staging: * updated Kconfig help text and dependencies * added TODO * removed two __DATE__ and __TIME__ printouts to allow reproducible builds * added to staging main Kconfig + Makefile Tested on a Renesas Salvator-X board with a Spectec SDW-823 card. I could connect to a WPA-protected network. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>