dect
/
linux-2.6
Archived
13
0
Fork 0
Commit Graph

27211 Commits

Author SHA1 Message Date
Guo-Fu Tseng aab6fb82b1 jme: Fix compile warning introduced by new pm macro
SIMPLE_DEV_PM_OPS is using SET_SYSTEM_SLEEP_PM_OPS
and SET_SYSTEM_SLEEP_PM_OPS is empty when CONFIG_PM_SLEEP
is not defined.

Switching #ifdef CONFIG_PM to #ifdef CONFIG_PM_SLEEP

Signed-off-by: Guo-Fu Tseng <cooldavid@cooldavid.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-30 22:13:16 -07:00
Kurt Van Dijck b21f3c7ed9 can: remove useless defaults in Kconfig
There's no need for "default N' (or 'default n') as it's default.

Signed-off-by: Kurt Van Dijck <kurt.van.dijck@eia.be>
Acked-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-30 22:13:15 -07:00
Vasanthy Kolluri ea7ea65a3b enic: Add support to configure hardware interrupt coalesce timers in a platform independent way
enic driver and the underlying hardware use different units for representing the interrupt coalesce timer.
Driver converts the interrupt coalesce timer in usec to hardware cycles while setting the relevant hardware
registers. The conversion factor can be different for each of the adapter hardware types. So it is dynamically
learnt from the adapter firmware using the devcmd CMD_INTR_COAL_CONVERT. This allows the driver to configure
the hardware interrupt coalesce timers in a platform independent way.

Signed-off-by: Danny Guo <dannguo@cisco.com>
Signed-off-by: Vasanthy Kolluri <vkolluri@cisco.com>
Signed-off-by: Roopa Prabhu <roprabhu@cisco.com>
Signed-off-by: David Wang <dwang2@cisco.com>
Signed-off-by: David S. Miller <davem@conan.davemloft.net>
2011-06-30 20:43:38 -07:00
stephen hemminger 3fa2a1df90 virtio-net: per cpu 64 bit stats (v2)
Use per-cpu variables to maintain 64 bit statistics.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@conan.davemloft.net>
2011-06-30 20:43:38 -07:00
Bastian Blank f984cec64a xen/netback: Add module alias for autoloading
Add xen-backend:vif module alias to the xen-netback module. This allows
automatic loading of the module.

Signed-off-by: Bastian Blank <waldi@debian.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
2011-06-30 11:19:09 -07:00
John W. Linville df2cbe4075 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem 2011-06-30 13:34:06 -04:00
John W. Linville 690b0cacb6 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 into for-davem 2011-06-30 11:26:04 -04:00
Dan Carpenter 9a4ba833a2 rtlwifi: potential forever loop in rtl92de_hw_init()
"i" should be an int here because we are trying to use it to count
to 10000.  The original code looks like it could hang in a forever
loop.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-29 15:11:07 -04:00
Larry Finger ab049fbf5e rtlwifi: rtl8192de: Fix build errors when using allyes configuration
After adding rtl8192de to linux-next, making the rtlwifi drivers be built-in
results in the following warnings:

  LD      drivers/net/wireless/rtlwifi/built-in.o
drivers/net/wireless/rtlwifi/rtl8192de/built-in.o: In function `rtl92ce_sw_led_on':
(.text+0x11fb6): multiple definition of `rtl92ce_sw_led_on'
drivers/net/wireless/rtlwifi/rtl8192ce/built-in.o:(.text+0xa326): first defined here
drivers/net/wireless/rtlwifi/rtl8192de/built-in.o:(.bss+0x0): multiple definition of `dm_digtable'
drivers/net/wireless/rtlwifi/rtl8192c/built-in.o:(.bss+0x0): first defined here
ld: Warning: size of symbol `dm_digtable' changed from 40 in drivers/net/wireless/rtlwifi/rtl8192c/built-in.o to 48 in drivers/net/wireless/rtlwifi/rtl8192de/built-in.o
drivers/net/wireless/rtlwifi/rtl8192de/built-in.o: In function `rtl92ce_sw_led_off':
(.text+0x11cfe): multiple definition of `rtl92ce_sw_led_off'
drivers/net/wireless/rtlwifi/rtl8192ce/built-in.o:(.text+0xa06e): first defined here

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Acked-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-29 15:11:06 -04:00
Rafał Miłecki a5f377fb9c b43: HT-PHY: correct 0x2059 radio init
Sometimes additional steps are performed while initializing 2059 radio.
We did not find the condition yet, so make it always true for now.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-29 15:11:06 -04:00
Mohammed Shafi Shajakhan 5cf6fa784a ath9k_htc: Add device ID for Sony UWA-BR100
for more details please take a look at:
http://comments.gmane.org/gmane.linux.drivers.ath9k.devel/6541
http://www.wikidevi.com/wiki/Sony_UWA-BR100

Reported-by: Thomas Novin <thomas@xyz.pp.se>
Cc: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-29 15:11:05 -04:00
Mohammed Shafi Shajakhan c3d77696b0 ath9k: move few descriptor macros to ath9k.h
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-29 15:11:04 -04:00
Rafał Miłecki 2d02c86b77 b43: HT-PHY: basic PHY init
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-29 15:11:03 -04:00
Rafał Miłecki 71d3b0d592 b43: HT-PHY: add init tables
They were written from observing MMIO writes to registers 0x72 0x74 and
0x73 right after phy_write(0x017e) <- 0x3830 which finishes chennel
switching. RegExps were used to translate writes to arrays.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-29 15:11:03 -04:00
Rafał Miłecki 3e644ab47e b43: HT-PHY: init radio when enabling it
Masks and sets were found in MMIO dumps by using MMIO hacks. Shortly:
radio_write(0x0c51) <- 0x0070
radio_write(0x0c5a) <- 0x0003
radio_write(0x0146) <- 0x0003
radio_write(0x0546) <- 0x0003
radio_write(0x0946) <- 0x0003
radio_write(0x002e) <- 0x0078
radio_write(0x00c0) <- 0x0080
radio_write(0x002e) <- 0xff87
radio_write(0x00c0) <- 0xff7f
radio_write(0x0011) <- 0xfff7

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-29 15:11:02 -04:00
Rafał Miłecki e8dec1e99a b43: HT-PHY: replace radio routing magic numbers
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-29 15:11:01 -04:00
Arik Nemtsov b4d38db121 wl12xx: AP-mode - use mac80211 indication about STA WME support
When adding a station, use the information given in the mac80211
populated ieee80211_sta structure to determine if it supports WME.
Provide this information to the FW.

