Guy Mishol [Thu, 16 Jul 2015 08:22:47 +0000 (11:22 +0300)]
wlcore: add antenna diversity reading
update the rssi reading on rx_status
to read both RSSI level (7 bits) and
antenna diversity (msb)
Signed-off-by: Guy Mishol <guym@ti.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Miaoqing Pan [Wed, 15 Jul 2015 07:54:07 +0000 (15:54 +0800)]
ath9k: export HW random number generator
We measured the FFT-based entropy in 3 ways, Shannon entropy,
collision entropy, and directly measured min-entropy. Just to
be conservative, we recommend the estimated min-Entropy to be
10 bits per 16-bit value.
Analysis was done by Jacobson,David(djacobso@qti.qualcomm.com).
Signed-off-by: Miaoqing Pan <miaoqing@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Miaoqing Pan [Wed, 15 Jul 2015 07:54:06 +0000 (15:54 +0800)]
ath9k: Fix register definitions for QCA956x
Signed-off-by: Miaoqing Pan <miaoqing@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Rafa? Mi?ecki [Thu, 9 Jul 2015 15:07:08 +0000 (17:07 +0200)]
brcmfmac: set wiphy's addresses to provide valid MACs
Broadcom's firmware requires every BSS to use MAC address with unique
last few bits. The amount of bits may depend on a particular firmware,
it was verified to be 2 for BCM43602 one.
If this condition won't be fulfilled firmware will reject such MAC:
brcmfmac: _brcmf_set_mac_address: Setting cur_etheraddr failed, -52
We don't want to simply set addr_mask as it would also disallow using
locally administrated bit. Instead let's build a list of addresses
manually enabling 0x2 bit for extra interfaces.
Signed-off-by: Rafa? Mi?ecki <zajec5@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Michal Kazior [Thu, 9 Jul 2015 10:27:22 +0000 (12:27 +0200)]
ath9k: fix moredata flag endianness in cabq tx
While compiling ath9k with some extra flags I've
found that:
ath9k/xmit.c +2473 ## 16: warning: restricted __le16 degrades to integer
ath9k/xmit.c +2474 ## 36: warning: invalid assignment: &=
ath9k/xmit.c +2474 ## 36: left side has type restricted __le16
ath9k/xmit.c +2474 ## 36: right side has type int
There's no way for frame ftype/stype to be
mistreated as the offending 'moredata' flag when
considering cab queue.
This could've however theoretically led sometimes
to increased power consumption on connected
stations as they would keep their Rx active
waiting for frames that would never come.
Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Christophe Jaillet [Wed, 8 Jul 2015 20:22:46 +0000 (22:22 +0200)]
brcmsmac: Use kstrdup to simplify code
Replace a kmalloc+strcpy by an equivalent kstrdup in order to improve
readability.
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Acked-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Larry Finger [Wed, 8 Jul 2015 15:18:50 +0000 (10:18 -0500)]
rtlwifi: rtl8821ae: Fix an expression that is always false
In routine _rtl8821ae_set_media_status(), an incorrect mask results in a test
for AP status to always be false. Similar bugs were fixed in rtl8192cu and
rtl8192de, but this instance was missed at that time.
Reported-by: David Binderman <dcb314@hotmail.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@vger.kernel.org> [3.18+]
Cc: David Binderman <dcb314@hotmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Rafał Miłecki [Sun, 28 Jun 2015 15:17:13 +0000 (17:17 +0200)]
bcma: populate bus DT subnodes as platform_device-s
Our bus should allow defining children nodes as we may want to specify
devices attached to the bus. This is required e.g. to specify NAND or
ChipCommon cores and use bus's address and IRQ mappings.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Aniket Nagarnaik [Thu, 2 Jul 2015 13:07:02 +0000 (06:07 -0700)]
mwifiex: fix for p2p broken link
This patch fixes following issues in p2p code paths.
1) bss role, bss type and connection type was not set correctly
for p2p GO and p2p client at couple of places.
2) Driver appends a proprietary header to management frames
which will be parsed by our firmware. Later while informing
TX status to cfg80211, modified frame buffer was passed to
cfg80211_mgmt_tx_status() instead of original one.
Signed-off-by: Aniket Nagarnaik <aniketn@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Felix Fietkau [Thu, 2 Jul 2015 11:40:29 +0000 (13:40 +0200)]
ath9k: make DMA stop related messages debug-only
A long time ago, ath9k had issues during reset where the DMA engine
would stay active and could potentially corrupt memory.
To debug those issues, the driver would print warnings whenever they
occur.
Nowadays, these issues are gone and the primary cause of these messages
is if the MAC is stuck during reset or busy processing a long
transmission. This is fairly harmless, yet these messages continue to
worry users.
To reduce the number of bogus bug reports, turn these messages into
debug messages and count their occurence in the "reset" debugfs file.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Raphaël Poggi [Thu, 2 Jul 2015 08:34:49 +0000 (10:34 +0200)]
wlcore: sdio: return correct error code
When wlcore_probe_of failed, return the correct error code instead of ENOMEM
Signed-off-by: Raphaël Poggi <poggi.raph@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Nik Nyby [Tue, 30 Jun 2015 00:45:47 +0000 (20:45 -0400)]
b43: Fix typo in function name
This fixes a typo in the "b43_lo_g_maintenance_work" function
name.
Signed-off-by: Nik Nyby <nikolas@gnu.org>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Acked-by: Michael Buesch <m@bues.ch>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Nik Nyby [Tue, 30 Jun 2015 00:17:55 +0000 (20:17 -0400)]
rtlwifi: fix typo in comments
This fixes a typo in two comments: "paht" -> "path".
Signed-off-by: Nik Nyby <nikolas@gnu.org>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Reyad Attiyat [Mon, 29 Jun 2015 01:07:38 +0000 (20:07 -0500)]
mwifiex: usb: Fix double add error when submitting rx urb
There is an error that can occur where the driver adds the same URB to USB submission list twice.
This happens since mwifiex_usb_submit_rem_rx can submit packets at same time as an rx urb complete callback.
This causes list corruption and is fixed by not setting the skb to NULL when submitting an rx packet.
[ 84.461242] WARNING: CPU: 1 PID: 748 at lib/list_debug.c:36 __list_add+0xcb/0xd0()
[ 84.461245] list_add double add: new=
ffff8800c92b0c50, prev=
ffff8800c92b0c50, next=
ffff8800ced6c430.
[ 84.461247] Modules linked in: rfcomm fuse cmac nf_conntrack_netbios_ns nf_conntrack_broadcast ip6t_rpfilter ip6t_REJECT nf_reject_ipv6 xt_conntrack ebtable_nat ebtable_broute bridge stp llc ebtable_filter ebtables ip6table_nat nf_conntrack_ipv6 nf_defrag_ipv6 nf_nat_ipv6 ip6table_mangle ip6table_security ip6table_raw ip6table_filter ip6_tables iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack bnep iptable_mangle iptable_security iptable_raw btusb btintel bluetooth mwifiex_usb mwifiex x86_pkg_temp_thermal cfg80211 coretemp r8712u(C) kvm_intel kvm hid_sensor_als hid_sensor_incl_3d hid_sensor_rotation hid_sensor_magn_3d hid_sensor_accel_3d hid_sensor_gyro_3d hid_sensor_trigger hid_sensor_iio_common industrialio_triggered_buffer kfifo_buf rfkill iTCO_wdt industrialio iTCO_vendor_support
[ 84.461316] crc32_pclmul crc32c_intel ghash_clmulni_intel microcode snd_hda_codec_realtek vfat snd_hda_codec_generic fat snd_hda_codec_hdmi snd_hda_intel snd_hda_controller uvcvideo snd_hda_codec videobuf2_vmalloc videobuf2_memops snd_hwdep videobuf2_core snd_hda_core joydev v4l2_common videodev hid_sensor_hub snd_seq hid_multitouch media snd_seq_device snd_pcm snd_timer mei_me snd i2c_i801 lpc_ich mei soundcore tpm_infineon tpm_tis tpm i2c_hid i2c_designware_platform i2c_designware_core nfsd auth_rpcgss nfs_acl lockd grace sunrpc sch_fq_codel i915 i2c_algo_bit drm_kms_helper drm xhci_pci xhci_hcd ehci_pci sd_mod ehci_hcd video
[ 84.461383] CPU: 1 PID: 748 Comm: kworker/u9:0 Tainted: G C 4.1.0-rc5+ #163
[ 84.461386] Hardware name: Microsoft Corporation Surface Pro 2/Surface Pro 2, BIOS 2.05.0250 04/10/2015
[ 84.461396] Workqueue: MWIFIEX_RX_WORK_QUEUE mwifiex_rx_work_queue [mwifiex]
[ 84.461399]
ffffffff81a8150e ffff8801174cf8e8 ffffffff817df830 0000000000000000
[ 84.461405]
ffff8801174cf938 ffff8801174cf928 ffffffff810a54ba ffff8800c86bd750
[ 84.461410]
ffff8800c92b0c50 ffff8800c92b0c50 ffff8800ced6c430 ffff88010c057178
[ 84.461416] Call Trace:
[ 84.461421] [<
ffffffff817df830>] dump_stack+0x4f/0x7b
[ 84.461428] [<
ffffffff810a54ba>] warn_slowpath_common+0x8a/0xc0
[ 84.461432] [<
ffffffff810a5536>] warn_slowpath_fmt+0x46/0x50
[ 84.461436] [<
ffffffff814109fb>] __list_add+0xcb/0xd0
[ 84.461442] [<
ffffffff815c551a>] ? usb_hcd_link_urb_to_ep+0x2a/0xa0
[ 84.461446] [<
ffffffff815c5570>] usb_hcd_link_urb_to_ep+0x80/0xa0
[ 84.461459] [<
ffffffffa004318a>] prepare_transfer+0xaa/0x130 [xhci_hcd]
[ 84.461470] [<
ffffffffa0044cf7>] xhci_queue_bulk_tx+0xb7/0x7a0 [xhci_hcd]
[ 84.461480] [<
ffffffffa003b67f>] ? xhci_urb_enqueue+0x50f/0x660 [xhci_hcd]
[ 84.461489] [<
ffffffffa003b67f>] ? xhci_urb_enqueue+0x50f/0x660 [xhci_hcd]
[ 84.461498] [<
ffffffffa003b735>] xhci_urb_enqueue+0x5c5/0x660 [xhci_hcd]
[ 84.461503] [<
ffffffff815c7ad3>] usb_hcd_submit_urb+0x93/0xa70
[ 84.461507] [<
ffffffff8168dde8>] ? __alloc_skb+0x78/0x1f0
[ 84.461511] [<
ffffffff8168d301>] ? __kmalloc_reserve.isra.26+0x31/0x90
[ 84.461515] [<
ffffffff8168ddbc>] ? __alloc_skb+0x4c/0x1f0
[ 84.461519] [<
ffffffff8168ddfc>] ? __alloc_skb+0x8c/0x1f0
[ 84.461523] [<
ffffffff8168badd>] ? skb_dequeue+0x5d/0x80
[ 84.461527] [<
ffffffff815c987e>] usb_submit_urb+0x42e/0x5f0
[ 84.461531] [<
ffffffff816931d9>] ? __alloc_rx_skb+0x39/0x100
[ 84.461536] [<
ffffffffa05aa372>] mwifiex_usb_submit_rx_urb+0xb2/0x170 [mwifiex_usb]
[ 84.461542] [<
ffffffffa05aa5f5>] mwifiex_usb_submit_rem_rx_urbs+0x45/0x50 [mwifiex_usb]
[ 84.461550] [<
ffffffffa07094be>] mwifiex_rx_work_queue+0x10e/0x140 [mwifiex]
[ 84.461556] [<
ffffffff810c4429>] process_one_work+0x229/0x890
[ 84.461559] [<
ffffffff810c438c>] ? process_one_work+0x18c/0x890
[ 84.461565] [<
ffffffff810c4ae3>] worker_thread+0x53/0x470
[ 84.461569] [<
ffffffff810c4a90>] ? process_one_work+0x890/0x890
[ 84.461572] [<
ffffffff810cb162>] kthread+0xf2/0x110
[ 84.461577] [<
ffffffff811031ad>] ? trace_hardirqs_on+0xd/0x10
[ 84.461581] [<
ffffffff810cb070>] ? kthread_create_on_node+0x230/0x230
[ 84.461586] [<
ffffffff817e9662>] ret_from_fork+0x42/0x70
[ 84.461590] [<
ffffffff810cb070>] ? kthread_create_on_node+0x230/0x230
[ 84.461593] ---[ end trace
65103af5e6fb3444 ]---
Signed-off-by: Reyad Attiyat <reyad.attiyat@gmail.com>
Acked-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
John Linville [Fri, 26 Jun 2015 19:29:36 +0000 (15:29 -0400)]
mwifiex: fix leak of gen_ie storage on exit from mwifiex_del_mgmt_ies
Storage pointed to by gen_ie is allocated with kmalloc, but was
never freed.
Coverity CID #
1271251
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Acked-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Avinash Patil [Wed, 24 Jun 2015 11:22:21 +0000 (16:52 +0530)]
MAINTAINERS: update for mwifiex driver maintainers
Amit & Nishant would be taking care of maintaining mwifiex driver here
onwards on account of organizational changes.
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Nishant Sarmukadam <nishants@marvell.com>
Signed-off-by: Cathy Luo <cluo@marvell.com>
Signed-off-by: Frank Huang <frankh@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
John Linville [Tue, 23 Jun 2015 19:04:03 +0000 (15:04 -0400)]
mwifiex: do not short circuit exit from mwifiex_set_mgmt_ies
Without this change, the code simply exits after calling
mwifiex_uap_set_head_tail_ies, leving the call to
mwifiex_set_mgmt_beacon_data_ies as dead code.
Coverity CID #
1271292
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Acked-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
John Linville [Tue, 23 Jun 2015 18:45:45 +0000 (14:45 -0400)]
mwifiex: avoid freeing improper pointer in mwifiex_set_wowlan_mef_entry
mwifiex_set_wowlan_mef_entry attempts to free a passed-in pointer in
case of an error. The only caller (mwifiex_set_mef_filter) passes that
pointer as an offset into allocated memory, so any attempt to free that
will not be the actual allocated pointer.
Address this by changing mwifiex_set_wowlan_mef_entry to not do any
free, and to cause mwifiex_set_mef_filter to do the appropriate free if
the call to mwifiex_set_wowlan_mef_entry fails.
Coverity CID #
1295879
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Acked-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Antonio Borneo [Tue, 23 Jun 2015 14:53:05 +0000 (22:53 +0800)]
wireless: cw1200: Remove redundant spi driver bus initialization
In ancient times it was necessary to manually initialize the bus
field of an spi_driver to spi_bus_type. These days this is done in
spi_register_driver(), so we can drop the manual assignment.
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
To: Solomon Peachy <pizza@shaftnet.org>
To: Kalle Valo <kvalo@codeaurora.org>
To: linux-wireless@vger.kernel.org
To: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Avinash Patil [Mon, 22 Jun 2015 13:36:23 +0000 (19:06 +0530)]
mwifiex: handle multichannel event
This patch adds support to handle multichannel event from FW.
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Avinash Patil [Mon, 22 Jun 2015 13:36:22 +0000 (19:06 +0530)]
mwifiex: separate interface combination for multichannel and DFS
Multichannel and DFS cannot be supported at same time. So when multichannel
operation is enabled by module parameter, we enable number of channel as 2
while registering wiphy. For all other cases we advertise DFS support to
cfg80211. Patch also adds support for radar detect widths parameter.
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Avinash Patil [Mon, 22 Jun 2015 13:36:21 +0000 (19:06 +0530)]
mwifiex: advertise multichannel support to cfg80211
This patch adds support to advetise mwifiex multichannel support to
cfg80211. If module parameter drcs is enabled and FW supports multichannel
operation we advertise this support to cfg80211. As of now 2 simultaneous
channels are supported.
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Avinash Patil [Mon, 22 Jun 2015 13:36:20 +0000 (19:06 +0530)]
mwifiex: support to set multichannel policy to FW
This patch adds support for setting multichannel policy as module parameter
to FW. Value of 1 indicates Multichannel support is enabled
and value of 0 disables it.
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Avinash Patil [Mon, 22 Jun 2015 13:36:19 +0000 (19:06 +0530)]
mwifiex: extend tx_data pause to AP interface as well
This patch adds support to extend TX Data pause for AP intefaces.
Also for station role, support for pausing/unpausing all traffic
when mac address parameter is BSSID is added.
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Avinash Patil [Mon, 22 Jun 2015 13:36:18 +0000 (19:06 +0530)]
mwifiex: enable traffic only when port is open
This patch adds support to enable data traffic only when port is open.
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Avinash Patil [Mon, 22 Jun 2015 13:36:17 +0000 (19:06 +0530)]
mwifiex: support for bypass tx queue
This patch adds support for another TX queue in driver- bypass
TX queue. This queue is used for sending data/mgmt packets while
in disconnected state i.e. when port is yet not unblocked.
TDLS setup packets would also be queued in this queue.
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Avinash Patil [Mon, 22 Jun 2015 13:36:16 +0000 (19:06 +0530)]
mwifiex: update domain_info upon band change in start_ap
It was observed that AP beacons would not reflect correct regulatory
information upon starting AP in A band. This was because of missing
AP config band update in set_channel of start_ap. Also we configure 11D
settings info FW only for specific band. So we need to download domain
info to FW even if domain remains unchanged but band is changed.
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Xinming Hu [Mon, 22 Jun 2015 13:36:15 +0000 (19:06 +0530)]
mwifiex: add cfg80211 tdls channel switch handler
This patch add cfg80211 tdls_chan_switch and tdls_cancel_chan_switch
handler.
With this handlers, mwifiex would support TDLS channel switch feature.
Signed-off-by: Xinming Hu <huxm@marvell.com>
Signed-off-by: Cathy Luo <cluo@marvell.com>
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Xinming Hu [Mon, 22 Jun 2015 13:36:14 +0000 (19:06 +0530)]
mwifiex: enhance tdls link setup condition
TDLS link status - channel switching, off channel or base channel itself
indicates that TDLS link is setup.
Signed-off-by: Xinming Hu <huxm@marvell.com>
Signed-off-by: Cathy Luo <cluo@marvell.com>
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Xinming Hu [Mon, 22 Jun 2015 13:36:13 +0000 (19:06 +0530)]
mwifiex: enable tdls channel switch ext_cap
This patch enable tdls channel switch ext capability in tdls action
frame, and also configure basic tdls channel switch parameters while
tdls setup completed and tdls link is enabled..
Signed-off-by: Xinming Hu <huxm@marvell.com>
Signed-off-by: Cathy Luo <cluo@marvell.com>
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Xinming Hu [Mon, 22 Jun 2015 13:36:12 +0000 (19:06 +0530)]
mwifiex: add tdls config command
This patch add support for a new tdls configuration command
which is used for configuration of tdls channel switch parameters.
Signed-off-by: Xinming Hu <huxm@marvell.com>
Signed-off-by: Cathy Luo <cluo@marvell.com>
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Xinming Hu [Mon, 22 Jun 2015 13:36:11 +0000 (19:06 +0530)]
mwifiex: process tdls channel switch event
This patch add support for tdls channel switch event process.
We block TX queues for particular RA list depending upon channel
switch state. If channel switch state is moving to base channel,
we unblock RA lists for AP. If channel switch state is moving to off
channel, we unblock TDLS peer RA lists.
Signed-off-by: Xinming Hu <huxm@marvell.com>
Signed-off-by: Cathy Luo <cluo@marvell.com>
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Xinming Hu [Mon, 22 Jun 2015 13:36:10 +0000 (19:06 +0530)]
mwifiex: add tdls channel switch status
This patch add new tdls status used for tdls channel switch.
Driver in turn would block cmd path and data path if tdls
channel switching. Data path to non tdls peer should be blocked
if tdls channel switch to off-channel.
Signed-off-by: Xinming Hu <huxm@marvell.com>
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Cathy Luo <cluo@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Xinming Hu [Mon, 22 Jun 2015 13:36:09 +0000 (19:06 +0530)]
mwifiex: do not increase tx_pkts_queued if receive address tx paused
If tx_pkts_queued is increased for tx paused receive address, tx process
will be triggered for this packet. But since RA list was tx paused,
there will be an infinite loop in mwifiex_wmm_process_tx waiting for the
event(tx pause, tdls cs) to cancel tx pause. This will be an dead loop,
since main_process was locked at this time, there will be no opportunity
to process event.
So do not increase tx_pkts_queued if receive address tx paused,
this will be restored RA list is unpaused.
Signed-off-by: Xinming Hu <huxm@marvell.com>
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Cathy Luo <cluo@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Xinming Hu [Mon, 22 Jun 2015 13:36:08 +0000 (19:06 +0530)]
mwifiex: block data traffic to tx paused receive address
Data traffic to tx paused receive address should be blocked.
Signed-off-by: Xinming Hu <huxm@marvell.com>
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Cathy Luo <cluo@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Avinash Patil [Mon, 22 Jun 2015 13:36:07 +0000 (19:06 +0530)]
mwifiex: add tx data pause support
This patch adds support to enable TX data pause feature for mwifiex.
Whenever FW TX buffers reach threshold, FW would send TX pause event
to driver. Driver in turn would block data traffic to that particular
receiver address.
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Xinming Hu <huxm@marvell.com>
Signed-off-by: Cathy Luo <cluo@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Taehee Yoo [Fri, 19 Jun 2015 18:28:15 +0000 (03:28 +0900)]
rtlwifi: rtl8192cu: Remove rtl8723 code
In the rtlwifi/rtl8192cu, rtl8723 code is dead code.
So I remove it.
Signed-off-by: Taehee Yoo <ap420073@gmail.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Kalle Valo [Tue, 21 Jul 2015 08:36:56 +0000 (11:36 +0300)]
Merge ath-next from ath.git.
Major changes in ath10k:
* enable VHT for IBSS
* initial work to support qca99x0 and the corresponding 10.4 firmware branch
Zefir Kurtisi [Tue, 16 Jun 2015 10:52:16 +0000 (12:52 +0200)]
ath9k: DFS - add pulse chirp detection for FCC
FCC long pulse radar (type 5) requires pulses to be
checked for chirping. This patch implements chirp
detection based on the FFT data provided for long
pulses.
A chirp is detected when a set of criteria defined
by FCC pulse characteristics is met, including
* have at least 4 FFT samples
* max_bin index moves equidistantly between samples
* the gradient is within defined range
The chirp detection has been tested with reference
radar generating devices and proved to work reliably.
Signed-off-by: Zefir Kurtisi <zefir.kurtisi@neratec.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Zefir Kurtisi [Tue, 16 Jun 2015 09:46:42 +0000 (11:46 +0200)]
ath9k: DFS - consider ext_channel pulses only in HT40 mode
The chip reports radar pulses on extension channel
even if operating in HT20 mode. This patch adds a
sanity check for HT40 mode before it feeds pulses
on extension channel to the pattern detector.
Signed-off-by: Zefir Kurtisi <zefir.kurtisi@neratec.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Nicholas Mc Guire [Mon, 15 Jun 2015 17:24:35 +0000 (19:24 +0200)]
ipw2100: fix timeout bug - always evaluated to 0
commit
2c86c275015c ("Add ipw2100 wireless driver.") introduced
HW_PHY_OFF_LOOP_DELAY (HZ / 5000) which always evaluated to 0. Clarified
by Stanislav Yakovlev <stas.yakovlev@gmail.com> that it should be 50
milliseconds thus fixed up to msecs_to_jiffies(50).
Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Acked-by: Stanislav Yakovlev <stas.yakovlev@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Michal Kazior [Thu, 9 Jul 2015 11:08:39 +0000 (13:08 +0200)]
ath10k: tweak interface combinations
Concurrent AP/GO operation on different channels
isn't really supported well by the firmware so
it's better to remove it from being advertised.
Also tune the way station and p2p client interface
limits are expressed to allow station + 2x p2p
client or station + p2p client + p2p go.
Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Michal Kazior [Thu, 9 Jul 2015 11:08:38 +0000 (13:08 +0200)]
ath10k: fix per-vif queue locking
Whenever any vdev was supposed to be paused all Tx
queues were stopped (except offchannel) instead of
only these associated with the given vdev.
This caused subtle issues with
multi-channel/multi-vif scenarios, e.g.
authentication of station vif could sometimes fail
depending on fw tx pause request timing.
Fixes: b4aa539dd8f2 ("ath10k: implement tx pause wmi event")
Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Michal Kazior [Thu, 9 Jul 2015 11:08:37 +0000 (13:08 +0200)]
ath10k: update vdev ps state on start
Psmode can be forcefully enabled when vdev isn't
started. It isn't guaranteed that mac80211 will
re-issue psmode setting after vdev is started
unless actual bss_conf.ps value has changed.
Even if this doesn't fix any problems now it may
prevent future breakage.
Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Michal Kazior [Thu, 9 Jul 2015 11:08:36 +0000 (13:08 +0200)]
ath10k: fix hw roc expiration notifcation
The expiration function must not be called when
roc is explicitly cancelled by mac80211. However
since
fcf9844636be ("ath10k: fix hw roc
expiration") the notification was never sent when
roc actually expired.
This fixes some P2P connection setup issues.
Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Michal Kazior [Thu, 9 Jul 2015 11:08:35 +0000 (13:08 +0200)]
ath10k: limit multi-vif ps more aggresivelly
Further testing proved that multi-channel AP+STA
on QCA6174 with RM.2.0-00088 should have powersave
force-disabled to avoid beacon misses/skipping on
either side which in turn could disrupt
communication.
Since AP never has arvif->ps don't even bother
checking it. Other combinations may be broken as
well so disallow powersave with multivif outright
unless firmware advertises otherwise.
Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Michal Kazior [Thu, 9 Jul 2015 11:08:34 +0000 (13:08 +0200)]
ath10k: don't set cck/ofdm scan flags
mac80211 already does provide complete IEs for
Probe Requests for hw scan and ath10k firmware was
appending duplicate Supported Rates IEs
unnecessarily.
Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Vasanthakumar Thiagarajan [Fri, 3 Jul 2015 13:55:27 +0000 (19:25 +0530)]
ath10k: Fix target to cpu address conversion logic
In commit
418ca5992e2f ("ath10k: Make target cpu address to
CE address conversion chip specific") mask 0x7fff is added
by mistake instead of 0x7ff. Fix this regression.
Fixes: 418ca5992e2f ("ath10k: Make target cpu address to CE address conversion chip specific")
Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qti.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Bartosz Markowski [Fri, 3 Jul 2015 13:33:49 +0000 (15:33 +0200)]
ath10k: fix QCA61X4 boot up
commit
a521ee983d312db7 ("ath10k: Add new reg_address/mask to hw register
table") broke QCA61x4 support by providing wrong
fw_indicator_address, which should have been 0x0003a028 instead of 0x00009028.
User experience was a failing boot up sequence (crashing device during
initialization):
[ 181.663874] ath10k_pci 0000:02:00.0: enabling device (0000 -> 0002)
[ 181.664787] ath10k_pci 0000:02:00.0: pci irq msi-x interrupts 8 irq_mode 0 reset_mode 0
[ 181.688886] ath10k_pci 0000:02:00.0: device has crashed during init
[ 181.688897] ath10k_pci 0000:02:00.0: failed to wait for target after cold reset: -70
[ 181.688902] ath10k_pci 0000:02:00.0: failed to reset chip: -70
[ 181.689774] ath10k_pci: probe of 0000:02:00.0 failed with error -70
Fix it by updating the address with correct value.
Fixes: a521ee983d31 ("ath10k: Add new reg_address/mask to hw register table")
Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
David S. Miller [Sat, 11 Jul 2015 06:24:31 +0000 (23:24 -0700)]
Merge branch 'be2net-next'
Sathya Perla says:
====================
be2net: patch set
Hi David, the following patch set has code cleanup patches, minor enhancements
and non-critical fixes. Pls consider applying to the net-next tree. Thanks!
Patch 1 removes duplicate code in be_setup_wol() routine making it simpler
and more readable.
Patch 2 fixes the the bridge mode return value for the ndo_bridge_getlink()
call. Instead of just relying on the SRIOV enabled state, the driver now
queries the FW, for the actual mode of bridge.
Patch 3 removes code for setting D0 power state as it's already done
in pci_enable_device()
Patch 4 fixes a bad return value in be_check_ufi_compatibility() routine
introduced by an earlier commit.
Patch 5 fixes a field in udp header being accessed while in network endian
format.
Patch 6 fixes the be_mcc_notify() routine to return an error status when
the FW/HW is in an error state.
Patch 7 fixes the be_cmd_rx_filter() routine to issue the RX_FILTER cmd
and not wait for a completion from the FW. If the FW/adapter
is in an error state, this change helps in not holding up the rtnl_lock
and keeping bottom halves disabled while the driver timesout waiting for
a response from the FW.
Patch 8 fixes the be_cmd_set_loopback() routine to issue the LOOPBACK cmd
and not wait for the FW completion while spin_lock_bh() is held on the
mcc_lock. As the cmd is always issued from ethtool in a process context,
it can sleep till the FW completion is received.
Patch 9 bumps up the driver version to 10.6.0.3
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Sathya Perla [Fri, 10 Jul 2015 09:32:51 +0000 (05:32 -0400)]
be2net: bump up the driver version to 10.6.0.3
Signed-off-by: Sathya Perla <sathya.perla@avagotech.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Suresh Reddy [Fri, 10 Jul 2015 09:32:50 +0000 (05:32 -0400)]
be2net: make SET_LOOPBACK_MODE cmd asynchrounous
The SET_LOOPBACK_MODE command is always issued from ethtool only in a
process context. So, while waiting for the cmd to complete, the driver
can sleep instead of holding spin_lock_bh() on the mcc_lock. This is done
by calling be_mcc_notify() instead of be_mcc_notify_wait() (that returns
only after the cmd completes while the MCCQ is locked).
Signed-off-by: Suresh Reddy <suresh.reddy@avagotech.com>
Signed-off-by: Sathya Perla <sathya.perla@avagotech.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Suresh Reddy [Fri, 10 Jul 2015 09:32:49 +0000 (05:32 -0400)]
be2net: make the RX_FILTER command asynchronous
This fix makes the RX_FILTER cmd asynchronous, i.e., the caller issues
this cmd and doesn't wait for a completion from the FW. If the FW/adapter
is in an error state, this change helps in not holding up the rtnl_lock
and keeping bottom halves disabled while the driver timesout waiting for
a response from the FW.
Signed-off-by: Suresh Reddy <suresh.reddy@avagotech.com>
Signed-off-by: Sathya Perla <sathya.perla@avagotech.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Suresh Reddy [Fri, 10 Jul 2015 09:32:48 +0000 (05:32 -0400)]
be2net: return error status from be_mcc_notify()
When the adapter is in error state, return error from be_mcc_notify()
so that the caller routines need not sleep waiting for a response.
Signed-off-by: Suresh Reddy <suresh.reddy@avagotech.com>
Signed-off-by: Sathya Perla <sathya.perla@avagotech.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Venkat Duvvuru [Fri, 10 Jul 2015 09:32:47 +0000 (05:32 -0400)]
be2net: convert dest field in udp-hdr to host-endian
The "dest" field in the UDP-hdr of a TX skb is in network endian format.
Convert it to host endian before accessing it. The os2bmc patch,
mentioned below introduced this code.
Fixes: 760c295e0e8d ("be2net: Support for OS2BMC")
Signed-off-by: Venkat Duvvuru <VenkatKumar.Duvvuru@Emulex.com>
Signed-off-by: Sathya Perla <sathya.perla@avagotech.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Vasundhara Volam [Fri, 10 Jul 2015 09:32:46 +0000 (05:32 -0400)]
be2net: fix wrong return value in be_check_ufi_compatibility()
In the commit
a6e6ff6eee12f3e
("be2net: simplify UFI compatibility checking"), a return value of "-1"
was incorrectly used in place of "false". This patch fixes it.
Fixes: a6e6ff6eee12f3e ("be2net: simplify UFI compatibility checking")
Signed-off-by: Vasundhara Volam <vasundhara.volam@avagotech.com>
Signed-off-by: Sathya Perla <sathya.perla@avagotech.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Kalesh Purayil [Fri, 10 Jul 2015 09:32:45 +0000 (05:32 -0400)]
be2net: remove redundant D0 power state set
pci_enable_device() call sets device power state to D0; there is no need
doing it again.
Signed-off-by: Kalesh AP <kalesh.purayil@avagotech.com>
Signed-off-by: Sathya Perla <sathya.perla@avagotech.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Kalesh Purayil [Fri, 10 Jul 2015 09:32:44 +0000 (05:32 -0400)]
be2net: query FW to check if EVB is enabled
The current code assumes that bridge functionality (EVB) in the adapter
is enabled only when SR-IOV is enabled. This is not always true.
This patch uses the GET_HSW_CONFIG FW cmd to query this from the FW.
Signed-off-by: Kalesh AP <kalesh.purayil@avagotech.com>
Signed-off-by: Sathya Perla <sathya.perla@avagotech.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Kalesh Purayil [Fri, 10 Jul 2015 09:32:43 +0000 (05:32 -0400)]
be2net: remove duplicate code in be_setup_wol()
This change will make be_setup_wol() routine more compact and readable
by removing some duplicate code.
Signed-off-by: Kalesh AP <kalesh.purayil@avagotech.com>
Signed-off-by: Sathya Perla <sathya.perla@avagotech.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
YOSHIFUJI Hideaki/吉藤英明 [Fri, 10 Jul 2015 07:58:31 +0000 (16:58 +0900)]
ipv6: Do not iterate over all interfaces when finding source address on specific interface.
If outgoing interface is specified and the candidate address is
restricted to the outgoing interface, it is enough to iterate
over that given interface only.
Signed-off-by: YOSHIFUJI Hideaki <hideaki.yoshifuji@miraclelinux.com>
Acked-by: Erik Kline <ek@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Krzysztof Kozlowski [Fri, 10 Jul 2015 06:29:23 +0000 (15:29 +0900)]
net: Drop owner assignment from platform_driver
platform_driver does not need to set an owner because
platform_driver_register() will set it.
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
David Thomson [Fri, 10 Jul 2015 04:28:25 +0000 (16:28 +1200)]
net: phy: Support setting polarity in marvell phy driver
Support manually setting the polarity to mdi or mdix
Signed-off-by: David Thomson <david.thomson@alliedtelesis.co.nz>
Signed-off-by: David S. Miller <davem@davemloft.net>
David Thomson [Fri, 10 Jul 2015 01:56:54 +0000 (13:56 +1200)]
net: phy: Pass mdix ethtool setting through to phy driver
Pass the mdix setting from ethtool down to the phy driver, to allow
driver specific implementations of manually setting the polarity.
Signed-off-by: David Thomson <david.thomson@alliedtelesis.co.nz>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Eric Dumazet [Thu, 9 Jul 2015 16:01:40 +0000 (18:01 +0200)]
tcp: do not export tcp_init_xmit_timers()
After commit
900f65d361d3 ("tcp: move duplicate code from
tcp_v4_init_sock()/tcp_v6_init_sock()"), we no longer
need to export tcp_init_xmit_timers()
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Neal Cardwell <ncardwell@google.com>
Acked-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Nikolay Aleksandrov [Thu, 9 Jul 2015 10:11:10 +0000 (03:11 -0700)]
bridge: mdb: fill state in br_mdb_notify
Fill also the port group state when sending notifications.
Signed-off-by: Satish Ashok <sashok@cumulusnetworks.com>
Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Masatake YAMATO [Thu, 9 Jul 2015 03:46:35 +0000 (12:46 +0900)]
route: remove unsed variable in __mkroute_input
flags local variable in __mkroute_input is not used as a variable.
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Tom Herbert [Wed, 8 Jul 2015 23:58:22 +0000 (16:58 -0700)]
ipv6: Nonlocal bind
Add support to allow non-local binds similar to how this was done for IPv4.
Non-local binds are very useful in emulating the Internet in a box, etc.
This add the ip_nonlocal_bind sysctl under ipv6.
Testing:
Set up nonlocal binding and receive routing on a host, e.g.:
ip -6 rule add from ::/0 iif eth0 lookup 200
ip -6 route add local 2001:0:0:1::/64 dev lo proto kernel scope host table 200
sysctl -w net.ipv6.ip_nonlocal_bind=1
Set up routing to 2001:0:0:1::/64 on peer to go to first host
ping6 -I 2001:0:0:1::1 peer-address -- to verify
Signed-off-by: Tom Herbert <tom@herbertland.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Thu, 9 Jul 2015 22:12:21 +0000 (15:12 -0700)]
Merge branch 'tw_cleanups'
Eric Dumazet says:
====================
inet: timewait cleanups
Another round of patches to make tw handling simpler.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Eric Dumazet [Wed, 8 Jul 2015 21:28:30 +0000 (14:28 -0700)]
inet: inet_twsk_deschedule factorization
inet_twsk_deschedule() calls are followed by inet_twsk_put().
Only particular case is in inet_twsk_purge() but there is no point
to defer the inet_twsk_put() after re-enabling BH.
Lets rename inet_twsk_deschedule() to inet_twsk_deschedule_put()
and move the inet_twsk_put() inside.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Eric Dumazet [Wed, 8 Jul 2015 21:28:29 +0000 (14:28 -0700)]
inet: simplify timewait refcounting
timewait sockets have a complex refcounting logic.
Once we realize it should be similar to established and
syn_recv sockets, we can use sk_nulls_del_node_init_rcu()
and remove inet_twsk_unhash()
In particular, deferred inet_twsk_put() added in commit
13475a30b66cd ("tcp: connect() race with timewait reuse")
looks unecessary : When removing a timewait socket from
ehash or bhash, caller must own a reference on the socket
anyway.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Eric Dumazet [Wed, 8 Jul 2015 21:28:28 +0000 (14:28 -0700)]
inet: remove BUG_ON() in twsk_destructor()
Kernel will crash the same if one of the pointer is NULL anyway.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Florian Westphal [Wed, 8 Jul 2015 21:32:12 +0000 (23:32 +0200)]
ipv6: use flag instead of u16 for hop in inet6_skb_parm
Hop was always either 0 or sizeof(struct ipv6hdr).
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Aleksey S. Kazantsev [Wed, 8 Jul 2015 03:38:15 +0000 (20:38 -0700)]
dsa: mv88e6352/mv88e6xxx: Add support for Marvell
88E6320 and
88E6321
MV88E6320 and MV88E6321 are largely compatible to MV886352,
but are members of a different chip family.
Signed-off-by: Aleksey S. Kazantsev <ioctl@yandex.ru>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Thu, 9 Jul 2015 21:22:53 +0000 (14:22 -0700)]
Merge branch 'tcp-in-slow-start'
Yuchung Cheng says:
====================
tcp: fixes some congestion control corner cases
This patch series fixes corner cases of TCP congestion control.
First issue is to avoid continuing slow start when cwnd reaches ssthresh.
Second issue is incorrectly processing order of congestion state and
cwnd update when entering fast recovery or undoing cwnd.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Yuchung Cheng [Thu, 9 Jul 2015 20:16:31 +0000 (13:16 -0700)]
tcp: update congestion state first before raising cwnd
The congestion state and cwnd can be updated in the wrong order.
For example, upon receiving a dubious ACK, we incorrectly raise
the cwnd first (tcp_may_raise_cwnd()/tcp_cong_avoid()) because
the state is still Open, then enter recovery state to reduce cwnd.
For another example, if the ACK indicates spurious timeout or
retransmits, we first revert the cwnd reduction and congestion
state back to Open state. But we don't raise the cwnd even though
the ACK does not indicate any congestion.
To fix this problem we should first call tcp_fastretrans_alert() to
process the dubious ACK and update the congestion state, then call
tcp_may_raise_cwnd() that raises cwnd based on the current state.
Signed-off-by: Yuchung Cheng <ycheng@google.com>
Signed-off-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Nandita Dukkipati <nanditad@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Yuchung Cheng [Thu, 9 Jul 2015 20:16:30 +0000 (13:16 -0700)]
tcp: do not slow start when cwnd equals ssthresh
In the original design slow start is only used to raise cwnd
when cwnd is stricly below ssthresh. It makes little sense
to slow start when cwnd == ssthresh: especially
when hystart has set ssthresh in the initial ramp, or after
recovery when cwnd resets to ssthresh. Not doing so will
also help reduce the buffer bloat slightly.
Signed-off-by: Yuchung Cheng <ycheng@google.com>
Signed-off-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Nandita Dukkipati <nanditad@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Yuchung Cheng [Thu, 9 Jul 2015 20:16:29 +0000 (13:16 -0700)]
tcp: add tcp_in_slow_start helper
Add a helper to test the slow start condition in various congestion
control modules and other places. This is to prepare a slight improvement
in policy as to exactly when to slow start.
Signed-off-by: Yuchung Cheng <ycheng@google.com>
Signed-off-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Nandita Dukkipati <nanditad@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Alexander Duyck [Thu, 9 Jul 2015 18:02:52 +0000 (11:02 -0700)]
net: skb_defer_rx_timestamp should check for phydev before setting up classify
This change makes it so that the call skb_defer_rx_timestamp will first
check for a phydev before going in and manipulating the skb->data and
skb->len values. By doing this we can avoid unnecessary work on network
devices that don't support phydev. As a result we reduce the total
instruction count needed to process this on most devices.
Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Jon Maxwell [Wed, 8 Jul 2015 00:12:28 +0000 (10:12 +1000)]
tcp: v1 always send a quick ack when quickacks are enabled
V1 of this patch contains Eric Dumazet's suggestion to move the per
dst RTAX_QUICKACK check into tcp_in_quickack_mode(). Thanks Eric.
I ran some tests and after setting the "ip route change quickack 1"
knob there were still many delayed ACKs sent. This occured
because when icsk_ack.quick=0 the !icsk_ack.pingpong value is
subsequently ignored as tcp_in_quickack_mode() checks both these
values. The condition for a quick ack to trigger requires
that both icsk_ack.quick != 0 and icsk_ack.pingpong=0. Currently
only icsk_ack.pingpong is controlled by the knob. But the
icsk_ack.quick value changes dynamically depending on heuristics.
The crux of the matter is that delayed acks still cannot be entirely
disabled even with the RTAX_QUICKACK per dst knob enabled. This
patch ensures that a quick ack is always sent when the RTAX_QUICKACK
per dst knob is turned on.
The "ip route change quickack 1" knob was recently added to enable
quickacks. It was modeled around the TCP_QUICKACK setsockopt() option.
This issue is that even with "ip route change quickack 1" enabled
we still see delayed ACKs under some conditions. It would be nice
to be able to completely disable delayed ACKs.
Here is an example:
# netstat -s|grep dela
3 delayed acks sent
For all routes enable the knob
# ip route change quickack 1
Generate some traffic across a slow link and we still see the delayed
acks.
# netstat -s|grep dela
106 delayed acks sent
1 delayed acks further delayed because of locked socket
The issue is that both the "ip route change quickack 1" knob and
the TCP_QUICKACK option set the icsk_ack.pingpong variable to 0.
However at the business end in the __tcp_ack_snd_check() routine,
tcp_in_quickack_mode() checks that both icsk_ack.quick != 0
and icsk_ack.pingpong=0 in order to trigger a quickack. As
icsk_ack.quick is determined by heuristics it can be 0. When
that occurs the icsk_ack.pingpong value is ignored and a delayed
ACK is sent regardless.
This patch moves the RTAX_QUICKACK per dst check into the
tcp_in_quickack_mode() routine which ensures that a quickack is
always sent when the quickack knob is enabled for that dst.
Signed-off-by: Jon Maxwell <jmaxwell37@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Scott Feldman [Wed, 8 Jul 2015 23:06:47 +0000 (16:06 -0700)]
rocker: add change MTU support
Implement ndo_change_mtu: on MTU change, reallocate Rx ring bufs and signal
HW of new port MTU value.
Signed-off-by: Scott Feldman <sfeldma@gmail.com>
Reviewed-by: Simon Horman <simon.horman@netronome.com>
Tested-by: Simon Horman <simon.horman@netronome.com>
Acked-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
Vaishali Thakkar [Thu, 9 Jul 2015 04:55:39 +0000 (10:25 +0530)]
neterion: s2io: Use module_pci_driver
Use module_pci_driver for drivers whose init and exit functions
only register and unregister, respectively.
A simplified version of the Coccinelle semantic patch that performs
this transformation is as follows:
@a@
identifier f, x;
@@
-static f(...) { return pci_register_driver(&x); }
@b depends on a@
identifier e, a.x;
statement S;
@@
-static e(...) {
-pci_unregister_driver(&x);
-DBG_PRINT(INIT_DBG,"S");
- }
@c depends on a && b@
identifier a.f;
declarer name module_init;
@@
-module_init(f);
@d depends on a && b && c@
identifier b.e, a.x;
declarer name module_exit;
declarer name module_pci_driver;
@@
-module_exit(e);
+module_pci_driver(x);
Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Hariprasad Shenai [Thu, 9 Jul 2015 09:25:46 +0000 (14:55 +0530)]
cxgb4vf: Fix check to use new User Doorbell mechanism
If we don't have access to the new User GTS (T5+), use the old doorbell
mechanism; otherwise use the new BAR2 mechanism.
Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Xi Wang [Wed, 8 Jul 2015 21:00:56 +0000 (14:00 -0700)]
test_bpf: extend tests for 32-bit endianness conversion
Currently "ALU_END_FROM_BE 32" and "ALU_END_FROM_LE 32" do not test if
the upper bits of the result are zeros (the arm64 JIT had such bugs).
Extend the two tests to catch this.
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Alexei Starovoitov <ast@plumgrid.com>
Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Wed, 8 Jul 2015 23:13:55 +0000 (16:13 -0700)]
Merge branch 'cxgb4-t6'
Hariprasad Shenai says:
====================
Cleanup, T6 changes and register range update
This patch series adds the following:
Don't use entire L2T table, update register ranges for T6 adapter,
read stats for only available channels for T6 and enable cim_la dump for
T6 adapter also.
This patch series has been created against net-next tree and includes
patches on cxgb4 driver.
We have included all the maintainers of respective drivers. Kindly review
the change and let us know in case of any review comments.
====================
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Hariprasad Shenai [Tue, 7 Jul 2015 16:19:21 +0000 (21:49 +0530)]
cxgb4: Enable cim_la dump to support T6
Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Hariprasad Shenai [Tue, 7 Jul 2015 16:19:20 +0000 (21:49 +0530)]
cxgb4: Read stats for only available channels
Updating the driver to read the stats of only available channels. T6 and
later has only 2 channels
Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Hariprasad Shenai [Tue, 7 Jul 2015 16:19:19 +0000 (21:49 +0530)]
cxgb4: Update register ranges for T6 adapter
Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Hariprasad Shenai [Tue, 7 Jul 2015 16:19:18 +0000 (21:49 +0530)]
cxgb4: Don't use entire L2T table, use only its slice
The driver was retrieving the parameters for the bounds of its
slice of the L2T from the firmware and then throwing those away and
using the entire table. This corrects that problem.
Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Vaishali Thakkar [Tue, 7 Jul 2015 07:02:54 +0000 (12:32 +0530)]
net: ec_bhf: Use module_pci_driver
Use module_pci_driver for drivers whose init and exit functions
only register and unregister, respectively.
A simplified version of the Coccinelle semantic patch that performs
this transformation is as follows:
@a@
identifier f, x;
@@
-static f(...) { return pci_register_driver(&x); }
@b depends on a@
identifier e, a.x;
@@
-static e(...) { pci_unregister_driver(&x); }
@c depends on a && b@
identifier a.f;
declarer name module_init;
@@
-module_init(f);
@d depends on a && b && c@
identifier b.e, a.x;
declarer name module_exit;
declarer name module_pci_driver;
@@
-module_exit(e);
+module_pci_driver(x);
Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Haiyang Zhang [Mon, 6 Jul 2015 21:11:37 +0000 (14:11 -0700)]
hv_netvsc: Add support to set MTU reservation from guest side
When packet encapsulation is in use, the MTU needs to be reduced for
headroom reservation.
The existing code takes the updated MTU value only from the host side.
But vSwitch extensions, such as Open vSwitch, require the flexibility
to change the MTU to different values from within a guest during the
lifecycle of a vNIC, when the encapsulation protocol is changed. The
patch supports this kind of MTU changes.
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Reviewed-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Eric Dumazet [Mon, 6 Jul 2015 20:05:28 +0000 (22:05 +0200)]
ifb: add multiqueue operation
Add multiqueue capabilities to ifb netdevice.
This removes last bottleneck for ingress when mq qdisc can be used
to shard load from multiple RX queues on physical device.
Tested:
# netem based setup, installed at receiver side
ETH=eth0
IFB=ifb10
EST="est 1sec 4sec" # Optional rate estimator
RTT_HALF=2ms
#REORDER=20us
#LOSS="loss 1"
TXQ=8
ip link add ifb10 numtxqueues $TXQ type ifb
ip link set dev $IFB up
tc qdisc add dev $ETH ingress 2>/dev/null
tc filter add dev $ETH parent ffff: \
protocol ip u32 match u32 0 0 flowid 1:1 \
action mirred egress redirect dev $IFB
tc qdisc del dev $IFB root 2>/dev/null
tc qdisc add dev $IFB root handle 1: mq
for i in `seq 1 $TXQ`
do
slot=$( printf %x $(( i )) )
tc qd add dev $IFB parent 1:$slot $EST netem \
limit 100000 delay $RTT_HALF $REORDER $LOSS
done
lpaa24:~# tc -s -d qd sh dev ifb10
qdisc mq 1: root
Sent
316544766 bytes
5265927 pkt (dropped 0, overlimits 0 requeues 0)
backlog 98880b 1648p requeues 0
qdisc netem 8002: parent 1:1 limit 100000 delay 2.0ms
Sent
39601416 bytes 658721 pkt (dropped 0, overlimits 0 requeues 0)
rate 38235Kbit 79657pps backlog 12240b 204p requeues 0
qdisc netem 8003: parent 1:2 limit 100000 delay 2.0ms
Sent
39472866 bytes 657227 pkt (dropped 0, overlimits 0 requeues 0)
rate 38234Kbit 79655pps backlog 10620b 176p requeues 0
qdisc netem 8004: parent 1:3 limit 100000 delay 2.0ms
Sent
39703417 bytes 659699 pkt (dropped 0, overlimits 0 requeues 0)
rate 38320Kbit 79831pps backlog 12780b 213p requeues 0
qdisc netem 8005: parent 1:4 limit 100000 delay 2.0ms
Sent
39565149 bytes 658011 pkt (dropped 0, overlimits 0 requeues 0)
rate 38174Kbit 79530pps backlog 11880b 198p requeues 0
qdisc netem 8006: parent 1:5 limit 100000 delay 2.0ms
Sent
39506078 bytes 657354 pkt (dropped 0, overlimits 0 requeues 0)
rate 38195Kbit 79571pps backlog 12480b 208p requeues 0
qdisc netem 8007: parent 1:6 limit 100000 delay 2.0ms
Sent
39675994 bytes 658849 pkt (dropped 0, overlimits 0 requeues 0)
rate 38323Kbit 79838pps backlog 12600b 210p requeues 0
qdisc netem 8008: parent 1:7 limit 100000 delay 2.0ms
Sent
39532042 bytes 658367 pkt (dropped 0, overlimits 0 requeues 0)
rate 38177Kbit 79536pps backlog 13140b 219p requeues 0
qdisc netem 8009: parent 1:8 limit 100000 delay 2.0ms
Sent
39488164 bytes 657705 pkt (dropped 0, overlimits 0 requeues 0)
rate 38192Kbit 79568pps backlog 13Kb 222p requeues 0
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Alexei Starovoitov <ast@plumgrid.com>
Cc: Jamal Hadi Salim <jhs@mojatatu.com>
Cc: John Fastabend <john.fastabend@gmail.com>
Acked-by: Alexei Starovoitov <ast@plumgrid.com>
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Hariprasad Shenai [Mon, 6 Jul 2015 17:08:34 +0000 (22:38 +0530)]
cxgb4: Add PCI device ids for few more T5 and T6 adapters
Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Carol Soto [Mon, 6 Jul 2015 14:20:19 +0000 (09:20 -0500)]
net/mlx4_core: Add extra check for total vfs for SRIOV
Add extra check for total vfs for SRIOV to check if that value is
bigger than total vfs in pci SRIOV capabalities. Fix a check and
print of the number of maximum vfs that hw can handle. Fix a check
and print of the number of maximum vfs per port that driver can handle.
Signed-off-by: Carol L Soto <clsoto@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Michael Holzheu [Mon, 6 Jul 2015 14:20:07 +0000 (16:20 +0200)]
samples: bpf: enable trace samples for s390x
The trace bpf samples do not compile on s390x because they use x86
specific fields from the "pt_regs" structure.
Fix this and access the fields via new PT_REGS macros.
Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Acked-by: Alexei Starovoitov <ast@plumgrid.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Punnaiah Choudary Kalluri [Mon, 6 Jul 2015 04:32:53 +0000 (10:02 +0530)]
net: macb: Add SG support for Zynq SOC family
Enable SG support for Zynq SOC family devices.
Signed-off-by: Punnaiah Choudary Kalluri <punnaia@xilinx.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Li, Liang Z [Mon, 6 Jul 2015 00:42:56 +0000 (08:42 +0800)]
xen-netback: remove duplicated function definition
There are two duplicated xenvif_zerocopy_callback() definitions.
Remove one of them.
Signed-off-by: Liang Li <liang.z.li@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Wed, 8 Jul 2015 20:50:42 +0000 (13:50 -0700)]
Merge branch 'sch_act_lockless'
Eric Dumazet says:
====================
net_sched: act: lockless operation
As mentioned by Alexei last week in Budapest, it is a bit weird
to take a spinlock in order to drop a packet in a tc filter...
Lets add percpu infra for tc actions and use it for gact & mirred.
Before changes, my host with 8 RX queues was handling 5 Mpps with gact,
and more than 11 Mpps after.
Mirred change is not yet visible if ifb+qdisc is used, as ifb is
not yet multi queue enabled, but is a step forward.
====================
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Eric Dumazet [Mon, 6 Jul 2015 12:18:09 +0000 (05:18 -0700)]
net_sched: act_mirred: remove spinlock in fast path
Like act_gact, act_mirred can be lockless in packet processing
1) Use percpu stats
2) update lastuse only every clock tick to avoid false sharing
3) use rcu to protect tcfm_dev
4) Remove spinlock usage, as it is no longer needed.
Next step : add multi queue capability to ifb device
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Alexei Starovoitov <ast@plumgrid.com>
Cc: Jamal Hadi Salim <jhs@mojatatu.com>
Cc: John Fastabend <john.fastabend@gmail.com>
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Acked-by: Alexei Starovoitov <ast@plumgrid.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Eric Dumazet [Mon, 6 Jul 2015 12:18:08 +0000 (05:18 -0700)]
net_sched: act_gact: remove spinlock in fast path
Final step for gact RCU operation :
1) Use percpu stats
2) update lastuse only every clock tick to avoid false sharing
3) Remove spinlock acquisition, as it is no longer needed.
Since this is the last contended lock in packet RX when tc gact is used,
this gives impressive gain.
My host with 8 RX queues was handling 5 Mpps before the patch,
and more than 11 Mpps after patch.
Tested:
On receiver :
dev=eth0
tc qdisc del dev $dev ingress 2>/dev/null
tc qdisc add dev $dev ingress
tc filter del dev $dev root pref 10 2>/dev/null
tc filter del dev $dev pref 10 2>/dev/null
tc filter add dev $dev est 1sec 4sec parent ffff: protocol ip prio 1 \
u32 match ip src 7.0.0.0/8 flowid 1:15 action drop
Sender sends packets flood from 7/8 network
Signed-off-by: Eric Dumazet <edumazet@google.com>
Acked-by: Alexei Starovoitov <ast@plumgrid.com>
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Acked-by: John Fastabend <john.fastabend@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Eric Dumazet [Mon, 6 Jul 2015 12:18:07 +0000 (05:18 -0700)]
net_sched: act_gact: read tcfg_ptype once
Third step for gact RCU operation :
Following patch will get rid of spinlock protection,
so we need to read tcfg_ptype once.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Alexei Starovoitov <ast@plumgrid.com>
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Acked-by: John Fastabend <john.fastabend@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>