aboutsummaryrefslogtreecommitdiff
path: root/drivers/net
AgeCommit message (Collapse)AuthorFilesLines
2016-03-07mwifiex: add delay when tdls confirm frame is queuedXinming Hu1-0/+7
It is observed that driver may send the data packet to tdls peer before tdls peer receives tdls setup confirm frame. Similar race condition exists during tdls teardown procedure also. This patch adds 10 milliseconds delay to resolve the race. Signed-off-by: Xinming Hu <[email protected]> Signed-off-by: Cathy Luo <[email protected]> Signed-off-by: Amitkumar Karwar <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-03-07rtlwifi: pass struct rtl_stats by reference as it is more efficientColin Ian King12-16/+16
passing rtl_stats by value is inefficient; the structure is over 300 bytes in size and generally just one field (packet_report_type) is being accessed, so the pass by value is a relatively large overhead. This change just affects just the rx_command_packet calls. Signed-off-by: Colin Ian King <[email protected]> Acked-by: Larry Finger <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-03-07at76c50x-usb: avoid double usb_put_dev() after downloading internal firmware ↵Alexey Khoroshilov1-2/+0
in at76_probe() There is no need in usb_put_dev() if at76_load_internal_fw() succeed. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-03-07mwifiex: Use to_delayed_work()Amitoj Kaur Chawla1-4/+2
Introduce the use of to_delayed_work() helper function instead of open coding it with container_of() A simplified version of the Coccinelle semantic patch used to make this change is: //<smpl> @@ expression a; symbol work; @@ - container_of(a, struct delayed_work, work) + to_delayed_work(a) //</smpl> Signed-off-by: Amitoj Kaur Chawla <[email protected]> Reviewed-by: Julian Calaby <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-03-07brcmfmac: add 802.11w management frame protection supportHante Meuleman6-75/+211
Add full support for both AP and STA for management frame protection. Reviewed-by: Arend Van Spriel <[email protected]> Reviewed-by: Franky (Zhenhui) Lin <[email protected]> Reviewed-by: Pieter-Paul Giesberts <[email protected]> Signed-off-by: Hante Meuleman <[email protected]> Signed-off-by: Arend van Spriel <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-03-07brcmfmac: integrate add_keyext in add_keyHante Meuleman1-115/+39
brcmf_add_keyext is called when a key is configured for a specific mac address. This function is very similar to the calling function brcmf_add_key. Integrate this function and also use existing del_key function in case key is to be cleared. Reviewed-by: Arend Van Spriel <[email protected]> Reviewed-by: Franky (Zhenhui) Lin <[email protected]> Reviewed-by: Pieter-Paul Giesberts <[email protected]> Signed-off-by: Hante Meuleman <[email protected]> Signed-off-by: Arend van Spriel <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-03-07brcmfmac: merge platform data and module paramatersHante Meuleman11-110/+139
Merge module parameters and platform data in one struct. This is the last step to move to the new platform data per device. Now parameters of platform data will be merged with module parameters per device. Reviewed-by: Arend Van Spriel <[email protected]> Reviewed-by: Franky (Zhenhui) Lin <[email protected]> Reviewed-by: Pieter-Paul Giesberts <[email protected]> Signed-off-by: Hante Meuleman <[email protected]> Signed-off-by: Arend van Spriel <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-03-07brcmfmac: switch to new platform dataHante Meuleman8-87/+97
Platform data is only available for sdio. With this patch a new platform data structure is being used which allows for platform data for any device and configurable per device. This patch only switches to the new structure and adds support for SDIO devices. Reviewed-by: Arend Van Spriel <[email protected]> Reviewed-by: Franky (Zhenhui) Lin <[email protected]> Reviewed-by: Pieter-Paul Giesberts <[email protected]> Signed-off-by: Hante Meuleman <[email protected]> Signed-off-by: Arend van Spriel <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-03-07brcmfmac: keep ARP and ND offload enabled during WOWLHante Meuleman3-3/+8
Currently ARP and ND (IPv6 Neigbor Discovery) offload get disabled on entering suspend. However when firmwares support the wowl_cap iovar then these offload routines can be kept enabled as they will work during WOWL as well. Reviewed-by: Arend Van Spriel <[email protected]> Reviewed-by: Franky (Zhenhui) Lin <[email protected]> Reviewed-by: Pieter-Paul Giesberts <[email protected]> Signed-off-by: Hante Meuleman <[email protected]> Signed-off-by: Arend van Spriel <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-03-07brcmfmac: move platform data retrieval code to commonHante Meuleman5-85/+84
In preparation of module parameters for all devices the module platform data retrieval is moved from sdio to common. It is still only used for sdio devices. Reviewed-by: Arend Van Spriel <[email protected]> Reviewed-by: Franky (Zhenhui) Lin <[email protected]> Reviewed-by: Pieter-Paul Giesberts <[email protected]> Signed-off-by: Hante Meuleman <[email protected]> Signed-off-by: Arend van Spriel <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-03-07brcmfmac: add wowl gtk rekeying offload supportHante Meuleman5-13/+93
This patch adds support for gtk rekeying offload and for gtk rekeying failure during wowl mode. Reviewed-by: Arend Van Spriel <[email protected]> Reviewed-by: Franky (Zhenhui) Lin <[email protected]> Reviewed-by: Pieter-Paul Giesberts <[email protected]> Signed-off-by: Hante Meuleman <[email protected]> Signed-off-by: Arend van Spriel <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-03-07brcmfmac: move module init and exit to commonHante Meuleman4-15/+39
In preparation of module parameters for all devices the module init and exit routines are moved to the common file. Reviewed-by: Arend Van Spriel <[email protected]> Reviewed-by: Franky (Zhenhui) Lin <[email protected]> Reviewed-by: Pieter-Paul Giesberts <[email protected]> Signed-off-by: Hante Meuleman <[email protected]> Signed-off-by: Arend van Spriel <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-03-07brcmfmac: increase timeout for tx eapolHante Meuleman1-1/+1
When keys get set and updated this has to happen after eapol got transmitted (without key or old key) before the key can be updated. To make sure the order of sending eapol and configuring key is done correctly a timeout for tx of eapol is applied. This timeout is set to 50 msec, which is not always enough. Especially in AP mode and key updates the timeout may need to be much longer because client(s) can be in powersave. Increase the timeout from 50 to 950 msec. Reviewed-by: Arend Van Spriel <[email protected]> Reviewed-by: Pieter-Paul Giesberts <[email protected]> Signed-off-by: Hante Meuleman <[email protected]> Signed-off-by: Arend van Spriel <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-03-07brcmfmac: remove pcie gen1 supportHante Meuleman1-115/+20
The PCIE bus driver supports older gen1 (v1) chips, but there is no actual device which is using this older pcie core which is supported by brcmfmac. Remove all gen1 related code. Reviewed-by: Arend Van Spriel <[email protected]> Reviewed-by: Franky (Zhenhui) Lin <[email protected]> Reviewed-by: Pieter-Paul Giesberts <[email protected]> Signed-off-by: Hante Meuleman <[email protected]> Signed-off-by: Arend van Spriel <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-03-07brcmfmac: add support for the PCIE 4366c0 chipHante Meuleman1-1/+3
A newer version of the 4366 PCIE chip has been released. Add support for this version of the chip. Reviewed-by: Arend Van Spriel <[email protected]> Reviewed-by: Pieter-Paul Giesberts <[email protected]> Signed-off-by: Hante Meuleman <[email protected]> Signed-off-by: Arend van Spriel <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-03-07brcmfmac: use bar1 window size as provided by pci subsystemHante Meuleman1-6/+4
The PCIE bar1 window size is specified by chip. Currently the ioremap of bar1 was using a define which always matched the size of bar1, but newer chips can have a different bar1 sizes. With this patch the ioremap will be called with the by chip provided window size. Reviewed-by: Arend Van Spriel <[email protected]> Reviewed-by: Franky (Zhenhui) Lin <[email protected]> Reviewed-by: Pieter-Paul Giesberts <[email protected]> Signed-off-by: Hante Meuleman <[email protected]> Signed-off-by: Arend van Spriel <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-03-07brcmfmac: use device memsize config from fw if definedHante Meuleman1-0/+33
Newer type pcie devices have memory which get shared between fw and hw. The division of this memory is done firmware compile time. As a result the ramsize as used by driver needs to be adjusted for this. This is done by reading the memory size from the firmware. Reviewed-by: Arend Van Spriel <[email protected]> Reviewed-by: Franky (Zhenhui) Lin <[email protected]> Reviewed-by: Pieter-Paul Giesberts <[email protected]> Signed-off-by: Hante Meuleman <[email protected]> Signed-off-by: Arend van Spriel <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-03-07brcmfmac: check return for ARP ip setting iovarFranky Lin1-8/+8
The return value of iovar set function should be saved and checked. Reviewed-by: Pieter-Paul Giesberts <[email protected]> Reviewed-by: Hante Meuleman <[email protected]> Signed-off-by: Franky Lin <[email protected]> Signed-off-by: Arend van Spriel <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-03-07brcmfmac: add neighbor discovery offload ip address table configurationFranky Lin3-27/+141
Configure ipv6 address for neighbor discovery offload ip table in firmware obtained through ipv6 address notification callback. Reviewed-by: Hante Meuleman <[email protected]> Reviewed-by: Pieter-Paul Giesberts <[email protected]> Signed-off-by: Franky Lin <[email protected]> Signed-off-by: Arend van Spriel <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-03-07brcmfmac: Add length checks on firmware eventsHante Meuleman4-58/+87
Add additional length checks on firmware events to create more robust code. Reviewed-by: Arend Van Spriel <[email protected]> Reviewed-by: Franky (Zhenhui) Lin <[email protected]> Reviewed-by: Pieter-Paul Giesberts <[email protected]> Reviewed-by: Lei Zhang <[email protected]> Signed-off-by: Hante Meuleman <[email protected]> Signed-off-by: Arend van Spriel <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-03-07brcmfmac: Configure country code using device specific settingsHante Meuleman4-13/+101
Country code configuration in a device is a device specific operation. For this the country code as specified by reg notifier (iso3166 alpha2) needs to be translated to a device specific country locale and revision number. This patch adds this translation and puts a placeholder in the device specific settings where the translation table can be stored. Additional patches will be needed to read these tables from for example device platform data. Reviewed-by: Arend Van Spriel <[email protected]> Reviewed-by: Franky (Zhenhui) Lin <[email protected]> Reviewed-by: Pieter-Paul Giesberts <[email protected]> Signed-off-by: Hante Meuleman <[email protected]> Signed-off-by: Arend van Spriel <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-03-07brcmfmac: check for wowl support before enumerating feature flagFranky Lin1-1/+2
In some cases wiphy->wowlan could be NULL if firmware doesn't have the support. Driver should check for support before walking down the feature flags. Reviewed-by: Arend Van Spriel <[email protected]> Reviewed-by: Pieter-Paul Giesberts <[email protected]> Reviewed-by: Hante Meuleman <[email protected]> Signed-off-by: Franky Lin <[email protected]> Signed-off-by: Arend van Spriel <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-03-07brcmfmac: Limit memory allocs to <64KHante Meuleman2-14/+15
Some systems have problems with allocating memory allocation larger then 64K. Often on unload/load or suspend/resume a failure is reported: Could not allocate wiphy device. This patch makes the escan intermediate storage buf dynamically allocated, and smaller than 64K. Reviewed-by: Arend Van Spriel <[email protected]> Reviewed-by: Franky (Zhenhui) Lin <[email protected]> Reviewed-by: Pieter-Paul Giesberts <[email protected]> Signed-off-by: Hante Meuleman <[email protected]> Signed-off-by: Arend van Spriel <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-03-07brcmfmac: change function name for brcmf_cfg80211_wait_vif_event_timeout()Arend van Spriel3-14/+15
Dropping the '_timeout' from the function name as the fact that a timeout value is passed makes it obvious a timeout is used. Also helps to keep code lines a bit shorter and easier to stick to 80 char boundary. Reviewed-by: Hante Meuleman <[email protected]> Reviewed-by: Pieter-Paul Giesberts <[email protected]> Signed-off-by: Arend van Spriel <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-03-07rtlwifi: Change long delays to sleepsLarry Finger1-32/+12
Routine rtl_addr_delay() uses delay statements in code that can sleep. To improve system responsiveness, the various delay statements are changed. In addition, routines rtl_rfreg_delay() and rtl_bb_delay() are rewritten to use the code in rtl_addr_delay() for most of their input values. Suggested-by: Byeoungwook Kim <[email protected]> Signed-off-by: Larry Finger <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-03-07carl9170: import 1.9.9 firmware headersChristian Lamparter4-6/+87
Import new headers from my firmware branch: <https://github.com/chunkeey/carl9170fw> Signed-off-by: Christian Lamparter <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-03-07rt2x00: unterminated strlen of user dataOne Thousand Gnomes1-2/+3
The buffer needs to be zero terminated in case the user data is not. Otherwise we run off the end of the buffer. Signed-off-by: Alan Cox <[email protected]> Reviewed-by: Julian Calaby <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-03-07rtlwifi: rtl8821ae: Silence useless log outputLarry Finger1-1/+1
When driver rtl8821ae is loaded but not connected to any AP, it logs a "firmware not ready to run" message roughly once a minute. To eliminate logging this massage under normal debug conditions, the degug level needed to print this message is increased. Signed-off-by: Larry Finger <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2016-03-07iwlwifi: mvm: extend time event durationSara Sharon2-5/+3
Before authentication, we start a time event during which we wait for a beacon in order to sync our timers. If we didn't hear the beacon during this time - we abandon the connection. However, in congested environment, it was observed we might not hear beacons in that time slot. Extend the time event to give the connection a better chance. Signed-off-by: Sara Sharon <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]>
2016-03-07iwlwifi: mvm: set the correct amsdu enum valuesSara Sharon1-3/+2
The amsdu enum values are off by 1 bit. Fix it. Signed-off-by: Sara Sharon <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]>
2016-03-07iwlwifi: mvm: fix unregistration of thermal in some error flowsChaya Rachel Ivgi1-3/+3
The call to iwl_mvm_thermal_initialize() was too early in the function. Unregister will be performed when goto out_unregister is called, but as the code was - out_free may be called and leave without unregistering from thermal. Signed-off-by: Chaya Rachel Ivgi <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]>
2016-03-07iwlwifi: refactor the code that reads the MAC address from the NVMSara Sharon3-58/+55
It makes it slightly easier to follow. Pass the pointer to the transport which allows to read WFMP_MAC_ADDR_X register only when needed and to use IWL_ERR instead of the less commonly used IWL_ERR_DEV logger macro. Signed-off-by: Sara Sharon <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]>
2016-03-06net: eth: altera: do not free array priv->mdio->irqColin Ian King1-1/+0
priv->mdio->irq used to be allocated and required freeing, but it is now a fixed sized array and should no longer be free'd. Issue detected using static analysis with CoverityScan Fixes: e7f4dc3536a400 ("mdio: Move allocation of interrupts into core") Signed-off-by: Colin Ian King <[email protected]> Reviewed-by: Andrew Lunn <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-03-06net/ethoc: do not free array priv->mdio->irqColin Ian King1-1/+0
priv->mdio->irq used to be allocated and required freeing, but it is now a fixed sized array and should no longer be free'd. Issue detected using static analysis with CoverityScan Fixes: e7f4dc3536a400 ("mdio: Move allocation of interrupts into core") Signed-off-by: Colin Ian King <[email protected]> Reviewed-by: Tobias Klauser <[email protected]> Reviewed-by: Andrew Lunn <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-03-06asix: do not free array priv->mdio->irqColin Ian King1-1/+0
Used to be allocated and required freeing, but now priv->mdio->irq is now a fixed sized array and should no longer be free'd. Issue detected using static analysis with CoverityScan Fixes: e7f4dc3536a400 ("mdio: Move allocation of interrupts into core") Signed-off-by: Colin Ian King <[email protected]> Reviewed-by: Andrew Lunn <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-03-06net: fec: Rename "phy-reset-active-low" propertyBernhard Walle1-4/+4
is actually "active high". Thanks for Troy Kisky for pointing that out. Since the patch is in linux-next, this patch is incremental and doesn't replace the original patch. Signed-off-by: Bernhard Walle <[email protected]> Acked-by: Fugang Duan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-03-06stmmac: fix noderef.cocci warningsWu Fengguang1-1/+1
drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c:115:15-21: ERROR: application of sizeof to pointer sizeof when applied to a pointer typed expression gives the size of the pointer Generated by: scripts/coccinelle/misc/noderef.cocci CC: Giuseppe Cavallaro <[email protected]> Signed-off-by: Fengguang Wu <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-03-06gianfar: Enable eTSEC-106 erratum w/a for MPC8548E Rev2Atsushi Nemoto1-1/+3
Enable workaround for MPC8548E erratum eTSEC 106, "Excess delays when transmitting TOE=1 large frames". (see commit 53fad77375ce "gianfar: Enable eTSEC-20 erratum w/a for P2020 Rev1") This erratum was fixed in Rev 3.1.x. Signed-off-by: Atsushi Nemoto <[email protected]> Acked-by: Claudiu Manoil <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-03-06iwlwifi: mvm: avoid panics with thermal device usageEmmanuel Grumbach2-27/+31
Thermal zone device registration can fail, and in this case we don't want to remove WiFi functionality. This is why the thermal zone registration function is void, and the flows continue even if the thermal zone device registration failed. Same applies for the cooling device. This means that we at least need to remember that the thermal zone device didn't register properly and take the minimal precautions to avoid panic'ing when we access it. This was missing. Signed-off-by: Emmanuel Grumbach <[email protected]>
2016-03-06iwlwifi: pcie: set RB chunk size back to 64Sara Sharon1-2/+1
128 byte chunk size is supported only on PCIe and not on IOSF. For now, change it back to 64 byte. Reported-by: Oren Givon <[email protected]> Signed-off-by: Sara Sharon <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]>
2016-03-06iwlwifi: pcie: refactor RXBs reclaiming codeSara Sharon1-42/+33
Change the code to move rxbs directly from the allocator's list to the queue's free list. This makes the code more readable, saves the interim array and the double loop over the free RBs. Signed-off-by: Sara Sharon <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]>
2016-03-06iwlwifi: pcie: forbid RTPM on device removalLuca Coelho2-6/+28
The pci driver keeps any unbound device in active state and forbids runtime PM. When our driver gets probed, we take control of the state. When the device is released (i.e. during unbind or module removal), we should return the state to what it was before. To do so, we need to forbid RTPM in the driver remove op. Additionally, remove an unnecessary pm_runtime_disable() call, move the initial ref_count setting to a better place and add some comments explaining what is going on. Signed-off-by: Luca Coelho <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]>
2016-03-06Merge 'net-next/master'Kalle Valo251-3985/+11355
Needed by the upcoming merge of iwlwifi-next-for-kalle-2016-03-02 tag.
2016-03-06Merge ath-next from ath.gitKalle Valo46-470/+2530
ath.git patches for 4.6. Major changes: ath10k * dt: add bindings for ipq4019 wifi block * start adding support for qca4019 chip ath9k * add device ID for Toshiba WLM-20U2/GN-1080 * allow more than one interface on DFS channels
2016-03-04mac80211_hwsim: use reset to set mac headerZhang Shengju1-2/+2
Since offset is zero, it's not necessary to use set function. Reset function is straightforward, and will remove the unnecessary add operation in set function. Signed-off-by: Zhang Shengju <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-03-04vxlan: use reset to set header pointersZhang Shengju1-3/+3
Since offset is zero, it's not necessary to use set function. Reset function is straightforward, and will remove the unnecessary add operation in set function. Signed-off-by: Zhang Shengju <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-03-04can: mcp251x: avoid write to error flag register if it's unnecessaryEd Spiridonov1-1/+1
Only two bits (RX0OVR and RX1OVR) are writable in EFLG, write is useless if these bits aren't set. Signed-off-by: Ed Spiridonov <[email protected]> Signed-off-by: Marc Kleine-Budde <[email protected]>
2016-03-03e1000e: Adds hardware supported cross timestamp on e1000e nicChristopher S. Hall4-0/+103
Modern Intel systems supports cross timestamping of the network device clock and Always Running Timer (ART) in hardware. This allows the device time and system time to be precisely correlated. The timestamp pair is returned through e1000e_phc_get_syncdevicetime() used by get_system_device_crosststamp(). The hardware cross-timestamp result is made available to applications through the PTP_SYS_OFFSET_PRECISE ioctl which calls e1000e_phc_getcrosststamp(). Cc: Prarit Bhargava <[email protected]> Cc: Richard Cochran <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Andy Lutomirski <[email protected]> Cc: Jeff Kirsher <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Acked-by: Jeff Kirsher <[email protected]> Signed-off-by: Christopher S. Hall <[email protected]> [jstultz: Reworked to use new interface, commit message tweaks] Signed-off-by: John Stultz <[email protected]>
2016-03-03net: ezchip: adapt driver to little endian architectureLada Trimasova2-332/+238
Since ezchip network driver is written with big endian EZChip platform it is necessary to add support for little endian architecture. The first issue is that the order of the bits in a bit field is implementation specific. So all the bit fields are removed. Named constants are used to access necessary fields. And the second one is that network byte order is big endian. For example, data on ethernet is transmitted with most-significant octet (byte) first. So in case of little endian architecture it is important to swap data byte order when we read it from register. In case of unaligned access we can use "get_unaligned_be32" and in other case we can use function "ioread32_rep" which reads all data from register and works either with little endian or big endian architecture. And then when we are going to write data to register we need to restore byte order using the function "put_unaligned_be32" in case of unaligned access and in other case "iowrite32_rep". The last little fix is a space between type and pointer to observe coding style. Signed-off-by: Lada Trimasova <[email protected]> Cc: Alexey Brodkin <[email protected]> Cc: Noam Camus <[email protected]> Cc: Tal Zilcer <[email protected]> Cc: Arnd Bergmann <[email protected]> Acked-by: Arnd Bergmann <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-03-03be2net: don't enable multicast flag in be_enable_if_filters() routineVenkat Duvvuru2-10/+15
When the interface is opened (in be_open()) the routine be_enable_if_filters() must be called to switch on the basic filtering capabilities of an interface that are not changed at run-time. These include the flags UNTAGGED, BROADCAST and PASS_L3L4_ERRORS. Other flags such as MULTICAST and PROMISC must be enabled later by be_set_rx_mode() based on the state in the netdev/adapter struct. be_enable_if_filters() routine is wrongly trying to enable MULTICAST flag without checking the current adapter state. This can cause the RX_FILTER cmds to the FW to fail. This patch fixes this problem by only enabling the basic filtering flags in be_enable_if_filters(). The VF must be able to issue RX_FILTER cmd with any filter flag, as long as the PF allowed those flags (if_cap_flags) in the iface it provisioned for the VF. This rule is applicable even when the VF doesn't have the FILTMGMT privilege. There is a bug in BE3 FW that wrongly fails RX_FILTER multicast programming cmds on VFs that don't have FILTMGMT privilege. This patch also helps in insulating the VF driver from be_open failures due to the FW bug. A fix for the BE3 FW issue will be available in versions >= 11.0.283.0 and 10.6.334.0 Reported-by: Ivan Vecera <[email protected]> Signed-off-by: Venkat Duvvuru <[email protected]> Signed-off-by: Sathya Perla <[email protected]> Signed-off-by: David S. Miller <[email protected]>