summaryrefslogtreecommitdiffstats
path: root/drivers/net
AgeCommit message (Collapse)Author
2014-09-15brcmfmac: obtain ifp through wdev structureArend van Spriel
For P2P_DEVICE interface the function brcmf_cfg80211_update_proto_addr_mode() resulted in a crash, because it assumed wdev->netdev would be valid. The ifp should be obtained through the driver vif structure which contains the wireless_dev. Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Reviewed-by: Daniel (Deognyoun) Kim <dekim@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-09-15brcmfmac: conditionally compile firmware protocol source codeArend van Spriel
The host-interface can select which protocol implementation it needs. Selecting PCIe will include the msgbuf protocol and selecting USB and/or SDIO will include the bcdc protocol. The PCIe kconfig option assures the dependencies for msgbuf are met, ie. HAS_DMA. Reported-by: Geert Uytterhoeven <geert@linux-m68k.org> Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Reviewed-by: Daniel (Deognyoun) Kim <dekim@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-09-15brcmfmac: Fix memory leak and missing assignment.Hante Meuleman
The function brcmf_enable_bw40_2g contains a memory leak. The function is also missing initialisation of one of the members of ch struct, which can lead to warning but this has no impact on result. Reviewed-by: Arend Van Spriel <arend@broadcom.com> Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Daniel (Deognyoun) Kim <dekim@broadcom.com> Signed-off-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-09-15net/phy: micrel: Disable asymmetric pause for KSZ9031Mike Looijmans
The KSZ9031 appears to suffer from the same hardware bug as described for the KSZ9021 in commit 32fcafbcd1c9f6c7013016a22a5369b4acb93577 ("net/phy: micrel: Disable asymmetric pause for KSZ9021") you have to unplug the cable and plug it back to get it to work. Remove the SUPPORTED_Asym_Pause flag for the KSZ9031 to fix this. Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-09-13bonding: fix div by zero while enslaving and transmittingNikolay Aleksandrov
The problem is that the slave is first linked and slave_cnt is incremented afterwards leading to a div by zero in the modes that use it as a modulus. What happens is that in bond_start_xmit() bond_has_slaves() is used to evaluate further transmission and it becomes true after the slave is linked in, but when slave_cnt is used in the xmit path it is still 0, so fetch it once and transmit based on that. Since it is used only in round-robin and XOR modes, the fix is only for them. Thanks to Eric Dumazet for pointing out the fault in my first try to fix this. Call trace (took it out of net-next kernel, but it's the same with net): [46934.330038] divide error: 0000 [#1] SMP [46934.330041] Modules linked in: bonding(O) 9p fscache snd_hda_codec_generic crct10dif_pclmul [46934.330041] bond0: Enslaving eth1 as an active interface with an up link [46934.330051] ppdev joydev crc32_pclmul crc32c_intel 9pnet_virtio ghash_clmulni_intel snd_hda_intel 9pnet snd_hda_controller parport_pc serio_raw pcspkr snd_hda_codec parport virtio_balloon virtio_console snd_hwdep snd_pcm pvpanic i2c_piix4 snd_timer i2ccore snd soundcore virtio_blk virtio_net virtio_pci virtio_ring virtio ata_generic pata_acpi floppy [last unloaded: bonding] [46934.330053] CPU: 1 PID: 3382 Comm: ping Tainted: G O 3.17.0-rc4+ #27 [46934.330053] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [46934.330054] task: ffff88005aebf2c0 ti: ffff88005b728000 task.ti: ffff88005b728000 [46934.330059] RIP: 0010:[<ffffffffa0198c33>] [<ffffffffa0198c33>] bond_start_xmit+0x1c3/0x450 [bonding] [46934.330060] RSP: 0018:ffff88005b72b7f8 EFLAGS: 00010246 [46934.330060] RAX: 0000000000000679 RBX: ffff88004b077000 RCX: 000000000000002a [46934.330061] RDX: 0000000000000000 RSI: ffff88004b3f0500 RDI: ffff88004b077940 [46934.330061] RBP: ffff88005b72b830 R08: 00000000000000c0 R09: ffff88004a83e000 [46934.330062] R10: 000000000000ffff R11: ffff88004b1f12c0 R12: ffff88004b3f0500 [46934.330062] R13: ffff88004b3f0500 R14: 000000000000002a R15: ffff88004b077940 [46934.330063] FS: 00007fbd91a4c740(0000) GS:ffff88005f080000(0000) knlGS:0000000000000000 [46934.330064] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [46934.330064] CR2: 00007f803a8bb000 CR3: 000000004b2c9000 CR4: 00000000000406e0 [46934.330069] Stack: [46934.330071] ffffffff811e6169 00000000e772fa05 ffff88004b077000 ffff88004b3f0500 [46934.330072] ffffffff81d17d18 000000000000002a 0000000000000000 ffff88005b72b8a0 [46934.330073] ffffffff81620108 ffffffff8161fe0e ffff88005b72b8c4 ffff88005b302000 [46934.330073] Call Trace: [46934.330077] [<ffffffff811e6169>] ? __kmalloc_node_track_caller+0x119/0x300 [46934.330084] [<ffffffff81620108>] dev_hard_start_xmit+0x188/0x410 [46934.330086] [<ffffffff8161fe0e>] ? harmonize_features+0x2e/0x90 [46934.330088] [<ffffffff81620b06>] __dev_queue_xmit+0x456/0x590 [46934.330089] [<ffffffff81620c50>] dev_queue_xmit+0x10/0x20 [46934.330090] [<ffffffff8168f022>] arp_xmit+0x22/0x60 [46934.330091] [<ffffffff8168f090>] arp_send.part.16+0x30/0x40 [46934.330092] [<ffffffff8168f1e5>] arp_solicit+0x115/0x2b0 [46934.330094] [<ffffffff8160b5d7>] ? copy_skb_header+0x17/0xa0 [46934.330096] [<ffffffff8162875a>] neigh_probe+0x4a/0x70 [46934.330097] [<ffffffff8162979c>] __neigh_event_send+0xac/0x230 [46934.330098] [<ffffffff8162a00b>] neigh_resolve_output+0x13b/0x220 [46934.330100] [<ffffffff8165f120>] ? ip_forward_options+0x1c0/0x1c0 [46934.330101] [<ffffffff81660478>] ip_finish_output+0x1f8/0x860 [46934.330102] [<ffffffff81661f08>] ip_output+0x58/0x90 [46934.330103] [<ffffffff81661602>] ? __ip_local_out+0xa2/0xb0 [46934.330104] [<ffffffff81661640>] ip_local_out_sk+0x30/0x40 [46934.330105] [<ffffffff81662a66>] ip_send_skb+0x16/0x50 [46934.330106] [<ffffffff81662ad3>] ip_push_pending_frames+0x33/0x40 [46934.330107] [<ffffffff8168854c>] raw_sendmsg+0x88c/0xa30 [46934.330110] [<ffffffff81612b31>] ? skb_recv_datagram+0x41/0x60 [46934.330111] [<ffffffff816875a9>] ? raw_recvmsg+0xa9/0x1f0 [46934.330113] [<ffffffff816978d4>] inet_sendmsg+0x74/0xc0 [46934.330114] [<ffffffff81697a9b>] ? inet_recvmsg+0x8b/0xb0 [46934.330115] bond0: Adding slave eth2 [46934.330116] [<ffffffff8160357c>] sock_sendmsg+0x9c/0xe0 [46934.330118] [<ffffffff81603248>] ? move_addr_to_kernel.part.20+0x28/0x80 [46934.330121] [<ffffffff811b4477>] ? might_fault+0x47/0x50 [46934.330122] [<ffffffff816039b9>] ___sys_sendmsg+0x3a9/0x3c0 [46934.330125] [<ffffffff8144a14a>] ? n_tty_write+0x3aa/0x530 [46934.330127] [<ffffffff810d1ae4>] ? __wake_up+0x44/0x50 [46934.330129] [<ffffffff81242b38>] ? fsnotify+0x238/0x310 [46934.330130] [<ffffffff816048a1>] __sys_sendmsg+0x51/0x90 [46934.330131] [<ffffffff816048f2>] SyS_sendmsg+0x12/0x20 [46934.330134] [<ffffffff81738b29>] system_call_fastpath+0x16/0x1b [46934.330144] Code: 48 8b 10 4c 89 ee 4c 89 ff e8 aa bc ff ff 31 c0 e9 1a ff ff ff 0f 1f 00 4c 89 ee 4c 89 ff e8 65 fb ff ff 31 d2 4c 89 ee 4c 89 ff <f7> b3 64 09 00 00 e8 02 bd ff ff 31 c0 e9 f2 fe ff ff 0f 1f 00 [46934.330146] RIP [<ffffffffa0198c33>] bond_start_xmit+0x1c3/0x450 [bonding] [46934.330146] RSP <ffff88005b72b7f8> CC: Eric Dumazet <eric.dumazet@gmail.com> CC: Andy Gospodarek <andy@greyhouse.net> CC: Jay Vosburgh <j.vosburgh@gmail.com> CC: Veaceslav Falico <vfalico@gmail.com> Fixes: 278b208375 ("bonding: initial RCU conversion") Signed-off-by: Nikolay Aleksandrov <nikolay@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-09-13r8169: fix setting rx vlanhayeswang
The setting should depend on the new features not the current one. Signed-off-by: Hayes Wang <hayeswang@realtek.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-09-13r8169: fix the default setting of rx vlanhayeswang
If the parameter "features" of __rtl8169_set_features() is equal to dev->features, the variable "changed" is alwayes 0, and nothing would be changed. Signed-off-by: Hayes Wang <hayeswang@realtek.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-09-13drivers: net: cpsw: dual_emac: in suspend/resume bring down/up all the netdevMugunthan V N
During suspend and resume in Dual EMAC, second port is not working as in suspend/resume only the first slave netdev is closed and opened. So bring down and up all the interfaces that are up during suspend/resume. Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com> Tested-by: Nishanth Menon <nm@ti.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-09-12drivers: net: b44: Fix typo in returning multicast statsMark Einon
nstat->multicast refers to received packets, not transmitted as is returned here. Change it so that received packet stats are given. Signed-off-by: Mark Einon <mark.einon@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-09-12Merge tag 'master-2014-09-11' of ↵David S. Miller
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless John W. Linville says: ==================== pull request: wireless 2014-09-11 Please pull this batch of fixes intended for the 3.17 stream: For the mac80211 bits, Johannes says: "Two more fixes for mac80211 - one of them addresses a long-standing issue that we only found when using vendor events more frequently; the other addresses some bad information being reported in userspace that people were starting to actually look at." For the iwlwifi bits, Emmanuel says: "I re-enable scheduled scan on firmware that contain the fix for the bug that Linus reported. A few trivial fixes: endianity issues, the same DTIM period fix that I did in mac80211. Eyal fixes a few issues we identified with EAPOL, we now send them just as if they were management frames, this solves interrop issues. Johannes has another set of trivial fixes, while Luca fixes the way we configure the filters in the firmware. Last but not least, a new device is added by Oren." Emmanuel was traveling, resulting in his pull to be a bit larger than I would have liked to see at this point. FWIW, I have asked Emmanuel to be much more strict for any more pull requests in this cycle. In addition to the above, Sujith Manoharan reverts an earlier ath9k patch. The earlier change was found to allow for the device to sleep too long and miss beacons. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2014-09-12Merge tag 'linux-can-fixes-for-3.17-20140911' of ↵David S. Miller
git://gitorious.org/linux-can/linux-can Marc Kleine-Budde says: ==================== pull-request: can 2014-09-11 this is a pull request for the current release cycle of a single patch. The patch by David Jander fixes a scheduling while atomic problem in the flexcan driver, that was introduced by me in v3.14-rc6. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2014-09-12net: arc_emac: prevent reuse of unreclaimed tx descriptorsBeniamino Galvani
This patch changes the logic in tx path to ensure that tx descriptors are reused for transmission only after they have been reclaimed by arc_emac_tx_clean(). Signed-off-by: Beniamino Galvani <b.galvani@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-09-12net: arc_emac: enable tx interruptsBeniamino Galvani
In the current implementation the cleaning of tx ring is done by the NAPI poll handler, which is scheduled after rx interrupts. Thus, in absence of received packets the reclaim of used tx buffers is never executed, blocking further transmission. This can be easily reproduced starting the transmission of a UDP flow with iperf, which blocks almost immediately because skbs are not returned to the stack and the socket send buffer becomes full. The patch enables tx interrupts so that the tx reclaim is scheduled after completed transmissions. Signed-off-by: Beniamino Galvani <b.galvani@gmail.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-09-11Revert "ath9k: Calculate sleep duration"Sujith Manoharan
This reverts commit 09ebb810927a110e4c354beb20308830d108a54b. ath9k_hw_set_sta_beacon_timers() configures AR_TIM_PERIOD with the beacon interval. Before this commit, the sleepduration was never greater than the beacon interval. But now, the behavior has changed. For example, with an AP that uses a beacon interval of 100: ath: phy9: next beacon 61128704 ath: phy9: beacon period 204800 ath: phy9: DTIM period 204800 If the sleepduration is calculated based on the listen time, then the bmiss threshold should also be changed since the HW would be in sleep state for a longer time, but that is not done currently. To avoid configuring a higher beacon interval based on the sleepduration, revert to the original behavior. Power consumption is not a problem since PS is disabled in ath9k anyway. Cc: stable@vger.kernel.org Cc: Rajkumar Manoharan <rmanohar@qti.qualcomm.com> Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-09-11can: flexcan: avoid calling usleep_range from interrupt contextDavid Jander
Apparently can_restart() runs from a (timer-) interrupt and can call flexcan_chip_[en|dis]able(), so avoid using usleep_range() Signed-off-by: David Jander <david@protonic.nl> Cc: linux-stable <stable@vger.kernel.org> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2014-09-10net/mlx4: Set vlan stripping policy by the right commandMatan Barak
Changing the vlan stripping policy of the QP isn't supported by older firmware versions for the INIT2RTR command. Nevertheless, we've used it. Fix that by doing this policy change using INIT2RTR only if the firmware supports it, otherwise, we call UPDATE_QP command to do the task. Fixes: 7677fc9 ('net/mlx4: Strengthen VLAN tags/priorities enforcement in VST mode') Signed-off-by: Matan Barak <matanb@mellanox.com> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-09-10net/mlx4: Avoid dealing with MAC index in UPDATE_QP wrapper if not neededMatan Barak
The current wrapper implementation of the UPDATE_QP command tries to get the MAC index, even if MAC wasn't set by the VF. Fix it up to only handle the MAC field if it's valid. Fixes: ce8d9e0 ('net/mlx4_core: Add UPDATE_QP SRIOV wrapper support') Signed-off-by: Matan Barak <matanb@mellanox.com> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-09-10net/mlx4: Use the correct VSD mask in UPDATE_QPMatan Barak
When doing VGT->VST->VGT state changes, we used an incorrect mask for the vlan-stripping-disable (VSD) flag, hence the vlan related policy for user-space Raw Ethernet QPs open by VFs wasn't really applied. Fix that, by using the correct mask. Fixes: f0f829b ('net/mlx4_core: Add immediate activate for VGT->VST->VGT') Signed-off-by: Matan Barak <matanb@mellanox.com> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-09-10net/mlx4: Correctly configure single ported VFs from the hostMatan Barak
Single port VFs are seen PCI wise on both ports of the PF (we don't have single port PFs with ConnectX). With this in mind, it's possible for virtualization tools to try and configure a single ported VF through the "wrong" PF port. To handle that, we use the PF driver mapping of single port VFs to NIC ports and adjust the port value before calling into the low level code that does the actual VF configuration Fixes: 449fc48 ('net/mlx4: Adapt code for N-Port VF') Signed-off-by: Matan Barak <matanb@mellanox.com> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-09-10drivers: net: cpsw: dual_emac: fix reducing of rx descriptor during ifdownMugunthan V N
In Dual EMAC, when both interface are up and while doing ifdown with heavy traffic then skbs already processed by DMA from that slave emac has to be requeued as still the other interface is up and running. Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-09-09net:bonding: Add missing space in bonding driver parameter descriptionMasanari Iida
This patch adds missing space between "interface" and "by" in bonding module parameter description. Signed-off-by: Masanari Iida <standby24x7@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-09-09Merge branch 'for-john' of ↵John W. Linville
git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-fixes
2014-09-08net: bcmgenet: check harder for out of memory conditionsFlorian Fainelli
There is a potential case where we might be failing to refill a control block, leaving it with both a NULL skb pointer *and* a NULL dma_unmap_addr. The way we process incoming packets, by first calling dma_unmap_single(), and then only checking for a potential NULL skb can lead to situations where do pass a NULL dma_unmap_addr() to dma_unmap_single(), resulting in an oops. Fix this my moving the NULL skb check earlier, since no backing skb also means no corresponding DMA mapping for this packet. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-09-08net: systemport: check harder for out of memory conditionsFlorian Fainelli
There is a potential case where we might be failing to refill a control block, leaving it with both a NULL skb pointer *and* a NULL dma_unmap_addr. The way we process incoming packets, by first calling dma_unmap_single(), and then only checking for a potential NULL skb can lead to situations where do pass a NULL dma_unmap_addr() to dma_unmap_single(), resulting in an oops. Fix this my moving the NULL skb check earlier, since no backing skb also means no corresponding DMA mapping for this packet. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-09-08net/mlx4_en: do not ignore autoneg in mlx4_en_set_pauseparam()Ivan Vecera
The driver does not support pause autonegotiation so it should return -EINVAL when the function is called with non-zero autoneg. Cc: Amir Vadai <amirv@mellanox.com> Signed-off-by: Ivan Vecera <ivecera@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-09-08drivers: net: ethernet: octeon_mgmt: fix a compiler warningAaro Koskinen
Fix the following compiler warning: drivers/net/ethernet/octeon/octeon_mgmt.c: In function 'octeon_mgmt_clean_tx_buffers': drivers/net/ethernet/octeon/octeon_mgmt.c:295:4: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement] u64 ns = cvmx_read_csr(CVMX_MIXX_TSTAMP(p->port)); ^ Signed-off-by: Aaro Koskinen <aaro.koskinen@nsn.com> Acked-by: David Daney <david.daney@cavium.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-09-08sunvnet - add missing rmb() for sunvnet driverDavid L Stevens
The sunvnet driver does not have an rmb() in the ring consumer corresponding to the wmb() in the producer. According to Documentation/memory-barriers.txt: "When dealing with CPU-CPU interactions, certain types of memory barrier should always be paired. A lack of appropriate pairing is almost certainly an error." In cases where an rmb() is not a no-op and a consumer is removing data from the ring while a producer is adding new entries, a load reorder would allow CPU1 CPU2 ---- ---- LOAD desc.size [e.g] STORE desc.size <wmb> set desc.hdr.state = VIO_DESC_READY LOAD desc.hdr.state [because VIO_DESC_READY, use old desc.size, already loaded out of order] [CPU2 has reordered apparently unrelated LOADs] To ensure other desc fields are not loaded before checking VIO_DESC_READY, we need an rmb() between the check and desc data accesses. I've also moved the viodbg() call to after the rmb() so that it, too, has current descriptor data even with reordering, which has the side effect that it won't print anything for descriptors that are not VIO_DESC_READY as before. That's a) probably a good thing, since the fields are not necessarily set and, b) better than adding another rmb() just for viodbg(). This would not be possible if strict-ordering is enforced, but then the memory barriers should be no-ops in that case. Signed-off-by: David L Stevens <david.stevens@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-09-08iwlwifi: mvm: fix an overflow in iwl_mvm_get_signal_strengthEyal Shapira
The idea here is to translate a value of 0 received from the firmware to the lowest rssi figure. As rx_status->chain_signal is a signed byte the lowest possible value is -128 and not -256. -256 was causing 0 to get stored in the signed byte. Signed-off-by: Eyal Shapira <eyalx.shapira@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-09-08iwlwifi: add PCI IDs and add then new 3165 seriesOren Givon
This change does the following: 1) Add a new 7265 series PCI ID 2) Add two new 3160 series PCI IDs 3) Add the new 3165 series PCI IDs and configurations Signed-off-by: Oren Givon <oren.givon@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-09-08iwlwifi: dvm: disable power save by defaultEmmanuel Grumbach
In https://bugzilla.kernel.org/show_bug.cgi?id=84031, the submitter said that disabling power saving helped, do just that. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-09-08iwlwifi: mvm: BT Coex - always initialize smps_modeJohannes Berg
smps_mode is used uninitialized in a debug statement in AP mode, so always initialize it. While at it, fix a typo. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Reviewed-by: Luciano Coelho <luciano.coelho@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-09-08iwlwiwi: mvm: use bss_conf->dtim_period instead of conf.ps_dtim_periodEmmanuel Grumbach
The latter is meant for software implementation of power save and is not per-virtual interface. Since our driver supports multiple virtual interfaces, we need to use vif->bss_conf.dtim_period. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-09-08iwlwifi: mvm: treat EAPOLs like mgmt frames wrt rateEyal Shapira
Using the LQ table which is initially set according to the rssi could lead to EAPOLs being sent in high legacy rates like 54mbps. It's better to avoid sending EAPOLs in high rates as it reduces the chances of a successful 4-Way handshake. Avoid this and treat them like other mgmt frames which would initially get sent at the basic rate. Cc: <stable@vger.kernel.org> [3.13+] Signed-off-by: Eyal Shapira <eyalx.shapira@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-09-08iwlwifi: mvm: correctly handle PM/QoS changes from mac80211Johannes Berg
When mac80211 requests multiple BSS config changes, as for example while associating, we ignore power management and QoS changes and only apply them later. Fix that by removing the "else" and making the conditions independent. Also move it after (potential) beacon filter enablement to have that already enabled when going into power management code. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-09-08iwlwifi: increase DEFAULT_MAX_TX_POWEREliad Peller
The chip is able to transmit up to 22dBm, so set the constant appropriately. CC: <stable@vger.kernel.org> [3.13+] Signed-off-by: Eliad Peller <eliadx.peller@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-09-08iwlwifi: mvm: fix endianity issues with Smart Fifo commandsEmmanuel Grumbach
This code was broken on big endian systems. Sparse didn't catch the bug since the firmware command was not tagged as little endian. Fix the bug for big endian systems and tag the field in the firmware command to prevent such issues in the future. Cc: stable@vger.kernel.org [3.14+] Fixes: 1f3b0ff8ec ("iwlwifi: mvm: Add Smart FIFO support") Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-09-08iwlwifi: mvm: set MAC_FILTER_IN_BEACON correctly for STA/P2P clientLuciano Coelho
In commit cad3f08c (iwlwifi: mvm: enable MAC_FILTER_IN_BEACON when forced_assoc_off is set) the code to set the MAC_FILTER_IN_BEACON flag was accidentally moved to the main block of the if statement, while it should be in the else block instead. Move it to the right place. Fixes: cad3f08c23de ("iwlwifi: mvm: enable MAC_FILTER_IN_BEACON when forced_assoc_off is set") Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luciano Coelho <luciano.coelho@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-09-08iwlwifi: mvm: BT Coex - remove shadowing variableJohannes Berg
The variable 'u32 mode' exists twice, the latter shadowing the former - remove the latter since there's no need for two variables. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-09-07Merge tag 'master-2014-09-04' of ↵David S. Miller
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless John W. Linville says: ==================== pull request: wireless 2014-09-05 Please pull this batch of fixes intended for the 3.17 stream... For the mac80211 bits, Johannes says: "Here are a few fixes for mac80211. One has been discussed for a while and adds a terminating NUL-byte to the alpha2 sent to userspace, which shouldn't be necessary but since many places treat it as a string we couldn't move to just sending two bytes. In addition to that, we have two VLAN fixes from Felix, a mesh fix, a fix for the recently introduced RX aggregation offload, a revert for a broken patch (that luckily didn't really cause any harm) and a small fix for alignment in debugfs." For the iwlwifi bits, Emmanuel says: "I revert a patch that disabled CTS to self in dvm because users reported issues. The revert is CCed to stable since the offending patch was sent to stable too. I also bump the firmware API versions since a new firmware is coming up. On top of that, Marcel fixes a bug I introduced while fixing a bug in our Kconfig file." Please let me know if there are problems! ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2014-09-05amd-xgbe: Enable interrupts for all management countersLendacky, Thomas
As the management counters reach a threshold they will generate an interrupt so the value can be saved and the counter reset. The current code does not enable this interrupt on all counters. This can result in inaccurate statistics. Update the code to enable all the counters to generate an interrupt when its threshold is exceeded. Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-09-05amd-xgbe: Treat certain counter registers as 64 bitLendacky, Thomas
Even if the management counters are configured to be 32 bit register values, the [rt]xoctetcount_gb and [rt]xoctetcount_g counters are always 64 bit counter registers. Since they are not being treated as 64 bit values, these statistics are being reported incorrectly (ifconfig, ethtool, etc.). Update the routines used to read the registers to access the "hi" register (an offset of 4 from the "lo" register) to create a 64 bit value for these 64 bit counters. Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-09-05greth: moved TX ring cleaning to NAPI rx poll funcDaniel Hellstrom
This patch does not affect the 10/100 GRETH MAC. Before all GBit GRETH TX descriptor ring cleaning was done in start_xmit(), when descriptor list became full it activated TX interrupt to start the NAPI rx poll function to do TX ring cleaning. With this patch the TX descriptor ring is always cleaned from the NAPI rx poll function, triggered via TX or RX interrupt. Otherwise we could end up in TX frames being sent but not reported to the stack being sent. On the 10/100 GRETH this is not an issue since the SKB is copied&aligned into private buffers so that the SKB can be freed directly on start_xmit() Signed-off-by: Daniel Hellstrom <daniel@gaisler.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-09-05cnic : Cleanup CONFIG_IPV6 & VLAN checkAnish Bhatt
The cnic module needs to ensure that if ipv6 support is compiled as a module, then the cnic module cannot be compiled as built-in as it depends on ipv6. Made this check cleaner via Kconfig Use simpler IS_ENABLED for CONFIG_VLAN_8021Q check Signed-off-by: Anish Bhatt <anish@chelsio.com> Acked-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-09-05bnx2x: Fix link problems for 1G SFP RJ45 moduleYaniv Rosner
When 1G SFP RJ45 module is detected, driver must reset the Tx laser in order to prevent link issues. As part of change, the link_attr_sync was relocated from vars to params. Signed-off-by: Yaniv Rosner <Yaniv.Rosner@qlogic.com> Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-09-053c59x: avoid panic in boomerang_start_xmit when finding page address:Neil Horman
This bug was reported on a very old kernel (RHEL6, 2.6.32-491.el6): BUG: unable to handle kernel paging request at 00800000 IP: [<c04107b5>] nommu_map_page+0x15/0x110 *pdpt = 000000003454f001 *pde = 000000003f03d067 Oops: 0000 [#1] SMP last sysfs file: /sys/devices/system/cpu/online Modules linked in: nfsd lockd nfs_acl auth_rpcgss sunrpc exportfs p4_clockmod ipv6 ppdev parport_pc parport microcode iTCO_wdt iTCO_vendor_support 3c59x mii dcdbas serio_raw snd_intel8x0 snd_ac97_codec ac97_bus snd_seq snd_seq_device snd_pcm snd_timer snd soundcore snd_page_alloc i2c_i801 sg lpc_ich mfd_core ext4 jbd2 mbcache sr_mod cdrom sd_mod crc_t10dif pata_acpi ata_generic ata_piix radeon ttm drm_kms_helper drm i2c_algo_bit i2c_core dm_mirror dm_region_hash dm_log dm_mod [last unloaded: mperf] Pid: 4219, comm: nfsd Not tainted 2.6.32-491.el6.i686 #1 Dell Computer Corporation OptiPlex GX240 /OptiPlex GX240 EIP: 0060:[<c04107b5>] EFLAGS: 00010246 CPU: 0 EIP is at nommu_map_page+0x15/0x110 EAX: 00000000 EBX: c0a83480 ECX: 00000000 EDX: 00800000 ESI: 00000000 EDI: f70e7860 EBP: e2d09b54 ESP: e2d09b24 DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068 Process nfsd (pid: 4219, ti=e2d08000 task=e2ceaaa0 task.ti=e2d08000) Stack: 00000056 00000000 0000000e c65efd38 00000020 00000296 00000206 00000206 <0> c050c850 c0a83480 e2cef154 00000001 e2d09ba8 f8fcd585 00000510 00000001 <0> 00000000 00000000 f5172200 f8fdac00 0039ef8c f5277020 f70e7860 00000510 Call Trace: [<c050c850>] ? page_address+0xd0/0xe0 [<f8fcd585>] ? boomerang_start_xmit+0x3b5/0x520 [3c59x] [<c07b2975>] ? dev_hard_start_xmit+0xe5/0x400 [<f9182b00>] ? ip6_output_finish+0x0/0xf0 [ipv6] [<c07ca053>] ? sch_direct_xmit+0x113/0x180 [<c07d5588>] ? nf_hook_slow+0x68/0x120 [<c07b2ea5>] ? dev_queue_xmit+0x1b5/0x290 [<f9182b6d>] ? ip6_output_finish+0x6d/0xf0 [ipv6] [<f9184cb8>] ? ip6_xmit+0x3e8/0x490 [ipv6] [<f91ab9f9>] ? inet6_csk_xmit+0x289/0x2f0 [ipv6] [<c07f6451>] ? tcp_transmit_skb+0x431/0x7f0 [<c07a403f>] ? __alloc_skb+0x4f/0x140 [<c07f85a2>] ? tcp_write_xmit+0x1c2/0xa50 [<c07f90b1>] ? __tcp_push_pending_frames+0x31/0xe0 [<c07ea47a>] ? tcp_sendpage+0x44a/0x4b0 [<c07ea030>] ? tcp_sendpage+0x0/0x4b0 [<c079be1e>] ? kernel_sendpage+0x4e/0x90 [<f8457bb9>] ? svc_send_common+0xc9/0x120 [sunrpc] [<f8457c85>] ? svc_sendto+0x75/0x1f0 [sunrpc] [<c060d0d9>] ? _atomic_dec_and_lock+0x59/0x90 [<f87d55d0>] ? nfs3svc_encode_readres+0x0/0xc0 [nfsd] [<f845876d>] ? svc_authorise+0x2d/0x40 [sunrpc] [<f87d4410>] ? nfs3svc_release_fhandle+0x0/0x10 [nfsd] [<f8455721>] ? svc_process_common+0xf1/0x5a0 [sunrpc] [<f8457e86>] ? svc_tcp_sendto+0x36/0xa0 [sunrpc] [<f8461778>] ? svc_send+0x98/0xd0 [sunrpc] [<f87c698c>] ? nfsd+0xac/0x140 [nfsd] [<c04470e0>] ? complete+0x40/0x60 [<f87c68e0>] ? nfsd+0x0/0x140 [nfsd] [<c04802ac>] ? kthread+0x7c/0xa0 [<c0480230>] ? kthread+0x0/0xa0 [<c0409f9f>] ? kernel_thread_helper+0x7/0x10 Code: 8d b6 00 00 00 00 eb f8 8d b4 26 00 00 00 00 8d bc 27 00 00 00 00 55 89 e5 83 ec 30 89 75 f8 31 f6 89 7d fc 89 c7 89 c8 89 5d f4 <8b> 1a 8b 4d 08 c1 eb 19 c1 e3 04 8b 9b c0 29 c7 c0 83 e3 fc 29 But the problem seems to still exist upstream. It seems on 32 bit kernels page_address() can reutrn a NULL value in some circumstances, and the pci_map_single api isn't prepared to handle that (on this system it results in a bogus pointer deference in nommu_map_page. The fix is pretty easy, if we convert the 3c59x driver to use the more convieient skb_frag_dma_map api we don't need to find the virtual address of the page at all, and page gets mapped to the hardware properly. Verified to fix the problem as described by the reporter. Applies to the net tree Change Notes: v2) Converted PCI_DMA_TODEVICE to DMA_TO_DEVICE. Thanks Dave! v3) Actually Run git commit after making changes to v2 :) Signed-off-by: Neil Horman <nhorman@tuxdriver.com> CC: klassert@mathematik.tu-chemnitz.de CC: "David S. Miller" <davem@davemloft.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-09-05drivers/net/fddi/skfp/h/skfbi.h: Remove useless PCI_BASE_2ND macrosChen Gang
They are use less, and may generate compiling warnings, so remove them (microblaze, arc, arm64, and unicore32 have already defined PCI_IOBASE). The related warnings (with allmodconfig under microblaze): CC [M] drivers/net/fddi/skfp/skfddi.o In file included from drivers/net/fddi/skfp/skfddi.c:95:0: drivers/net/fddi/skfp/h/skfbi.h:151:0: warning: "PCI_IOBASE" redefined #define PCI_IOBASE 0xffffff00L /* Bit 31..8: I/O Base address */ ^ In file included from include/linux/io.h:22:0, from include/linux/pci.h:31, from drivers/net/fddi/skfp/skfddi.c:82: ./arch/microblaze/include/asm/io.h:33:0: note: this is the location of the previous definition #define PCI_IOBASE ((void __iomem *)_IO_BASE) ^ Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-09-05VMXNET3: Check for map error in vmxnet3_set_mcAndy King
We should check if the map of the table actually succeeds, and also free resources accordingly. Version bumped to 1.2.1.0 Acked-by: Shelley Gong <shelleygong@vmware.com> Acked-by: Bhavesh Davda <bhavesh@vmware.com> Signed-off-by: Andy King <acking@vmware.com> Reported-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-09-04Merge branch 'for-john' of ↵John W. Linville
git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-fixes
2014-09-02amd-xgbe: Fix initialization of the wrong spin lockLendacky, Thomas
During allocation and initialization of the network driver structures, the wrong pointer is used to initialize a spin lock. Fix the spin lock initialization by using the proper pointer. Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-09-02bnx2x: Configure device endianity on driver load and reset endianity on removal.Manish Chopra
Some hosts can be both little and big endian. In certain scenarios a big endian kernel can kexec a little endian kernel. This patch fixes this case from both ends: 1) Return endianity to original values on shutdown (in case little endian kernel boots after we shutdown). 2) Do not rely on HW reset values when loading driver in little endian kernel but configure them explicitly (in case previous kernel was big endian and did not reset the HW). Signed-off-by: Manish Chopra <manish.chopra@qlogic.com> Signed-off-by: Ariel Elior <Ariel.Elior@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>