aboutsummaryrefslogtreecommitdiff
path: root/drivers/net
AgeCommit message (Collapse)AuthorFilesLines
2013-08-25Merge branch 'for-davem' of ↵David S. Miller20-1278/+1130
git://git.kernel.org/pub/scm/linux/kernel/git/bwh/sfc-next Merge SFC driver changes from Ben Hutchings. Signed-off-by: David S. Miller <[email protected]>
2013-08-23Merge branch 'master' of ↵John W. Linville6-6/+18
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless into for-davem
2013-08-23cfg80211: add flags to cfg80211_rx_mgmt()Vladimir Kondratiev4-9/+8
Add flags intended to report various auxiliary information and introduce the NL80211_RXMGMT_FLAG_ANSWERED flag to report that the frame was already answered by the device. Signed-off-by: Vladimir Kondratiev <[email protected]> [REPLIED->ANSWERED, reword commit message] Signed-off-by: Johannes Berg <[email protected]>
2013-08-23mac80211: move setting WIPHY_FLAG_SUPPORTS_SCHED_SCAN into driversJohannes Berg1-1/+2
mac80211 currently sets WIPHY_FLAG_SUPPORTS_SCHED_SCAN based on whether the start_sched_scan operation is supported or not, but that will not be correct for all drivers, we're adding scheduled scan to the iwlmvm driver but it depends on firmware support. Therefore, move setting WIPHY_FLAG_SUPPORTS_SCHED_SCAN into the drivers so that they can control it regardless of implementing the operation. This currently only affects the TI drivers since they're the only ones implementing scheduled scan (in a mac80211 driver.) Acked-by: Luciano Coelho <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2013-08-22fs_enet: cleanup clock API useGerhard Sittig1-0/+20
make the Freescale ethernet driver get, prepare and enable the FEC clock during probe(); disable and unprepare the clock upon remove(), put is done by the devm approach; hold a reference to the clock over the period of use. clock lookup is non-fatal as not all platforms provide clock specs in their device tree; failure to enable specified clocks is fatal. Signed-off-by: Gerhard Sittig <[email protected]> Signed-off-by: Anatolij Gustschin <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-08-22fs_enet: silence a build warning (unused variable)Gerhard Sittig1-1/+0
Since commit 720a43efd30f04a0a492c85fb997361c44fbae05 (drivers:net: Remove unnecessary OOM messages after netdev_alloc_skb) there is a build warning: drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c: In function 'tx_skb_align_workaround': drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c:586:26: warning: unused variable 'fep' Fix it. Signed-off-by: Gerhard Sittig <[email protected]> Signed-off-by: Anatolij Gustschin <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-08-22Merge branch 'for-davem' of git://gitorious.org/linux-can/linux-can-next ↵David S. Miller3-3/+3
into cpsw Marc Kleine-Budde says: ==================== another pull-request for net-next. It consists of two patches by Libo Chen, the at91 and flexcan driver make use of platform_set_drvdata() rather than open coding it. Chen Gang improves the error checking in the c_can_platform driver's probe function. ==================== Signed-off-by: David S. Miller <[email protected]>
2013-08-22net: ethernet: davinci_cpdma: export cpdma_chan_get_statsDaniel Mack1-0/+1
This is needed when the cpsw driver is built as module. Signed-off-by: Daniel Mack <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-08-22be2net: fix disabling TX in be_close()Sathya Perla1-1/+1
commit fba875591 ("disable TX in be_close()") disabled TX in be_close() to protect be_xmit() from touching freed up queues in the AER recovery flow. But, TX must be disabled *before* cleaning up TX completions in the close() path, not after. This allows be_tx_compl_clean() to free up all TX-req skbs that were notified to the HW. Signed-off-by: Sathya Perla <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-08-22ethernet: broadcom: remove unnecessary platform_set_drvdata()Jingoo Han1-1/+0
The driver core clears the driver data to NULL after device_release or on probe failure. Thus, it is not needed to manually clear the device driver data to NULL. Signed-off-by: Jingoo Han <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-08-22ethernet: moxa: remove unnecessary platform_set_drvdata()Jingoo Han1-1/+0
The driver core clears the driver data to NULL after device_release or on probe failure. Thus, it is not needed to manually clear the device driver data to NULL. Signed-off-by: Jingoo Han <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-08-22Merge branch 'sfc-3.11' of git://git.kernel.org/pub/scm/linux/kernel/git/bwh/sfcDavid S. Miller1-1/+1
Merge in a fix for RX MAC address filter programming bug in the sfc driver. Signed-off-by: David S. Miller <[email protected]>
2013-08-22r8169: fix invalid register dumpPeter Wu1-1/+5
For some reason, my PCIe RTL8111E onboard NIC on a GA-Z68X-UD3H-B3 motherboard reads as FFs when reading from MMIO with a block size larger than 7. Therefore change to reading blocks of four bytes. Ben Hutchings noted that the buffer is large enough to hold all registers, so now all registers are read. Signed-off-by: Peter Wu <[email protected]> Acked-by: Francois Romieu <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-08-22brcmsmac: add support for BCM4313 iPA variantArend van Spriel1-20/+53
This patch completes the changes needed for supporting the iPA variant cards of the BCM4313 wireless chipset. Tested-by: David Herrmann <[email protected]> Reviewed-by: Pieter-Paul Giesberts <[email protected]> Signed-off-by: Arend van Spriel <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-08-22brcmsmac: reinitialize TSSI power control upon channel switchArend van Spriel1-0/+2
When changing channels the TSSI based power control needs to be reinitialized. Tested-by: David Herrmann <[email protected]> Reviewed-by: Pieter-Paul Giesberts <[email protected]> Signed-off-by: Arend van Spriel <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-08-22brcmsmac: correct phy registers for TSSI-based power controlArend van Spriel1-0/+20
A number of additional phy registers needs to be programmed when using TSSI-based power control. Tested-by: David Herrmann <[email protected]> Reviewed-by: Pieter-Paul Giesberts <[email protected]> Signed-off-by: Arend van Spriel <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-08-22brcmsmac: rework switch control table init including iPA BT-comboArend van Spriel3-15/+89
Rework the code path in lcnphy tbl_init() for switch control table programming. This also takes the iPA BT-combo card into account. Tested-by: David Herrmann <[email protected]> Reviewed-by: Pieter-Paul Giesberts <[email protected]> Signed-off-by: Arend van Spriel <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-08-22brcmsmac: avoid calling set_txpwr_by_index() twiceArend van Spriel1-1/+1
For lcnphy revision 1 or when hardware supports i/q calibration the function wlc_lcnphy_set_txpwr_by_index() was called twice. Tested-by: David Herrmann <[email protected]> Reviewed-by: Pieter-Paul Giesberts <[email protected]> Signed-off-by: Arend van Spriel <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-08-22brcmsmac: fix TSSI idle estimationArend van Spriel1-0/+9
The baseband multiplier must be zero during TSSI idle estimation and restored afterwards. Reviewed-by: Pieter-Paul Giesberts <[email protected]> Tested-by: David Herrmann <[email protected]> Signed-off-by: Arend van Spriel <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-08-22brcmsmac: change lcnphy receive i/q calibration routineArend van Spriel1-20/+58
The gain level control for the test tone has been changed. This calbration test tone is used to determine the i/q compensation. The i/q calibration routine has been reworked to accomodate this. Cc: Jonas Gorski <[email protected]> Tested-by: David Herrmann <[email protected]> Reviewed-by: Pieter-Paul Giesberts <[email protected]> Reviewed-by: Hante Meuleman <[email protected]> Signed-off-by: Arend van Spriel <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-08-22brcmsmac: update transmit gain table for lcn phyArend van Spriel1-108/+108
Update the transmit gain table for bcm4313 chip family. Tested-by: David Herrmann <[email protected]> Reviewed-by: Pieter-Paul Giesberts <[email protected]> Signed-off-by: Arend van Spriel <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-08-22brcmsmac: add debug info message providing phy and radio infoArend van Spriel1-1/+3
For debug purposes it is good to have the phy and radio information available in the log. Only logged when driver is built when BRCMDBG or BRCM_TRACING kconfig are set. Tested-by: David Herrmann <[email protected]> Reviewed-by: Pieter-Paul Giesberts <[email protected]> Signed-off-by: Arend van Spriel <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-08-22brcmsmac: use ARRAY_SIZE in phytbl_lcn.cArend van Spriel1-73/+44
This patch converts all sizeof(x)/sizeof(x[0]) instances to ARRAY_SIZE macro in phytbl_lcn.c. The patch was made using spatch with ARRAY_SIZE.cocci (see [1]). [1] https://github.com/coccinelle/coccinelle/tree/master/demos/janitorings Cc: Jonas Gorski <[email protected]> Tested-by: David Herrmann <[email protected]> Reviewed-by: Hante Meuleman <[email protected]> Reviewed-by: Pieter-Paul Giesberts <[email protected]> Signed-off-by: Arend van Spriel <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-08-22brcmsmac: change pa_gain for bcm4313 iPAArend van Spriel1-5/+2
The function wlc_lcnphy_load_tx_gain_table() has a target PA gain specified for the iPA variant of the bcm4313. This gain value is reduced to avoid PA distortion. The if-statement is removed because it was rather redundant in the first place. Please note that this patch does not provide full iPA support. Cc: Jonas Gorski <[email protected]> Tested-by: David Herrmann <[email protected]> Reviewed-by: Pieter-Paul Giesberts <[email protected]> Reviewed-by: Hante Meuleman <[email protected]> Signed-off-by: Arend van Spriel <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-08-22brcmsmac: cosmetic change in phy_lcn.cArend van Spriel1-107/+106
Cleaning up some code fragments reducing indentation and uncluttering some lines. Apart from whitespace there are no actual code changes made. Cc: Jonas Gorski <[email protected]> Tested-by: David Herrmann <[email protected]> Reviewed-by: Pieter-Paul Giesberts <[email protected]> Signed-off-by: Arend van Spriel <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-08-22ath9k: Add one more PCI ID for CUS198Sujith Manoharan1-0/+5
This is a AR9485/WB225 based card. Signed-off-by: Sujith Manoharan <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-08-22mwifiex: do not create AP and P2P interfaces upon driver loadingBing Zhao1-14/+0
Bug 60747 - 1286:2044 [Microsoft Surface Pro] Marvell 88W8797 wifi show 3 interface under network https://bugzilla.kernel.org/show_bug.cgi?id=60747 This issue was also reported previously by OLPC and some folks from the community. There are 3 network interfaces with different types being created when mwifiex driver is loaded: 1. mlan0 (infra. STA) 2. uap0 (AP) 3. p2p0 (P2P_CLIENT) The Network Manager attempts to use all 3 interfaces above without filtering the managed interface type. As the result, 3 identical interfaces are displayed under network manager. If user happens to click on an entry under which its interface is uap0 or p2p0, the association will fail. Work around it by removing the creation of AP and P2P interfaces at driver loading time. These interfaces can be added with 'iw' or other applications manually when they are needed. Signed-off-by: Bing Zhao <[email protected]> Signed-off-by: Avinash Patil <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-08-22ath9k: Add antenna diversity tweak for CUS198Sujith Manoharan4-0/+9
This improves RX diversity and performance for AR9485. Signed-off-by: Sujith Manoharan <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-08-22ath9k: Add support for AR9485 1.2Sujith Manoharan3-13/+13
Signed-off-by: Sujith Manoharan <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-08-22rt2x00: rt2800lib: adjust frequency offset for RF3053Gabor Juhos1-1/+1
Along with other chipsets, the Ralink driver uses the frequency adjustment code for RF3053 as well. Remove the bogus place-holder comment from the RF3053 specific channel configuration function and call the frequency adjustment function instead Based on the DPO_RT5572_LinuxSTA_2.6.0.1_20120629 driver. Reference: RT3593_ChipSwitchChannel function in chips/rt3593.c Signed-off-by: Gabor Juhos <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-08-22rt2x00: rt2800lib: move rt2800_adjust_freq_offset functionGabor Juhos1-36/+37
Move the rt2800_adjust_freq_offset function before the channel configuration functions to make it usable from those without a forward declaration. The patch contains no functional changes. Signed-off-by: Gabor Juhos <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-08-22rt2x00: rt2800lib: use step-by-step frequency offset adjustment on MMIO devicesGabor Juhos1-3/+16
According to the DPO_RT5572_LinuxSTA_2.6.0.1_20120629 driver, the RFCSR17 register can't be programmed in one step on devices which are using the frequency offset adjustment code. Update the code to use step-by-step adjustment. Reference: RT30xxWriteRFRegister function in common/rt_rf.c Signed-off-by: Gabor Juhos <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-08-22rt2x00: rt2800lib: use a MCU command for frequency adjustment on USB devicesGabor Juhos2-1/+6
According to the Ralink driver, there is an MCU command which can be used to send the frequency offset value directly to the USB device without going through the RFCSR writing sequence. Based on the DPO_RT5572_LinuxSTA_2.6.0.1_20120629 driver. Reference: RTMPAdjustFrequencyOffset function in common/rt_rf.c Signed-off-by: Gabor Juhos <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-08-22rt2x00: rt2800lib: optimize frequency offset adjustmentGabor Juhos1-1/+6
Don't write the new value into the register if it is the same as the old value to avoid unncessary USB bus traffic with USB devices. The change also saves a few cycle on MMIO based devices. Based on the DPO_RT5572_LinuxSTA_2.6.0.1_20120629 driver. Reference: RTMPAdjustFrequencyOffset function in common/rt_rf.c Signed-off-by: Gabor Juhos <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-08-22rt2x00: rt2800lib: fix frequency offset boundary calculationGabor Juhos1-4/+5
The current code in the 'rt2800_adjust_freq_offset' function limits the device specific frequency offset value to FREQ_BOUND but ignores the fact that the uppermost bit is not part of the frequency offset value. As the result, the driver always uses the FREQ_BOUND value if the uppermost bit is set. Update the code to use the correct source value for calculating the boundary. Based on the DPO_RT5572_LinuxSTA_2.6.0.1_20120629 driver. Reference: RTMPAdjustFrequencyOffset function in common/rt_rf.c Signed-off-by: Gabor Juhos <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-08-22rt2x00: rt2800lib: pass beacon index to rt2800_clear_beacon_registerGabor Juhos1-11/+7
Instead of precomputing the beacon base in each caller, pass the beacon index to the 'rt2800_clear_beacon_register' function and compute the beacon base in there. This allows to simplify the caller functions a bit. Signed-off-by: Gabor Juhos <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-08-22rt2x00: rt2800: rename HW_BEACON_OFFSET macroGabor Juhos2-3/+3
The name of the HW_BEACON_OFFSET macro is a bit confusing. It returns with one of the HW_BEACON_BASE* values, so rename the macro to HW_BEACON_BASE to reflect that. The patch contains no functional changes. Signed-off-by: Gabor Juhos <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2013-08-22sfc: Move NIC-type-specific MTD partition date into separate structuresBen Hutchings1-85/+112
Signed-off-by: Ben Hutchings <[email protected]>
2013-08-22sfc: Eliminate struct efx_mtdBen Hutchings2-160/+120
Currently we use struct efx_mtd to represent a physical NVRAM device and struct efx_mtd_partition to represent a partition on that device. But this only really makes sense for Falcon, as we don't know or care whether MC-managed NVRAM partitions are on one or more physical devices. It complicates iteration and provides little benefit. Therefore: - Replace the pointer to efx_mtd in mtd_info::priv with a pointer to efx_nic - Move the falcon_spi_device pointer into the union in struct efx_mtd_partition - Move the device name to efx_mtd_partition::dev_type_name - Move the efx_mtd_ops pointer to efx_nic::mtd_ops - Make efx_nic::mtd_list a list of partitions Signed-off-by: Ben Hutchings <[email protected]>
2013-08-22sfc: Rename SPI stuff to show that it is Falcon-specificBen Hutchings4-47/+47
Signed-off-by: Ben Hutchings <[email protected]>
2013-08-22sfc: Cleanup Falcon-arch simple MAC filter stateBen Hutchings7-44/+52
On Falcon we implement MAC filtering requested by the stack using the MAC wrapper's single unicast filter and multicast hash filter. Siena is very similar, though MAC configuration is mediated by the MC. Since MCDI operations may sleep, reconfiguration is deferred from ndo_set_rx_mode to a work item. However, it still updates the private variables describing the filter state synchronously. Contrary to comments, the later use of these variables is not protected using the address lock, resulting in race conditions. Move the state update to a new function efx_farch_filter_sync_rx_mode() and make the Falcon-arch MAC configuration functions call that, so that its use is consistently serialised by the mac_lock. Invert and rename the promiscuous flag to the more accurate unicast_filter, and comment that both this and multicast_hash are not used on EF10. Signed-off-by: Ben Hutchings <[email protected]>
2013-08-22sfc: Define and use MCDI_POPULATE_DWORD_{1,2,3,4,5,6,7}Ben Hutchings2-10/+62
There is only one user now, but we're about to add many more. Signed-off-by: Ben Hutchings <[email protected]>
2013-08-22sfc: Add flag for stack-owned RX MAC filtersBen Hutchings2-17/+37
MAC filters inserted on request from the stack (ndo_set_rx_mode) should allow manual steering but not removal. Currently we have a special case for Siena's all-multicast and all-unicast MAC filters, but on EF10 we need to allow for steering of precise MAC filters as well. The EFX_FILTER_FLAG_RX_STACK flag changes the behaviour of replacement and removal requests: - Replacement *of* a filter with this flag never clears the flag but does change steering and saved priority - Replacement *by* a filter with this flag only sets the flag but does not change steering - Removal with priority < EFX_FILTER_PRI_REQUIRED really resets RX steering and saved priority This could support precise MAC filtering on Siena in future. As a side-benefit, the default MAC filters are hidden from ethtool until they are steered. Signed-off-by: Ben Hutchings <[email protected]>
2013-08-22sfc: Refactor Falcon-arch filter removalBen Hutchings1-34/+40
Move the special case for removal of default filters from efx_farch_filter_table_clear_entry() into a wrapper function, efx_farch_filter_table_remove(). Move the existence and priority checks into the latter and use it where appropriate. Signed-off-by: Ben Hutchings <[email protected]>
2013-08-22sfc: Make most filter operations NIC-type-specificBen Hutchings10-1267/+1448
Aside from accelerated RFS, there is almost nothing that can be shared between the filter table implementations for the Falcon architecture and EF10. Move the few shared functions into efx.c and rx.c and the rest into farch.c. Introduce efx_nic_type operations for the implementation and inline wrapper functions that call these. Signed-off-by: Ben Hutchings <[email protected]>
2013-08-22sfc: Refactor Falcon-arch search limit resetBen Hutchings1-29/+30
Currently every call to efx_farch_filter_table_clear_entry() is shortly followed by a conditional reset of the table limits. The new limits (0) are not pushed to hardware until the next filter insertion. Move both the reset and the hardware reconfiguration into efx_farch_filter_table_clear_entry(), and add an explanatory comment. Also, make consistent use of the term 'search limit' for the maximum number of probes the NIC must make when searching for a filter of a particular type. Signed-off-by: Ben Hutchings <[email protected]>
2013-08-22sfc: Split Falcon-arch-specific and common filter stateBen Hutchings2-55/+58
Move the common state from struct efx_filter_state into struct efx_nic. Rename struct efx_filter_state to efx_farch_filter_state and change the type of efx_nic::filter_state to void *. Signed-off-by: Ben Hutchings <[email protected]>
2013-08-22sfc: Extend and abstract efx_filter_spec to cover Huntington/EF10Ben Hutchings3-392/+494
Replace type field with match_flags. Add rss_context and match values covering of most of what is now in the MCDI protocol. Change some fields into bitfields so that the structure size doesn't grow beyond 64 bytes. Ditch the filter decoding functions as it is now easier to pick apart the abstract structure. Rewrite ethtool NFC rule functions to set/get filter match flags and values directly. Signed-off-by: Ben Hutchings <[email protected]>
2013-08-22sfc: Name the RX drop queue IDBen Hutchings2-3/+8
Signed-off-by: Ben Hutchings <[email protected]>
2013-08-22sfc: Rename Falcon-arch filter implementation types and functionsBen Hutchings1-209/+243
The filter table(s) on EF10 are managed by firmware and will need almost entirely separate code. Rename the types and functions used within the existing implementation. The current definition of struct efx_filter_spec is really implementation-specific, so we need to keep it. For now, define a separate structure for the internal representation but leave them identical. Signed-off-by: Ben Hutchings <[email protected]>