summaryrefslogtreecommitdiffstats
path: root/drivers/staging/ks7010/ks_hostif.h
AgeCommit message (Collapse)Author
2020-02-23staging: Replace zero-length array with flexible-array memberGustavo A. R. Silva
The current codebase makes use of the zero-length array language extension to the C90 standard, but the preferred mechanism to declare variable-length types such as these ones is a flexible array member[1][2], introduced in C99: struct foo { int stuff; struct boo array[]; }; By making use of the mechanism above, we will get a compiler warning in case the flexible array does not occur last in the structure, which will help us prevent some kind of undefined behavior bugs from being inadvertently introduced[3] to the codebase from now on. Also, notice that, dynamic memory allocations won't be affected by this change: "Flexible array members have incomplete type, and so the sizeof operator may not be applied. As a quirk of the original implementation of zero-length arrays, sizeof evaluates to zero."[1] This issue was found with the help of Coccinelle. [1] https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html [2] https://github.com/KSPP/linux/issues/21 [3] commit 76497732932f ("cxgb3/l2t: Fix undefined behaviour") Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Link: https://lore.kernel.org/r/20200220132908.GA30501@embeddedor Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-06staging: ks7010: change some casts from uint8_t to u8 in ks_hostif headerSergio Paracuellos
This commit changes some type cast in rate related preprocessor definitions included in ks_hostif header file to use preferred u8 type. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-06staging: ks7010: conver MIB attributes preprocessor defs into an enumSergio Paracuellos
This commit just change some preprocessor definitions related with MIB attributes into an enumeration which is much cleaner for this here. Also add kerneldoc to avoid long comment lines. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-06staging: ks7010: convert MIB preprocessor defs into an enumSergio Paracuellos
This commit just change some preprocessor definitions related with MIB data types into an enumeration which is much cleaner for this here. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-06staging: ks7010: use the same parameter for 'event' in hostif_sme_enqueueSergio Paracuellos
Declaration of second parameter 'event' in ks_hostif .h and .c file is different using uint16_t and unsigned short respectively. Just unify both using 'u16' which is preferred instead. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-06staging: ks7010: remove missing WPS preprocessor conditional codeSergio Paracuellos
Commit 92c1552caef3661f049c4e967550e933599e2663 removes WPS hardcoded definition and its related conditional preprocessor code. There was some missing stuff already in this files. Remove it. 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-23staging: ks7010: rewrite hif_align_size inline functionSergio Paracuellos
This commit rewrites hif_align_size inline function to improve readability. It also change parameters and return type from int to size_t which is the correct and the one which is being used when this function is called from several points of the code. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-23staging: ks7010: remove KS_ATOM preprocessor condtional codeSergio Paracuellos
This commit removes KS_ATOM preprocessor conditional code from hif_align_size because it is not defined anywhere. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-23staging: ks7010: move and rename DEVICE_ALIGNMENT into correct headerSergio Paracuellos
This commit moves DEVICE_ALIGNMENT definition into the header ks_hostif.h which is where it is being used. This is also defined always so just remove nosense undef definitions also and clean some preprocessor conditional directives in hif_align_size function. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-23staging: ks7010: Remove unused 'struct hostif_mic_failure_confirm_t'.Quytelda Kahja
'struct hostif_mic_failure_confirm_t' is not used in this driver. Remove 'struct hostif_mic_failure_confirm_t'. 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 hostif_mic_failure_request_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 hostif_mic_failure_request_t' with 'struct hostif_mic_failure_request'. Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-23staging: ks7010: Remove unused 'struct hostif_sleep_confirm_t'.Quytelda Kahja
'struct hostif_sleep_confirm_t' is not used in this driver. Remove 'struct hostif_sleep_confirm_t'. 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 hostif_sleep_request_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 hostif_sleep_request_t' with 'struct hostif_sleep_request'. Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-23staging: ks7010: Remove unused 'struct hostif_phy_information_confirm_t'.Quytelda Kahja
'struct hostif_phy_information_confirm_t' is not used in this driver. Remove 'struct hostif_phy_information_confirm_t'. 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 ↵Quytelda Kahja
hostif_phy_information_request_t'. 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 hostif_phy_information_request_t' with 'struct hostif_phy_information_request'. Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-23staging: ks7010: Remove unused 'struct hostif_bss_scan_confirm_t'.Quytelda Kahja
'struct hostif_bss_scan_confirm_t' is not used in this driver. Remove 'struct hostif_bss_scan_confirm_t'. 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 hostif_bss_scan_request_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 hostif_bss_scan_request_t' with 'struct hostif_bss_scan_request'. Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-23staging: ks7010: Remove unused 'struct hostif_associate_indication_t'.Quytelda Kahja
'struct hostif_associate_indication_t' is not used in this driver. Remove 'struct hostif_associate_indication_t'. 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 association_response_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 association_response_t' with 'struct association_response'. 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 association_request_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 association_request_t' with 'struct association_request'. Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-23staging: ks7010: Remove unused 'struct last_associate_t'.Quytelda Kahja
'struct last_associate_t' is not used in this driver. Remove 'struct last_associate_t'. Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-23staging: ks7010: Remove unused 'struct hostif_adhoc_set_confirm_t'.Quytelda Kahja
'struct hostif_adhoc_set_confirm_t' is not used in this driver. Remove 'struct hostif_adhoc_set_confirm_t'. 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 hostif_adhoc_set2_request_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 hostif_adhoc_set2_request_t' with 'struct hostif_adhoc_set2_request'. 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 hostif_adhoc_set_request_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 hostif_adhoc_set_request_t' with 'struct hostif_adhoc_set_request'. Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-23staging: ks7010: Remove unused 'struct hostif_infrastructure_set_confirm_t'.Quytelda Kahja
'struct hostif_infrastructure_set_confirm_t' is not used in this driver. Remove 'struct hostif_infrastructure_set_confirm_t'. 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 ↵Quytelda Kahja
hostif_infrastructure_set_request_t'. 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 hostif_infrastructure_set_request_t' with 'struct hostif_infrastructure_set_request'. Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-23staging: ks7010: Remove unused 'struct hostif_ps_adhoc_set_confirm_t'.Quytelda Kahja
'struct hostif_ps_adhoc_set_confirm_t' is not used in this driver. Remove 'struct hostif_ps_adhoc_set_confirm_t'. 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 hostif_ps_adhoc_set_request_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 hostif_ps_adhoc_set_request_t' with 'struct hostif_ps_adhoc_set_request'. 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 hostif_request_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 hostif_request_t' with 'struct hostif_request'. Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-23staging: ks7010: Remove unused 'struct hostif_stop_confirm_t'.Quytelda Kahja
'struct hostif_stop_confirm_t' is not used in this driver. Remove 'struct hostif_stop_confirm_t'. 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 hostif_stop_request_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 hostif_stop_request_t' with 'struct hostif_stop_request'. Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-23staging: ks7010: Remove unused 'struct hostif_connect_indication_t'.Quytelda Kahja
'struct hostif_connect_indication_t' is not used in this driver. Remove 'struct hostif_connect_indication_t'. 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 link_ap_info_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 link_ap_info_t' with 'struct link_ap_info'. 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 ap_info_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 ap_info_t' with 'struct ap_info'. 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 rate_set16_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 rate_set16_t' with 'struct rate_set16'. 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 ibss_parms_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 ibss_parms_t' with 'struct ibss_parms'. 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 cf_parms_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 cf_parms_t' with 'struct cf_parms'. 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 ds_parms_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 ds_parms_t' with 'struct ds_parms'. 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 fh_parms_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 fh_parms_t' with 'struct fh_parms'. 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 rate_set8_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 rate_set8_t' with 'struct rate_set8'. 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 ssid_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 ssid_t' with 'struct ssid'. Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-23staging: ks7010: Remove unused 'struct hostif_start_confirm_t'.Quytelda Kahja
'struct hostif_start_confirm_t' is not used in this driver. Remove 'struct hostif_start_confirm_t'. 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 hostif_start_request_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 hostif_start_request_t' with 'struct hostif_start_request'. Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-23staging: ks7010: Remove unused 'struct hostif_power_mgmt_confirm_t'.Quytelda Kahja
'struct hostif_power_mgmt_confirm_t' is not used in this driver. Remove 'struct hostif_power_mgmt_confirm_t'. 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 hostif_power_mgmt_request_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 hostif_power_mgmt_request_t' with 'struct hostif_power_mgmt_request'. Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-23staging: ks7010: Remove unused 'struct hostif_mib_set_confirm_t'.Quytelda Kahja
'struct hostif_mib_set_confirm_t' is not used in this driver. Remove 'struct hostif_mib_set_confirm_t'. 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 hostif_mib_value_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 hostif_mib_value_t' with 'struct hostif_mib_value'. 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 hostif_mib_get_request_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 hostif_mib_get_request_t' with 'struct hostif_mib_get_request'. 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 channel_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 channel_list_t' with 'struct channel_list'. Signed-off-by: Quytelda Kahja <quytelda@tamalin.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>