aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2012-07-10brcmsmac: remove ai_findcore()Hauke Mehrtens3-31/+14
bcma also stores a pointer to the chipcommon core in its struct, brcmsmac should use it and not search for the core by its own. Acked-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-07-10brcmsmac: use container_of instead of castHauke Mehrtens1-8/+8
Now "struct si_pub pub" does not have to be the first member in struct si_info any more, if it is the resulting code after compilation should be the same. Acked-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-07-10brcmsmac: remove ai_get_buscore{type,rev}()Hauke Mehrtens2-19/+0
These two functions are not used any more. Acked-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-07-10brcmsmac: remove PCI_FORCEHT() macroHauke Mehrtens1-19/+0
The BCM4716 is a SoC and does not have a PCI client interface, so this condition is never true. Acked-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-07-10brcmsmac: remove PCIE() macroHauke Mehrtens1-5/+4
Instead of checking if there is a PCIe core on the bus, better check if hosttype is PCIe. In the original submission to staging PCIE() checked, if the bustype is PCI and the buscore is a PCIe core. Now we assume that all cores bcma supports are PCIe based, so we just have to check if the bustype is PCI. The old code bcmsmac currently uses searches for a PCIe core on the bus and if there is one assumes that this is the buscore, which is wrong. Some SoCs have a PCIe core operating in host mode and this is not the bus core. The old code also caused a null pointer in ai_get_buscoretype() and ai_get_buscorerev() if buscore was not set because there was no PCIe core on the bus. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Acked-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-07-10iwmc3200wifi: remove driver for unavailable hardwareJohn W. Linville30-10563/+0
This hardware never became available to normal humans. Leaving this driver imposes unwelcome maintenance costs for no clear benefit. Signed-off-by: John W. Linville <linville@tuxdriver.com> Acked-by: Samuel Ortiz <sameo@linux.intel.com>
2012-07-10wlcore: fix a couple small memory leaksDan Carpenter1-2/+2
We should free "chunk" here before returning the error code. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-07-10wlcore: determine AP extra rates correctlyArik Nemtsov1-5/+15
Don't use the ht_mode module parameter for determining AP supported rates. We can rely on channel type, since HT40 won't be enabled if our HT cap doesn't support it. Enable MIMO only if there enough antennas, and rely on per-peer rate limitation to prevent IOPs. Signed-off-by: Arik Nemtsov <arik@wizery.com>
2012-07-10wlcore: check ssid length against the correct elementEliad Peller1-1/+1
commit 587cc28 ("wlcore: compare ssid_len before comparing ssids") introduced a new bug - the ssid length from the request struct was compared against the ssid length of another request, instead the one of the cmd. This might cause the sched scan request to fail (with -EINVAL) in many cases. Signed-off-by: Eliad Peller <eliad@wizery.com>
2012-07-10wl12xx/wl18xx: use a dynamic PS timeout of 1.5secArik Nemtsov2-2/+2
It seems some parties have bad user experience when smaller values are used. This should have little implications for power consumption, since traffic is bursty in nature. Signed-off-by: Arik Nemtsov <arik@wizery.com>
2012-07-10wlcore: define number of supported bands internallyArik Nemtsov3-4/+7
Avoid using the IEEE80211_NUM_BANDS constant for arrays sizes etc, as this can contain bands unsupported by the driver (e.g. 60Ghz). Use an internal constant to determine the number of bands. Signed-off-by: Arik Nemtsov <arik@wizery.com>
2012-07-10wlcore: don't set SDIO_FAILED flag when driver state is offArik Nemtsov2-7/+7
If some IO read/write fails while the FW is not loaded, a recovery will not take place. This means the SDIO_FAILED flag will stay in place forever and prevent further read/writes. This can happen if a check for STATE_OFF was forgotten in some routine. Take this opportunity to rename the flag to IO_FAILED, since we support other buses as well. Reported-by: Ido Yariv <ido@wizery.com> Signed-off-by: Arik Nemtsov <arik@wizery.com>
2012-07-10wlcore: change the wait for event mechanismYoni Divinsky1-1/+7
wlcore needs to wait for certain events for example for roc complete event. Usually the events are received from the FW very fast, therefore wlcore can poll with a short delay and if after a second the event was not received yet poll with a long (1-5 msec) delay. This implementation is similar to the sending of commands to the FW. Empirically the change reduced the wait for roc event from ~10-40msec to 100s of usecs. [replace udelay/msleep with usleep_range - Arik] Signed-off-by: Yoni Divinsky <yoni.divinsky@ti.com> Signed-off-by: Arik Nemtsov <arik@wizery.com>
2012-07-10wlcore: Prevent processing of work items during op_stopIdo Yariv3-25/+32
The interrupt line is disabled in op_stop using disable_irq. Since pending interrupts are synchronized, the mutex has to be released before disabling the interrupt to avoid a deadlock with the interrupt handler. In addition, the internal state of the driver is only set to 'off' after the interrupt is disabled. Otherwise, if an interrupt fires after the state is set but before the interrupt line is disabled, the interrupt handler will not be able to acknowledge the interrupt resulting in an interrupt storm. The driver's operations might be called during recovery. If these acquire the mutex after it was released by op_stop, but before the driver's state is changed, they may queue new work items instead of just failing. This is especially problematic in the case of scans, in which a new scan may be scheduled after all scan requests were cancelled. Signed-off-by: Ido Yariv <ido@wizery.com> Signed-off-by: Arik Nemtsov <arik@wizery.com>
2012-07-10wlcore: implement .flush callbackEliad Peller1-0/+8
implement the .flush() callback by simply calling wl1271_tx_flush(). Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-07-10wl12xx/wlcore: increase FW filename versionLuciano Coelho4-27/+6
We have some API changes and new features in the new firmwares that are not compatible with older drivers. Increase the version of the FW filenames for wl12xx to 5. Additionally, remove the duplicate definitions from wlcore_i.h and remove the MODULE_FIRMWARE macro calls from the SDIO and SPI modules, since they're irrelevant there. Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-07-10wlcore: add probe request templates for sched and one-shot scansYoni Divinsky6-9/+39
The driver configures the firmware template for probe requests during the scan process. If the same template is used for one-shot and sched scans they will override each other when running scans simultaneously. This fix works only on firmwares later than X.3.9.2.112 for single role and X.3.9.2.23 for multi-role. [Some cleaning-up and renaming of the quirk to something smaller -- Luca.] Signed-off-by: Yoni Divinsky <yoni.divinsky@ti.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-07-10wlcore: always clear recovery flag during recovery_workArik Nemtsov1-2/+2
If recovery is called when the FW is off, we should clear the recovery flag. Otherwise we risk booting the driver in permanent pending-recovery state. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-07-10wlcore: avoid debug prints during intended FW recoveryArik Nemtsov1-3/+4
Don't read the FW panic log or print other debug data when recovery is intended (i.e. FW type switch). This takes valuable time and can be confusing to the user. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-07-10wlcore: remove recover cmd from testmodeArik Nemtsov1-12/+1
This command is buggy (doesn't take the mutex) and unused. Instead, the "start_recovery" file is used for the same purpose. Remove the code but keep the command constant to avoid breaking the testmode ABI. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-07-10wlcore: don't stop tx queue via watermark if already stoppedArik Nemtsov1-1/+3
If a Tx queue is currently stopped because of our Tx watermark flow control, don't stop it again. This causes a warning to appear. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-07-10wlcore/wl12xx/wl18xx: check min FW versionArik Nemtsov6-0/+100
Refuse to boot if the FW version is too old. The minimum version is set per chip, with the option of setting it per PG in the future. When boot fails because of an old FW, display a helpful message. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-07-10wlcore: enable sched scan while connectedVictor Goldenshtein3-1/+6
New wl12xx firmware supports scheduled scans also while connected. Stop blocking sched scan requests when connected and add a quirk to block in hardware that don't support it (currently wl18xx doesn't). This requires FW version 6/7.3.10.2.112 for single-role and 6/7.5.6.0.25 for multi-role. Signed-off-by: Victor Goldenshtein <victorg@ti.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-07-10r8169: fix argument in rtl_hw_init_8168g.Hayes Wang1-2/+2
Signed-off-by: Hayes Wang <hayeswang@realtek.com>
2012-07-09Merge branch 'davem-next.r8169' of git://violet.fr.zoreil.com/romieu/linuxDavid S. Miller1-318/+666
Francois Romieu (4): r8169: mdio_ops signature change. r8169: csi_ops signature change. r8169: ephy, eri and efuse functions signature changes. r8169: abstract out loop conditions. Hayes Wang (2): r8169: add RTL8106E support. r8169: support RTL8168G Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-09gianfar: fix potential sk_wmem_alloc imbalanceEric Dumazet1-4/+3
commit db83d136d7f753 (gianfar: Fix missing sock reference when processing TX time stamps) added a potential sk_wmem_alloc imbalance If the new skb has a different truesize than old one, we can get a negative sk_wmem_alloc once new skb is orphaned at TX completion. Now we no longer early orphan skbs in dev_hard_start_xmit(), this probably can lead to fatal bugs. Signed-off-by: Eric Dumazet <edumazet@google.com> Tested-by: Paul Gortmaker <paul.gortmaker@windriver.com> Cc: Manfred Rudigier <manfred.rudigier@omicron.at> Cc: Claudiu Manoil <claudiu.manoil@freescale.com> Cc: Jiajun Wu <b06378@freescale.com> Cc: Andy Fleming <afleming@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-09drivers/net/ethernet/broadcom/cnic.c: remove invalid reference to list iterator variableJulia Lawall1-1/+2
If list_for_each_entry, etc complete a traversal of the list, the iterator variable ends up pointing to an address at an offset from the list head, and not a meaningful structure. Thus this value should not be used after the end of the iterator. There does not seem to be a meaningful value to provide to netdev_warn. Replace with pr_warn, since pr_err is used elsewhere. This problem was found using Coccinelle (http://coccinelle.lip6.fr/). Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-09net/rxrpc/ar-peer.c: remove invalid reference to list iterator variableJulia Lawall1-1/+1
If list_for_each_entry, etc complete a traversal of the list, the iterator variable ends up pointing to an address at an offset from the list head, and not a meaningful structure. Thus this value should not be used after the end of the iterator. This seems to be a copy-paste bug from a previous debugging message, and so the meaningless value is just deleted. This problem was found using Coccinelle (http://coccinelle.lip6.fr/). Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-09drivers/isdn/mISDN/stack.c: remove invalid reference to list iterator variableJulia Lawall1-2/+2
If list_for_each_entry, etc complete a traversal of the list, the iterator variable ends up pointing to an address at an offset from the list head, and not a meaningful structure. Thus this value should not be used after the end of the iterator. The dereferences are just deleted from the debugging statement. This problem was found using Coccinelle (http://coccinelle.lip6.fr/). Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-09net/fsl_pq_mdio: use spin_event_timeout() to poll the indicator registerTimur Tabi1-10/+19
Macro spin_event_timeout() was designed for simple polling of hardware registers with a timeout, so use it when we poll the MIIMIND register. This allows us to return an error code instead of polling indefinitely. Note that PHY_INIT_TIMEOUT is a count of loop iterations, so we can't use it for spin_event_timeout(), which asks for microseconds. Signed-off-by: Timur Tabi <timur@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-09net: cgroup: fix out of bounds accessesEric Dumazet2-4/+8
dev->priomap is allocated by extend_netdev_table() called from update_netdev_tables(). And this is only called if write_priomap() is called. But if write_priomap() is not called, it seems we can have out of bounds accesses in cgrp_destroy(), read_priomap() & skb_update_prio() With help from Gao Feng Signed-off-by: Eric Dumazet <edumazet@google.com> Cc: Neil Horman <nhorman@tuxdriver.com> Cc: Gao feng <gaofeng@cn.fujitsu.com> Acked-by: Gao feng <gaofeng@cn.fujitsu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-09bonding: debugfs and network namespaces are incompatibleEric W. Biederman1-1/+1
The bonding debugfs support has been broken in the presence of network namespaces since it has been added. The debugfs support does not handle multiple bonding devices with the same name in different network namespaces. I haven't had any bug reports, and I'm not interested in getting any. Disable the debugfs support when network namespaces are enabled. Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-09bonding: Manage /proc/net/bonding/ entries from the netdev eventsEric W. Biederman1-3/+6
It was recently reported that moving a bonding device between network namespaces causes warnings from /proc. It turns out after the move we were trying to add and to remove the /proc/net/bonding entries from the wrong network namespace. Move the bonding /proc registration code into the NETDEV_REGISTER and NETDEV_UNREGISTER events where the proc registration and unregistration will always happen at the right time. Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-09smsc95xx: support ethtool get_regsEmeric Vigier1-0/+31
Inspired by implementation in smsc911x.c and smsc9420.c Tested on ARM/pandaboard running android Signed-off-by: Emeric Vigier <emeric.vigier@savoirfairelinux.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-09r6040: use module_pci_driver macroDevendra Naga1-14/+1
as the manual of module_pci_driver says that it can be used when the init and exit functions of the module does nothing but the pci_register_driver and pci_unregister_driver. use it for rdc's r6040 driver, as the init and exit paths does as above, and also this reduces a little amount of code. Signed-off-by: Devendra Naga <devendra.aaru@gmail.com> Acked-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-09bnx2x: populate skb->l4_rxhashEric Dumazet2-4/+16
l4_rxhash is set on skb when rxhash is obtained from canonical 4-tuple over transport ports/addresses. We can set skb->l4_rxhash for all incoming TCP packets on bnx2x for free, as cqe status contains a hash type information. Signed-off-by: Eric Dumazet <edumazet@google.com> Cc: Eilon Greenstein <eilong@broadcom.com> Cc: Willem de Bruijn <willemb@google.com> Acked-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-09r8169: support RTL8168GHayes Wang1-0/+291
For RTL8111G, the settings of phy and firmware are replaced with ocp functions. r8168g_mdio_{write / read} redirects the relative settings to suitable ocp functions. A per-device variable is needed to evaluate the real address of ocp functions. rtl_writephy(tp, 0x1f, xxxx) is dedicated to keeping said variable up-to-date. Signed-off-by: Hayes Wang <hayeswang@realtek.com> Acked-by: Francois Romieu <romieu@fr.zoreil.com>
2012-07-09r8169: abstract out loop conditions.Francois Romieu1-181/+186
Twelve functions can fail silently. Now they have a chance to complain. Macro and pasting abuse has been kept at a level where tags and friends should not be hurt. Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
2012-07-09r8169: ephy, eri and efuse functions signature changes.Francois Romieu1-111/+100
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
2012-07-09r8169: csi_ops signature change.Francois Romieu1-11/+12
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
2012-07-09r8169: mdio_ops signature change.Francois Romieu1-20/+26
Further changes need more context down in the call stack. Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
2012-07-09r8169: add RTL8106E support.Hayes Wang1-0/+56
Signed-off-by: Hayes Wang <hayeswang@realtek.com> Acked-by: Francois Romieu <romieu@fr.zoreil.com>
2012-07-09stmmac: Fix for higher mtu size handlingDeepak Sikri1-1/+2
For the higher mtu sizes requiring the buffer size greater than 8192, the buffers are sent or received using multiple dma descriptors/ same descriptor with option of multi buffer handling. It was observed during tests that the driver was missing on data packets during the normal ping operations if the data buffers being used catered to jumbo frame handling. The memory barrriers are added in between preparation of dma descriptors in the jumbo frame handling path to ensure all instructions before enabling the dma are complete. Signed-off-by: Deepak Sikri <deepak.sikri@st.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-09stmmac: Fix for nfs hang on multiple rebootDeepak Sikri1-0/+3
It was observed that during multiple reboots nfs hangs. The status of receive descriptors shows that all the descriptors were in control of CPU, and none were assigned to DMA. Also the DMA status register confirmed that the Rx buffer is unavailable. This patch adds the fix for the same by adding the memory barriers to ascertain that the all instructions before enabling the Rx or Tx DMA are completed which involves the proper setting of the ownership bit in DMA descriptors. Signed-off-by: Deepak Sikri <deepak.sikri@st.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-09NFC: Check for llcp_sock and its device from llcp_sock_getnameSamuel Ortiz1-0/+3
They both can potentially be NULL. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-07-09NFC: Add ISO 14443 type B protocolSamuel Ortiz7-18/+28
Some devices (e.g. Sony's PaSoRi) can not do type B polling, so we have to make a distinction between ISO14443 type A and B poll modes. Cc: Eric Lapuyade <eric.lapuyade@intel.com> Cc: Ilan Elias <ilane@ti.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-07-09NFC: Use communicate thru only for PaSoRi when trying to read Felica tagsSamuel Ortiz1-12/+11
Otherwise DATA_EXCHANGE seems to be just fine. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-07-09NFC: Add initial Sony RC-S360 support to pn533Samuel Ortiz1-38/+181
Sony RC-S360 is also known as the Sony PaSoRi contactless reader. Only type 2, 3 and 4 tag reading is supported at the moment. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-07-09NFC: Dereference LLCP bind socket address after checking for it to be NULLSamuel Ortiz1-2/+2
Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-07-09NFC: Do not return EBUSY when stopping a poll that's already stoppedSamuel Ortiz1-0/+9
We check for the polling flag before checking if the netlink PID caller match. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>