summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rsi
Commit message (Collapse)AuthorAgeFilesLines
* mac80211: allow to transmit A-MSDU within A-MPDUEmmanuel Grumbach2015-09-221-1/+3
| | | | | | | | | Advertise the capability to send A-MSDU within A-MPDU in the AddBA request sent by mac80211. Let the driver know about the peer's capabilities. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* rsi: Fix possible leak when loading firmwareChristian Engelmayer2015-08-252-4/+12
| | | | | | | | | | | | Commit 5d5cd85ff441 ("rsi: Fix failure to load firmware after memory leak fix and fix the leak") also added a check on the allocation of DMA-accessible memory that may directly return. In that case the already allocated firmware data is leaked. Make sure the data is always freed correctly. Detected by Coverity CID 1316519. Fixes: 5d5cd85ff441 ("rsi: Fix failure to load firmware after memory leak fix and fix the leak") Signed-off-by: Christian Engelmayer <cengelma@gmx.at> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rsi: Fix failure to load firmware after memory leak fix and fix the leakMike Looijmans2015-07-312-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | Fixes commit eae79b4f3e82 ("rsi: fix memory leak in rsi_load_ta_instructions()") which stopped the driver from functioning. Firmware data has been allocated using vmalloc(), resulting in memory that cannot be used for DMA. Hence the firmware was first copied to a buffer allocated with kmalloc() in the original code. This patch reverts the commit and only calls "kfree()" to release the buffer after sending the data. This fixes the memory leak without breaking the driver. Add a comment to the kmemdup() calls to explain why this is done, and abort if memory allocation fails. Tested on a Topic Miami-Florida board which contains the rsi SDIO chip. Also added the same kfree() call to the USB glue driver. This was not tested on actual hardware though, as I only have the SDIO version. Fixes: eae79b4f3e82 ("rsi: fix memory leak in rsi_load_ta_instructions()") Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl> Cc: stable@vger.kernel.org Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* mac80211: convert HW flags to unsigned long bitmapJohannes Berg2015-06-101-4/+3
| | | | | | | | | | | | | | | As we're running out of hardware capability flags pretty quickly, convert them to use the regular test_bit() style unsigned long bitmaps. This introduces a number of helper functions/macros to set and to test the bits, along with new debugfs code. The occurrences of an explicit __clear_bit() are intentional, the drivers were never supposed to change their supported bits on the fly. We should investigate changing this to be a per-frame flag. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* rsi: fix memory leak in rsi_load_ta_instructions()Alexey Khoroshilov2014-12-241-3/+1
| | | | | | | | | | | Memory allocated by kmemdup() in rsi_load_ta_instructions() is leaked. But duplication of firmware data here is useless, so the patch removes kmemdup() at all. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* rsi: fix memory leaks and error handling in rsi_91x_usbAlexey Khoroshilov2014-07-011-20/+38
| | | | | | | | | | | | | | | The patch fixes a couple of issues: - absence of deallocation of rsi_dev->rx_usb_urb[0] in the driver; - potential NULL pointer dereference because of lack of checks for memory allocation success in rsi_init_usb_interface(). By the way, it makes rsi_probe() returning error code instead of 1 and fixes comments regarding returning values. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rsi: GFP_ATOMIC is not needed in rsi_init_usb_interface()Alexey Khoroshilov2014-07-011-1/+1
| | | | | Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rsi: Fixed warnings reported by static code analyzers.Jahnavi Meher2014-06-251-5/+7
| | | | | | | | Fixed a warning related to incorrect return type and removed an unnecessary semi colon. Signed-off-by: Jahnavi Meher <jahnavi.meher@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rsi: Fixed errors and warnings reported by static code analyzers.Jahnavi Meher2014-06-251-2/+3
| | | | | | | | Fixed a potential buffer overflow in 'rsi_rates' and a sparse warning related to difference in endianness in rsi_91x_mgmt.c. Signed-off-by: Jahnavi Meher <jahnavi.meher@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rsi: Changes for 40MHzJahnavi Meher2014-06-193-22/+31
| | | | | | | Added code required for 40MHz. Signed-off-by: Jahnavi Meher <jahnavi.meher@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rsi: Adding support for host based bgscan.Jahnavi Meher2014-06-194-12/+160
| | | | | | | | | Added support for host based bgscan. The h/w queues are blocked while bgscan is being performed and after coming to the connected channel, the queues are unblocked. Signed-off-by: Jahnavi Meher <jahnavi.meher@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rsi: Adding support for 5GHzJahnavi Meher2014-06-193-12/+87
| | | | | | | Adding support for 5GHz. Signed-off-by: Jahnavi Meher <jahnavi.meher@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rsi: Sending QoS null packet via the mgmt queue.Jahnavi Meher2014-06-191-1/+2
| | | | | | | Send the QoS null packet via mgmt queue. Signed-off-by: Jahnavi Meher <jahnavi.meher@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rsi: Added debug messages.Jahnavi Meher2014-06-191-0/+2
| | | | | | | Added some debug messages. Signed-off-by: Jahnavi Meher <jahnavi.meher@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rsi: Changed the logic of dequeuing packets from hal queues.Jahnavi Meher2014-06-192-24/+59
| | | | | | | | | The number of packets being dequeued from s/w queues was fixed - changed it to a dynamic calculation based on txop. There are also some fixes to the dequeuing algorithm. Signed-off-by: Jahnavi Meher <jahnavi.meher@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rsi: Changed the SDIO interrupt variables and some clean up.Jahnavi Meher2014-06-192-7/+9
| | | | | | | Changed the SDIO interrupt variables and some clean ups. Signed-off-by: Jahnavi Meher <jahnavi.meher@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rsi: Use SGI if configured for fixed rate transmission.Jahnavi Meher2014-06-192-0/+7
| | | | | | | Use SGI if configured while sending data packets at a fixed rate. Signed-off-by: Jahnavi Meher <jahnavi.meher@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rsi: Lower level debug messages and changed handling of confirm received for ↵Jahnavi Meher2014-06-191-3/+6
| | | | | | | | | | rsi_program_bb_rf(). Lower level debug messages for some frames and changed confirm received for rsi_program_bb_rf() to a valid case. Signed-off-by: Jahnavi Meher <jahnavi.meher@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rsi: Changed rate handling.Jahnavi Meher2014-06-191-19/+16
| | | | | | | Changed rate handling. Signed-off-by: Jahnavi Meher <jahnavi.meher@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rsi: Changed the rsi_set_channel() and rsi_program_bb_rf().Jahnavi Meher2014-06-191-18/+2
| | | | | | | | Made required changes to rsi_set_channel() and rsi_program_bb_rf() functions. Signed-off-by: Jahnavi Meher <jahnavi.meher@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rsi: Changed the radio caps frame.Jahnavi Meher2014-06-192-0/+22
| | | | | | | Changed the radio caps frame and added the required fields. Signed-off-by: Jahnavi Meher <jahnavi.meher@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rsi: Add macros for endpoints and set default value of endpoint.Jahnavi Meher2014-06-192-0/+6
| | | | | | | | Added macros for the endpoints and set the default value of endpoint to 2.4GHz and 20MHz. Signed-off-by: Jahnavi Meher <jahnavi.meher@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rsi: Using band from rsi_common to fill in ieee80211_rx_statusJahnavi Meher2014-06-191-4/+1
| | | | | | | Filling in band from common->band. Signed-off-by: Jahnavi Meher <jahnavi.meher@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rsi: Fixed the kernel docJahnavi Meher2014-06-191-1/+1
| | | | | | | Changed the function header to match the function name. Signed-off-by: Jahnavi Meher <jahnavi.meher@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rsi: Mapping the debugfs stats to the correct s/w queues.Jahnavi Meher2014-06-191-5/+5
| | | | | | | Changed the queue numbers to macros, and corrected the mappings. Signed-off-by: Jahnavi Meher <jahnavi.meher@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rsi_91x_sdio: add error handling into rsi_module_init()Alexey Khoroshilov2014-06-191-2/+4
| | | | | | | Fix rsi_module_init() to propagate sdio_register_driver() errors. Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rsi: Use module_usb_driverAlexey Khoroshilov2014-06-191-27/+1
| | | | | | | | | | module_usb_driver eliminates the boilerplate and makes the code simpler, in addition to the fact currently rsi_module_init() ignores usb_deregister() error. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-nextLinus Torvalds2014-06-124-3/+5
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull networking updates from David Miller: 1) Seccomp BPF filters can now be JIT'd, from Alexei Starovoitov. 2) Multiqueue support in xen-netback and xen-netfront, from Andrew J Benniston. 3) Allow tweaking of aggregation settings in cdc_ncm driver, from Bjørn Mork. 4) BPF now has a "random" opcode, from Chema Gonzalez. 5) Add more BPF documentation and improve test framework, from Daniel Borkmann. 6) Support TCP fastopen over ipv6, from Daniel Lee. 7) Add software TSO helper functions and use them to support software TSO in mvneta and mv643xx_eth drivers. From Ezequiel Garcia. 8) Support software TSO in fec driver too, from Nimrod Andy. 9) Add Broadcom SYSTEMPORT driver, from Florian Fainelli. 10) Handle broadcasts more gracefully over macvlan when there are large numbers of interfaces configured, from Herbert Xu. 11) Allow more control over fwmark used for non-socket based responses, from Lorenzo Colitti. 12) Do TCP congestion window limiting based upon measurements, from Neal Cardwell. 13) Support busy polling in SCTP, from Neal Horman. 14) Allow RSS key to be configured via ethtool, from Venkata Duvvuru. 15) Bridge promisc mode handling improvements from Vlad Yasevich. 16) Don't use inetpeer entries to implement ID generation any more, it performs poorly, from Eric Dumazet. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1522 commits) rtnetlink: fix userspace API breakage for iproute2 < v3.9.0 tcp: fixing TLP's FIN recovery net: fec: Add software TSO support net: fec: Add Scatter/gather support net: fec: Increase buffer descriptor entry number net: fec: Factorize feature setting net: fec: Enable IP header hardware checksum net: fec: Factorize the .xmit transmit function bridge: fix compile error when compiling without IPv6 support bridge: fix smatch warning / potential null pointer dereference via-rhine: fix full-duplex with autoneg disable bnx2x: Enlarge the dorq threshold for VFs bnx2x: Check for UNDI in uncommon branch bnx2x: Fix 1G-baseT link bnx2x: Fix link for KR with swapped polarity lane sctp: Fix sk_ack_backlog wrap-around problem net/core: Add VF link state control policy net/fsl: xgmac_mdio is dependent on OF_MDIO net/fsl: Make xgmac_mdio read error message useful net_sched: drr: warn when qdisc is not work conserving ...
| * rsi: avoid format string leak to thread nameKees Cook2014-05-291-1/+1
| | | | | | | | | | | | | | | | | | Since the rsi_create_kthread interface does not include any format string arguments, make sure that the resulting thread name can never accidentally process the name as a format string. Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * rsi: Changed the return value to enable BA set-upJahnavi Meher2014-05-131-0/+1
| | | | | | | | | | Signed-off-by: Jahnavi Meher <jahnavi.meher@redpinesignals.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * rsi: Changing opcode for sta mode according to changes in firmwareJahnavi Meher2014-04-302-2/+3
| | | | | | | | | | Signed-off-by: Jahnavi Meher <jahnavi.meher@redpinesignals.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | mmc: drop the speed mode of card's stateSeungwon Jeon2014-05-121-3/+1
|/ | | | | | | | | | | Timing mode identifier has same role and can take the place of speed mode. This change removes all related speed mode. Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com> Tested-by: Jaehoon Chung <jh80.chung@samsung.com> Acked-by: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Chris Ball <chris@printf.net>
* rsi: Fix a potential memory leak in rsi_send_auto_rate_request()Christian Engelmayer2014-04-141-0/+1
| | | | | | | | | | Fix a potential memory leak in the error path of function rsi_send_auto_rate_request(). In case memory allocation for array 'selected_rates' fails, the error path exits and leaves the previously allocated skb in place. Detected by Coverity: CID 1195575. Signed-off-by: Christian Engelmayer <cengelma@gmx.at> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rsi: Fix a potential memory leak in rsi_set_channel()Christian Engelmayer2014-04-141-10/+10
| | | | | | | | | | | Fix a potential memory leak in function rsi_set_channel() that is used to program channel changes. The channel check block for the frequency bands directly exits the function in case of an error, thus leaving an already allocated skb unreferenced. Move the checks above allocating the skb. Detected by Coverity: CID 1195576. Signed-off-by: Christian Engelmayer <cengelma@gmx.at> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rsi: Add missing initialization of iiGeert Uytterhoeven2014-04-141-1/+1
| | | | | | | | drivers/net/wireless/rsi/rsi_91x_core.c: In function ‘rsi_core_determine_hal_queue’: drivers/net/wireless/rsi/rsi_91x_core.c:91: warning: ‘ii’ may be used uninitialized in this function Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rsi: Fixed issue relating to doing dma on stack error.Fariya Fatima2014-04-091-7/+19
| | | | | Signed-off-by: Fariya Fatima <fariyaf@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rsi: Fixed issue relating to index of q_num.Fariya Fatima2014-04-091-2/+4
| | | | | Signed-off-by: Fariya Fatima <fariyaf@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rsi: Fixed issue relating to return value.Fariya Fatima2014-04-091-4/+2
| | | | | Signed-off-by: Fariya Fatima <fariyaf@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rsi: Fixed issue relating to variable de-referenced before check 'adapter'Fariya Fatima2014-04-091-2/+3
| | | | | Signed-off-by: Fariya Fatima <fariyaf@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rsi: Fixed signedness bug reported by static code analyzer.Fariya Fatima2014-04-091-3/+5
| | | | | Signed-off-by: Fariya Fatima <fariyaf@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rsi: Potential null pointer derefernce issue fixed.Fariya Fatima2014-04-091-19/+16
| | | | | Signed-off-by: Fariya Fatima <fariyaf@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rsi: rsi_91x: misleading debug printkDan Carpenter2014-03-311-1/+2
| | | | | | | | There is a missing set of curly braces here so the debug output says "Probe confirm received" unintentionally. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rsi: Add pr_fmt,__printf, fix format & arg mismatchJoe Perches2014-03-193-2/+5
| | | | | | | | | | Emit a prefix for the rsi_dbg messages. Fix the format and argument mismatch and add __printf(2, 3) to try to avoid more. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rsi: make rsi_dbg a regular functionJohn W. Linville2014-03-182-15/+24
| | | | | | | | | | | | This is to address reports of this: In file included from drivers/net/wireless/rsi/rsi_mgmt.h:22:0, from drivers/net/wireless/rsi/rsi_91x_core.c:17: drivers/net/wireless/rsi/rsi_91x_core.c: In function 'rsi_dbg': drivers/net/wireless/rsi/rsi_main.h:44:20: error: function 'rsi_dbg' can never be inlined because it uses variable argument lists static inline void rsi_dbg(u32 zone, const char *fmt, ...) Signed-off-by: John W. Linville <linville@tuxdriver.com>
* rsi: Add RS9113 wireless driverFariya Fatima2014-03-1719-0/+6642
This patch adds the Redpine Signals' 91x wireless driver. Signed-off-by: Fariya Fatima <fariyaf@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
OpenPOWER on IntegriCloud