staging: wilc1000: change function to static in linux_wlan
Defined function as static which are used only in single file. And also removed
their declaration from header file.
Below function are changed to static
wilc_wlan_initialize()
wilc_wlan_deinitialize()
wilc_wlan_get_firmware()
staging: wilc1000: rename wlan init and deinit function prefixed with wil1000
Rename wilc1000_wlan_init() & wilc1000_wlan_deinit() function to avoid
unecessary 'wilc1000' prefix in function to be inline with other
function naming convension.
staging: wicl1000: removed the unsed variables in wilc_parse_network_info()
Cleanup patch to remove the unused variables in
wilc_parse_network_info(). The value is assinged to these local
variables but assinged value is not used in that function.
staging: ks7010: refactor ks_wlan_translate_scan function
This commit refactors ks_wlan_translate_scan function with
the following changes:
- reorder local variables
- use ether_addr_copy to copy ethernet addresses
- change style in 'current_ev' variable assignments
- make use of some ternaries avoiding if-else code
- use preferred style for comments
- extract common code into a new ks_wlan_add_leader_event
function
staging: ks7010: refactor ks_wlan_set_wap function
Make use of ether_addr_copy instead of memcpy for copying
ethernet address data in ks_wlan_set_wap function and avoid
an 'else' just changing if logic to check invalid values first.
staging: ks7010: refactor ks_wlan_set_pmksa function
This commit cleans a bit ks_wlan_set_pmksa function removing
nonsense comments as well as make use of ether_addr_* family
functions written to not do manually things that were being
here. Minor single if brackets has been removed also.
staging: ks7010: refactor ks_wlan_set_cts_mode function
This commit refactors ks_wlan_set_cts_mode function to
handle invalid values first and then assign the good
one changing a bit logic to use a ternary operator.
staging: ks7010: refactor ks_wlan_set_power_mgmt function
This commit change logic to simplify conditional paths in
ks_wlan_set_power_mgmt function. It handles invalid's first
and just finally assign a valid value.
staging: gdm724x: remove redundant license information
Now that the SPDX tag is in all gdm724x files, that identifies the
license in a specific and legally-defined manner. So the extra GPL text
wording can be removed as it is no longer needed at all.
This is done on a quest to remove the 700+ different ways that files in
the kernel describe the GPL license text. And there's unneeded stuff
like the address (sometimes incorrect) for the FSF which is never
needed.
staging: gdm724x: add SPDX identifiers to all files.
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 gdm724x 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.
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>
Dan Carpenter [Thu, 26 Apr 2018 05:58:27 +0000 (08:58 +0300)]
staging: kernel.h: Prevent macro expantion bug in container_of_safe()
There aren't many users of this so it doesn't cause a problem, but we
obviously want to use "__mptr" here instead of "ptr" to prevent the
parameter from being executed twice.
The method struct drm_connector_helper_funcs::mode_valid is defined
as returning an 'enum drm_mode_status' but the driver implementation
for this method uses an 'int' for it.
Fix this by using 'enum drm_mode_status' in the driver too.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
The method ndo_start_xmit() is defined as returning an 'netdev_tx_t',
which is a typedef for an enum type, but the implementation in this
driver returns an 'int'.
Fix this by returning 'netdev_tx_t' in this driver too.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: rtl8723bs: fix rtw_cfg80211_monitor_if_xmit_entry()'s return type
The method ndo_start_xmit() is defined as returning an 'netdev_tx_t',
which is a typedef for an enum type, but the implementation in this
driver returns an 'int'.
Fix this by returning 'netdev_tx_t' in this driver too.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: visornic: fix visornic_xmit()'s return type
The method ndo_start_xmit() is defined as returning an 'netdev_tx_t',
which is a typedef for an enum type, but the implementation in this
driver returns an 'int'.
Fix this by returning 'netdev_tx_t' in this driver too.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: wlan-ng: fix p80211knetdev_hard_start_xmit()'s return type
The method ndo_start_xmit() is defined as returning an 'netdev_tx_t',
which is a typedef for an enum type, but the implementation in this
driver returns an 'int'.
Fix this by returning 'netdev_tx_t' in this driver too.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging/wilc1000: fix wilc_mac_xmit()'s return type
The method ndo_start_xmit() is defined as returning an 'netdev_tx_t',
which is a typedef for an enum type, but the implementation in this
driver returns an 'int'.
Fix this by returning 'netdev_tx_t' in this driver too.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Removed the items from WILC1000 TODO list, which are already addressed
to keep it updated. The removed items are already taken care by
previously submitted patches.
staging: wilc1000: remove registering of ndo_do_ioctl callback
Remove registering of ndo_do_ioctl in wilc_netdev_ops structure.
As RSSI information is already avaliable through cfg80211, so remove
the IOCTL call use to fetch the same information. Wext support is not
present in the driver. Its also done to address the TODO list item
mentioned below:
"use wext-core handling instead of private SIOCSIWPRIV implementation"
staging: wilc1000: remove multiple define for mac connect and disconnect
Cleanup patch to have commonly used macro in common header file to avoid
same defination in mulitple file. Removed MAC_CONNECTED &
MAC_DISCONNECTED macro from coreconfigurator.h header.
staging: wilc1000: remove multiple define used for MAX_SSID_LEN
Cleanup patch to have commonly used macro in common header file to avoid
same defination in mulitple file. Removed MAX_SSID_LEN macro from
coreconfigurator.h header as its already defined in wilc_wlan_if.h.
staging: wilc1000: remove unused macros in wilc module
Cleanup patch to remove the macros which are defined by not used.
Below mentioned macros are removed:
SCAN_DONE
SCAN_EVENT_DONE_ABORTED
WILC_WFI_RX_INTR
WILC_WFI_TX_INTR
WILC_WFI_TIMEOUT
WILC_WFI_DWELL_PASSIVE
WILC_WFI_DWELL_ACTIVE
MAX_SURVEY_RESULT_FRAG_SIZE
SURVEY_RESULT_LENGTH
NUM_BASIC_SWITCHES
NUM_FHSS_SWITCHES
NUM_11N_BASIC_SWITCHES
NUM_11N_HUT_SWITCHES
BA_SESSION_DEFAULT_BUFFER_SIZE
BA_SESSION_DEFAULT_TIMEOUT
BLOCK_ACK_REQ_SIZE
staging: wilc1000: handle error condition in add_key() and remove auth_type variable
Added the code to return correct error code in add_key() and also removed
'auth_type' variable. Now passing diretly to function instead of using
the 'auth_type' variable.
staging: wilc1000: split add_key() to avoid line over 80 chars
Cleanup changes to fix 'line over 80 chars' issue found by checkpatch.pl
script by spliting the function. Also make use of kzalloc() instead
kmalloc().
staging: wilc1000: refactor mgmt_tx to fix line over 80 chars
Refactor mgmt_tx() to fix line over 80 characters issue. Split the
function to avoid the checkpatch.pl warning. Returning the same error
code in case of memory allocation failure.
staging: wilc1000: remove line over 80 char warnings in set_wiphy_params()
Fix 'line over 80 character' issue reported by checkpatch.pl script in
set_wiphy_params(). Directly used the 'wiphy' pointer received as
function argument instead of using 'priv->dev->ieee80211_ptr->wiphy'.
staging: wilc1000: refactor scan() to free kmalloc memory on failure cases
Added changes to free the allocated memory in scan() for error condition.
Also added 'NULL' check validation before accessing allocated memory.
Copied the SSID information in consecutive slots to avoid inbetween
holes while filling into array.
staging: ks7010: refactor hostif_sme_set_pmksa function
This commits refactor a bit hostif_sme_set_pmksa function:
- avoid one level indentation changing if condition.
- use ether_addr_copy to copy bssid addresses.
- move 'i' initialization to declaration place.
staging: ks7010: use ether_addr_copy() instead of custom copy
In order to achieve ethernet address copies, ether_addr_copy()
function exists. So just use it and avoid the byte by byte copy.
This increase readability.
staging: ks7010: refactor ks_wlan_set_mode function
Most cases which are being handled in the switch-case of
ks_wlan_set_mode function are just returning EINVAL. Avoid
the use of switch-case stament and just use a simple if
to handle those. This decrease LOC as well as improves
readability.
staging: ks7010: refactor hostif_sme_power_mgmt_set function
Some minor changes have been done in this function to clean
it a bit:
- POWER_MGMT_ACTIVE and default case are the same so
just handle that with the same block of code,
- POWER_MGMT_SAVE1 replaces if-else with a ternary operator.
staging: ks7010: use definitions from kernel headers in hostif_data_indication function
Function hostif_data_indication checks some hardcoded values in a
switch-case block. This values are defined in uapi/linux/llc.h
header. Just use them and avoid a comment in the code improving
readability a bit.
staging: ks7010: join some debug traces in get_current_ap function
There is a lot of netdev_dbg calls related with the access point
in this function and all of them can be joined in only one call.
This makes code a bit simplier.
staging: ks7010: avoid some if-else code in get_current_ap function
This commits avoid some if-else code extracting common code before
its use and making use of a new variable 'size' which is assigned
using a ternary operator. This improves readability.
staging: ks7010: remove KSC_OPNOTSUPP related code
This commit reviews KSC_OPNOTSUPP related code. The
preprocessor KSC_OPNOTSUPP is defined by default so
related wext functions are not being used. Just clean
code removing all of this stuff.
staging: ks7010: use IW_HANDLER macro in ks_wlan_handler
This commit make use of IW_HANDLER to set wext operations
of the device. Using this, comments are not neccessary anymore
and also NULL entries so readability is clearly increased.
In order to avoid casting because of the use of a different
prototype in all related functions, those which are affected
have been updated also to make use of the union iwreq_data
as third parameter updating code accordly.
staging: ks7010: review includes of ks_hostif file
This commit reviews includes of ks_hostif.c source file.
Those which are not being used at all have been removed.
Driver header includes have been moved after the kernel
header includes to make style consistent in different
files of the driver. The need of ks_wlan.h header include
is only because of some preprocessor conditional code
of WPS definition. This definition is in ks_wlan.h
so this one must be included before the ks_hostif.h header
file.