Commit graph

534061 commits

Author SHA1 Message Date
Dmitry Kalinkin
32491f561b staging: vme_user: remove okcount variable
Signed-off-by: Dmitry Kalinkin <dmitry.kalinkin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 22:50:15 -07:00
Dmitry Kalinkin
18f8bee206 staging: vme_user: remove distracting comment
Signed-off-by: Dmitry Kalinkin <dmitry.kalinkin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 22:50:15 -07:00
Dmitry Kalinkin
457ab28619 staging: vme_user: remove unused variable
Signed-off-by: Dmitry Kalinkin <dmitry.kalinkin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 22:50:15 -07:00
Dmitry Kalinkin
7c78e0cdd0 staging: vme_user: switch to returning -EFAULT on __copy_*_user errors
Signed-off-by: Dmitry Kalinkin <dmitry.kalinkin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 22:50:15 -07:00
Dmitry Kalinkin
8e4d138cc0 staging: vme_user: allow large read()/write()
This changes large master transfers to do shorter read/write rather than
return -EINVAL. User space will now be able to optimistically request a
large transfer and get at least some data.

This also removes comments suggesting on how to implement large
transfers. Current vme_master_* read and write implementations use CPU
copies that don't produce burst PCI accesses and subsequently no block
transfer on VME bus. In the end overall performance is quiet low and it
can't be fixed by doing direct copy to user space. Much easier solution
would be to just reuse kernel buffer.

Signed-off-by: Dmitry Kalinkin <dmitry.kalinkin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 22:50:15 -07:00
Dmitry Kalinkin
1f0622de0d staging: vme_user: fix kmalloc style
Signed-off-by: Dmitry Kalinkin <dmitry.kalinkin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 22:50:14 -07:00
Dmitry Kalinkin
f99b71be37 staging: vme_user: fix NULL comparison style
Signed-off-by: Dmitry Kalinkin <dmitry.kalinkin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 22:50:14 -07:00
Dmitry Kalinkin
cd974d35ab staging: vme_user: fix blank lines
Signed-off-by: Dmitry Kalinkin <dmitry.kalinkin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 22:50:14 -07:00
Dmitry Kalinkin
86eadace5d staging: vme_user: fix code alignment
Signed-off-by: Dmitry Kalinkin <dmitry.kalinkin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 22:50:14 -07:00
Maninder Singh
4d4d138a3e staging:vt6655: remove checks around dev_kfree_skb
dev_kfree_skb checks for NULL pointer itself,
Thus no need of explicit NULL check.

Signed-off-by: Maninder Singh <maninder1.s@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 22:48:29 -07:00
Gioh Kim
aeb7fa7b4f staging: ion: debugfs to shrink pool
This patch enables debugfs file /sys/kernel/debug/ion/heaps/system_shrink
to shrink pool and get pool size. This technically enables debugfs
shrinking for all heaps, not just the system heap although the system heap
is the only one with a shrinker right now. It is already implemented
but not complete. This patch completes and enables it.

Reading the file returns pool size
in page unit and writing the number of pages shrinks pool.
It flushes all pages to write zero at the file.

Signed-off-by: Gioh Kim <gioh.kim@lge.com>
Reviewed-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 22:47:30 -07:00
Gioh Kim
b44d9ce3b8 staging: ion: shrink page-pool by page unit
This patch shrink page-pool by page unit.

The system shrinker calls ion_heap_shrink_count() to get nr_to_scan,
and pass it to ion_heap_shrink_scan().
The problem is the return value of ion_heap_shrink_count() is the number
of pages but ion_system_heap_shrink(), which is called by
ion_heap_shrink_scan(), gets the number of chunk.

The main root of this is that ion_page_pool_shrink() returns page count
via ion_page_pool_total() if it have to check pool size. But it frees
chunks of pages if it have to free pools.

This patch first fix ion_page_pool_shrink() to count only pages,
not chunks. And then ion_system_heap_shrink() to work on pages.

Signed-off-by: Gioh Kim <gioh.kim@lge.com>
Reviewed-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 22:47:30 -07:00
Vaishali Thakkar
3e3148c511 Staging: rtl8192e: Replace memset with eth_zero_addr
Use eth_zero_addr to assign the zero address to the given address
array instead of memset when second argument is address of zero.
Note that the 6 in the third argument of memset appears to represent
an ethernet address size (ETH_ALEN).

The Coccinelle semantic patch that makes this change is as follows:

// <smpl>
@eth_zero_addr@
expression e;
@@

-memset(e,0x00,6);
+eth_zero_addr(e);
// </smpl>

Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 22:46:20 -07:00
Mateusz Kulikowski
6957248f48 staging: rtl8192e: rtllib_softmac: Make functions static
Make as many functions as possible static in rtllib_softmac.c.

