Christian Gromm [Tue, 22 Dec 2015 09:52:58 +0000 (10:52 +0100)]
staging: most: remove code to destroy channel
This patch removes unnecessary code to destroy channel objects. It is
needed, because function most_stop_channel, which is indirectly
triggered by function most_deregister_interface, already destroys the
channels.
Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Christian Gromm [Tue, 22 Dec 2015 09:52:53 +0000 (10:52 +0100)]
staging: most: move initialization of pointer
This patch makes function store_add_link initialize the pointer to an AIM
right before the channel is probed. It is needed, the AIM may already call
most_start_channel while probe_channel is still running. At this point the
pointer to the AIM must not be NULL.
Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Christian Gromm [Tue, 22 Dec 2015 09:52:47 +0000 (10:52 +0100)]
staging: most: fix mbo leak
This patch fixes a potential MBO leak in case function aim_read()
exits right after the MBO has been fetched from kfifo and before
it has been saved to the variable stacked_mbo.
Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
The MBO pointer stacked_mbo and the boolean variable keep_mbo are
always changed together and therefore provide the same information.
This patch removes keep_mbo and uses stacked_mbo instead.
Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dan Carpenter [Thu, 7 Jan 2016 09:34:13 +0000 (12:34 +0300)]
staging: unisys: remove some dead code
queue_delayed_work() returns bool, not negative error codes. It returns
false if the work has already been queued or true otherwise. Since
we don't care about that, we can just remove the test.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com> Acked-by: Don Zickus <dzickus@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chaehyun Lim [Fri, 5 Feb 2016 01:35:13 +0000 (10:35 +0900)]
staging: wilc1000: fix return type of wilc_deinit
This patch changes return type of wilc_deinit from s32 to int.
The result variable gets return value from wilc_mq_send that has return
type of int. It should be changed return type of this function as well
as data type of result variable.
Chaehyun Lim [Fri, 5 Feb 2016 01:35:11 +0000 (10:35 +0900)]
staging: wilc1000: fix return type of wilc_hif_set_cfg
This patch changes return type of wilc_hif_set_cfg from s32 to int.
The result variable gets return value from wilc_mq_send that has data
type of int. It should be changed return type of this function as well
as data type of result variable.
Chris Park [Thu, 4 Feb 2016 09:24:30 +0000 (18:24 +0900)]
staging: wilc1000: remove unnecessary log message using GENERIC_DBG tag
This patch remove unnecessary log message using GENERIC_DBG tag.
Needed log messages has changed netdev_dbg from PRINT_D.
And removes variables that were used to log message.
Signed-off-by: Chris Park <chris.park@atmel.com> Signed-off-by: Leo Kim <leo.kim@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chris Park [Thu, 4 Feb 2016 09:24:29 +0000 (18:24 +0900)]
staging: wilc1000: remove unused debug tag
This patch remove unused debug tag INT_DBG, LOCK_DBG, BUS_DBG,
MEM_DBG and FIRM_DBG
Signed-off-by: Chris Park <chris.park@atmel.com> Signed-off-by: Leo Kim <leo.kim@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chris Park [Thu, 4 Feb 2016 09:24:28 +0000 (18:24 +0900)]
staging: wilc1000: remove unused log message using the RX_DBG tag
This patch remove unused log message using the RX_DBG tag
Signed-off-by: Chris Park <chris.park@atmel.com> Signed-off-by: Leo Kim <leo.kim@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chris Park [Thu, 4 Feb 2016 09:24:27 +0000 (18:24 +0900)]
staging: wilc1000: remove unnecessary wilc_rx_complete function
This patch remove unnecessary wilc_rx_complete function
because this function only print unused log message.
remove unused has_packet variable nomore.
Signed-off-by: Chris Park <chris.park@atmel.com> Signed-off-by: Leo Kim <leo.kim@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This patch renames to avoid camelcase and remove prefix names,
changes follow are:
- u16capability to capability
- u16ConnectStatus to status
- u16AssocID to assoc_id
- pu8RespIEs to ies
- u16RespIEsLen to ies_len
Signed-off-by: Leo Kim <leo.kim@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Leo Kim [Thu, 4 Feb 2016 09:24:07 +0000 (18:24 +0900)]
staging: wilc1000: removes function 'wilc_dealloc_assoc_resp_info()'
This patch removes function wilc_dealloc_assoc_resp_info()'.
Does not need this function which only free memory.
Therefore, this function is removed and changed directly with kfree.
Signed-off-by: Leo Kim <leo.kim@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Leo Kim [Thu, 4 Feb 2016 09:24:06 +0000 (18:24 +0900)]
staging: wilc1000: removes function 'wilc_dealloc_network_info()'
This patch removes function 'wilc_dealloc_network_info()'.
Does not need this function which only free memory.
Therefore, this function is removed and changed directly with kfree.
Signed-off-by: Leo Kim <leo.kim@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chris Park [Thu, 4 Feb 2016 09:24:05 +0000 (18:24 +0900)]
staging: wilc1000: remove unused log message using the TX_DBG tag
This patch remove unused log message using the TX_DBG tag
Signed-off-by: Chris Park <chris.park@atmel.com> Signed-off-by: Leo Kim <leo.kim@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chris Park [Thu, 4 Feb 2016 09:24:04 +0000 (18:24 +0900)]
staging: wilc1000: remove unused log message using the HOSTINF_DBG tag
This patch remove unused log message using the HOSTINF_DBG tag
Signed-off-by: Chris Park <chris.park@atmel.com> Signed-off-by: Leo Kim <leo.kim@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chris Park [Thu, 4 Feb 2016 09:24:03 +0000 (18:24 +0900)]
staging: wilc1000: remove unused log message using the CORECONFIG_DBG tag
This patch remove unused log messages using the CORECONFIG_DBG tag
Signed-off-by: Chris Park <chris.park@atmel.com> Signed-off-by: Leo Kim <leo.kim@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chris Park [Thu, 4 Feb 2016 09:15:54 +0000 (18:15 +0900)]
staging: wilc1000: Optimize code of wilc_get_chipid function
This patch optimize code of wilc_get_chipid function.
u8 type changed to boolean type and removed unnecessary if statement.
Signed-off-by: Chris Park <chris.park@atmel.com> Signed-off-by: Leo Kim <leo.kim@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chris Park [Thu, 4 Feb 2016 09:15:53 +0000 (18:15 +0900)]
staging: wilc1000: remove warnings missing a blank line after declarations
This patch remove warnings reported by checkpatch.pl
for missing a blank line after declarations
Signed-off-by: Chris Park <chris.park@atmel.com> Signed-off-by: Leo Kim <leo.kim@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chris Park [Thu, 4 Feb 2016 09:15:52 +0000 (18:15 +0900)]
staging: wilc1000: remove unnecessary braces
This patch remove warnings reported by checkpatch.pl
for unnecessary braces
Signed-off-by: Chris Park <chris.park@atmel.com> Signed-off-by: Leo Kim <leo.kim@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chris Park [Thu, 4 Feb 2016 09:15:51 +0000 (18:15 +0900)]
staging: wilc1000: remove useless function
This patch remove useless function remove_TCP_related
in wilc_wlan.c file
Signed-off-by: Chris Park <chris.park@atmel.com> Signed-off-by: Leo Kim <leo.kim@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chris Park [Thu, 4 Feb 2016 09:15:50 +0000 (18:15 +0900)]
staging: wilc1000: remove useless log message
This patch remove useless log message in wilc_wlan.c file
Signed-off-by: Chris Park <chris.park@atmel.com> Signed-off-by: Leo Kim <leo.kim@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chris Park [Thu, 4 Feb 2016 09:15:49 +0000 (18:15 +0900)]
staging: wilc1000: fix warnings for line over 80 characters
This patch fixes warnings reported by checkpatch.pl
for line over 80 characters
Signed-off-by: Chris Park <chris.park@atmel.com> Signed-off-by: Leo Kim <leo.kim@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Leo Kim [Thu, 4 Feb 2016 09:15:46 +0000 (18:15 +0900)]
staging: wilc1000: wilc_parse_assoc_resp_info(): renames local variables
This patch renames to avoid camelcase, changes follow are:
- pstrConnectRespInfo to connect_resp_info
- u16AssocRespLen to assoc_resp_len
- pu8IEs to ies
- u16IEsLen to ies_len
Signed-off-by: Leo Kim <leo.kim@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Leo Kim [Thu, 4 Feb 2016 09:15:45 +0000 (18:15 +0900)]
staging: wilc1000: wilc_parse_assoc_resp_info(): renames function variables
This patch renames to avoid camelcase, changes follow are:
- pu8Buffer to buffer
- u32BufferLen to buffer_len
- ppstrConnectRespInfo to ret_connect_resp_info
Signed-off-by: Leo Kim <leo.kim@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Leo Kim [Thu, 4 Feb 2016 09:15:44 +0000 (18:15 +0900)]
staging: wilc1000: rename variable s32Error
This patch renames variable s32Error to result
to avoid CamelCase naming convention.
Also, remove the unused variable s32Error and replace with direct return.
Signed-off-by: Leo Kim <leo.kim@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Leo Kim [Thu, 4 Feb 2016 09:15:43 +0000 (18:15 +0900)]
staging: wilc1000: wilc_parse_network_info(): renames local inner variables
This patch renames to avoid camelcase, changes follow are:
- pu8TimElm to tim_elm
- pu8IEs to ies
- u16IEsLen to ies_len
- u32Tsf_Lo to tsf_lo
- u32Tsf_Hi to tsf_hi
And, remove the prefix variable defined name, below are:
- u8index to index
- pu8msa to msa
Signed-off-by: Leo Kim <leo.kim@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Leo Kim [Thu, 4 Feb 2016 09:15:42 +0000 (18:15 +0900)]
staging: wilc1000: wilc_parse_network_info(): renames local variables
This patch renames to avoid camelcase, changes follow are:
- pstrNetworkInfo to network_info
- u8MsgType to msg_type
- u8MsgID to msg_id
- u16MsgLen to msg_len
- u16WidID to wid_id
- u16WidLen to wid_len
- pu8WidVal to wid_val
Signed-off-by: Leo Kim <leo.kim@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Leo Kim [Thu, 4 Feb 2016 09:15:40 +0000 (18:15 +0900)]
staging: wilc1000: fixes variable dereferenced before check
This patch fixes the warning reported by smatch.
- wilc_wlan_get_firmware() warn: variable dereferenced before check 'vif'
- wilc_set_multicast_list() warn: variable dereferenced before check 'dev'
Just delete them and no need add null check since they are net_device from
ndo_set_rx_mode of net_device_ops and vif of netdev_priv.
Signed-off-by: Leo Kim <leo.kim@atmel.com> Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Glen Lee [Thu, 4 Feb 2016 09:15:31 +0000 (18:15 +0900)]
staging: wilc1000: pass vif to wilc_send_config_pkt
This patch passes vif instead of wilc to wilc_send_config_pkt and it's related
functions as well, because we need vif which is currently being used and
vif has wilc as well.
Change custom print with netdev_xxx format if there are custom print inside
the functions we have changed.
Function parameter of following functions are modified to vif.
wilc_send_config_pkt
wilc_wlan_cfg_set
wilc_wlan_cfg_get
wilc_wlan_cfg_commit
wilc_wlan_txq_add_cfg_pkt
wilc_wlan_txq_add_to_head
Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Glen Lee [Thu, 4 Feb 2016 09:15:30 +0000 (18:15 +0900)]
staging: wilc1000: move wilc_send_config_pkt to wilc_wlan.c
This patch moves the function wilc_send_config_pkt to wilc_wlan.c which
handles transport since the purpose of the function is sending/getting of
config information. coreconfiguator.[ch] will be rename with frame.[ch] later.
The print codes of the function is removed also and they will be implemented
with netdev_xx print format later.
struct wid need to be moved to wilc_wlan_if.h which defines configure
informations.
Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Glen Lee [Thu, 4 Feb 2016 09:15:28 +0000 (18:15 +0900)]
staging: wilc1000: fix WEP security bug
Station cannot connect to soft AP mode wilc when it is configured for WEP
security. This patch fixes it by setting the key index within the key value and
change the last else condition with DEFAULTKEY action case, and also do not use
WILC_WFI_wep_default index to set wep key id.
Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Glen Lee [Thu, 4 Feb 2016 09:15:21 +0000 (18:15 +0900)]
staging: wilc1000: handle connecting error
If connection fails, wilc1000_connecting needs to be set false also and return
immediately because goto lable 'done' doesn't do anything. Remove lable 'done'
as well.
Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Glen Lee [Thu, 4 Feb 2016 09:15:18 +0000 (18:15 +0900)]
staging: wilc1000: wilc_set_wfi_drv_handler: add mac index
Firmware supports sta/ap concurrency so mac index will be passed to wilc.
Remove wilc_set_wfi_drv_handler in scan and connect functions, and call
the function in ndo_open which is wilc_mac_open.
WID_SET_DRV_HANDLER value has been changed as well.
Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Oleg Drokin [Sat, 6 Feb 2016 07:12:12 +0000 (02:12 -0500)]
staging/lustre/lnet: Don't call roundup_pow_of_two on zero in LNetEQAlloc
roundup_pow_of_two return when called on a zero argument is
undefined, so don't call it like that.
This fixes a problem introduced by commit 322489d9d551
("staging/lustre: Use roundup_pow_of_two() in LNetEQAlloc()")
since 0 is a valid count parameter for LNetEQAlloc. Also manifesting
itself as an annoying kernel warning:
LNet: 3486:0:(lib-eq.c:85:LNetEQAlloc()) EQ callback is guaranteed to get every event, do you still want to set eqcount 1 for polling event which will have locking overhead? Please contact with developer to confirm
Oleg Drokin [Sat, 6 Feb 2016 07:01:51 +0000 (02:01 -0500)]
staging/lustre/obdclass: export debugfs functionality for GPL only.
Turns out we mistakenly export some pretty-wide-reaching debugfs
functions as EXPORT_SYMBOL instead of EXPORT_SYMBOL_GPL as we should,
so this patch rectifies the situation.
Oleg Drokin [Sat, 6 Feb 2016 07:01:50 +0000 (02:01 -0500)]
staging/lustre/libcfs: Properly handle debugfs read- and write-only files
It turns out that unlike procfs, debugfs does not really enforce
permissions for root (similar to regular filesystems), so we need
to ensure we are not providing ->write() method to read-only files
and ->read() method for write-only files at registration.
This fixes a couple of crashes on unexpected access.