This patch depends on "mac80211: propagate information about
STA WME support down".

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-29 15:11:01 -04:00
Jon Mason f01dce9474 rtlwifi: use PCI_VENDOR_ID_*
Use PCI_VENDOR_ID_* from pci_ids.h instead of creating #define locally.

Signed-off-by: Jon Mason <jdmason@kudzu.us>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-29 15:10:59 -04:00
Jon Mason 6a4ecc29c9 rtlwifi: remove unnecessary read of PCI_CAP_ID_EXP
The PCIE capability offset is saved during PCI bus walking.  It will
remove an unnecessary search in the PCI configuration space if this
value is referenced instead of reacquiring it.

Also, remove unnecessary and unused #defines for PCI.

Signed-off-by: Jon Mason <jdmason@kudzu.us>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-29 15:10:59 -04:00
Jon Mason f05b691150 iwlegacy: remove unnecessary read of PCI_CAP_ID_EXP
The PCIE capability offset is saved during PCI bus walking.  It will
remove an unnecessary search in the PCI configuration space if this
value is referenced instead of reacquiring it.

Signed-off-by: Jon Mason <jdmason@kudzu.us>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-29 14:53:25 -04:00
Rafał Miłecki bfc8dfec45 b43: HT-PHY: implement lacking 0x908 PHY reg op
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-29 14:53:25 -04:00
Rafał Miłecki feb90636cc b43: HT-PHY: add channel switching tables for 2 GHz band
Tables were taken from observing writes in MMIO dumps.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-29 14:53:24 -04:00
Rafał Miłecki e5b61007bc b43: HT-PHY: perform some tables ops on channel switching
Starring at MMIO dumps around PHY channel switching has led to finding
serie of 3 similar ops this patch implements.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-29 14:53:24 -04:00
Rafał Miłecki bdb2dfb237 b43: HT-PHY: upload PHY values when switching channel
After calibrating radio you can find few PHY writes in MMIO dumps:
 phy_read(0x0009) -> 0x0000
phy_write(0x01ce) <- 0x03dd
phy_write(0x01cf) <- 0x03d9
phy_write(0x01d0) <- 0x03d5
phy_write(0x01d1) <- 0x0424
phy_write(0x01d2) <- 0x0429
phy_write(0x01d3) <- 0x042d
By comparing to N-PHY code we found out that they are PHY tables for
channel switching plus band info read at the beginning.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-29 14:53:23 -04:00
Rafał Miłecki 1a93139237 b43: HT-PHY: prepare place for HT-PHY tables
They are big arrays uploaded to the hardware on init, calibration, etc.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-29 14:53:22 -04:00
Eugene A. Shatokhin a0b8de350b ath5k: fix memory leak when fewer than N_PD_CURVES are in use
We would free the proper number of curves, but in the wrong
slots, due to a missing level of indirection through
the pdgain_idx table.

It's simpler just to try to free all four slots, so do that.

Cc: stable@kernel.org
Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-29 14:36:45 -04:00
Rajkumar Manoharan c31eb8e926 ath9k: Fix suspend/resume when no interface is UP
When no interface has been brought up, the chip's power
state continued as AWAKE. So during resume, the chip never
been powered up.

Cc: stable@kernel.org
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-29 14:36:44 -04:00
Dave Jones 16adf5d079 usbnet: Remove over-broad module alias from zaurus.
This module and a bunch of dependancies are getting loaded on several
of laptops I have (probably picking up the mobile broadband device),
that have nothing to do with zaurus. Matching by class without
any vendor/device pair isn't the right thing to do here, as it
will prevent any other driver from correctly binding to it.
(Or in the absense of a driver, will just waste time & memory by
 unnecessarily loading modules)

Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-29 06:09:17 -07:00
Jon Mason 3bea123791 myri10ge: update version
Update version and copyright

Signed-off-by: Jon Mason <mason@myri.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-29 06:02:05 -07:00
Jon Mason b3b6ae2c2a myri10ge: misc style cleanups
Miscellaneous white space, style, and other cleanups

v2 includes corrections from Joe Perches

Signed-off-by: Jon Mason <mason@myri.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-29 06:02:05 -07:00
Jon Mason effd1edab9 myri10ge: remove unnecessary read of PCI_CAP_ID_EXP
The PCIE capability offset is saved during PCI bus walking.  It will
remove an unnecessary search in the PCI configuration space if this
value is referenced instead of reacquiring it.

Signed-off-by: Jon Mason <mason@myri.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-29 06:02:05 -07:00
Jon Mason 5dcd846712 myri10ge: add support for set_phys_id
Add myri10ge driver support for the ethtool identify operation.
NOTE: Rather than blinking (which is the normal case), when identify is
used, the yellow LED turns solid.

Signed-off-by: Jon Mason <mason@myri.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-29 06:02:05 -07:00
Jon Mason 4b47638ab2 myri10ge: allow small_bytes = 0
Allow page-based receive to work when small_bytes is set to 0.

Signed-off-by: Jon Mason <mason@myri.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-29 06:02:04 -07:00
Jon Mason c689b81b42 myri10ge: rework parity error check and cleanup
Clean up watchdog reset code:
 - move code that checks for stuck slice to a common routine
 - unless there is a confirmed h/w fault, verify that a stuck
   slice is still stuck in the watchdog worker; if the slice is no
   longer stuck, abort the reset.
 - this removes an egregious 2000ms pause in the watchdog worker that
   was a diagnostic aid (to look for spurious resets) the snuck into
   production code.

v3 includes corrections from Joe Perches

Signed-off-by: Jon Mason <mason@myri.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-29 06:02:04 -07:00
Jon Mason 7539a613c6 myri10ge: Mask PCI Surprise Link Down Events
A SRAM parity error can cause a surprise link down.  Since We can
recover from SRAM parity errors, mask PCI surprise down events.

Signed-off-by: Jon Mason <mason@myri.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-29 06:02:04 -07:00
Jon Mason 3b20b2dc5f myri10ge: ensure tx queues remain stopped
Ensure that our tx queues remain stopped when we stop them in
myri10ge_close().  Not doing so can potentially lead to traffic being
transmitted when the interface is removed, which can lead to NULL
pointer dereferences.

Signed-off-by: Jon Mason <mason@myri.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-29 06:02:04 -07:00
Marc Kleine-Budde a30d5155a4 net/can: activate bit-timing calculation and netlink based drivers by default
The two options "CAN bit-timing calculation" and
"Platform CAN drivers with Netlink support" have a "default Y". In order to
activate them by default, change to "default y".

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Acked-by: Wolfgang Grandegger <wg@grandegger.com>
Acked-by: Kurt Van Dijck <kurt.van.dijck@eia.be>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-29 05:58:42 -07:00
Yinglin Luan 55caa9241e rionet: fix NULL pointer dereference in rionet_remove
Function rionet_remove initializes local variable 'ndev' to NULL
and do nothing changes before the call to unregister_netdev(ndev),
this could cause a NULL pointer dereference.