The following functions were affected:
- rtllib_sta_wakeup
- rtllib_TURBO_Info
- rtllib_get_beacon_
- rtllib_send_probe_requests
- rtllib_update_active_chan_map
- rtllib_softmac_scan_syncro

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 22:43:31 -07:00
Mateusz Kulikowski
ed43603369 staging: rtl8192e: Make rtllib_rx_mgt() static
Function is not referenced outside of rtllib_rx.c

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 22:43:31 -07:00
Mateusz Kulikowski
511998ea5b staging: rtl8192e: rtllib_tx: Make functions static
Make as many functions as possible static in rtllib_tx.c.

The following functions were affected:
- rtllib_xmit_inter
- rtllib_query_seqnum
- rtllib_put_snap

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 22:43:31 -07:00
Mateusz Kulikowski
01b67faf5c staging: rtl8192e: Make rtl8192_QueryIsShort() static
Relocate function within file to avoid unnecessary fw decl.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 22:43:31 -07:00
Mateusz Kulikowski
cc5a1591da staging: rtl8192e: r8192e_phy: Make functions static
Make as many functions as possible static in r8192E_phy.c.

The following functions were affected:
- rtl8192_phyConfigBB
- rtl8192_SwChnl_WorkItem
- rtl8192_SetBWModeWorkItem

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 22:43:31 -07:00
Mateusz Kulikowski
235a86c3ec staging: rtl8192e: rtl_core: Make functions static
Make as many functions as possible static in rtl_core.c.
If needed - move fw declaration from header.

The following functions were affected:
- rtl8192_is_tx_queue_empty
- rtl819x_watchdog_wqcallback
- watch_dog_timer_callback
- rtl8192_data_hard_stop
- rtl8192_data_hard_resume
- rtl8192_hard_data_xmit
- rtl8192_hard_start_xmit
- rtl8192_tx_cmd
- rtl8192_tx
- rtl8192_pci_initdescring
- rtl8192_irq_tx_tasklet
- rtl8192_irq_rx_tasklet
- rtl8192_cancel_deferred_work
- _rtl8192_up
- rtl8192_up
- rtl8192_down
- rtl8192_restart
- rtl8192_update_cap

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 22:43:31 -07:00
Mateusz Kulikowski
3ebfc41805 staging: rtl8192e: Make phy_RF8256_Config_ParaFile() static
Relocate function in driver to avoid adding unnecessary fw decl.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 22:43:30 -07:00
Mateusz Kulikowski
e0c84c1c1f staging: rtl8192e: rtllib_HTProc: Make functions static
Make as many functions as possible static in rtllib_HTProc.c.

The following functions were affected:
- HTMcsToDataRate
- HTFilterMCSRate

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 22:43:30 -07:00
Mateusz Kulikowski
735b78615a staging: rtl8192e: rtl_dm: Make functions static
Make as many functions as possible static in rtllib_dm.c.

The following functions were affected:
- dm_check_fsync
- dm_CheckRfCtrlGPIO
- dm_fsync_timer_callback

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 22:43:30 -07:00
Mateusz Kulikowski
3a82a2fe2c staging: rtl8192e: Remove rtl8192_rx_cmd()
Function is empty.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 22:43:30 -07:00
Mateusz Kulikowski
84b2ce69f9 staging: rtl8192e: probe: Remove bdma64 check
It is always false.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 22:43:30 -07:00
Mateusz Kulikowski
59eda5eecd staging: rtl8192e: Remove rtl819x_process_cck_rxpathsel()
Function is empty.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 22:43:30 -07:00
Mateusz Kulikowski
9d9d0e3698 staging: rtl8192e: Remove DMESG macro
It is used in several places, but expands to nothing.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 22:43:30 -07:00
Mateusz Kulikowski
1e16cb17d5 staging: rtl8192e: Remove read|write_nic_io_(d)word|byte()
None of this functions was used.
Also remove PlatformIOCheckPageLegalAndGetRegMask() used by them.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 22:43:30 -07:00
Mateusz Kulikowski
632751b529 staging: rtl8192e: Remove DOT11D_GetMaxTxPwrInDbm()
Function is not used.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 22:43:29 -07:00
Mateusz Kulikowski
18e2daa858 staging: rtl8192e: Remove unused rtllib_device::freq_band
Member is never referenced.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 22:43:29 -07:00
Mateusz Kulikowski
9b3fcf2bbf staging: rtl8192e: Remove unused ether_header structure
Structure is not used in the driver.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 22:43:29 -07:00
Mateusz Kulikowski
e93c18c723 staging: rtl8192e: Remove rtllib_stats structure
Two remaining fields of rtllib_stats are only incremented, but
never read.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 22:43:29 -07:00
Mateusz Kulikowski
1184b4ade8 staging: rtl8192e: Remove unused fields from rtllib_stats
None of them are used in the driver.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 22:43:29 -07:00
Mateusz Kulikowski
adc7623c86 staging: rtl8192e: Remove unused enums
Remove ack_policy enum and some unused RTL_DEBUG enums.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 22:43:29 -07:00
Mateusz Kulikowski
5e6f1c7145 staging: rtl8192e: Remove undefs
They relate to macros that are not used in the driver.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 22:43:29 -07:00
Mateusz Kulikowski
9efe891d01 staging: rtl8192e: Remove unused defines
Remove most of unused defines (excluding phyreg/hw registers).

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 22:43:29 -07:00
Mateusz Kulikowski
04ed5f3d4e staging: rtl8192e: Remove ToLegalChannel()
Function is not used.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 22:43:28 -07:00
Krzysztof Kozlowski
bd1fb5388d staging: Drop owner assignment from i2c_driver
i2c_driver does not need to set an owner because i2c_register_driver()
will set it.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 20:18:56 -07:00
Jacob Kiefer
861e82d5b5 staging: style fix for octeon/ethernet-tx.c
Broke line with greater than 80 characters into two lines and
improved logical operator readability in hardware checksum if statement.

