summaryrefslogtreecommitdiff
path: root/drivers/staging/ks7010/ks_wlan.h
AgeCommit message (Collapse)Author
2018-05-15staging: ks7010: Remove unused defineNathan Chancellor
After commit 6d6612deaf55 ("staging: ks7010: Remove unnecessary limit checks"), this define is not used anywhere. Remove it as well. Suggested-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-14staging: ks7010: replace not standard uint type to unsigned intSergio Paracuellos
The field 'wakeup_count' in 'ks_wlan_private' struct is declared as 'uint' which is not a standard type. Replace in favour of 'unsigned int' which it is. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-06staging: ks7010: change type for rsn_enabled in wpa_status structSergio Paracuellos
Field rsn_enabled included in wpa_status struct is declared as unsigned int but it is only be set using 0 and 1 values and in conditional if code is just being used as a boolean. Change its type to be a boolean. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-06staging: ks7010: move two preprocessor definitions to ks_wlan.hSergio Paracuellos
In ks_wlan_translate_scan function there are two preprocessor definitions: - RSN_INFO_ELEM_ID - GENERIC_INFO_ELEM_ID These can be moved to common ks_wlan.h because they can be used in get_current_ap function instead of use hardcoded values. GENERIC_INFO_ELEM_ID has been renamed to WPA_INFO_ELEM_ID which is more clear. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-06staging: ks7010: remove nonsense comment in ks_wlan.h fileSergio Paracuellos
Header file ks_wlan.h has a lot of nonsense comments along the different declarations included on it. Most of them are just the same as the variable name. Just remove them all. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-06staging: ks7010: avoid ks_sdio_card dependency in ks_wlan headerSergio Paracuellos
ks_wlan_private struct has a pointer to struct ks_sdio_card in its fields. Because of that a forward declaration in needed in ks_wlan.h header and also it makes necessary to have ks_sdio_card public in a ks7010_sdio.h header. Changing this pointer into a void pointer makes no longer necessary to have ks7010_sdio.h header as well as removes the forward dependency in ks_wlan.h. Declaration of ks_sdio_card has been moved to ks7010_sdio.c source file and To make code cleaner inside this file a new ks7010_to_func function has been added. The code has been updated to this changes. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-06staging: ks7010: move tx and rx queues definitions into ks_wlan.h headerSergio Paracuellos
There are some definitions for rx and tx queues in ks7010_sdio which is not the best place to put them. Changing them into the ks_wlan header file there is no need to explicity include ks7010_sdio.h which makes no sense at all and can be resolved easily using forward declarations. The functions related with the queues circular buffers have been moved also into this header. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-06staging: ks7010: add SPDX identifiers to all filesSergio Paracuellos
It's good to have SPDX identifiers in all files to make it easier to audit the kernel tree for correct licenses. Fix up the all of the staging ks7010 files to have a proper SPDX 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. Extra GPL text wording can be removed as it is no longer needed at all. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-25staging: ks7010: remove WPS definition conditional codeSergio Paracuellos
WPS definition was defined by default in ks_wlan.h header file. So it makes no sense to have conditional preprocessor stuff along the code about this. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-25staging: ks7010: removes data_buff field of ks_wlan_private structSergio Paracuellos
This commit removes data_buff array field of ks_wlan_private which is not being used at all. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-25staging: ks7010: remove two fields of ks_wlan_private structSergio Paracuellos
This commit removes l2_dev and l2_fd fields of ks_wlan_private struct because they are not being used at all. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-25staging: ks7010: change name and type for device_open_status fieldSergio Paracuellos
This commit changes type for device_open_status field of ks_wlan_private structure from int to bool. This variable is only be set to 1 on ks_wlan_net_start and set to 0 on ks_wlan_net_stop. For this purpose it is not necessary at all to use an integer because a bool is enough. This also renames field name from device_open_status to is_device_open. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-23staging: ks7010: remove enum from ks_wlan.h headerSergio Paracuellos
This commit removes an enum which is in ks_wlan.h and it is not being used at all. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-23staging: ks7010: review includes of ks_wlan.h fileSergio Paracuellos
This commit reviews includes of ks_wlan.h header file. It removes those which are not being used at all. It also reorder remaining ones in alphabetical order. The linux/module.h include file has been moved to the correct file which is ks7010_sdio.c in order to be able to compile the driver without problems. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-23staging: ks7010: Change 'device_open_status' to a bool.Quytelda Kahja
The 'device_open_status' member of 'struct ks_wlan_private' is only ever set to zero or one, so it makes more sense for it to be a bool instead of an int. Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-23staging: ks7010: Remove trailing _t from 'struct wps_status_t'.Quytelda Kahja
The "_t" suffix is not needed for structure names in this driver, and is a reflection of an older typedef system that is no longer in place. Replace all occurences of 'struct wps_status_t' with 'struct wps_status'. Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-23staging: ks7010: Remove trailing _t from 'struct pmk_t'.Quytelda Kahja
The "_t" suffix is not needed for structure names in this driver, and is a reflection of an older typedef system that is no longer in place. Replace all occurences of 'struct pmk_t' with 'struct pmk'. Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-23staging: ks7010: Remove trailing _t from 'struct pmk_list_t'.Quytelda Kahja
The "_t" suffix is not needed for structure names in this driver, and is a reflection of an older typedef system that is no longer in place. Replace all occurences of 'struct pmk_list_t' with 'struct pmk_list'. Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-23staging: ks7010: Remove trailing _t from 'struct wpa_status_t'.Quytelda Kahja
The "_t" suffix is not needed for structure names in this driver, and is a reflection of an older typedef system that is no longer in place. Replace all occurences of 'struct wpa_status_t' with 'struct wpa_status'. Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-23staging: ks7010: Remove trailing _t from 'struct mic_failure_t'.Quytelda Kahja
The "_t" suffix is not needed for structure names in this driver, and is a reflection of an older typedef system that is no longer in place. Replace all occurences of 'struct mic_failure_t' with 'struct mic_failure'. Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-23staging: ks7010: Remove trailing _t from 'struct wpa_key_t'.Quytelda Kahja
The "_t" suffix is not needed for structure names in this driver, and is a reflection of an older typedef system that is no longer in place. Replace all occurences of 'struct wpa_key_t' with 'struct wpa_key'. Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-23staging: ks7010: Remove trailing _t from 'struct scan_ext_t'.Quytelda Kahja
The "_t" suffix is not needed for structure names in this driver, and is a reflection of an older typedef system that is no longer in place. Replace all occurences of 'struct scan_ext_t' with 'struct scan_ext'. Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-23staging: ks7010: Remove trailing _t from 'struct sleep_status_t'.Quytelda Kahja
The "_t" suffix is not needed for structure names in this driver, and is a reflection of an older typedef system that is no longer in place. Replace all occurences of 'struct sleep_status_t' with 'struct sleep_status'. Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-23staging: ks7010: Remove trailing _t from 'struct power_save_status_t'.Quytelda Kahja
The "_t" suffix is not needed for structure names in this driver, and is a reflection of an older typedef system that is no longer in place. Replace all occurences of 'struct power_save_status_t' with 'struct power_save_status'. Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-23staging: ks7010: Remove trailing _t from 'struct local_eeprom_sum_t'.Quytelda Kahja
The "_t" suffix is not needed for structure names in this driver, and is a reflection of an older typedef system that is no longer in place. Replace all occurences of 'struct local_eeprom_sum_t' with 'struct local_eeprom_sum'. Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-23staging: ks7010: Remove trailing _t from 'struct local_gain_t'.Quytelda Kahja
The "_t" suffix is not needed for structure names in this driver, and is a reflection of an older typedef system that is no longer in place. Replace all occurences of 'struct local_gain_t' with 'struct local_gain'. Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-23staging: ks7010: Remove trailing _t from 'struct local_aplist_t'.Quytelda Kahja
The "_t" suffix is not needed for structure names in this driver, and is a reflection of an older typedef system that is no longer in place. Replace all occurences of 'struct local_aplist_t' with 'struct local_aplist'. Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-23staging: ks7010: Remove trailing _t from 'struct local_ap_t'.Quytelda Kahja
The "_t" suffix is not needed for structure names in this driver, and is a reflection of an older typedef system that is no longer in place. Replace all occurences of 'struct local_ap_t' with 'struct local_ap'. Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-23staging: ks7010: Remove trailing _t from 'struct wps_ie_t'.Quytelda Kahja
The "_t" suffix is not needed for structure names in this driver, and is a reflection of an older typedef system that is no longer in place. Replace all occurences of 'struct wps_ie_t' with 'struct wps_ie'. Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-23staging: ks7010: Remove trailing _t from 'struct rsn_ie_t'.Quytelda Kahja
The "_t" suffix is not needed for structure names in this driver, and is a reflection of an older typedef system that is no longer in place. Replace all occurences of 'struct rsn_ie_t' with 'struct rsn_ie'. Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-23staging: ks7010: Remove trailing _t from 'struct hostt_t'.Quytelda Kahja
The "_t" suffix is not needed for structure names in this driver, and is a reflection of an older typedef system that is no longer in place. Replace all occurences of 'struct hostt_t' with 'struct hostt'. Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-29staging: ks7010: Remove unused member 'reg_net' from 'ks_wlan_private'.Quytelda Kahja
'reg_net' is never used in this driver. Signed-off-by: Quytelda Kahja <quytelda@tamalin.org>x Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-29staging: ks7010: Change mac_address_valid to a bool instead of int.Quytelda Kahja
'mac_address_valid' is only ever assigned 0 or 1, so it makes more sense to use a bool type for this variable. Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-28staging: ks7010: use GENMASK instead of custom defines in SME_WEP_VAL_MASKSergio Paracuellos
This commits replaces custom defines that were been used to define a mask using GENMASK macro from linux bitops header file. With this change the "WARNING: line over 80 characters" warning message reported by checkpatch script is also removed. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-28staging: ks7010: Fix spelling mistakes.Quytelda Kahja
Fix two spelling mistakes in comments. Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-22staging: ks7010: remove max_event_count field which is only being used in debugSergio Paracuellos
This patch removes max_event_count field of sme_info structure which is a write only variable just being used for debug purposes. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-22staging: ks7010: replace KS_WLAN_DEBUG with DEBUG preprocessor directiveSergio Paracuellos
This commit replaces custom KS_WLAN_DEBUG which is not being used anymore in favour of DEBUG which is the one included when debugging is enabled. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-19staging: ks7010: replace DPRINTK traces in favour of netdev_*Sergio Paracuellos
This commit removes custom defined DPRINTK macro and replaces all the associated debug and other traces for preferred ones netdev_*. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-15staging: ks7010: avoid CamelCase in fields of struct local_gain_tJanusz Lisiecki
Replace CamelCase fields of struct 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-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: abstract connection statusTobin C. Harding
Host interface connection status is handled using a 32 bit type. Top byte is used as for FORCE_DISCONNECT status, low bits are used for connect/disconnect status. Driver masks and checks integers to ascertain status. If functions are defined to do the masking and equality check then the details of how the status integer is used are abstracted away. This makes the code easier to read. Also future updates to the status handling will be easier because the code is in one place. Driver currently uses the CONNECT_STATUS and DISCONNECT_STATUS as values, as apposed to opaque values. Because of this driver code checks for equality with CONNECT_STATUS and DISCONNECT_STATUS as apposed to negating a single check (ie 'foo != CONNECT_STATUS). In order to maintain the current functionality we define two separate functions is_connect_status() and is_disconnect_status(). Add functions to abstract the status integer check. Update all sites that do the check manually to use the newly defined functions. Signed-off-by: Tobin C. Harding <me@tobin.cc> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-18staging: ks7010: move hw info into dev private dataTobin C. Harding
Currently driver uses a hardware information struct description to group some SDIO related functionality (work, work queue, sdio private data pointer). This structure is then embedded in the device private data structure. Having nested structures described in different header files means that to view the device private data programmers must open two header files. This structure could be embedded anonymously in the device private data and achieve the same result (grouping of function specific to SDIO) without the need to open multiple headers. However, the SDIO private data structure already has various different data and pointers, adding the embedded structure adds little extra meaning and lengthens all the dereferences throughout the driver, often meaning addition line breaks and braces. We can increase readability and reduce code complexity by moving the hardware information data and pointers to directly be within the device private data structure description. While preparing for this refactoring it was noted that the identifier currently used for the delayed work is 'rw_wq', this is confusing since the 'wq' suffix typically means 'work queue'. This identifier would be more meaningful if it used the suffix 'dwork' as does the declaration of queue_delayed_work() (include/linux/workqueue.h). The identifier for the work queue is currently 'ks7010sdio_wq'. This identifier can be shortened without loss of meaning because there is only one work queue within the driver. Identifier 'wq' is typical within in-tree driver code and aptly describes the pointer. Current pointer to the SDIO private data is identified by 'sdio_card', this is sufficiently meaningful from within the hw_info structure but once the hw_info_t structure is removed the pointer would be better to have a prefix appended to it to retain the prior level of meaning. Move members from struct hw_info_t to struct ks_wlan_private. Rename identifiers; struct delayed_work pointer 'rw_wq' to 'rw_dwork'. struct workqueue_struct pointer 'ks7010sdio_wq' to 'wq'. struct ks_sdio_card pointer 'sdio_card' to 'ks_sdio_card'. Remove structure description hw_info_t. Fix init/destroy calls. Fix all call sites, SDIO private data access calls, and queuing calls. Signed-off-by: Tobin C. Harding <me@tobin.cc> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-18staging: ks7010: move tasklet_struct to ks_wlan_privateTobin C. Harding
Currently a pointer to the tasklet_struct used for bottom half processing on the receive path is within the hw_info_t structure. This structure is then embedded in the device private data structure. Having the tasklet_struct nested does not add meaning to the device private data, device private data already (and typically) has various data relating to the device, there is no real need to separate the tasklet_struct to a SDIO specific structure. While not adding allot of extra meaning having the nested structure means the programmer must open two header files to read the description of the device private data, the code would be easier to read if the device private data struct description was not spread over two files. Move tasklet_struct out of sdio header file and into the device private data structure description. Signed-off-by: Tobin C. Harding <me@tobin.cc> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-18staging: ks7010: rename wakeup work structTobin C. Harding
struct work_struct uses identifier ks_wlan_wakeup_task, this is confusing because the 'task' suffix implies that this is a tasklet_struct instead of a work struct. Suffix 'work' would be more clear. The code would be easier to read if it followed the principle of least surprise and used the 'work' suffix for a work_struct identifier. Rename work_struct structure 'ks_wlan_wakeup_task' to 'wakeup_work'. Signed-off-by: Tobin C. Harding <me@tobin.cc> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-06staging: ks7010: fix coding style issue of aligning comments properlyChetan Sethi
This patch fixes coding style issue of having block comments using a trailing */ on a separate line, warning as issued by checkpatch Signed-off-by: Chetan Sethi <cpsethi369@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-06staging: ks7010: fix coding style issue of using __func__ instead of ↵Chetan Sethi
__FUNCTION__ This patch fixes coding style issue of using __func__ instead of gcc specific __FUNCTION__, warning as issued by checkpatch Signed-off-by: Chetan Sethi <cpsethi369@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-06staging: ks7010: fix coding style issue of using pr_notice instead of printkChetan Sethi
Signed-off-by: Chetan Sethi <cpsethi369@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-06staging: ks7010: fix coding style issue of enclosing complex macro value in ↵Chetan Sethi
parentheses This patch fixes error of enclosing complex macro value in parentheses, error as issued by checkpatch Signed-off-by: Chetan Sethi <cpsethi369@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-06staging: ks7010: fixed warning of avoiding line over 80 charactersChetan Sethi
This patch fixes warning of line over 80 characters, as issued by checkpatch.pl Signed-off-by: Chetan Sethi <cpsethi369@gmail.com> 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>