Reported-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Yinglin Luan <synmyth@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-29 05:57:35 -07:00
Joe Perches 864834f935 caif: Fix recieve/receive typo
Just spelling fixes.

Actually, a twofer with vaiables/variables as well.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-29 05:52:03 -07:00
David S. Miller 7ab24bfdf9 net+crypto: Use vmalloc for zlib inflate buffers.
They are 64K and result in order-4 allocations, even with SLUB.

Therefore, just like we always have for the deflate buffers, use
vmalloc.

Reported-by: Martin Jackson <mjackson220.list@gmail.com>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-29 05:48:41 -07:00
Stephen Rothwell 84cac3989a net: include dma-mapping.h in ll_temac_main.c for dma_map_single etc
fixes thses build errors:

drivers/net/ll_temac_main.c: In function 'temac_dma_bd_release':
drivers/net/ll_temac_main.c:209:4: error: implicit declaration of function 'dma_unmap_single'
drivers/net/ll_temac_main.c:215:3: error: implicit declaration of function 'dma_free_coherent'
drivers/net/ll_temac_main.c: In function 'temac_dma_bd_init':
drivers/net/ll_temac_main.c:243:2: error: implicit declaration of function 'dma_alloc_coherent'
drivers/net/ll_temac_main.c:243:14: warning: assignment makes pointer from integer without a cast
drivers/net/ll_temac_main.c:251:14: warning: assignment makes pointer from integer without a cast
drivers/net/ll_temac_main.c:280:3: error: implicit declaration of function 'dma_map_single'
drivers/net/ll_temac_main.c: In function 'temac_start_xmit_done':
drivers/net/ll_temac_main.c:628:22: warning: cast to pointer from integer of different size