Signed-off-by: Jacob Kiefer <jtk54@cornell.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 20:18:56 -07:00
Leung Timothy Chi King
364b91be26 Staging: rts5208: Fix checkpatch warning: else is not generally useful
The following checkpatch warning was fixed:

WARNING: else is not generally useful after a break or return

Signed-off-by: Leung Timothy Chi King <contact@timothyleung.co>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 20:18:56 -07:00
Johannes Postma
9fccffbfd9 Staging: ozwpan: ozusbsvc1.c: Fix missing blank line after declarations
This patch fixes a missing line after declarations issue.

Signed-off-by: Johannes Postma <jgmpostma@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 20:17:06 -07:00
Jakub Sitnicki
4221844a62 staging: rtl8188eu: fold rtl8188e_read_chip_version() into rtl8188e_SetHalODMVar()
Both rtl8188e_read_chip_version() and ReadChipVersion8188E() are used
only in one place.  Make ReadChipVersion8188E() a void function and
eliminate its wrapper - rtl8188e_read_chip_version().

Signed-off-by: Jakub Sitnicki <jsitnicki@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 20:12:19 -07:00
Jakub Sitnicki
a51d13037b staging: rtl8188eu: remove ROMVer from struct HAL_VERSION
ROM version on RTL8188EU is always 0.

Signed-off-by: Jakub Sitnicki <jsitnicki@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 20:12:19 -07:00
Jakub Sitnicki
3c71dd6c56 staging: rtl8188eu: remove RFtype from struct HAL_VERSION
RFtype in struct HAL_VERSION duplicates rf_type in struct
hal_data_8188e, and does not change.  Remove it and the macros that test
it.

Signed-off-by: Jakub Sitnicki <jsitnicki@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 20:12:19 -07:00
Jakub Sitnicki
e827aeedd0 staging: rtl8188eu: remove ICtype from struct HAL_VERSION
IC type on RTL8188EU is always 8188E.  Remove it and all the macros that
check it.

Signed-off-by: Jakub Sitnicki <jsitnicki@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 20:12:19 -07:00
Jakub Sitnicki
3738408cc8 staging: rtl8188eu: remove RegulatorMode from struct hal_data_8188e
This field is not used anywhere.  Also, kill the rt_regulator_mode enum
which exists just for this field.

Signed-off-by: Jakub Sitnicki <jsitnicki@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 20:08:31 -07:00
Sreenath Madasu
249472588c staging: rtl8188eu: core: Fixed 80 character length warning
When the checkpatch.pl script was run, it showed lines with length
more than 80 characters in rtw_ap.c file. Fixed line number 382 by
breaking it up into two lines within 80 characters.

Signed-off-by: Sreenath Madasu <Sreenath.Madasu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 20:08:31 -07:00
Sunil Shahu
e1d0bcedfb staging: rtl8188eu: core: rtw_mlme: remove space before ','
Fix coding style error by removing spaces before ',' as suggested by
checkpatch.pl script.

Signed-off-by: Sunil Shahu <shshahu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 20:07:43 -07:00
Prasanna Karthik
9e7e78d829 staging:rtl8188eu: Code cleanup fix reported by coccinelle
bool check modified

Signed-off-by: Prasanna Karthik <mkarthi3@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 20:07:42 -07:00
Jakub Sitnicki
027d3efd93 staging: rtl8188eu: don't duplicate ieee80211 WLAN_CAPABILITY_* constants
linux/ieee80211.h already defines constants for capability bits.
Include it where needed, resolve discrepancies in naming, and remove the
duplicated definitions.

Also, make use of WLAN_CAPABILITY_IS_STA_BSS() macro to check if neither
ESS nor IBSS capability bits are set.

Signed-off-by: Jakub Sitnicki <jsitnicki@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 20:07:42 -07:00
Sudip Mukherjee
eb90d44de7 staging: sm7xxfb: use kernel commandline
We were only using the kernel commandline to set the mode if this driver
is builtin, but when it is built as a module we were not having any way
to set the mode. Start using commandline even if it is built as a
module.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14 20:05:32 -07:00