summaryrefslogtreecommitdiff
path: root/drivers/net
AgeCommit message (Collapse)Author
2010-07-26e1000e: Drop a useless statementJean Delvare
err is set again a few lines below. Cc: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Jean Delvare <jdelvare@suse.de> Acked-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-07-26drivers/net/qla3xxx.c: Checkpatch cleanupsJoe Perches
Remove typedefs Indentation and spacing Use a temporary for a very long pointer variable More 80 column compatible Convert a switch to if/else if Compile tested only, depends on patch "Update logging message style" (old) $ scripts/checkpatch.pl -f drivers/net/qla3xxx.c | grep "^total:" total: 209 errors, 82 warnings, 3995 lines checked (new) $ scripts/checkpatch.pl -f drivers/net/qla3xxx.c | grep "^total:" total: 2 errors, 0 warnings, 3970 lines checked $ size drivers/net/qla3xxx.o.* text data bss dec hex filename 50413 212 13864 64489 fbe9 drivers/net/qla3xxx.o.old 49959 212 13728 63899 f99b drivers/net/qla3xxx.o.new Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-07-26drivers/net/qla3xxx.c: Update logging message styleJoe Perches
Use pr_<level> Use netdev_<level> Use netif_<level> Remove #define PFX Improve a couple of loops to avoid deep indentation. Compile tested only $ size drivers/net/qla3xxx.o.* text data bss dec hex filename 51603 212 13864 65679 1008f drivers/net/qla3xxx.o.old 50413 212 13864 64489 fbe9 drivers/net/qla3xxx.o.new Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-07-25forcedeth: Fix different hardware statistics versions.Mike Ditto
The macros for the values of the bit field describing the four different versions of statistics supported by different hardware variants were being misused. Where the code was trying to test if the hardware implements V3, it was actually testing whether it implements any of V1, V2, or V3, causing the driver to report statistics that don't really exist in the hardware, with bogus values. Signed-off-by: Mike Ditto <mditto@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-07-25net-next: Fix an overflow bug in vmxnet3 Tx descriptorBhavesh Davda
Fix an overflow bug in vmxnet3 Tx descriptor This patch fixes a bug where a 16K buffer on a Tx descriptor was overflowing into the 'gen' bit in the descriptor thereby corrupting the descriptor and stalling the transmit ring. Signed-off-by: Bhavesh Davda <bhavesh@vmware.com> Signed-off-by: Shreyas Bhatewara <sbhatewara@vmware.com> Signed-off-by: Matthew Delco <delcoM@vmware.com> Signed-off-by: Ronghua Zhang <ronghua@vmware.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-07-253c59x: Add ethtool WOL supportAndrew O. Shadoura
This patch adds wrappers for ethtool to get or set wake-on-LAN setting without re-inserting the kernel module. Signed-off-by: Andrew O. Shadoura <andrew@beldisplaytech.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-07-25qlcnic: fix diag resource allocationSony Chacko
netif_device_attach missing from error path in qlcnic_diag_alloc_res Signed-off-by: Sony Chacko <sony.chacko@qlogic.com> Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-07-25qlcnic: fix loopback testAmit Kumar Salecha
o Loopback not supported for virtual function. Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-07-24ixgbe: fix ethtool statsEric Dumazet
In latest changes about 64bit stats on 32bit arches, [commit 28172739f0a276eb8 (net: fix 64 bit counters on 32 bit arches)], I missed ixgbe uses a bit of magic in its ixgbe_gstrings_stats definition. IXGBE_NETDEV_STAT() must now assume offsets relative to rtnl_link_stats64, not relative do dev->stats. As a bonus, we also get 64bit stats on ethtool -S Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Tested-by: Stephen Ko <stephen.s.ko@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-07-24qlcnic: fix bandwidth checkRajesh Borundia
Fix maximum and minmum bandwith value. Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com> Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-07-23Merge branch 'master' of ↵David S. Miller
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 Conflicts: drivers/net/wireless/iwlwifi/iwl-commands.h
2010-07-233c59x: Fix call to mdio_sync() with the wrong argumentBen Hutchings
commit a095cfc40ec7ebe63e9532383c5b5c2a27b14075 "3c59x: Specify window explicitly for access to windowed registers" changed the first parameter to mdio_sync(), from a pointer to the register mapping, to a pointer to the vortex_private structure, and changed all but one of the call sites. Fix that last one. Reported-by: Luca Falavigna <dktrkranz@debian.org> Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-07-23net: s2io: fix buffer overflowKulikov Vasiliy
vpd_data[] is allocated as kmalloc(256, GFP_KERNEL), so if cnt = 255 then (cnt + 3) overflows 256. memset() is executed without checking. vpd_data[cnt+2] must be less than 256-cnt-2 as the latter is number of vpd_data[] elements to copy. Do not fill with zero the beginning of nic->serial_num as it will be filled with vpd_data[]. String in product_name[] should be terminated by '\0'. Signed-off-by: Kulikov Vasiliy <segooon@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-07-23mv643xx_eth: potential null dereferenceDan Carpenter
We assume that "pd" can be null on the previous line, and throughout the function so we should check it here as well. This was introduced by 9b2c2ff7a1c0 "mv643xx_eth: use sw csum for big packets" Signed-off-by: Dan Carpenter <error27@gmail.com> Acked-by: Lennert Buytenhek <buytenh@wantstofly.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-07-23net: 3c59x: fix leak of iomapsKulikov Vasiliy
If vortex_probe1() fails we should unmap ioaddr mapped earlier. Signed-off-by: Kulikov Vasiliy <segooon@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-07-23wireless: use newly introduced hex_to_bin()Andy Shevchenko
Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com> Cc: Corey Thomas <coreythomas@charter.net> Cc: "John W. Linville" <linville@tuxdriver.com> Cc: linux-wireless@vger.kernel.org Signed-off-by: David S. Miller <davem@davemloft.net>
2010-07-23usb: usbnet: use newly introduced hex_to_bin()Andy Shevchenko
Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com> Cc: Greg Kroah-Hartman <gregkh@suse.de> Cc: linux-usb@vger.kernel.org Signed-off-by: David S. Miller <davem@davemloft.net>
2010-07-23drivers: net: use newly introduced hex_to_bin()Andy Shevchenko
Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-07-23be2net: bump the driver version numberAjit Khaparde
Signed-off-by: Ajit Khaparde <ajitk@serverengines.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-07-23be2net: variable name changesAjit Khaparde
This patch changes names of some variables. Signed-off-by: Ajit Khaparde <ajitk@serverengines.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-07-23be2net: supress printing error when mac query fails for VFAjit Khaparde
When a virtual function driver in initialized, the network mac query command can fail. Skip display of error message in that case. Signed-off-by: Ajit Khaparde <ajitk@serverengines.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-07-23be2net: code to support tx rate configuration on virtual functionsAjit Khaparde
Signed-off-by: Ajit Khaparde <ajitk@serverengines.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-07-23be2net: add vlan support for sriov virtual functionsAjit Khaparde
Signed-off-by: Ajit Khaparde <ajitk@serverengines.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-07-23be2net: add support to get vf configAjit Khaparde
Signed-off-by: Ajit Khaparde <ajitk@serverengines.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-07-23be2net: change to call pmac_del only if necessaryAjit Khaparde
If a mac address has not been configured for a VF, there is no need to call be_cmd_pmac_del. Signed-off-by: Ajit Khaparde <ajitk@serverengines.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-07-22stmmac: handle allocation errors in setup functionsDan Carpenter
If the allocations fail in either dwmac1000_setup() or dwmac100_setup() then return NULL. These are called from stmmac_mac_device_setup(). The check for NULL returns in stmmac_mac_device_setup() needed to be moved forward a couple lines. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-07-22bonding: don't lock when copying/clearing VLAN list on slaveJay Vosburgh
When copying VLAN information to or removing from a slave during slave addition or removal, the bonding code currently holds the bond->lock for write to prevent concurrent modification of the vlan_list / vlgrp. This is unnecessary, as all of these operations occur under RTNL. Holding the bond->lock also caused might_sleep issues for some drivers' ndo_vlan_* functions. This patch removes the extra locking. Problem reported by Michael Chan <mchan@broadcom.com> Signed-off-by: Jay Vosburgh <fubar@us.ibm.com> Cc: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-07-22bonding: change test for presence of VLANsJay Vosburgh
After commit ad1afb00393915a51c21b1ae8704562bf036855f ("vlan_dev: VLAN 0 should be treated as "no vlan tag" (802.1p packet)") it is now regular practice for a VLAN "add vid" for VLAN 0 to arrive prior to any VLAN registration or creation of a vlan_group. This patch updates the bonding code that tests for the presence of VLANs configured above bonding. The new logic tests for bond->vlgrp to determine if a registration has occured, instead of testing that bonding's internal vlan_list is empty. The old code would panic when vlan_list was not empty, but vlgrp was still NULL (because only an "add vid" for VLAN 0 had occured). Bonding still adds VLAN 0 to its internal list so that 802.1p frames are handled correctly on transmit when non-VLAN accelerated slaves are members of the bond. The test against bond->vlan_list remains in bond_dev_queue_xmit for this reason. Modification to the bond->vlgrp now occurs under lock (in addition to RTNL), because not all inspections of it occur under RTNL. Additionally, because 8021q will never issue a "kill vid" for VLAN 0, there is now logic in bond_uninit to release any remaining entries from vlan_list. Signed-off-by: Jay Vosburgh <fubar@us.ibm.com> Cc: Pedro Garcia <pedro.netdev@dondevamos.com> Cc: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-07-22net/fec: restore interrupt mask after software-reset in fec_stop()Wolfram Sang
After the change from mdio polling to irq, it became necessary to restore the interrupt mask after resetting the chip in fec_stop(). Otherwise, with all irqs disabled, no communication with the PHY will be possible after e.g. un-/replugging the cable and the device gets stalled. Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-07-223c59x: handle pci_iomap() errorsKulikov Vasiliy
pci_iomap() can fail, handle this case and return -ENOMEM from probe function. Signed-off-by: Kulikov Vasiliy <segooon@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-07-22CAN: Add Flexcan CAN controller driverMarc Kleine-Budde
This core is found on some Freescale SoCs and also some Coldfire SoCs. Support for Coldfire is missing though at the moment as they have an older revision of the core which does not have RX FIFO support. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Acked-by: Wolfgang Grandegger <wg@grandegger.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2010-07-21r6040: Fix args to phy_mii_ioctl().David S. Miller
Reported by Stephen Rothwell. Signed-off-by: David S. Miller <davem@davemloft.net>
2010-07-21drivers/net/irda: use for_each_pci_dev()Kulikov Vasiliy
Use for_each_pci_dev() to simplify the code. Signed-off-by: Kulikov Vasiliy <segooon@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-07-21drivers/net/qlge: Use pr_<level>, shrink text a bitJoe Perches
Add and use a few neatening macros Remove PFX Add #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt Convert printk(KERN_ERR to pr_err( $ size drivers/net/qlge/built-in.o.* text data bss dec hex filename 116456 2312 25712 144480 23460 drivers/net/qlge/built-in.o.old 114909 2312 25728 142949 22e65 drivers/net/qlge/built-in.o.new Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-07-21b43: silence phy_n sparse warningsLarry Finger
drivers/net/wireless/b43/phy_n.c:512:53: warning: cast truncates bits from constant value (ffff0fff becomes fff) drivers/net/wireless/b43/phy_n.c:765:66: warning: cast truncates bits from constant value (ffff7fff becomes 7fff) drivers/net/wireless/b43/phy_n.c:1012:38: warning: cast truncates bits from constant value (ffff00ff becomes ff) drivers/net/wireless/b43/phy_n.c:1119:38: warning: cast truncates bits from constant value (ffff0fff becomes fff) drivers/net/wireless/b43/phy_n.c:2458:56: warning: cast truncates bits from constant value (ffff7fff becomes 7fff) drivers/net/wireless/b43/phy_n.c:2933:38: warning: cast truncates bits from constant value (ffff0fff becomes fff) drivers/net/wireless/b43/phy_n.c:3294:57: warning: cast truncates bits from constant value (ffff3fff becomes 3fff) Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-07-21b43: silence most sparse warningsJohn W. Linville
CHECK drivers/net/wireless/b43/main.c drivers/net/wireless/b43/main.c:111:5: warning: symbol 'b43_modparam_pio' was not declared. Should it be static? CHECK drivers/net/wireless/b43/phy_g.c drivers/net/wireless/b43/phy_g.c:975:56: warning: cast truncates bits from constant value (ffff7fff becomes 7fff) CHECK drivers/net/wireless/b43/phy_lp.c drivers/net/wireless/b43/phy_lp.c:2701:6: warning: symbol 'b43_lpphy_op_switch_analog' was not declared. Should it be static? drivers/net/wireless/b43/phy_lp.c:1148:30: warning: cast truncates bits from constant value (ffff1fff becomes 1fff) drivers/net/wireless/b43/phy_lp.c:1525:30: warning: cast truncates bits from constant value (ffff1fff becomes 1fff) drivers/net/wireless/b43/phy_lp.c:1529:30: warning: cast truncates bits from constant value (ffff1fff becomes 1fff) CHECK drivers/net/wireless/b43/wa.c drivers/net/wireless/b43/wa.c:385:60: warning: cast truncates bits from constant value (ffff00ff becomes ff) drivers/net/wireless/b43/wa.c:403:55: warning: cast truncates bits from constant value (ffff00ff becomes ff) drivers/net/wireless/b43/wa.c:405:55: warning: cast truncates bits from constant value (ffff00ff becomes ff) drivers/net/wireless/b43/wa.c:415:71: warning: cast truncates bits from constant value (ffff0fff becomes fff) AFAICT, none of these amount to real bugs. But this reduces warning spam from sparse w/o significantly affecting readability of the code (IMHO). Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-07-21drivers/net/cxgb3/t3_hw.c: use new hex_to_bin() methodAndy Shevchenko
Get rid of own implementation of hex_to_bin(). Signed-off-by: Andy Shevchenko <ext-andriy.shevchenko@nokia.com> Acked-by: Divy Le Ray <divy@chelsio.com> Cc: "David S. Miller" <davem@davemloft.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-07-20Merge branch 'master' of ↵David S. Miller
master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: drivers/vhost/net.c net/bridge/br_device.c Fix merge conflict in drivers/vhost/net.c with guidance from Stephen Rothwell. Revert the effects of net-2.6 commit 573201f36fd9c7c6d5218cdcd9948cee700b277d since net-next-2.6 has fixes that make bridge netpoll work properly thus we don't need it disabled. Signed-off-by: David S. Miller <davem@davemloft.net>
2010-07-20rtl8180: improve signal reporting for rtl8185 hardwareJohn W. Linville
The existing code seemed to be somewhat based on the datasheet, but varied substantially from the vendor-provided driver. This mirrors the handling of the rtl8185 case from that driver, but still neglects the specifics for the rtl8180 hardware. Those details are a bit muddled... Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-07-20mwl8k: correct/silence sparse warningsJohn W. Linville
drivers/net/wireless/mwl8k.c:1541:21: warning: incorrect type in assignment (different base types) drivers/net/wireless/mwl8k.c:1541:21: expected restricted __le16 [usertype] result drivers/net/wireless/mwl8k.c:1541:21: got int drivers/net/wireless/mwl8k.c:1575:42: expected unsigned short [unsigned] [usertype] cmd drivers/net/wireless/mwl8k.c:1575:42: got restricted __le16 [usertype] code drivers/net/wireless/mwl8k.c:1587:50: warning: incorrect type in argument 1 (different base types) drivers/net/wireless/mwl8k.c:1587:50: expected unsigned short [unsigned] [usertype] cmd drivers/net/wireless/mwl8k.c:1587:50: got restricted __le16 [usertype] code drivers/net/wireless/mwl8k.c:1592:50: warning: incorrect type in argument 1 (different base types) drivers/net/wireless/mwl8k.c:1592:50: expected unsigned short [unsigned] [usertype] cmd drivers/net/wireless/mwl8k.c:1592:50: got restricted __le16 [usertype] code drivers/net/wireless/mwl8k.c:1845:27: warning: incorrect type in argument 1 (different base types) drivers/net/wireless/mwl8k.c:1845:27: expected unsigned int [unsigned] [usertype] <noident> drivers/net/wireless/mwl8k.c:1845:27: got restricted __le32 [usertype] <noident> drivers/net/wireless/mwl8k.c:1848:27: warning: incorrect type in argument 1 (different base types) drivers/net/wireless/mwl8k.c:1848:27: expected unsigned int [unsigned] [usertype] <noident> drivers/net/wireless/mwl8k.c:1848:27: got restricted __le32 [usertype] <noident> drivers/net/wireless/mwl8k.c:1851:27: warning: incorrect type in argument 1 (different base types) drivers/net/wireless/mwl8k.c:1851:27: expected unsigned int [unsigned] [usertype] <noident> drivers/net/wireless/mwl8k.c:1851:27: got restricted __le32 [usertype] <noident> drivers/net/wireless/mwl8k.c:1854:27: warning: incorrect type in argument 1 (different base types) drivers/net/wireless/mwl8k.c:1854:27: expected unsigned int [unsigned] [usertype] <noident> drivers/net/wireless/mwl8k.c:1854:27: got restricted __le32 [usertype] <noident> drivers/net/wireless/mwl8k.c:1857:27: warning: incorrect type in argument 1 (different base types) drivers/net/wireless/mwl8k.c:1857:27: expected unsigned int [unsigned] [usertype] <noident> drivers/net/wireless/mwl8k.c:1857:27: got restricted __le32 [usertype] <noident> drivers/net/wireless/mwl8k.c:1860:27: warning: incorrect type in argument 1 (different base types) drivers/net/wireless/mwl8k.c:1860:27: expected unsigned int [unsigned] [usertype] <noident> drivers/net/wireless/mwl8k.c:1860:27: got restricted __le32 [usertype] <noident> drivers/net/wireless/mwl8k.c:3055:20: warning: incorrect type in assignment (different base types) drivers/net/wireless/mwl8k.c:3055:20: expected restricted __le16 [usertype] ht_caps drivers/net/wireless/mwl8k.c:3055:20: got unsigned short [unsigned] [usertype] cap At least the last one looks like a real bug... Signed-off-by: John W. Linville <linville@tuxdriver.com> Acked-by: Lennert Buytenhek <buytenh@wantstofly.org>
2010-07-20rt2x00: correct sparse warning in rt2x00debug.cJohn W. Linville
CHECK drivers/net/wireless/rt2x00/rt2x00debug.c drivers/net/wireless/rt2x00/rt2x00debug.c:193:28: warning: incorrect type in assignment (different base types) drivers/net/wireless/rt2x00/rt2x00debug.c:193:28: expected restricted __le32 [usertype] chip_rev drivers/net/wireless/rt2x00/rt2x00debug.c:193:28: got restricted __le16 [usertype] <noident> Signed-off-by: John W. Linville <linville@tuxdriver.com> Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
2010-07-20libipw: correct sparse warnings and mark some variables staticJohn W. Linville
CHECK drivers/net/wireless/ipw2x00/libipw_module.c drivers/net/wireless/ipw2x00/libipw_module.c:65:21: warning: symbol 'libipw_config_ops' was not declared. Should it be static? drivers/net/wireless/ipw2x00/libipw_module.c:66:6: warning: symbol 'libipw_wiphy_privid' was not declared. Should it be static? CHECK drivers/net/wireless/ipw2x00/libipw_wx.c drivers/net/wireless/ipw2x00/libipw_wx.c:415:17: warning: symbol 'ssid' shadows an earlier one drivers/net/wireless/ipw2x00/libipw_wx.c:324:9: originally declared here Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-07-20ipw2100: mark ipw2100_pm_qos_req staticJohn W. Linville
CHECK drivers/net/wireless/ipw2x00/ipw2100.c drivers/net/wireless/ipw2x00/ipw2100.c:177:28: warning: symbol 'ipw2100_pm_qos_req' was not declared. Should it be static? Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-07-20ath9k: correct sparse identified endian bug in ath_paprd_calibrateJohn W. Linville
drivers/net/wireless/ath/ath9k/main.c:282:26: warning: incorrect type in assignment (different base types) drivers/net/wireless/ath/ath9k/main.c:282:26: expected restricted __le16 [usertype] duration_id drivers/net/wireless/ath/ath9k/main.c:282:26: got int Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-07-20phy: add suspend/resume in the ic+Giuseppe Cavallaro
Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-07-20mac80211: move QoS-enable to BSS infoJohannes Berg
Ever since commit e1b3ec1a2a336c328c336cfa5485a5f0484cc90d Author: Stanislaw Gruszka <sgruszka@redhat.com> Date: Mon Mar 29 12:18:34 2010 +0200 mac80211: explicitly disable/enable QoS mac80211 is telling drivers, in particular iwlwifi, whether QoS is enabled or not. However, this is only relevant for station mode, since only then will any device send nullfunc frames and need to know whether they should be QoS frames or not. In other modes, there are (currently) no frames the device is supposed to send. When you now consider virtual interfaces, it becomes apparent that the current mechanism is inadequate since it enables/disables QoS on a global scale, where for nullfunc frames it has to be on a per-interface scale. Due to the above considerations, we can change the way mac80211 advertises the QoS state to drivers to only ever advertise it as "off" in station mode, and make it a per-BSS setting. Tested-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-07-20cxgb4vf: Fix bug where we were only allocating one queue in MSI modeCasey Leedom
Fix bug in setup_sge_queues() where we were incorrectly only allocating a single "Queue Set" for MSI mode. Signed-off-by: Casey Leedom <leedom@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-07-20cxgb4vf: Fix off-by-one error checking for the end of the mailbox delay arrayCasey Leedom
Fix off-by-one error in checking for the end of the mailbox response delay array. We ended up walking off the end and, if we were unlucky, we'd end up pulling in a 0 and never terminate the mailbox response delay loop ... Signed-off-by: Casey Leedom <leedom@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-07-19bnx2: Update version to 2.0.17.Michael Chan
Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-07-19bnx2: Remove some unnecessary smp_mb() in tx fast path.Michael Chan
smp_mb() inside bnx2_tx_avail() is used twice in the normal bnx2_start_xmit() path (see illustration below). The full memory barrier is only necessary during race conditions with tx completion. We can speed up the tx path by replacing smp_mb() in bnx2_tx_avail() with a compiler barrier. The compiler barrier is to force the compiler to fetch the tx_prod and tx_cons from memory. In the race condition between bnx2_start_xmit() and bnx2_tx_int(), we have the following situation: bnx2_start_xmit() bnx2_tx_int() if (!bnx2_tx_avail()) BUG(); ... if (!bnx2_tx_avail()) netif_tx_stop_queue(); update_tx_index(); smp_mb(); smp_mb(); if (bnx2_tx_avail()) if (netif_tx_queue_stopped() && netif_tx_wake_queue(); bnx2_tx_avail()) With smp_mb() removed from bnx2_tx_avail(), we need to add smp_mb() to bnx2_start_xmit() as shown above to properly order netif_tx_stop_queue() and bnx2_tx_avail() to check the ring index. If it is not strictly ordered, the tx queue can be stopped forever. This improves performance by about 5% with 2 ports running bi-directional 64-byte packets. Reviewed-by: Benjamin Li <benli@broadcom.com> Reviewed-by: Matt Carlson <mcarlson@broadcom.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>