summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2017-03-20brcmfmac: always print error when PSM's watchdog firesRafał Miłecki3-23/+34
So far we were attaching BRCMF_E_PSM_WATCHDOG event listener in brcmf_debug_attach which gets compiled only with CONFIG_BRCMDBG. This event means something went wrong and firmware / hardware usually can't be expected to work (reliably). Such a problem is significant for user experience so I believe we should print an error unconditionally (even with debugging disabled). What can be indeed optional is dumping bus memory as this is clearly part of debugging process. In the future we may also try to extend this listener by trying to recover from the error or at least signal it to the cfg80211. Signed-off-by: Rafał Miłecki <rafal@milecki.pl> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2017-03-20bcma: fill core OF info independently of bus typeRafał Miłecki1-2/+2
PCI devices can be described in DT as well so we should always execute relevant code. This will make bcma e.g. set of_node for cores described in DT. Signed-off-by: Rafał Miłecki <rafal@milecki.pl> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2017-03-20bcma: use helper function to set core dev's parentRafał Miłecki1-2/+1
A tiny code deduplication thanks to the bcma_bus_get_host_dev. Signed-off-by: Rafał Miłecki <rafal@milecki.pl> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2017-03-20bcma: drop unneeded check for CONFIG_OF_IRQRafał Miłecki1-3/+0
We already have the same check in bcma_of_get_irq which really calls symbols available with CONFIG_OF_IRQ only. It appears this duplicated check was accidentally added in commit c58d900cc96a ("bcma: fix building without OF_IRQ"). The rest of code in bcma_of_fill_device should work fine without CONFIG_OF_IRQ. Signed-off-by: Rafał Miłecki <rafal@milecki.pl> Cc: Arnd Bergmann <arnd@arndb.de> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2017-03-20rtlwifi: Add QoS-NULL and BT-QoS-NULL to reserved page.Ping-Ke Shih8-33/+287
Two additional preset responses are added to the reserved page on the wifi device. Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2017-03-20rtlwifi: Add code to read new versions of firmwareLarry Finger2-6/+24
Changes in the drivers for RTL8723BE and RTL8821AE require corresponding changes in the firmware. This new firmware has been accepted into the Linux firmware repo. To handle the case where the kernel has been updated before the firmware, the new versions have been given new names. The code will attempt to read the new name, and fall back to the old one if the new one is not available. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2017-03-20rtlwifi: Update 8812ae new phy parameters and its parser.Ping-Ke Shih3-1046/+280
Update PHY tables for the RTL8812AE. A new parser is also needed. Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2017-03-20rtlwifi: Update 8821ae new phy parameters and its parser.Ping-Ke Shih4-249/+214
There are new PHY table values for the RTL8821AE. The changes require new parsing code. Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2017-03-20mwifiex: fix kernel crash after shutdown command timeoutBrian Norris2-4/+4
We observed a SHUTDOWN command timeout during reboot stress test due to a corner case firmware bug. It can lead to either a use-after-free + OOPS (on either the adapter structure, or the 'card' structure) or an abort (where, e.g., the PCI device is "disabled" before we're done dumping the FW). We can avoid this by canceling/flushing the FW dump work: (a) after we've terminated all other work queues (e.g., for processing commands which could time out) (b) after we've disabled all interrupts (which could also queue more work for us) (c) after we've unregistered the netdev and wiphy structures (and implicitly, and debugfs entries which could manually trigger FW dumps) (d) before we've actually disabled the device (e.g., pci_device_disable()) Altogether, this means no card->work will be scheduled if we sync at a point that satisfies the above. This can be done at the beginning of the .cleanup_if() callback. Signed-off-by: Brian Norris <briannorris@chromium.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2017-03-20mwifiex: send fewer channels to scan while connectedAmitkumar Karwar1-3/+8
Application triggers periodic background scans when device is connected. We will scan less number of channels per scan command so that data traffic won't get affected. Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2017-03-20mwifiex: fix for unaligned readsDevidas Puranik9-57/+56
Using the accessor function e.g. get_unaligned_le32 instead of le32_to_cpu to avoid the unaligned access. This is for the architectures that don't handle the unaligned memory access Signed-off-by: Devidas Puranik <devidas@marvell.com> Signed-off-by: Ganapathi Bhat <gbhat@marvell.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2017-03-20mwifiex: Use accessors routines for unaligned valuesDaniel Mentz6-32/+49
Synopsys' ARCompact architecture does not support loading from or storing values to unaligned memory locations. We saw a series of misaligned access exceptions on ARC. To work around this issue, we bulk replaced le16_to_cpu and le32_to_cpu with get_unaligned_le16 and get_unaligned_le32, respectively. We also added le16_unaligned_add_cpu which is similar to le16_add_cpu but works with unaligned values. Signed-off-by: Daniel Mentz <danielmentz@google.com> Signed-off-by: Ganapathi Bhat <gbhat@marvell.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2017-03-20mwifiex: add qualifier to firmware structuresKarthik Ananthapadmanabha2-20/+20
Adding qualifier "__packed" indicates that no padding should be performed on the qualified object for alignment. This patch adds qualifier __packed to the required firmware structures in mwifiex driver. Signed-off-by: Karthik Ananthapadmanabha <karthida@marvell.com> Signed-off-by: Ganapathi Bhat <gbhat@marvell.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2017-03-20mwifiex: pcie: clean up error prints in mwifiex_pcie_reset_notify()Brian Norris1-12/+5
We shouldn't be printing a kernel pointer as a decimal integer. But we really shouldn't be printing this case at all; we should never get here with NULL drvdata. We've eliminated this unnecessary conditional in several other places, so kill it here too. Similarly, there's no need to check for '!pdev'; we are guaranteed to have a real device here. And finally, use dev_err() instead of pr_err(). This yields (for failed PCIe resets): [ 68.286586] mwifiex_pcie 0000:01:00.0: mwifiex_pcie_reset_notify: adapter structure is not valid instead of: [ 82.932658] mwifiex_pcie: mwifiex_pcie_reset_notify: Card or adapter structure is not valid (-270880688088) Signed-off-by: Brian Norris <briannorris@chromium.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2017-03-20mwifiex: wake system up when receives a wake irqJeffy Chen1-0/+3
Currrently we are disabling this wake irq after receiving it. If this happens before we finish suspend and the pm event check is disabled, the system will continue suspending, and this irq would not work again. We may need to abort system suspend to avoid that. Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2017-03-20atmel: remove time_t usageAlexandre Belloni1-1/+1
last_qual never really holds a time. It only holds jiffies. Make it the same type as jiffies. Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2017-03-08rtlwifi: fix spelling mistake: "conuntry" -> "country"Colin Ian King1-1/+1
trivial fix to spelling mistake in RT_TRACE message Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2017-03-08rtl8187: Enable monitor mode to fix multicast receptionNils Holland1-9/+7
The rtl8187 cards don't seem to receive multicast frames, which, among other things, makes them fail to receive RAs in IPv6 networks. The cause seems to be that the RTL818X_RX_CONF_MULTICAST flag doesn't have the desired effect. Fix the issue by setting RTL818X_RX_CONF_MONITOR instead, which puts the card into monitor mode and resolves the problem so that multicast frames are sucessfully passed to the kernel. The existence of the problem and the effectiveness of the solution has originally been confirmed on an 8187B based card with the USB id of 0bda:8197. Subsequent testing by Larry Finger on an 8187L based card, which follows the second (8187, i.e. "non-b") code path in the driver, has confirmed that the fix does not cause any noticeable regresssions there either. Signed-off-by: Nils Holland <nholland@tisys.org> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2017-03-08rt2x00: fix rt2x00debug_dump_frame commentStanislaw Gruszka1-1/+1
Reported-by: Jeroen Roovers <jer@airfi.aero> Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2017-03-08rt2800: use TXOP_BACKOFF for probe framesStanislaw Gruszka1-3/+4
Even if we do not set AMPDU bit in TXWI, device still can aggregate frame and send it with rate not corresponding to requested. That mean we can do not sent probe frames with requested rate. To prevent that use TXOP_BACKOFF for probe frames. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2017-03-08rt2800: status based rate flags for nomatch caseStanislaw Gruszka2-1/+36
We use skb_desc->tx_rate_flags from entry as rate[].flags even if skb does not match status. Patch corrects flags and also fixes mcs for legacy rates. rt2800_rate_from_status() is based on Felix's mt76 mt76x2_mac_process_tx_rate() function. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2017-03-08rt2x00: use txdone_nomatch on rt2800usbStanislaw Gruszka4-19/+35
If we do not match skb entry, provide tx status via nomatch procedure. Currently in that case we do rt2x00lib_txdone_noinfo(TXDONE_NOINFO), which actually assume that entry->skb was posted without retries and provide rate saved in skb desc as successful. Patch changed that to rate read from TX_STAT_FIFO, however still do not provide correct number of retries. On SoC/PCI devices we keep providing status via standard txdone procedure, no change in those devices, though we should thing about it. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2017-03-08rt2x00: fixup fill_tx_status for nomatch caseStanislaw Gruszka2-1/+6
Add bits rt2x00lib_fill_tx_status() when filling status in nomatch case and hopefully do not break the function for existing cases. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2017-03-08rt2x00: add txdone nomatch functionStanislaw Gruszka2-0/+52
This txdone nomatch function will be used when we get status from the HW, but we could not match it with any sent skb. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2017-03-08rt2x00: separte clearing entry from rt2x00lib_txdoneStanislaw Gruszka1-22/+29
This makes rt2x00lib_txdone a bit simpler and will allow to reuse code in different variant of txdone which I'm preparing. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2017-03-08rt2x00: separte filling tx status from rt2x00lib_txdoneStanislaw Gruszka1-65/+76
This makes rt2x00lib_txdone a bit simpler and will allow to reuse code in different variant of txdone which I'm preparing. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2017-03-08rt2800: identify station based on status WCIDStanislaw Gruszka3-1/+8
Add framework to identify sta based on tx status WCID. This is currently not used, will start be utilized in the future patch. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2017-03-08rt2x00: rt2800lib: move rt2800_drv_data declaration into rt2800lib.hGabor Juhos2-25/+23
The rt2800_drv_data structure contains driver specific information. Move the declaration into the rt2800lib.h header which is a more logical place for it. Also fix the comment style to avoid checkpatch warning. The patch contains no functional changes, it is in preparation for the next patch. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Signed-off-by: Daniel Golle <daniel@makrotopia.org> Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2017-03-08bcma: gpio: set of_node regardless of the host typeRafał Miłecki1-2/+1
DT allows describing many device types, not only platform ones. If e.g. bcma is hosted on PCI(e) and it has its of_node, let's pass it to the GPIO subsystem. This allows GPIO code to handle more hardware details not only for bcma on a SoC. Signed-off-by: Rafał Miłecki <rafal@milecki.pl> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2017-03-07decnet: Use TCP nagle macro instead of literal number in decnetGao Feng1-6/+7
Use existing TCP nagle macro TCP_NAGLE_OFF and TCP_NAGLE_CORK instead of the literal number 1 and 2 in the current decnet codes. Signed-off-by: Gao Feng <fgao@ikuai8.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-03-07net: qcom/emac: optimize QDF2400 SGMII RX/TX impedence valuesTimur Tabi1-0/+6
Adjust the impedance values of the RX and TX lanes in the SGMII block so that they are closer to optimal values. Signed-off-by: Timur Tabi <timur@codeaurora.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-03-06Merge branch 'bgmac-cleanups-PM-support'David S. Miller4-37/+116
Jon Mason says: ==================== net: ethernet: bgmac: PM support and clean-ups Changes in v3: * Corrected a bug Florian found and added his Reviewed-by Changes in v2: * Reworked the PM patch with Florian's suggestions Add code to support Power Management (only tested on NS2), and add some code clean-ups ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2017-03-06net: ethernet: bgmac: driver power manangementJoey Zhong3-0/+87
Implement suspend/resume callbacks in the bgmac driver. This makes sure that we de-initialize and re-initialize the hardware correctly before entering suspend and when resuming. Signed-off-by: Joey Zhong <zhongx@broadcom.com> Signed-off-by: Jon Mason <jon.mason@broadcom.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-03-06net: ethernet: bgmac: unify code of the same familyJon Mason1-36/+28
BCM471X and BCM535X are of the same family (from what I can derive from internal documents). Group them into the case statement together, which results in more code reuse. Also, use existing helper variables to make the code a little more readable too. Signed-off-by: Jon Mason <jon.mason@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-03-06net: ethernet: bgmac: use #defines for MAX sizeJon Mason1-1/+1
The maximum frame size is really just the standard ethernet frame size and FCS. So use those existing defines to make the code a little more beautiful. Signed-off-by: Jon Mason <jon.mason@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-03-06net: axienet: use eth_hw_addr_random()Tobias Klauser1-1/+1
Use eth_hw_addr_random() to set a random MAC address in order to make sure ndev->addr_assign_type will be properly set to NET_ADDR_RANDOM. Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-03-06Merge branch 'netvsc-NAPI'David S. Miller6-143/+242
Stephen Hemminger says: ==================== NAPI support for Hyper-V These patches enable NAPI, GRO and napi_alloc_skb for Hyper-V netvsc driver. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2017-03-06netvsc: replace netdev_alloc_skb_ip_align with napi_alloc_skbstephen hemminger1-2/+4
Gives potential performance gain. Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-03-06netvsc: enable GROstephen hemminger1-4/+4
Use GRO when receiving packets. Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-03-06netvsc: implement NAPIstephen hemminger4-47/+102
Use NAPI (softirq), to handle receive packets and send completions. Previously this was handled by tasklet. Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-03-06vmbus: introduce in-place packet iteratorstephen hemminger3-91/+133
This is mostly just a refactoring of previous functions (get_pkt_next_raw, put_pkt_raw and commit_rd_index) to make it easier to use for other drivers and NAPI. Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-03-06netvsc: don't overload variable in same functionstephen hemminger1-2/+2
There are two variables named packet in the same function. One is the metadata descriptor from host (vmpacket_descriptor) and the other is the control block in the skb used to hold metadata from send. Change name to avoid possible confusion and bugs. Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-03-06tools: hv: Add clean up function for Ubuntu configHaiyang Zhang1-0/+18
This patch adds a function to clean up duplicate config info on Ubuntu. Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-03-06ipv6: Provide ipv6 version of "disable_policy" sysctlDavid Forster3-0/+116
This provides equivalent functionality to the existing ipv4 "disable_policy" systcl. ie. Allows IPsec processing to be skipped on terminating packets on a per-interface basis. Signed-off-by: David Forster <dforster@brocade.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-03-06net: smsc: smc91c92_cs: use new api ethtool_{get|set}_link_ksettingsPhilippe Reynes1-46/+52
The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes <tremyfr@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-03-06net: smsc: epic100: use new api ethtool_{get|set}_link_ksettingsPhilippe Reynes1-7/+9
The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes <tremyfr@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-03-06net: sis: sis900: use new api ethtool_{get|set}_link_ksettingsPhilippe Reynes1-9/+9
The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes <tremyfr@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-03-06net: sis: sis190: use new api ethtool_{get|set}_link_ksettingsPhilippe Reynes1-6/+8
The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes <tremyfr@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-03-06net: silan: sc92031: use new api ethtool_{get|set}_link_ksettingsPhilippe Reynes1-36/+47
The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes <tremyfr@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-03-06net: sgi: ioc3-eth: use new api ethtool_{get|set}_link_ksettingsPhilippe Reynes1-6/+8
The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes <tremyfr@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>