summaryrefslogtreecommitdiffstats
path: root/drivers/staging/ks7010/ks_hostif.c
Commit message (Collapse)AuthorAgeFilesLines
* Merge tag 'staging-4.11-rc1' of ↵Linus Torvalds2017-02-221-12/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging/iio driver updates from Greg KH: "Here is the big staging and iio driver patchsets for 4.11-rc1. We almost broke even this time around, with only a few thousand lines added overall, as we removed the old and obsolete i4l code, but added some new drivers for the RPi platform, as well as adding some new IIO drivers. All of these have been in linux-next for a while with no reported issues" * tag 'staging-4.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (669 commits) Staging: vc04_services: Fix the "space prohibited" code style errors Staging: vc04_services: Fix the "wrong indent" code style errors staging: octeon: Use net_device_stats from struct net_device Staging: rtl8192u: ieee80211: ieee80211.h - style fix Staging: rtl8192u: ieee80211: ieee80211_tx.c - style fix Staging: rtl8192u: ieee80211: rtl819x_BAProc.c - style fix Staging: rtl8192u: ieee80211: ieee80211_module.c - style fix Staging: rtl8192u: ieee80211: rtl819x_TSProc.c - style fix Staging: rtl8192u: r8192U.h - style fix Staging: rtl8192u: r8192U_core.c - style fix Staging: rtl8192u: r819xU_cmdpkt.c - style fix staging: rtl8192u: blank lines aren't necessary before a close brace '}' staging: rtl8192u: Adding space after enum and struct definition staging: rtl8192u: Adding space after struct definition Staging: ks7010: Add required and preferred spaces around operators Staging: ks7010: ks*: Remove redundant blank lines Staging: ks7010: ks*: Add missing blank lines after declarations staging: visorbus, replace init_timer with setup_timer staging: vt6656: rxtx.c Removed multiple dereferencing staging: vt6656: Alignment match open parenthesis ...
| * Staging: ks7010: Add required and preferred spaces around operatorsShiva Kerdel2017-02-161-1/+1
| | | | | | | | | | | | | | | | Spaces should be added around operators to improve readability and are required in some cases. Signed-off-by: Shiva Kerdel <shiva@exdev.nl> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * Staging: ks7010: ks_*: Removed blank lines before and after braces.Shiva Kerdel2017-02-121-11/+0
| | | | | | | | | | | | | | Removing unnecessary blank lines around braces to solve CHECKS. Signed-off-by: Shiva Kerdel <shiva@exdev.nl> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | net: Remove usage of net_device last_rx memberTobias Klauser2017-01-181-2/+0
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The network stack no longer uses the last_rx member of struct net_device since the bonding driver switched to use its own private last_rx in commit 9f242738376d ("bonding: use last_arp_rx in slave_last_rx()"). However, some drivers still (ab)use the field for their own purposes and some driver just update it without actually using it. Previously, there was an accompanying comment for the last_rx member added in commit 4dc89133f49b ("net: add a comment on netdev->last_rx") which asked drivers not to update is, unless really needed. However, this commend was removed in commit f8ff080dacec ("bonding: remove useless updating of slave->dev->last_rx"), so some drivers added later on still did update last_rx. Remove all usage of last_rx and switch three drivers (sky2, atp and smc91c92_cs) which actually read and write it to use their own private copy in netdev_priv. Compile-tested with allyesconfig and allmodconfig on x86 and arm. Cc: Eric Dumazet <eric.dumazet@gmail.com> Cc: Jay Vosburgh <j.vosburgh@gmail.com> Cc: Veaceslav Falico <vfalico@gmail.com> Cc: Andy Gospodarek <andy@greyhouse.net> Cc: Mirko Lindner <mlindner@marvell.com> Cc: Stephen Hemminger <stephen@networkplumber.org> Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Acked-by: Eric Dumazet <edumazet@google.com> Reviewed-by: Jay Vosburgh <jay.vosburgh@canonical.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* staging: ks7010: convert list_for_each to entry variantWei Yongjun2016-10-251-3/+1
| | | | | | | | convert list_for_each() to list_for_each_entry() where applicable. Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: ks7010: Remove braces around single statement blocksSabitha George2016-10-171-15/+8
| | | | | | | | Fixes checkpatch warning: braces{} are not necessary for single statment blocks Signed-off-by: Sabitha George <sabitha.george@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: ks7010: Add blank line after declarationsSabitha George2016-10-171-0/+6
| | | | | | | | Fixes checkpatch.pl warning :Missing a blank line after declarations Signed-off-by: Sabitha George <sabitha.george@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: ks7010: use netdev_* instead of printk()Sabitha George2016-10-161-13/+9
| | | | | | | | | 1. Fixes checkpatch warning on printk usage in ks_hostif.c 2. Dropped "ks_wlan" prefix from the messages 3. Removed the "Memory squeeze,dropping packet" messages Signed-off-by: Sabitha George <sabitha.george@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: ks7010: Delete unnecessary return statementMihaela Muraru2016-10-161-8/+0
| | | | | | | | | | | | This is a patch to ks_hostif.c file that fixes up a checkpatch.pl WARNING: void function return statements are not generally useful. The 'return' statement is not useful here, because it is not necessary to be forced the exit of the function. Signed-off-by: Mihaela Muraru <mihaela.muraru21@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: ks7010: __packed instedad of __attribute__((packed))Mihaela Muraru2016-10-161-4/+4
| | | | | | | | | | | Fix a issue found by checkpatch.pl tool: "WARNING: __packed is preferred over __attribute__((packed))". Replace __attribute__((packed)) with __packed. Signed-off-by: Mihaela Muraru <mihaela.muraru21@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: ks7010: Use printk format specifier for MAC addressesPontus Fuchs2016-10-161-29/+7
| | | | | | | Convert to %pM instead of custom code. Signed-off-by: Pontus Fuchs <pontus.fuchs@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: ks7010: fix checkpatch "space after #ifdef" errorPhilipp Hoefflin2016-10-161-1/+1
| | | | | | | | Fix checkpatch "ERROR: exactly one space required after that #ifdef" error in ks_hostif.c. Signed-off-by: Philipp Hoefflin <p.hoefflin@posteo.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: ks7010: reformat makro ps_confirm_wait_inc()Philipp Hoefflin2016-10-161-4/+5
| | | | | | | | | | | | | | | Reformat the makro ps_confirm_wait_inc() to fix several checkpatch errors and warnings: - ERROR: space required before the open brace '{' - ERROR: space required before the open parenthesis '(' - ERROR: code indent should use tabs where possible - ERROR: space required after that close brace '}' - ERROR: space required before the open parenthesis '(' - WARNING: line over 80 characters - WARNING: please, no spaces at the start of a line Signed-off-by: Philipp Hoefflin <p.hoefflin@posteo.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: ks7010: use tabs for indentationPhilipp Hoefflin2016-10-161-3/+3
| | | | | | | | Fix all occurences of checkpatch "ERROR: code indent should use tabs where possible" errors in ks_hostif.c. Signed-off-by: Philipp Hoefflin <p.hoefflin@posteo.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: ks7010: fix "prohibited space" errors reported by checkpatchPhilipp Hoefflin2016-10-161-4/+4
| | | | | | | | | | Fix all occurences of the following checkpatch errors in ks_hostif.c: - ERROR: space prohibited after that '&' (ctx:WxW) - ERROR: space prohibited after that open parenthesis '(' - ERROR: space prohibited before that close parenthesis ')' Signed-off-by: Philipp Hoefflin <p.hoefflin@posteo.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: ks7010: add blank line after variable declarationsJohan Svensson2016-09-231-0/+3
| | | | | | | | Fixes warnings found by checkpatch Missing a blank line after declarations Signed-off-by: Johan Svensson <johan.svensson692@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: ks7010: Use "foo *bar" instead of "foo * bar"Sandhya Bankar2016-09-201-1/+1
| | | | | | | This patch was found by checkpatch. Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: ks7010: Remove unnecessary variable used to store return valuesayli karnik2016-09-201-7/+3
| | | | | | | | | | | | | | | | | | | | | This patch removes an unnecessary variable used to store return values in order to reduce memory usage. Done using coccinelle: @@ type T; constant C; identifier ret; @@ - T ret = C; ... when != ret return - ret + C ; Signed-off-by: sayli karnik <karniksayli1995@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: ks7010: fixes typo in ks_hostif.cHariharan R2016-09-201-3/+3
| | | | | | | | | Fixes typo, FAILUER -> FAILURE Recieve -> Receive Signed-off-by: Hariharan R <hariharanrangasamy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: ks7010: Remove extern keyword from function declarationBhumika Goyal2016-09-171-9/+0
| | | | | | | | | | | | | | | | | Remove extern specifier from function declaration as they have it by default. Also move extern declaration from .c files to their respective header file 'ks_hostif.h'. Coccinelle was used to remove extern and other changes were done by hand. Script: @@ identifier func; type T; @@ - extern T func(...); Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: ks7010: Replace memset with eth_zero_addrBhumika Goyal2016-09-171-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | Use eth_zero_addr to assign zero address to the given address array instead of memset when the second argument in memset is address of zero. Coccinelle was used to do the replacement and add the header file linux/etherdevice.h if not already present. Script: @header@ @@ #include <linux/etherdevice.h> @r1@ expression e; @@ -memset(e,0,ETH_ALEN); +eth_zero_addr(e); @includeheader depends on r1 && !header@ @@ + #include <linux/etherdevice.h> #include <...> Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: ks7010: Remove the explicit cast on kmallocsayli karnik2016-09-161-31/+16
| | | | | | | | | The assignment operator implicitly converts a void pointer to the type of the pointer it is assigned to. Hence an explicit cast on the result of the kmalloc function is not required. Signed-off-by: sayli karnik <karniksayli1995@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: ks7010: Remove whitespace before newlineRehas Sachdeva2016-09-161-12/+12
| | | | | | | | This patch fixes the checkpatch.pl warning: WARNING: unnecessary whitespace before a quoted newline. Signed-off-by: Rehas Sachdeva <aquannie@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: ks7010: Remove the explicit NULL comparisonsayli karnik2016-09-131-15/+15
| | | | | | | | The patch removes the explicit null comparisons entirely for the ks7010 driver. This was detected by checkpatch.pl Signed-off-by: sayli karnik <karniksayli1995@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: ks7010: fix two memory leaks on error return pathColin Ian King2016-09-121-0/+2
| | | | | | | | | On the error case where there is an invalid MAC address there is memory leak on packet and pp on the error return. Free these first before returning to fix the leak. Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: ks7010: don't print skb->dev->name if skb is nullColin Ian King2016-08-211-4/+2
| | | | | | | | | A null pointer dereference will occur when skb is null and skb->dev->name is printed. Replace the skb->dev->name with plain text "ks_wlan" to fix this. Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: ks7010: declare private functions staticNicholas Mc Guire2016-08-211-2/+2
| | | | | | | | | | Private functions in ks_hostif.c can be declared static. Fixes: 13a9930d15b4 ("staging: ks7010: add driver from Nanonote extra-repository") Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org> Reviewed-by: Wolfram Sang <wsa@the-dreams.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: ks7010: fix wait_for_completion_interruptible_timeout return handlingNicholas Mc Guire2016-08-211-2/+6
| | | | | | | | | | | | | wait_for_completion_interruptible_timeout return 0 on timeout and -ERESTARTSYS if interrupted. The check for !wait_for_completion_interruptible_timeout() would report an interrupt as timeout. Further, while HZ/50 will work most of the time it could fail for HZ < 50, so this is switched to msecs_to_jiffies(20). Fixes: 13a9930d15b4 ("staging: ks7010: add driver from Nanonote extra-repository") Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: ks7010: cleanup file headersWolfram Sang2016-06-071-5/+2
| | | | | | | | Remove svn-ids and fix typos in the licence declaration. Add my copyright to the sdio code which I worked on mainly. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: ks7010: indent ks_hostif.cWolfram Sang2016-06-071-880/+1080
| | | | | Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: ks7010: remove unecessary typedefWolfram Sang2016-06-071-57/+57
| | | | | | | | Let's simply specify the struct to keep in sync with kernel coding style. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: ks7010: really iterate over multicast addressesWolfram Sang2016-06-071-1/+2
| | | | | | | The loop variable was defined but not really used. Fix this. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: ks7010: delete seperate debug headerWolfram Sang2016-06-071-1/+0
| | | | | | | Move the one debug macro to the generic wlan header. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: ks7010: remove code for old kernel versionsWolfram Sang2016-06-071-9/+0
| | | | | | | No need to be backwards compatible. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: ks7010: remove checks for WIRELESS_EXT versionWolfram Sang2016-06-071-23/+0
| | | | | | | We are by far newer than that anyhow. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: ks7010: remove non-SDIO code and #ifdefsWolfram Sang2016-06-071-70/+0
| | | | | | | | I couldn't find any trace of code or even products using ks7010 with something else than SDIO. So, remove the conditionals. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: ks7010: add driver from Nanonote extra-repositoryWolfram Sang2016-06-071-0/+2665
See the TODO for details where this driver came from. Only a few minor changes were made to make the driver suitable for staging: * updated Kconfig help text and dependencies * added TODO * removed two __DATE__ and __TIME__ printouts to allow reproducible builds * added to staging main Kconfig + Makefile Tested on a Renesas Salvator-X board with a Spectec SDW-823 card. I could connect to a WPA-protected network. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
OpenPOWER on IntegriCloud