pandora-kernel.git
12 years agoqlcnic: fix cdrp race condition
Sritej Velaga [Mon, 29 Aug 2011 12:50:29 +0000 (12:50 +0000)]
qlcnic: fix cdrp race condition

Reading CRB registers(if reqd) before releasing the api lock.

Signed-off-by: Sritej Velaga <sritej.velaga@qlogic.com>
Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoqlcnic: Add FLT entry for CO cards FW image region
Sritej Velaga [Mon, 29 Aug 2011 12:50:28 +0000 (12:50 +0000)]
qlcnic: Add FLT entry for CO cards FW image region

The FLT entry for FW image region has changed for C0 cards.
Updated the driver to look at the right region in the FLT.

Signed-off-by: Sritej Velaga <sritej.velaga@qlogic.com>
Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoqlcnic: Change debug messages in loopback path
Manish chopra [Mon, 29 Aug 2011 12:50:27 +0000 (12:50 +0000)]
qlcnic: Change debug messages in loopback path

Added more debug messages while loopback test in progress

Signed-off-by: Manish chopra <Manish.Chopra@qlogic.com>
Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoqlcnic: detect fan failure
Sony Chacko [Mon, 29 Aug 2011 12:50:26 +0000 (12:50 +0000)]
qlcnic: detect fan failure

Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoMerge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville...
David S. Miller [Mon, 29 Aug 2011 20:46:24 +0000 (13:46 -0700)]
Merge branch 'for-davem' of git://git./linux/kernel/git/linville/wireless-next

12 years agonet: fix Makefile typos & build errors
Randy Dunlap [Mon, 29 Aug 2011 18:49:40 +0000 (11:49 -0700)]
net: fix Makefile typos & build errors

Fix many (randconfig) PPP build errors by fixing typos in
drivers/net/Makefile.

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agowl12xx/sdio_test.c: fix build breakage from WL127X_FW_NAME change
John W. Linville [Mon, 29 Aug 2011 19:47:58 +0000 (15:47 -0400)]
wl12xx/sdio_test.c: fix build breakage from WL127X_FW_NAME change