Caused by commit commit b7f080cfe2 ("net: remove mm.h inclusion from
netdevice.h").

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-29 02:55:59 -07:00
Stephen Rothwell 8d0f7cea7a net: include io.h in sja1000_of_platform.c for iounmap etc
fixes these build errors:

drivers/net/can/sja1000/sja1000_of_platform.c: In function 'sja1000_ofp_read_reg':
drivers/net/can/sja1000/sja1000_of_platform.c:61:2: error: implicit declaration of function 'in_8'
drivers/net/can/sja1000/sja1000_of_platform.c: In function 'sja1000_ofp_write_reg':
drivers/net/can/sja1000/sja1000_of_platform.c:67:2: error: implicit declaration of function 'out_8'
drivers/net/can/sja1000/sja1000_of_platform.c: In function 'sja1000_ofp_remove':
drivers/net/can/sja1000/sja1000_of_platform.c:81:2: error: implicit declaration of function 'iounmap'
drivers/net/can/sja1000/sja1000_of_platform.c: In function 'sja1000_ofp_probe':
drivers/net/can/sja1000/sja1000_of_platform.c:113:2: error: implicit declaration of function 'ioremap_nocache'
drivers/net/can/sja1000/sja1000_of_platform.c:113:7: warning: assignment makes pointer from integer without a cast

Caused by commit b7f080cfe2 ("net: remove mm.h inclusion from
netdevice.h").

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-29 02:55:28 -07:00
John W. Linville 3be3fdb58a Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
Conflicts:
	drivers/net/wireless/iwlwifi/iwl-tx.c
2011-06-28 13:56:21 -04:00
John W. Linville 5ee0a58d8c iwlagn: use PCI_DMA_* for pci_* operations
"iwlagn: map command buffers BIDI" uses the DMA_* enumerations for DMA
directions, even though the pci_* DMA API is still in use.  That patch
was undoubtedly developed on top of "iwlagn: don't use the PCI wrappers
for DMA operation", which is due in the next release.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-28 11:16:39 -04:00
Jesse Gross 213ade8ca8 vmxnet3: Enable GRO support.
When receiving packets from another guest on the same hypervisor, it's
generally possible to receive large packets because no segmentation is
necessary and these packets are handled by LRO.  However, when doing
routing or bridging we must disable LRO and lose this benefit.  In
these cases GRO can still be used and it is very effective because the
packets which are segmented in the hypervisor are received very close
together and can easily be merged.

CC: Shreyas Bhatewara <sbhatewara@vmware.com>
CC: Scott Goldman <scottjg@vmware.com>
CC: VMware PV-Drivers <pv-drivers@vmware.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
Signed-off-by: Scott J. Goldman <scottjg@vmware.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-27 22:08:38 -07:00
Jon Mason 95cab7386b vxge: remove unnecessary reads of PCI_CAP_ID_EXP
The PCIE capability offset is saved during PCI bus walking.  It will
remove an unnecessary search in the PCI configuration space if this
value is referenced instead of reacquiring it.

Signed-off-by: Jon Mason <jdmason@kudzu.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-27 21:40:45 -07:00
Jon Mason 1a10ccae90 sky2: remove unnecessary reads of PCI_CAP_ID_EXP
The PCIE capability offset is saved during PCI bus walking.  It will
remove an unnecessary search in the PCI configuration space if this
value is referenced instead of reacquiring it.  Also, pci_is_pcie is a
better way of determining if the device is PCIE or not (as it uses the
same saved PCIE capability offset).

Signed-off-by: Jon Mason <jdmason@kudzu.us>
Acked-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-27 21:40:45 -07:00
Jon Mason e44daaded1 r8169: remove unnecessary read of PCI_CAP_ID_EXP
The PCIE capability offset is saved during PCI bus walking.  Use the
value from pci_dev instead of checking in the driver and saving it off
the the driver specific structure.  Also, it will remove an unnecessary
search in the PCI configuration space if this value is referenced
instead of reacquiring it.

Signed-off-by: Jon Mason <jdmason@kudzu.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-27 21:40:45 -07:00
Jon Mason d3aa0cb44f niu: remove unnecessary read of PCI_CAP_ID_EXP
The PCIE capability offset is saved during PCI bus walking.  It will
remove an unnecessary search in the PCI configuration space if this
value is referenced instead of reacquiring it.

Signed-off-by: Jon Mason <jdmason@kudzu.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-27 21:40:45 -07:00
Jon Mason 77c98e6a7a bnx2x: remove unnecessary read of PCI_CAP_ID_EXP
The PCIE capability offset is saved during PCI bus walking.  It will
remove an unnecessary search in the PCI configuration space if this
value is referenced instead of reacquiring it.  Also, pci_is_pcie is a
better way of determining if the device is PCIE or not (as it uses the
same saved PCIE capability offset).

Signed-off-by: Jon Mason <jdmason@kudzu.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-27 21:40:45 -07:00
Jon Mason e82760e7d6 bnx2: remove unnecessary read of PCI_CAP_ID_EXP
The PCIE capability offset is saved during PCI bus walking.  It will
remove an unnecessary search in the PCI configuration space if this
value is referenced instead of reacquiring it.  Also, pci_is_pcie is a
better way of determining if the device is PCIE or not (as it uses the
same saved PCIE capability offset).

Signed-off-by: Jon Mason <jdmason@kudzu.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-27 21:40:45 -07:00
Jon Mason bdaae04c65 igb: remove unnecessary reads of PCI_CAP_ID_EXP
The PCIE capability offset is saved during PCI bus walking.  It will
remove an unnecessary search in the PCI configuration space if this
value is referenced instead of reacquiring it.

Signed-off-by: Jon Mason <jdmason@kudzu.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-27 21:40:44 -07:00
Jon Mason 353064de8a e1000e: remove unnecessary reads of PCI_CAP_ID_EXP
The PCIE capability offset is saved during PCI bus walking.  It will
remove an unnecessary search in the PCI configuration space if this
value is referenced instead of reacquiring it.

Signed-off-by: Jon Mason <jdmason@kudzu.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-27 21:40:44 -07:00
Jon Mason 6532e9cb33 cxgb3: remove unnecessary read of PCI_CAP_ID_EXP
The PCIE capability offset is saved during PCI bus walking.  It will
remove an unnecessary search in the PCI configuration space if this
value is referenced instead of reacquiring it.

Signed-off-by: Jon Mason <jdmason@kudzu.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-27 21:40:44 -07:00
Jon Mason a875a4c740 mlx4: remove unnecessary read of PCI_CAP_ID_EXP
The PCIE capability offset is saved during PCI bus walking.  It will
remove an unnecessary search in the PCI configuration space if this
value is referenced instead of reacquiring it.

Signed-off-by: Jon Mason <jdmason@kudzu.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-27 21:40:44 -07:00
Jon Mason 708ebb3a51 tg3: remove unnecessary read of PCI_CAP_ID_EXP
The PCIE capability offset is saved during PCI bus walking.  Use the
value from pci_dev instead of checking in the driver and saving it off
the the driver specific structure.  It will remove an unnecessary search
in the PCI configuration space if this value is referenced instead of
reacquiring it.

v2 of the patch re-adds the PCI_EXPRESS flag and adds comments
describing why it is necessary.

[ pdev->pcie_cap --> pci_pcie_cap(pdev) -DaveM ]

Signed-off-by: Jon Mason <jdmason@kudzu.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-27 21:38:45 -07:00
Kuninori Morimoto ec0d75518c net: sh_eth: tidyup compile warning
This patch tidyup below warning

${LINUX}/drivers/net/sh_eth.c:1773: warning:
'mdp' may be used uninitialized in this function

Cc: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-27 21:03:26 -07:00
Jesse Gross 72e85c45b9 vmxnet3: Convert to new vlan model.
This converts the vmxnet3 driver to use the new vlan model.  In doing so
it fixes missing tags in tcpdump and failure to do checksum offload when
tx vlan offload is disabled.

CC: Shreyas Bhatewara <sbhatewara@vmware.com>
CC: VMware PV-Drivers <pv-drivers@vmware.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
Signed-off-by: Scott J. Goldman <scottjg@vmware.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-27 20:56:51 -07:00
Mike Frysinger cfbf7586bc can: bfin_can: auto-calculate accessor sizes
Since we have a struct that defines the sizes of the registers, we don't
need to explicitly use the 16bit read/write helpers.  Let the code figure
out which size access to make based on the size of the C type.

There should be no functional changes here.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Wolfgang Grandegger <wg@grandegger.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-27 20:42:24 -07:00
Mike Frysinger 9118f08a77 can: bfin_can: simplify xmit id1 setup
If we look closely, the 4 writes to TRANSMIT_CHL.id1 can be collapsed
down into much simpler code.  So do just that.

This also fixes a build failure due to the I/O macros no longer
getting pulled in.  Their minor (and accidental) usage here gets
dropped as part of the unification.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Wolfgang Grandegger <wg@grandegger.com>
Acked-by: Kurt Van Dijck <kurt.van.dijck@eia.be>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-27 20:42:24 -07:00
Sergei Shtylyov aca7a3acb1 mlx4: use pci_dev->revision
Commit 725c89997e (mlx4_en: Reporting HW revision
in ethtool -i) added code to read the revision ID from the PCI configuration
register while it's already stored by PCI subsystem in the 'revision' field of
'struct pci_dev'...

While at it, move the code being changed a bit in order to not break the
initialization sequence.

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-27 20:30:47 -07:00
Sergei Shtylyov 6691678dca iwlwifi: use pci_dev->revision, again
Commit ff938e43d3 (net: use pci_dev->revision,
again) already converted this driver to using the 'revision' field of 'struct
pci_dev' but commit 084dd79172 (iwlagn: move PCI
related operations from probe and remove to PCI layer) has again added the code
to read the PCI revision ID register...

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-27 15:09:42 -04:00
Dan Carpenter a5e5aa6cee mwifiex: restore handling of NULL parameters
Prior to a5ffddb70c "mwifiex: remove casts of void pointers" the
code assumed that the data_buf parameter could be a NULL pointer.
The patch preserved some NULL checks but not consistently, so there
was a potential for NULL dereferences and it changed the behavior.
This patch restores the original behavior.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-27 15:09:42 -04:00
Rajkumar Manoharan f6b4e4d476 ath9k: Fix locking issue during tx completion
The received tx status of aggregated frame without BlockAck may
cause deaf state in AR5416 cards. So the driver does a reset to
recover. When this happens, we release the pcu_lock before doing
a reset as ath_rest acquires pcu_lock. This is ugly and also not
atomic. Fixing this addresses the TX DMA failure also.

ath_tx_complete_aggr can be called from different paths which
takes different variants of spin_lock. This patch also addresses
the following warning.

WARNING: at kernel/timer.c:1011 del_timer_sync+0x4e/0x50()
Call Trace:
 <IRQ>  [<ffffffff8104be3a>] warn_slowpath_common+0x7a/0xb0
 [<ffffffff8104be85>] warn_slowpath_null+0x15/0x20
 [<ffffffff8105915e>] del_timer_sync+0x4e/0x50
 [<ffffffffa03726be>] ath_reset+0x3e/0x210 [ath9k]
 [<ffffffff8135cdaf>] ? _raw_spin_unlock_bh+0x1f/0x30
 [<ffffffffa037760a>] ath_tx_complete_aggr.isra.26+0x54a/0xa40 [ath9k]

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-27 15:09:42 -04:00
Stanislaw Gruszka 428bc8c396 iwlagn: fix rmmod crash
priv->bus.bus_specific pointer is used after priv structures was freed,
in iwl_pci_remove(), what make ugly rmmod crash. This bug was introduced
by current pci changes.

On the way remove fake check, if prober error code is returned from
.probe() function, .remove() will never be called be null drvdata.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-27 15:09:42 -04:00
Joe Perches 1d616b14cf rt2x00: Fix unspeficied typo
Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-27 15:09:41 -04:00
Mohammed Shafi Shajakhan 05b60d4e37 ath9k_hw: make use of the gain_table_entry macro
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-27 15:09:40 -04:00
Mohammed Shafi Shajakhan f68e20f0f8 ath9k_hw: Add carrier leak correction in desired gain calculation
Cc: muddin@qca.qualcomm.com
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-27 15:09:40 -04:00
Rajkumar Manoharan dcfcbd590d ath9k_hw: Fix false tx hung detection in AR9003 chips
The edma based (AR9003 family) chips update tx status
descriptors in a common ring buffer for all transmitted
frames. Whenever tx interrupt is raised, the descriptors
are processed and tx status index is moved.

The complete tx stauts ring are updated with beacons tx status
when there are no data frames to be sent for a period of time.
In this state, transmitting data frames causes the driver to
wait for the tx status on an incorrect tx status index though
the status was updated by hw properly. The driver detects this
condition as a h/w hang and does unnecessary chip resets.

This issue was orginally reported in adhoc mode while sending
frames after an idle time.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-27 15:09:40 -04:00
Johannes Berg 8ee3108075 mac80211: restrict advertised HW scan rates
Advertise only user-requested bitrates in a HW scan.
Note that the hw_scan API doesn't currently have a
way of asking for a specific probe request bitrate,
so we might end up using a bitrate that we don't
advertise as supported. I'll fix that later.

Also add a hexdump printk to hwsim to verify this.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-27 15:09:39 -04:00
Johannes Berg 04b7dcf979 wireless: unify QoS control field definitions
Move all that mac80211 has into the generic
ieee80211.h header file and use them. At the
same time move them from mask+shift to just
bits and rename them for consistent names.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-27 15:09:39 -04:00
Chaoming Li f9fc51365d rtlwifi: rtl8192de: Modify Kconfig and Makefile routines for new driver
Set up Kconfig and Makefile for new driver for RTL8192DE.

Signed-off-by: Chaoming_Li <chaoming_li@realsil.com.cn>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-27 15:09:38 -04:00
Larry Finger f34317db36 rtlwifi: Fix build problems introduced by merging rtl8192de
These patches allow compilation of rtlwifi, rtl8192c_common,
rtl8192ce, rtl8192cu and rtl8192se to compile after rtl8192de
was added.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-27 15:09:38 -04:00
Chaoming Li 674f0523ec rtlwifi: rtl8192de: Merge TX and RX routines
Merge routines trx.c and trx.h for RTL8192DE.

Signed-off-by: Chaoming_Li <chaoming_li@realsil.com.cn>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-27 15:09:38 -04:00
Chaoming Li e501016884 rtlwifi: rtl8192de: Merge table routines
Merge routines table.c and table.h for RTL8192DE.

Signed-off-by: Chaoming_Li <chaoming_li@realsil.com.cn>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-27 15:09:38 -04:00
Chaoming Li a7dbd3b50d rtlwifi: rtl8192de: Merge main (sw) routines
Merge routines sw.c and sw.h for RTL8192SE.

Signed-off-by: Chaoming_Li <chaoming_li@realsil.com.cn>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-27 15:09:38 -04:00
Chaoming Li f219eff1e5 rtlwifi: rtl8192de: Merge rf routines
Merge routines rf.c and rf.h for RTL8192DE.

Signed-off-by: Chaoming_Li <chaoming_li@realsil.com.cn>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-27 15:09:38 -04:00
Chaoming Li 3de1ef7304 rtlwifi: rtl8192de: Merge register definitions
Merge routines reg.h for RTL8192DE.

Signed-off-by: Chaoming_Li <chaoming_li@realsil.com.cn>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-27 15:09:38 -04:00
Chaoming Li 7274a8c229 rtlwifi: rtl8192de: Merge phy routines
Merge routines phy.c and phy.h for RTL8192DE.

Signed-off-by: Chaoming_Li <chaoming_li@realsil.com.cn>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-27 15:09:37 -04:00
Chaoming Li f53d5a7006 rtlwifi: rtl8192de: Merge led routines
Merge routines led.c and led.h for RTL8192DE.

Signed-off-by: Chaoming_Li <chaoming_li@realsil.com.cn>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-27 15:09:37 -04:00
Chaoming Li 3affdf4237 rtlwifi: rtl8192de: Merge hardware routines
Merge routines hw.c and hw.h for RTL8192DE.

Signed-off-by: Chaoming_Li <chaoming_li@realsil.com.cn>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-27 15:09:37 -04:00
Chaoming Li 985d4d3f6d rtlwifi: rtl8192de: Merge firmware routines
Merge routines fw.c and fw.h for RTL8192DE.

Signed-off-by: Chaoming_Li <chaoming_li@realsil.com.cn>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-27 15:09:37 -04:00
Chaoming Li 4f01358e5b rtlwifi: rtl8192de: Merge dynamic management routines
Merge routines dm.c and dm.h for RTL8192DE.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Chaoming_Li <chaoming_li@realsil.com.cn>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-27 15:09:37 -04:00
Chaoming Li 23a8c61416 rtlwifi: rtl8192de: Merge def.h
Introduce routine def.h for rtl8192de.

Signed-off-by: Chaoming_Li <chaoming_li@realsil.com.cn>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-27 15:09:37 -04:00
Evgeni Golov 8fcbd4dc7a iwlagn: fix *_UCODE_API_MAX output in the firmware field
Currently (3.0-rc2), modinfo iwlagn shows:
    firmware:       iwlwifi-5150-IWL5150_UCODE_API_MAX.ucode
    firmware:       iwlwifi-5000-IWL5000_UCODE_API_MAX.ucode
    firmware:       iwlwifi-6000g2b-IWL6000G2_UCODE_API_MAX.ucode
    firmware:       iwlwifi-6000g2a-IWL6000G2_UCODE_API_MAX.ucode
    firmware:       iwlwifi-6050-IWL6050_UCODE_API_MAX.ucode
    firmware:       iwlwifi-6000-IWL6000_UCODE_API_MAX.ucode
    firmware:       iwlwifi-100-IWL100_UCODE_API_MAX.ucode
    firmware:       iwlwifi-1000-IWL1000_UCODE_API_MAX.ucode
    firmware:       iwlwifi-105-IWL105_UCODE_API_MAX.ucode
    firmware:       iwlwifi-2030-IWL2030_UCODE_API_MAX.ucode
    firmware:       iwlwifi-2000-IWL2000_UCODE_API_MAX.ucode

which is obviously wrong, the user should not see the *_UCODE_API_MAX
macros but the actual ucode API versions here.

The problem are the
    #define *_MODULE_FIRMWARE(api) *_FW_PRE #api ".ucode"
which do not expand api correctly (because this is a macro itself).

Fixed by using __stringify() from linux/stringify.h.

Further information about macro stringification can be found here:
    http://gcc.gnu.org/onlinedocs/cpp/Stringification.html

Signed-off-by: Evgeni Golov <sargentd@die-welt.net>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-27 14:33:14 -04:00
John W. Linville ed9ed3b82b Merge branch 'wireless-2.6' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-2.6 2011-06-27 14:26:04 -04:00
Johannes Berg e815407d39 iwlagn: map command buffers BIDI
Evidently, the device sometimes wants to write back
to command buffers, even if I see no reason why it
should. Allow it to do that.

Tested-by: Andy Lutomirski <luto@mit.edu>
Tested-by: Kyle McMartin <kyle@redhat.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-06-27 07:56:41 -07:00
Johannes Berg 1107a08a1a iwlagn: fix cmd queue unmap
When we stop the device while a command is in
flight that uses multiple TBs, we can leak the
DMA buffers for the second and higher TBs. Fix
this by using iwlagn_unmap_tfd() as we do when
we normally recover the entry.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-06-27 07:50:45 -07:00
Ido Yariv 95dac04f88 wl12xx: Support routing FW logs to the host
A recently added feature to the firmware enables the driver to retrieve
firmware logs via the host bus (SDIO or SPI).

There are two modes of operation:
1. On-demand: The FW collects its log in an internal ring buffer. This
   buffer can later be read, for example, upon recovery.
2. Continuous: The FW pushes the FW logs as special packets in the RX
   path.

Reading the internal ring buffer does not involve the FW. Thus, as long
as the HW is not in ELP, it should be possible to read the logs, even if
the FW crashes.

A sysfs binary file named "fwlog" was added to support this feature,
letting a monitor process read the FW messages. The log is transferred
from the FW only when available, so the reading process might block.

Signed-off-by: Ido Yariv <ido@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-06-27 15:10:56 +03:00
Ido Yariv baacb9aed0 wl12xx: Avoid recovery while one is already in progress
During recovery work commands sent to the FW could fail and schedule
additional recovery work. Since the chip is going to be powered off,
avoid recursive recoveries.

Signed-off-by: Ido Yariv <ido@wizery.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-06-27 15:05:15 +03:00
Ido Yariv 842f1a6c71 wl12xx: Check for FW quirks as soon as the FW boots
The FW initialization might depend on the FW revision, so check for any
FW quirks right after booting it.

Signed-off-by: Ido Yariv <ido@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-06-27 15:05:14 +03:00
Eliad Peller 92ef8960ae wl12xx: use freezable workqueue for netstack_work
When resuming (after wowlan), we want the rx packets (which is
usually the wake-up packet itself) to be passed to mac80211 only
after the resume notifier was completed, and mac80211 is up and
running (otherwise, the packets will be dropped).

By enqueueing the netstack_work to a freezable workqueue, we can
guarantee the rx processing to occur only after mac80211 was resumed.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Ido Yariv <ido@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-06-27 13:56:14 +03:00
Eliad Peller c27d3accb6 wl12xx: use _ni version of ieee80211_tx_status
wl1271_flush_deferred_work(), which calls ieee80211_rx() and
ieee80211_tx_status(), is called from a process context.
hence, use ieee80211_tx_status_ni() instead of ieee80211_tx_status().

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-06-27 13:56:14 +03:00
Eliad Peller ef4b29e976 wl12xx: check the vif's operstate after join
When resuming while connected (without wowlan), the interface
is already IF_OPER_UP, so we won't get the notifier callback,
and hence never complete the association (from wl12xx perspective)

This situation, among other potential problems, prevents the
station from entering psm.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-06-27 13:56:14 +03:00
Eliad Peller 6bb0433215 wl12xx_sdio: enable wowlan only if enable_irq_wake() succeeded
Some platforms don't support the wake_irq, so disable wowlan
in this case, and avoid the "Unbalanced IRQ wake disable"
warning on disable_irq_wake().

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-06-27 13:35:53 +03:00
Eliad Peller 8a7cf3febb wl12xx: enable/disable beacon filtering on ap suspend/resume
Beacon filtering needs to be enabled so AP won't wake up by
by every received beacon.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-06-27 13:35:40 +03:00
Eliad Peller ff91afc90a wl12xx: clear wl->wow_enabled on resume
We set wl->wow_enabled on every suspend(), so we need to clear it
on every resume().
(we can't rely on setting wl->wow_enabled=false in suspend(),
as it being called only when wowlan triggers are configured)

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-06-27 13:29:21 +03:00
Eliad Peller 4a859df85a wl12xx: don't check wow param on suspend/resume
Since mac80211 calls suspend/resume only when wowlan triggers
exist, there is no need to check for triggers existance in the
callbacks as well.
Add a WARN_ON() to verify it.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-06-27 13:29:21 +03:00
Shahar Levi 0c005048aa wl12xx: Add Support for Low Power DRPw (LPD) Mode
The Low Power DRPw (LPD) mode contains several optimizations
that designed to reduce power consumption. The purpose
is to save current consumption in RX and Listen mode.

LPD setting apply only for wl127x AP mode (not wl128x)

Signed-off-by: Shahar Levi <shahar_levi@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-06-27 12:50:33 +03:00
Ohad Ben-Cohen 86046da4af wl12xx: don't bail if mmc isn't MMC_CAP_POWER_OFF_CARD
If our SDIO function has its runtime PM disabled, don't try to
manipulate its runtime PM status at all. This way we can still
power on cards plugged to mmc hosts that are not MMC_CAP_POWER_OFF_CARD.

Reported-and-tested-by: Tim Yamin <tim@kangatronix.co.uk>
Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-06-27 12:01:31 +03:00
Luciano Coelho d2c2bb9fcc wl12xx: split channel array per band in sched_scan
The firmware, in practice, treats the channels in three separate
blocks, one for each band (bg, a and j).  Instead of using a single
array and doing some magic with indices, split the array in 3 to make
it more readable.

Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-06-27 12:01:20 +03:00
Eliad Peller d192d268a1 wl12xx: fix erroneous commit (cb5ae0)
Due to rebase error, the patch for commit cb5ae0 ("wl12xx: configure
rates when working in ibss mode") was wrong - a blob was added
into the wrong function. fix it.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-06-27 12:01:14 +03:00
Eliad Peller a011130265 wl12xx: remove unused crc7 references
crc7 is used only in wl12xx_spi.

Remove redundant crc7.h includes, and update Kconfig to select CRC7
only if WL12XX_SPI is being selected.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-06-27 10:15:52 +03:00
Shahar Levi 0e44eb2093 wl12xx: Enable beacon early termination in 2.4GHz band only
Beacon early termination doesn't help much in the 5GHz band and masks
channel switch IE Beacons.  Thus, change the code to use BET only in
2.4GHz.

[Reworded the commit log slightly -- Luca.]

Signed-off-by: Shahar Levi <shahar_levi@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-06-27 10:15:51 +03:00
Eliad Peller c84368e01a wl12xx: add rx_streaming debugfs entry
Allow control over rx_streaming interval and operation mode
(always/only on coex) via debugfs.

e.g.
echo 100 > /debug/ieee80211/phy0/wl12xx/rx_streaming/interval
echo 1 > /debug/ieee80211/phy0/wl12xx/rx_streaming/always

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-06-27 10:15:50 +03:00
Eliad Peller 77ddaa108f wl12xx: add automatic rx streaming triggers
When rx_streaming.interval is non-zero, use automatic rx streaming.
Enable rx streaming on the each rx/tx packet, and disable it
rx_streaming.duration msecs later.

When rx_streaming.always=0 (default), rx streaming is enabled only
when there is a coex operation.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-06-27 10:15:49 +03:00
Eliad Peller f84673d597 wl12xx: add support for rx streaming
wl12xx supports the "rx streaming" feature:

When in ps mode, and @timeout msecs have been passed since
the last rx/tx, it issues trigger packets (QoS-null/PS-Poll packets,
according to the ac type) in const intervals (in order to reduce
the rx time).

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-06-27 10:15:48 +03:00
Felipe Balbi ba2274c68e net: wl12xx: remove unnecessary prints
Those have little value. Remove those to
make the driver less noisy.

Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-06-27 10:15:47 +03:00
Felipe Balbi 4c4cdfa12f net: wl12xx: remove the nops
Nops aren't needed. When we actually need
those calls, then we add them with meat
and barbecue sauce.

Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-06-27 10:15:47 +03:00
Felipe Balbi 77d7d7a36d net: wl12xx: care for optional operations
->init and ->reset are optional - at least
sdio.c doesn't implement them - so allow those
pointers to be NULL.

Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-06-27 10:15:46 +03:00
Felipe Balbi 6bdaf79623 net: wl12xx: remove some unnecessary prints
Those have little value. Remove those to make
the driver less noisy.

Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-06-27 10:15:45 +03:00
Felipe Balbi 33dd74c784 net: wl12xx: sdio: id_tables should be __devinitconst
That's only needed during init anyway, let's free
some space after we're done probing.

Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-06-27 10:15:44 +03:00
David S. Miller 85a43a9eda Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/jkirsher/net-next-2.6 2011-06-27 00:09:56 -07:00
Joe Perches 23efcb738e wan: Update to current logging forms
Use pr_fmt, pr_<level> and netdev_<level> as appropriate.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-27 00:09:47 -07:00
Joe Perches c75bb2c6f0 ixp4xx_hss: Update to current logging forms
Use pr_fmt, pr_<level> and netdev_<level> as appropriate.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-27 00:09:47 -07:00
Joe Perches e8c122f450 farsync: Update to current logging forms
Use pr_fmt, pr_<level> and netdev_<level> as appropriate.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-27 00:09:47 -07:00
Joe Perches 09a1732bee dscc4: Update to current logging forms
Use pr_fmt, pr_<level> and netdev_<level> as appropriate.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-27 00:09:47 -07:00
Joe Perches 86fb0ccf90 frame relay dlci/frad: Update to current logging forms
Use pr_fmt, pr_<level> and netdev_<level> as appropriate.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-27 00:09:47 -07:00
Joe Perches d6810e1375 cyclom: Update to current logging forms
Use pr_fmt, pr_<level> and netdev_<level> as appropriate.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-27 00:09:46 -07:00
Joe Perches 9cbe50d423 cosa: Update to current logging forms
Use pr_fmt, pr_<level> and netdev_<level> as appropriate.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-27 00:09:46 -07:00
Joe Perches 12a3bfefc8 generic_hdlc: Update to current logging forms
Use pr_fmt, pr_<level> and netdev_<level> as appropriate.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-27 00:09:46 -07:00
Sathya Perla 2903dd654d be2net: fix initialization of vlan_prio_bmap
Initialization of this field to "all priorities" must be done before MCC queue
creation. As soon as the MCC queue is created, an event modifying this value
may be received.

Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-27 00:09:31 -07:00
Sathya Perla c814fd3669 be2net: get rid of multi_rxq module param
Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-27 00:09:31 -07:00
Sathya Perla 6e53391cb4 be2net: fix netdev_stats_update
Problem initially reproted and fixed by Eric Dumazet <eric.dumazet@gmail.com>

netdev_stats_update() resets netdev->stats and then accumulates stats from
various rings. This is wrong as stats readers can sometimes catch zero values.
Use temporary variables instead for accumulating per-ring values.

Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-27 00:09:31 -07:00
John Fastabend 42532da64e ixgbe: implement DCB ops dcb_ieee_del()
Implement DCB ops dcb_ieee_del() and set FCoE to the default
priority when no priority exists.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-06-25 00:15:58 -07:00
John Fastabend 3b3bf3b92b ixgbe: remove unused fcoe.tc field and fcoe_setapp()
The fcoe.tc field is no longer used so remove it. After
the field is removed there is no need to keep fcoe_setapp()
around so remove it as well. And finally we can get rid
of some DCB #ifdef's in the fcoe code.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-06-25 00:15:42 -07:00
John Fastabend 9372453e87 ixgbe: complete FCoE initialization from setapp() routine
Commit,

commit c8ca76ebc6
Author: John Fastabend <john.r.fastabend@intel.com>
Date:   Sat Mar 12 03:50:53 2011 +0000

    ixgbe: DCB, further cleanups to app configuration

Removed the getapp() routines from ixgbe because they are no
longer needed. It also allowed the set hardware routines to
use both IEEE 802.1Qaz app types and CEE app types. This
added code to do bit shifting in the IEEE case.

This patch reverts the checks and handles the IEEE case
from the setapp entry point. I prefer this because it
keeps the two paths from having to be aware of the DCB
mode. This resolves a bug where I missed setting the
selector bit in the IEEE spec value and left it in the
CEE value. Now that they are separate routines these types
of errors should not occur.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-06-25 00:15:24 -07:00
Lior Levy 7555e83df3 ixgbe: A fix to VF TX rate limit
There is a need to configure MMW_SIZE in register RTTBCNRM with a correct
value (0x4 for non jumbo frames and 0x14 for jumbo frames support).
For 82599 the value is 0x4 and for X540 the value is 0x14.

Signed-off-by: Lior Levy <lior.levy@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-06-25 00:10:34 -07:00
Alexander Duyck a535c30e9e ixgbe: Update method used for determining descriptor count for an skb
This patch updates the current methods used for determining if we have
enough space to transmit a given skb.  The current method is quite wasteful
as it has us go through and determine how each page is going to be broken
up.  That only needs to be done if pages are larger than our maximum data
per TXD.  As such I have wrapped that in a page size check.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-06-25 00:06:51 -07:00
Alexander Duyck 897ab15606 ixgbe: Add one function that handles most of context descriptor setup
There is a significant amount of shared functionality between the checksum
and TSO offload configuration that is shared in regards to how they setup
the context descriptors.  Since so much of the functionality is shared it
makes sense to move the shared functionality into a single function and
just call that function from the two context descriptor specific routines.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-06-25 00:06:05 -07:00
Alexander Duyck 63544e9c00 ixgbe: Move all values that deal with count, next_to_use, next_to_clean to u16
This change updates all values dealing with count, next_to_use, and
next_to_clean so that they stay u16 values.  The advantage of this is that
there is no re-casting of type during the propagation through the stack.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-06-25 00:04:59 -07:00
Alexander Duyck 7d4987de75 ixgbe: Convert IXGBE_DESC_UNUSED from macro to static inline function
This change is a minor cleanup that converts the IXGBE_DESC_UNUSED macro
into a static inline function just for the case of the code being a bit
cleaner.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-06-25 00:04:32 -07:00
Alexander Duyck a65151ba20 ixgbe: pass adapter struct instead of netdev for interrupt data
This change makes it so that we pass the adapter struct instead of the
netdev for most of the basic interrupts that are not associated with
q_vectors.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-06-25 00:04:06 -07:00
John (Jay) Hernandez d6fe5f4ecc cxgb3: skb_record_rx_queue now records the queue index relative to the net_device.
Fixed call to skb_record_rx_queue where we were passing the queue index
relative to the adapter when it should have been relative to the net_device.

Signed-off-by: John (Jay) Hernandez <jay@chelsio.com>
Signed-off-by: Divy Le Ray <divy@chelsio.com>
Reported-by: Shawn Bohrer <sbohrer@rgmadvisors.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-24 17:55:22 -07:00
Joe Perches 572404ea6b zorro8390: Update style, neaten, restructure to eliminate prototypes
Convert to current logging styles.
Move code blocks to eliminate need for prototypes.
Use tabs for code indent and standardize spacing.
Comment neatening.

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-24 17:31:37 -07:00
Joe Perches 3c01164e80 lib8390: Remove unnecessary extern
Already declared in 8390.h

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-24 17:31:37 -07:00
Joe Perches 5aedcf50e5 lib8390: Convert include <asm to include <linux
Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-24 17:31:36 -07:00
Joe Perches be763c940f lib8390: Normalize source code spacing
Make more conformant to normal kernel style.

Long line lengths > 80 columns ignored.

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-24 17:31:36 -07:00
Joe Perches 7340c4db81 lib8390: Indent braces appropriately
Move the braces around to conform to kernel standard style.

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-24 17:31:36 -07:00
Joe Perches 840f639339 lib8390: Use pr_<level> and netdev_<level>
Use the current logging styles.

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-24 17:31:36 -07:00
Joe Perches 747e252fa1 a2065: Use pr_fmt, pr_<level> and netdev_<level>
Use current logging styles.

Other miscellaneous cleanups:

Space removal and additions for checkpatch warnings.

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-24 17:31:36 -07:00
Joe Perches 7b5b0abdb6 ariadne: Update style, neaten, restructure to eliminate prototypes
Convert to current logging styles.
Move code blocks to eliminate need for prototypes.
Use tabs for code indent and sandardize spacing.
Comment neatening.

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-24 17:31:36 -07:00
David S. Miller 4d03b446d2 Merge branch 'davem.r8169' of git://git.kernel.org/pub/scm/linux/kernel/git/romieu/netdev-2.6 2011-06-24 14:33:01 -07:00
David S. Miller cd5f3e2064 Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 2011-06-24 14:21:00 -07:00
John W. Linville 36099365c7 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem
Conflicts:
	drivers/net/wireless/rtlwifi/pci.c
	include/linux/netlink.h
2011-06-24 15:25:51 -04:00
Johannes Berg f775aa06d2 iwlagn: don't use CCK rates for P2P interfaces
P2P interfaces must not use CCK rates, only OFDM
rates are allowed. To set this up, we need to set
up the broadcast station to start with 6M instead
of starting with 1M.

Since the interface type can change, also reset
the broadcast station when RXON changes.

This will affect beacons as well.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-06-24 11:54:51 -07:00
Johannes Berg 0b5b3ff15b iwlagn: fill beacon TX rate properly
Use the rate that mac80211 requested to fill the
uCode TX command for the beacon. Unfortunately,
the uCode is (currently?) ignoring it, but now
at least fill it properly.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-06-24 11:54:42 -07:00
Johannes Berg 81704d2db9 iwlagn: extend host command timeout
We've infrequently seen timeouts, make the wait time
match the windows driver; hopefully our driver is
just too impatient.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-06-24 11:54:36 -07:00
Johannes Berg f8d651a56e iwlagn: fix cmd queue unmap
When we stop the device while a command is in
flight that uses multiple TBs, we can leak the
DMA buffers for the second and higher TBs. Fix
this by using iwlagn_unmap_tfd() as we do when
we normally recover the entry.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-06-24 11:54:30 -07:00
Johannes Berg 1e5cf9b0be iwlagn: use PM ops macro
Simplify the code and use SIMPLE_DEV_PM_OPS
to define iwl_dev_pm_ops instead of doing the
same thing manually.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-06-24 11:54:22 -07:00