Commit c302b2c959164622558474871ae942da0e484a38 ("wl12xx: Use a single
fw for both STA and AP roles") changed the name of the firmware name
definition, breaking the build of wl12xx/sdio_test.c.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agob43: Fix swatch warning
Larry Finger [Sat, 27 Aug 2011 20:53:42 +0000 (15:53 -0500)]
b43: Fix swatch warning

Swatch reports the following warning for main.c:

  CHECK   drivers/net/wireless/b43/main.c
drivers/net/wireless/b43/main.c +4115 b43_wireless_core_stop(7) warn: variable dereferenced before check 'dev'

After analysis, this is not a bug, but a false warning. Nonetheless,
a cleanup is in order to prevent some future janitor proposing
the wrong fix, as I did in my original patch.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: Fix a smatch warnings
Larry Finger [Sat, 27 Aug 2011 18:56:00 +0000 (13:56 -0500)]
ath9k: Fix a smatch warnings

Smatch shows the following warnings:

  CHECK   drivers/net/wireless/ath/ath9k/htc_drv_main.c
drivers/net/wireless/ath/ath9k/htc_drv_main.c +1315 ath9k_htc_configure_filter(27) warn: inconsistent returns mutex:&priv->mutex: locked (1303) unlocked (1315)

  CHECK   drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
drivers/net/wireless/ath/ath9k/ar9003_eeprom.c +3321 ar9300_eeprom_restore_internal(20) warn: returning -1 instead of -ENOMEM is sloppy

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: Add debugfs support for mac/baseband samples
Rajkumar Manoharan [Sat, 27 Aug 2011 10:47:47 +0000 (16:17 +0530)]
ath9k: Add debugfs support for mac/baseband samples

This patch keep track of number of samples that includes
DMA debugs registers, PCU observe, CR, channel noise,
cycle conters, noisefloor history buffer and last N number
of tx and rx descriptor status. These samples are grouped
in table manner which dumping in debgufs.

Debugfs file location:
    <debugfs_mnt>/ieee80211/phy#/ath9k/samples

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: fix regression in sending aggregated packets
Felix Fietkau [Sat, 27 Aug 2011 08:25:27 +0000 (10:25 +0200)]
ath9k: fix regression in sending aggregated packets

The recent commit "ath9k: Send legacy rated frames as unaggregated"
introduced a check to ensure that packets with non-MCS rates set in
the rate series will not be aggregated. However, it failed to check
if the rate series is valid before testing the flags, thus breaking
aggregation for normal MCS-only packets if the last series is unset.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: Fix eifs/usec timeout for AR9287 v1.3+
Rajkumar Manoharan [Sat, 27 Aug 2011 06:43:21 +0000 (12:13 +0530)]
ath9k: Fix eifs/usec timeout for AR9287 v1.3+

For AR9287 v1.3+ chips, MAC runs at 117MHz. But the initvals
IFS parameters are loaded based on 44/88MHz clockrate. So
eifs/usec from ini should not be used for AR9287 v1.3+.
The mentioned values are tested on 2 chain HT40 mode.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: Set default slottime as 9us
Rajkumar Manoharan [Sat, 27 Aug 2011 05:52:59 +0000 (11:22 +0530)]
ath9k_hw: Set default slottime as 9us

Initialize 9us slot time as that is what is used mostly
(for non-ERP cases) and also to be in sync with initvals.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agob43: make HT-PHY support experimental
Rafał Miłecki [Fri, 26 Aug 2011 18:41:40 +0000 (20:41 +0200)]
b43: make HT-PHY support experimental

It was tested on three BCM4331 devices, code has been written from MMIO
dumps only, but seems to be quite stable.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agob43: use 8K buffers for 64-bit DMA to workaround hardware bug
Rafał Miłecki [Fri, 26 Aug 2011 18:41:39 +0000 (20:41 +0200)]
b43: use 8K buffers for 64-bit DMA to workaround hardware bug

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agob43: Relax requirement for descriptors to be in the DMA zone
Larry Finger [Fri, 26 Aug 2011 18:41:38 +0000 (20:41 +0200)]
b43: Relax requirement for descriptors to be in the DMA zone

When 64-bit DMA was first used, there were problems with the
BCM4311 (14e4:4311). The problem was "fixed" by using the GFP_DMA
flag in the allocation of coherent ring descriptor memory.

The original problem is now believed to have been due to bugs in
the 64-bit DMA implementation in the rest of the kernel, and that
those bugs have been fixed. Accordingly, the requirement for the
descriptors to be in the DMA zone is relaxed.

Bounce buffers are left in the DMA zone.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Michael Buesch <m@bues.ch>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agop54spi: add "spi:" prefix for stlc45xx modalias
Axel Lin [Fri, 26 Aug 2011 06:34:59 +0000 (14:34 +0800)]
p54spi: add "spi:" prefix for stlc45xx modalias

Since commit e0626e38 (spi: prefix modalias with "spi:"),
the spi modalias is prefixed with "spi:".

This patch adds "spi:" prefix for modalias of stlc45xx.
Also move it to be group with other modalias.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-By: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: handle GO powersave
Johannes Berg [Fri, 26 Aug 2011 06:13:56 +0000 (23:13 -0700)]
iwlagn: handle GO powersave

In order to implement support for GO powersave on
the P2P client side, the ucode needs to know what
GO we're trying to authenticate/associate with,
it needs to have a station entry and the BSSID in
the RXON set.

Implement the new mac80211 callbacks to give this
data to the device.

Since this is also useful for the device when a
normal connection is established, also program it
with the information in that case.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: move tx queues to transport layer
Emmanuel Grumbach [Fri, 26 Aug 2011 06:11:32 +0000 (23:11 -0700)]
iwlagn: move tx queues to transport layer

This finalizes the move of the data path to the transport layer.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: move the stop / wake queue logic to transport layer
Emmanuel Grumbach [Fri, 26 Aug 2011 06:11:31 +0000 (23:11 -0700)]
iwlagn: move the stop / wake queue logic to transport layer

priv->mac80211_registered and priv->hw needed to move to shared.
stop_queue API was added in order to allow the upper layer to stop
the SW queues for regulatory purposes.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: move check_stuck_queue to transport layer
Emmanuel Grumbach [Fri, 26 Aug 2011 06:11:30 +0000 (23:11 -0700)]
iwlagn: move check_stuck_queue to transport layer

This one is really transport related.

==== moves Stanislaw's code to BSD area ====

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: move wait_for_tx_queue_empty to transport layer
Emmanuel Grumbach [Fri, 26 Aug 2011 06:11:29 +0000 (23:11 -0700)]
iwlagn: move wait_for_tx_queue_empty to transport layer

This one is really transport related.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: cosmetics in iwl-trans.h
Emmanuel Grumbach [Fri, 26 Aug 2011 06:11:28 +0000 (23:11 -0700)]
iwlagn: cosmetics in iwl-trans.h

Remove a few dereferences of priv from the transport layer while
at it.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: move the disable agg logic to transport layer
Emmanuel Grumbach [Fri, 26 Aug 2011 06:11:27 +0000 (23:11 -0700)]
iwlagn: move the disable agg logic to transport layer

Since all the check_empty logic is now in the transport layer,
the upper layer doesn't need to know anything about tx queues.
The disable aggregation flow was the last to know what a tx queue
is, so move it too.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: move the check_empty logic to the transport layer
Emmanuel Grumbach [Fri, 26 Aug 2011 06:11:26 +0000 (23:11 -0700)]
iwlagn: move the check_empty logic to the transport layer

This logic is responsible to tell mac80211 when the HW queues are
empty and the BA session can be started / torn down.

Fix a bug on the way:
When the the Tx BA session is stopped and the HW queues aren't empty,
we stop the SW queue to drain the HW queue and then switch to the
legacy HW queue. This is the IWL_EMPTYING_HW_QUEUE_DELBA state.

While in this state, we never wake the SW queue, even when the HW
queue is almost empty, since we need to drain it completely. Look
at iwl_trans_pcie_reclaim regarding this.

Once the HW queue is really empty, we must wake the SW queue in order
to get traffic to the legacy queue.
This step was missing leading to an odd situation were the traffic
would just stall after we tore down a Tx BA session while the HW
queue was not empty.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: allocate resources for TX BA session in transport
Emmanuel Grumbach [Fri, 26 Aug 2011 06:11:25 +0000 (23:11 -0700)]
iwlagn: allocate resources for TX BA session in transport

The queues and all the related logic suits to the transport layer.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: move the mapping ac to queue / fifo to transport
Emmanuel Grumbach [Fri, 26 Aug 2011 06:11:24 +0000 (23:11 -0700)]
iwlagn: move the mapping ac to queue / fifo to transport

This mapping is transport related.
This allows us to remove the notion of tx queue from the tx path in
the upper layer.
iwl_wake_any_queue moved to transport layer since it needs to access
these mappings.
The TX API is nicer now:

int (*tx)(struct iwl_trans *trans, struct sk_buff *skb,
struct iwl_device_cmd *dev_cmd, u8 ctx, u8 sta_id);

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: upper layer uses slabs to allocate tx cmds
Emmanuel Grumbach [Fri, 26 Aug 2011 06:11:23 +0000 (23:11 -0700)]
iwlagn: upper layer uses slabs to allocate tx cmds

In a near future, the upper layer won't be aware of the tx queues.
This allows to remove one place where the upper layer needed to
provide the tx queue index to the transport layer.
This also saves around 1.5MB.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: set tx_fifo for ampdu in transport layer
Emmanuel Grumbach [Fri, 26 Aug 2011 06:11:22 +0000 (23:11 -0700)]
iwlagn: set tx_fifo for ampdu in transport layer

the mapping tx_queue -> fifo is really transport related. The upper
layer should be involved in such things.

Note that upon agg_disable, the queue is always mapped to fifo 0, but
this doesn't matter since when the queue will be setup again for a
new BA session, it will be configured to the good fifo anyway.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: upper layer stores iwl_rxon_context in skb's CB
Emmanuel Grumbach [Fri, 26 Aug 2011 06:11:21 +0000 (23:11 -0700)]
iwlagn: upper layer stores iwl_rxon_context in skb's CB

This removes the need for iwl_tx_info.
Each tx queue holds an array of skbs, the transport layer doesn't
need to know anything about the context in which a specific skb is
sent.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: stop the device before freeing it
Emmanuel Grumbach [Fri, 26 Aug 2011 06:11:20 +0000 (23:11 -0700)]
iwlagn: stop the device before freeing it

When we remove the module, we free all the tx and rx resources.
Before doing that, we'd better stop the tx / rx activity. Calling
iwl_trans_stop_device in iwl_remove helps also to remove a few API
functions:
 * rx_free: happens in iwl_trans_free
 * tx_free: happens in iwl_trans_free
 * disable_sync_irq: happens in iwl_trans_stop_device

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: remove dereferences of priv from transport
Emmanuel Grumbach [Fri, 26 Aug 2011 06:11:19 +0000 (23:11 -0700)]
iwlagn: remove dereferences of priv from transport

There are still quite a few, but much less.
A few fields have been moved /copied to hw_params which sits in the
shared area:
 * priv->cfg->base_params->num_of_ampdu_queues
 * priv->cfg->base_params->shadow_reg_enable
 * priv->cfg->sku
 * priv->ucode_owner

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: iwl_tid_data moves to iwl-shared
Emmanuel Grumbach [Fri, 26 Aug 2011 06:11:18 +0000 (23:11 -0700)]
iwlagn: iwl_tid_data moves to iwl-shared

The rate scaling and the transport need to access the data in
iwl_tid_data, hence the move.

Note that the only component in the upper layer that needs this data
is the rate scaling. Refactoring the rate scaling may help to move
iwl_tid_data from the shared area to the transport area.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: adding special "D" SKU for 2000 series
Wey-Yi Guy [Fri, 26 Aug 2011 06:11:17 +0000 (23:11 -0700)]
iwlagn: adding special "D" SKU for 2000 series

One more sku for 2000 series with different Subsystem ID

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: iwl-pci doesn't include iwl-dev any more
Emmanuel Grumbach [Fri, 26 Aug 2011 06:11:16 +0000 (23:11 -0700)]
iwlagn: iwl-pci doesn't include iwl-dev any more

Move all the iwlXXX_abgn_cfg forward declaration to a separate file
so that iwl-pci.c doesn't need to include iwl-agn.h that includes
all iwl-dev.h
This allows to provide real encapsulation. Dereferencing iwl_priv
in the bus layer will now lead to a compilation error.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: fix compile warnings when CONFIG_PM_SLEEP is not set
Daniel Halperin [Fri, 26 Aug 2011 06:11:15 +0000 (23:11 -0700)]
iwlagn: fix compile warnings when CONFIG_PM_SLEEP is not set

  CC [M]  drivers/net/wireless/iwlwifi/iwl-pci.o
  drivers/net/wireless/iwlwifi/iwl-pci.c:506: warning: \91iwl_pci_suspend\92 defined but not used
  drivers/net/wireless/iwlwifi/iwl-pci.c:519: warning: \91iwl_pci_resume\92 defined but not used

These are only used if CONFIG_PM_SLEEP is enabled. CONFIG_PM depends
(CONFIG_PM_SLEEP || CONFIG_PM_RUNTIME), so it can be set without
CONFIG_PM_SLEEP selected.

Signed-off-by: Daniel Halperin <dhalperi@cs.washington.edu>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: all function iwl-io.c receive iwl_bus
Emmanuel Grumbach [Fri, 26 Aug 2011 06:11:14 +0000 (23:11 -0700)]
iwlagn: all function iwl-io.c receive iwl_bus

Which means that iwl-io.c doesn't need to include iwl-dev.h any more.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: add missing includes
Emmanuel Grumbach [Fri, 26 Aug 2011 06:11:13 +0000 (23:11 -0700)]
iwlagn: add missing includes

a few h files weren't self contained. Fix that.
Move iwl_dma_ptr to transport layer since it is not used by the upper layer
any more.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: move Keep Warm to transport layer
Emmanuel Grumbach [Fri, 26 Aug 2011 06:11:12 +0000 (23:11 -0700)]
iwlagn: move Keep Warm to transport layer

It is relevant for PCIe only.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: iwl-dev.h doesn't include iwl-fh.h any more
Emmanuel Grumbach [Fri, 26 Aug 2011 06:11:11 +0000 (23:11 -0700)]
iwlagn: iwl-dev.h doesn't include iwl-fh.h any more

Since iwl-fh.h contains transport related data, it shouldn't be included by the
upper layer.
Only the transport layer and iwl-agn-ucode.c includes it.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: remove unused parameters from hw_params
Emmanuel Grumbach [Fri, 26 Aug 2011 06:11:10 +0000 (23:11 -0700)]
iwlagn: remove unused parameters from hw_params

Some of them weren't used at all, the others always had the same value since
the driver split.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: remove references to priv from the transport layer
Emmanuel Grumbach [Fri, 26 Aug 2011 06:11:09 +0000 (23:11 -0700)]
iwlagn: remove references to priv from the transport layer

Continue to the clean up of the priv dereferencing from the transport layer.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: move dump_csr and dump_fh to transport layer
Emmanuel Grumbach [Fri, 26 Aug 2011 06:11:08 +0000 (23:11 -0700)]
iwlagn: move dump_csr and dump_fh to transport layer

These are transport layer related. Move also the corresponding debugfs handlers.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: move hcmd_lock to transport layer
Emmanuel Grumbach [Fri, 26 Aug 2011 06:11:07 +0000 (23:11 -0700)]
iwlagn: move hcmd_lock to transport layer

Since it is needed for host commands only, it is needed in transport layer only

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: transport layer should receive iwl_trans
Emmanuel Grumbach [Fri, 26 Aug 2011 06:11:06 +0000 (23:11 -0700)]
iwlagn: transport layer should receive iwl_trans

Change a lot of functions to have them receive iwl_trans and not iwl_priv.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: move iwl_free_pages to iwl-shared.h
Emmanuel Grumbach [Fri, 26 Aug 2011 06:11:05 +0000 (23:11 -0700)]
iwlagn: move iwl_free_pages to iwl-shared.h

This helper is used by the transport and the upper layer.
Kill __iwl_free_pages which was used in the transport only.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: move all iwl_is_XXX helpers to iwl-shared.h
Emmanuel Grumbach [Fri, 26 Aug 2011 06:11:04 +0000 (23:11 -0700)]
iwlagn: move all iwl_is_XXX helpers to iwl-shared.h

Logic move after all priv->status moved to struct iwl_shared

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: fix the check of IWLAGN_FIRST_AMPDU_QUEUE
Emmanuel Grumbach [Fri, 26 Aug 2011 06:11:03 +0000 (23:11 -0700)]
iwlagn: fix the check of IWLAGN_FIRST_AMPDU_QUEUE

BUILD_BUG_ON(ARRAY_SIZE(iwlagn_ipan_queue_to_tx_fifo) !=
IWLAGN_FIRST_AMPDU_QUEUE);

This check can be buggy. IWLAGN_FIRST_AMPDU_QUEUE has to be greater than the
ARRAY_SIZE of iwlagn_ipan_queue_to_tx_fifo.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: move scd_bc_tbls and scd_base_addr to iwl_trans_pcie
Emmanuel Grumbach [Fri, 26 Aug 2011 06:11:02 +0000 (23:11 -0700)]
iwlagn: move scd_bc_tbls and scd_base_addr to iwl_trans_pcie

Needed for PCIe only

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: move reclaim related functions
Emmanuel Grumbach [Fri, 26 Aug 2011 06:11:01 +0000 (23:11 -0700)]
iwlagn: move reclaim related functions

Now that the reclaim flow has been moved to the transport layer, a lot of
functions can be made static or don't need to be exported outside the transport
layer.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: reclaim the packets in transport layer
Emmanuel Grumbach [Fri, 26 Aug 2011 06:11:00 +0000 (23:11 -0700)]
iwlagn: reclaim the packets in transport layer

The reclaim flow is really transport related. Define a simple API to allow the
upper layer to request from the transport layer to reclaim packets until an
index written in the Tx response / BA notification.
The transport layer prepares a list of the packets that are being freed and
passes this list to the upper layer.
Between the two layers, the CB of the skb is used to pass a pointer to the
context (BSS / PAN) in which the skb was sent.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: move isr_statistics to transport layer
Emmanuel Grumbach [Fri, 26 Aug 2011 06:10:59 +0000 (23:10 -0700)]
iwlagn: move isr_statistics to transport layer

It is accessed by the transport layer only, hence the move.
The debugfs handlers that accessed it moved to the transport layer too.
The rx_handlers part of it stayed in the upper layer and a special debugfs
has been added for it

Also add missing includes to iwl-commands.h.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: add comments to module parameters
Wey-Yi Guy [Fri, 26 Aug 2011 06:10:58 +0000 (23:10 -0700)]
iwlagn: add comments to module parameters

Add more comments to iwl_mod_params

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: more comments for bt channel inhibition
Wey-Yi Guy [Fri, 26 Aug 2011 06:10:57 +0000 (23:10 -0700)]
iwlagn: more comments for bt channel inhibition

Add comments for better description

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: support small form factor SKU of 6205
Wey-Yi Guy [Fri, 26 Aug 2011 06:10:56 +0000 (23:10 -0700)]
iwlagn: support small form factor SKU of 6205

Different subsystem ID

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: enable 11n aggregation without checking traffic load
Wey-Yi Guy [Fri, 26 Aug 2011 06:10:55 +0000 (23:10 -0700)]
iwlagn: enable 11n aggregation without checking traffic load

Enable HT aggregation when it reach reasonable traffic without
checking traffic load which delay enabling the aggregation and lower
the throughput

but this behavior can be overwrite by module parameter

this address
https://bugzilla.kernel.org/show_bug.cgi?id=40042

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: move the NIC error flow to the transport layer
Emmanuel Grumbach [Fri, 26 Aug 2011 06:10:54 +0000 (23:10 -0700)]
iwlagn: move the NIC error flow to the transport layer

It is transport dependent, move to the PCIe transport layer.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: move ISR related data to transport layer
Emmanuel Grumbach [Fri, 26 Aug 2011 06:10:53 +0000 (23:10 -0700)]
iwlagn: move ISR related data to transport layer

Since the ISR is entirely in the transport layer, its data should be in the pcie
specific region.
Change sync_irq to first disable and then synchronize the IRQ.
iwl_isr and iwl_isr_ict now receive iwl_trans.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: move iwl_suspend / iwl_resume to the transport layer
Emmanuel Grumbach [Fri, 26 Aug 2011 06:10:52 +0000 (23:10 -0700)]
iwlagn: move iwl_suspend / iwl_resume to the transport layer

These flows needs to access the APM and a few other registers that can differ
between different transports.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: iwl_rx_queue moves to the iwl_trans_pcie
Emmanuel Grumbach [Fri, 26 Aug 2011 06:10:51 +0000 (23:10 -0700)]
iwlagn: iwl_rx_queue moves to the iwl_trans_pcie

Since this struct is specific to pcie transport, move it the the pcie
specific transport layer.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: transport handler can register debugfs entries
Emmanuel Grumbach [Fri, 26 Aug 2011 06:10:50 +0000 (23:10 -0700)]
iwlagn: transport handler can register debugfs entries

Add a handler in iwl_trans_ops to allow it to add entries under debugfs dir
given by the upper level.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: add comments to iwl_bus / iwl_trans
Emmanuel Grumbach [Fri, 26 Aug 2011 06:10:49 +0000 (23:10 -0700)]
iwlagn: add comments to iwl_bus / iwl_trans

Rename the recursive inclusion protection in iwl-bus.h while we are at it.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: bus layer chooses its transport layer
Emmanuel Grumbach [Fri, 26 Aug 2011 06:10:48 +0000 (23:10 -0700)]
iwlagn: bus layer chooses its transport layer

Remove iwl_transport_register which was a W/A. The bus layer knows what
transport to use. So now, the bus layer gives the upper layer a pointer to the
iwl_trans_ops struct that it wants to use. The upper layer then, allocates the
desired transport layer using iwl_trans_ops->alloc function.

As a result of this, priv->trans, no longer exists, priv holds a pointer to
iwl_shared, which holds a pointer to iwl_trans. This required to change all the
calls to the transport layer from upper layer. While we were at it, trans_X
inlines have been renamed to iwl_trans_X to avoid confusions, which of course
required to rename the functions inside the transport layer because of
conflicts in names. So the static API functions inside the transport layer
implementation have been renamed to iwl_trans_pcie_X.

Until now, the IRQ / Tasklet were initialized in iwl_transport_layer. This is
confusing since the registration doesn't mean to request IRQ, so I added a
handler for that.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: priv->sta_lock moves to iwl_shared
Emmanuel Grumbach [Fri, 26 Aug 2011 06:10:47 +0000 (23:10 -0700)]
iwlagn: priv->sta_lock moves to iwl_shared

Since it is used by all the layers, it needs to move to iwl_shared.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: add IWL_DEBUG_FW_ERRORS
Emmanuel Grumbach [Fri, 26 Aug 2011 06:10:46 +0000 (23:10 -0700)]
iwlagn: add IWL_DEBUG_FW_ERRORS

instead of IWL_DEBUG(priv, IWL_DL_FW_ERRORS

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: modify the debug macro to be usable by all the layers
Emmanuel Grumbach [Fri, 26 Aug 2011 06:10:45 +0000 (23:10 -0700)]
iwlagn: modify the debug macro to be usable by all the layers

Since all the layers need to print debug message, the debug macro cannot suppose
that they will be given iwl_priv as a parameter and then dereference it.
Use iwl_shared instead.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: priv->mutex moves to iwl_shared
Emmanuel Grumbach [Fri, 26 Aug 2011 06:10:44 +0000 (23:10 -0700)]
iwlagn: priv->mutex moves to iwl_shared

Since it is used by all the layers, it needs to move to iwl_shared.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: priv->lock moves to iwl_shared
Emmanuel Grumbach [Fri, 26 Aug 2011 06:10:43 +0000 (23:10 -0700)]
iwlagn: priv->lock moves to iwl_shared

Since it is used by all the layers, it needs to move to iwl_shared.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: priv->status moves to iwl_shared
Emmanuel Grumbach [Fri, 26 Aug 2011 06:10:42 +0000 (23:10 -0700)]
iwlagn: priv->status moves to iwl_shared

Since it is used by all the layers, it needs to move to iwl_shared.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: workqueue moves to iwl_shared
Emmanuel Grumbach [Fri, 26 Aug 2011 06:10:41 +0000 (23:10 -0700)]
iwlagn: workqueue moves to iwl_shared

Since it is used by all the layers, it needs to move to iwl_shared.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: cmd_queue moves to iwl_shared
Emmanuel Grumbach [Fri, 26 Aug 2011 06:10:40 +0000 (23:10 -0700)]
iwlagn: cmd_queue moves to iwl_shared

Since it is used by all the layers, it needs to move to iwl_shared.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: hw_params moves to iwl_shared
Emmanuel Grumbach [Fri, 26 Aug 2011 06:10:39 +0000 (23:10 -0700)]
iwlagn: hw_params moves to iwl_shared

Since it is used by all the layers, it needs to move to iwl_shared.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: debug_level moves to struct iwl_shared
Emmanuel Grumbach [Fri, 26 Aug 2011 06:10:38 +0000 (23:10 -0700)]
iwlagn: debug_level moves to struct iwl_shared

This will allow all the modules to look at it.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: introduce struct iwl-shared - known by all layers
Emmanuel Grumbach [Fri, 26 Aug 2011 06:10:37 +0000 (23:10 -0700)]
iwlagn: introduce struct iwl-shared - known by all layers

This struct will hold pointers to all the layers, so that every layer will find
the pointers it needs when calling another layer.

Note that the drv_data set to struct device is now a pointer to
struct iwl_shared.
This solves of bug that I introduced in

iwlagn: simplify the bus architecture

Bug description:

sysfs gets the the driver data from struct device. Till the aforementioned
patch, dev_get_drvdata would return iwl_priv. After the patch, dev_get_drvdata
return iwl_bus which is buggy since the sysfs handlers rely on this value, and
sysfs handlers need iwl_priv.

Now, dev_get_drvdata return iwl-shared. Since we have pointers to all the
layers in iwl_shared, every layer will be able to get the pointer it needs:
bus layer will gets iwl_bus from the PCI suspend callbacks, and the sysfs
handlers will get the iwl_priv they need.

In order to keep good encapsulation, we need to avoid to dereference iwl_priv
from a different layer. This is why instead of including iwl-dev.h from
iwl-shared.h, I added a forward declaration to iwl_priv. Moreover we keep type
safety while providing encapsulation.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: introduce iwl-shared.h
Emmanuel Grumbach [Fri, 26 Aug 2011 06:10:36 +0000 (23:10 -0700)]
iwlagn: introduce iwl-shared.h

It will hold declaration of functions and forward declaration of struct that
are used by several layers.
This will allow modules not to include iwl_priv. iwl_bus and iwl_trans are
still visible to all.

All the layers share the module parameters, move the struct to iwl-shared.h.
Also add all module parameters to iwl_mod_params instead of having them as
global static. This includes

* debug_level
* ant_coupling
* bt_ch_announce
* wanted_ucode_alternative

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: use iwl_get_debug_level instead of iwl_debug_level
Emmanuel Grumbach [Fri, 26 Aug 2011 06:10:35 +0000 (23:10 -0700)]
iwlagn: use iwl_get_debug_level instead of iwl_debug_level

The latter may return incomplete information.
For example, if one switched IWL_DL_TX on through sysfs, IWL_DL_TX bit would
have been set in priv->debug_level, but since iwl_alloc_traffic_mem looked at
iwl_debug_level only, it wouldn't have allocated the tx_traffic buffer.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: remove out-dated comments
Wey-Yi Guy [Fri, 26 Aug 2011 06:10:34 +0000 (23:10 -0700)]
iwlagn: remove out-dated comments

Portion of iwl_cfg comments is not correct anymore, remove it.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: Rename iwlcore prefix
Wey-Yi Guy [Fri, 26 Aug 2011 06:10:33 +0000 (23:10 -0700)]
iwlagn: Rename iwlcore prefix

There are number of functions with "iwlcore_" prefix which not feels right,
rename those to "iwl_".

No functional changes by making the renames.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: minor cleanup in ani
Mohammed Shafi Shajakhan [Fri, 26 Aug 2011 05:49:57 +0000 (11:19 +0530)]
ath9k: minor cleanup in ani

removed a function declaration, removed a variable, renamed a variable

Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: use appropriate debug mask
Mohammed Shafi Shajakhan [Fri, 26 Aug 2011 05:40:01 +0000 (11:10 +0530)]
ath9k: use appropriate debug mask

in the Rx path of the driver it would be better to use ATH_DBG_ANY
rather than ATH_DBG_XMIT for printing debug messages

Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agop54: Use do_div for 64-bit division to fix 32-bit kernels
Christian Lamparter [Thu, 25 Aug 2011 21:47:35 +0000 (23:47 +0200)]
p54: Use do_div for 64-bit division to fix 32-bit kernels

Use the do_div macro for 64-bit division. Otherwise, the module will
reference __udivdi3 under 32-bit kernels, which is not allowed in
kernel space.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: add missing AR9340 in ath_mac_bb_names
Florian Fainelli [Thu, 25 Aug 2011 19:33:48 +0000 (21:33 +0200)]
ath9k: add missing AR9340 in ath_mac_bb_names

AR9340 is not listed in ath_mac_bb_names, which leads to such a message:
ieee80211 phy0: Atheros AR???? Rev:0 mem=0xb8100000, irq=2

Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agocfg80211: document wiphy->registered
Stanislaw Gruszka [Thu, 25 Aug 2011 15:07:24 +0000 (17:07 +0200)]
cfg80211: document wiphy->registered

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: refactor skb copy to failq in mesh_path_move_to_queue
John W. Linville [Wed, 24 Aug 2011 19:12:41 +0000 (15:12 -0400)]
mac80211: refactor skb copy to failq in mesh_path_move_to_queue

This seems a bit less awkward...

Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agonet/mac80211/debugfs: Convert to kstrou8_from_user
Peter Huewe [Tue, 7 Jun 2011 20:36:14 +0000 (22:36 +0200)]
net/mac80211/debugfs: Convert to kstrou8_from_user

This patch replaces the code for getting an number from a
userspace buffer by a simple call to kstrou8_from_user.
This makes it easier to read and less error prone.

Since the old buffer was only 10 bytes long and the value is masked by a
nibble-mask anyway, we don't need to use kstrtoul but rather kstrtou8.

Kernel Version: v3.0-rc2

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
John W. Linville [Mon, 29 Aug 2011 18:52:20 +0000 (14:52 -0400)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-next into for-davem

12 years agoMerge branch 'for-linville' of git://git.kernel.org/pub/scm/linux/kernel/git/luca...
John W. Linville [Mon, 29 Aug 2011 18:27:52 +0000 (14:27 -0400)]
Merge branch 'for-linville' of git://git./linux/kernel/git/luca/wl12xx

12 years agoixgbe: clear RNBC only for 82598
Emil Tantilov [Fri, 29 Jul 2011 06:46:15 +0000 (06:46 +0000)]
ixgbe: clear RNBC only for 82598

RNBC (0x03FC0) is only for 82598 and has different meaning
on newer HW. Make sure to only clear it for 82598.

Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoixgbe: add check for supported modes
Emil Tantilov [Fri, 29 Jul 2011 06:46:10 +0000 (06:46 +0000)]
ixgbe: add check for supported modes

When setting advertised speed/duplex with ethtool.

Also cleaned up the comment since we also support 100/F.

Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoixgbe: fix ixgbe_fc_autoneg_fiber bug
Don Skidmore [Thu, 28 Jul 2011 01:00:58 +0000 (01:00 +0000)]
ixgbe: fix ixgbe_fc_autoneg_fiber bug

A logic error in ixgbe_fc_autoneg_fiber() that treated a masked u32 as a
boolean would make it so we would never fall hit a error check case.  So
now I force the u32 to a boolean value with '!!'.

Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoixgbe: cleanup feature flags in ixgbe_probe
Don Skidmore [Sat, 30 Jul 2011 05:08:18 +0000 (05:08 +0000)]
ixgbe: cleanup feature flags in ixgbe_probe

I'm removing NETIF_F_GRO from being initialed in the feature flags during
ixgbe_probe() bases on a comment from Michal Miroslaw
<mirq-linux@rere.qmqm.pl> that it is always set by network code now.

Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoixgbe: PFC not cleared on X540 devices
John Fastabend [Thu, 21 Jul 2011 22:43:29 +0000 (22:43 +0000)]
ixgbe: PFC not cleared on X540 devices

X540 devices do not clear PFC before sets. This results in
the device possibly responding to PFC frames that the user
has disabled. Although it would also be wrong for the peer
to be transmitting these frames. Now we clear the register
before set.

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>
12 years agoixgbe: consolidate, setup for multiple traffic classes
John Fastabend [Mon, 18 Jul 2011 22:38:36 +0000 (22:38 +0000)]
ixgbe: consolidate, setup for multiple traffic classes

This consolidates setup code for multiple traffic classes in
the setup_tc routine.

Prep work to allow IEEE DCBX to optimize for number of traffic
classes. Also simplifies code paths.

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>
12 years agoixgbe: remove unneeded fdir pb alloc case
John Fastabend [Mon, 18 Jul 2011 22:38:30 +0000 (22:38 +0000)]
ixgbe: remove unneeded fdir pb alloc case

The packet buffer is correctly allocated by generic pb allocation
path in ixgbe_configure() there is no need to do the allocation
here as well.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
12 years agoixgbe: fixup remaining call sites for arbitrary TCs
John Fastabend [Mon, 18 Jul 2011 22:38:25 +0000 (22:38 +0000)]
ixgbe: fixup remaining call sites for arbitrary TCs

One existing call sites still expect either 4 or 8 traffic
classes to be specified. This fixes this allowing arbitrary
values up to 8 to work as expected.

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>
12 years agoixgbe: Always tag VLAN tagged packets
Alexander Duyck [Wed, 20 Jul 2011 00:09:10 +0000 (00:09 +0000)]
ixgbe: Always tag VLAN tagged packets

This change is meant to fix the patch:
ixgbe: Cleanup FCOE and VLAN handling in xmit_frame_ring
And can be rolled into it if needed.

What this fixes is that VLAN tagged packets were not being tagged if they
were prio 7 which matches up with TC_PRIO_CONTROL.  In order to fix it I am
just setting things up so that we always tag VLAN tagged packets.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoixgbe: Add support for setting CC bit when SR-IOV is enabled
Alexander Duyck [Wed, 29 Jun 2011 05:43:27 +0000 (05:43 +0000)]
ixgbe: Add support for setting CC bit when SR-IOV is enabled

This change makes it so that the CC bit in the descriptor is set when
SR-IOV is enabled.  This is needed in order to support offloading
functionality when passing traffic over the internal TX switch.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agocaif: Remove OOM messages, use kzalloc
Joe Perches [Thu, 25 Aug 2011 13:22:24 +0000 (13:22 +0000)]
caif: Remove OOM messages, use kzalloc

Remove per site OOM messages because they duplicate
the generic mm subsystem OOM message.

Use kzalloc instead of kmalloc/memset
when next to the OOM message removals.

Reduces object size (allyesconfig ~2%)

$ size -t drivers/net/caif/built-in.o.old net/caif/built-in.o.old
   text    data     bss     dec     hex filename
  32297     700    8224   41221    a105 drivers/net/caif/built-in.o.old
  72159    1317   20552   94028   16f4c net/caif/built-in.o.old
 104456    2017   28776  135249   21051 (TOTALS)
$ size -t drivers/net/caif/built-in.o.new net/caif/built-in.o.new
   text    data     bss     dec     hex filename
  31975     700    8184   40859    9f9b drivers/net/caif/built-in.o.new
  70748    1317   20152   92217   16839 net/caif/built-in.o.new
 102723    2017   28336  133076   207d4 (TOTALS)

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobenet: remove bogus "unlikely" on vlan check
Jiri Pirko [Thu, 25 Aug 2011 02:50:51 +0000 (02:50 +0000)]
benet: remove bogus "unlikely" on vlan check

Use of unlikely in this place is wrong. Remove it.

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: Define NETDEV_FCOE_WWNN, NETDEV_FCOE_WWPN only when CONFIG_LIBFCOE is enabled
Bhanu Prakash Gollapudi [Fri, 26 Aug 2011 09:45:41 +0000 (09:45 +0000)]
net: Define NETDEV_FCOE_WWNN, NETDEV_FCOE_WWPN only when CONFIG_LIBFCOE is enabled

bnx2fc driver calls netdev->netdev_ops->ndo_fcoe_get_wwn() and it may not
be defined with the current Kconfig dependencies.  ndo_fcoe_get_wwn is
dependent on CONFIG_FCOE, but bnx2fc does not select CONFIG_FCOE, as it does
not depend on fcoe driver. Since both fcoe and bnx2fc drivers select
CONFIG_LIBFCOE, define NETDEV_FCOE_WWNN and NETDEV_FCOE_WWPN when
CONFIG_LIBFCOE is defined.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Reported-by: Randy Dunlap <rdunlap@xenotime.net>
Cc: Yi Zou <yi.zou@intel.com>
Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Reviewed-by: Yi Zou <yi.zou@intel.com>
Acked-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: David S. Miller <davem@davemloft.net>