Commit graph

147469 commits

Author SHA1 Message Date
Rajkumar Manoharan 4fb7175bbd ath9k_hw: fix IQ calibration chain index
The chain index to perform IQ calibration is counted to number of valid
tx chains and then used for indexing chain specific registers. If the
chainmask is set to 0x2 (i.e chain 1 only), still it accesses chain 0
registers for chain 1. So use real chain index instead sequential one.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-06 15:20:28 -04:00
Rajkumar Manoharan 4f6bd1a8df ath9k: cleanup MCI indentation
Fix bad indentation & if nesting to lose about two levels
of unnecessary indentation.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-06 15:20:27 -04:00
Rajkumar Manoharan 5d294a1680 ath9k_hw: update ar9462 initval table to fix rx
The wrong ADC sample phase that happen between awake and
network/full sleep will lead to improper rx noisefloor
calibration.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-06 15:20:27 -04:00
Sujith Manoharan e6930c4b32 ath9k: Use separate operational flags for BTCOEX
Also, use atomic operations to check the flags.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-06 15:20:26 -04:00
Sujith Manoharan 4cb54fa3a2 ath9k: Remove SC_OP_OFFCHANNEL
mac80211's IEEE80211_CONF_OFFCHANNEL can be used directly
to track offchannel state. Also pass the correct boolean
value to ath9k_hw_startpcureceive().

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-06 15:20:26 -04:00
Sujith Manoharan 2fd5d35bc8 ath9k_hw: Fix variable usage
Exposed by sparse:
ar9003_mci.c:1134:31: warning: Using plain integer as NULL pointer

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-06 15:20:26 -04:00
Sujith Manoharan 97ba515a20 ath9k: Add MCI interrupt to debugfs statistics
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-06 15:20:25 -04:00
Sujith Manoharan 31604cf0a7 ath9k_hw: Cleanup power mode API
The 'setChip' variable is unused, remove it and
simplify the functions.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-06 15:20:25 -04:00
Sujith Manoharan 5955b2b0ef ath9k_hw: Fix MCI usage
MCI has to be handled only when BTCOEX is actually enabled.
Check for this condition before calling MCI related functions
from various reset/calibration call-sites.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-06 15:20:25 -04:00
Sujith Manoharan 83c7a52dcc ath9k_hw: Fix AR_RTC_KEEP_AWAKE usage
The default value that is being programmed to AR_RTC_KEEP_AWAKE
is 0x2, there is no need to program it manually in various
functions.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-06 15:20:24 -04:00
Sujith Manoharan e270e776a0 ath9k: Setup MCI interrupts properly
MCI interrupts have to be enabled only when BTCOEX is
actually in use.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-06 15:20:24 -04:00
Sujith Manoharan d09f5f4cfb ath9k: Handle ASPM properly
ASPM has to be disabled when BTCOEX is in use, do this properly
by calling the bus-specific ASPM init routine after the
BTCOEX scheme has been determined.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-06 15:20:24 -04:00
Sujith Manoharan aaa1ec46b3 ath9k: Prune ath9k_init_device
Instead of cluttering ath9k_init_device() with 'ath_softc'
specific initialization code, use ath9k_init_softc() to
setup driver-specific work routines, timers etc.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-06 15:20:23 -04:00
Chris Yungmann 2b0446c420 brcm80211: brcmsmac: fixed checkpatch and sparse warnings
Fixed checkpatch and sparse warnings related to aiutils.*

Signed-off-by: Chris Yungmann <yungmann.chris@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-06 15:20:23 -04:00
Hauke Mehrtens ccaf8c32d5 ssb: recognize ARM Cortex M3
I found this core on a BCM4322, a PCI card in the Linksys WRT610N V1.
This core is not used by the driver, this patch just makes ssb show the
correct name.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-06 15:20:22 -04:00
Vivek Natarajan d202caff28 ath9k: Ensure a fair beacon distribution in IBSS mode
Configure CWmin based on slot time for IBSS mode. This helps
in increasing the beacon distribution of ath9k to accepted
levels in 11a mode.

Signed-off-by: Vivek Natarajan <nataraja@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-06 15:19:00 -04:00
Zero.Lin cff3d1f093 rt2x00:Add RT5392 chipset support
Signed-off-by: Zero.Lin <Zero.Lin@mediatek.com>
Reviewed-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-06 15:19:00 -04:00
Stanislaw Gruszka d7fbcada37 iwl4965: claim RSN IBSS support
Similar like other drivers including iwl3945, do not configure group
keys to the hardware (on Ad-Hoc mode) to make IBSS RSN work.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-06 15:18:18 -04:00
Stanislaw Gruszka 6851dff3e6 rt2x00: claim RSN IBSS support
Similar like other drivers, do not configure group keys to the hardware
(on Ad-Hoc mode) to make IBSS RSN work.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-06 15:18:18 -04:00
Zefir Kurtisi 620a55687b ath9k: fix/add bits for spectral scanning
Updates for spectral scanning register modification for AR93x:
 * fix bits for spectral_scan_count
 * add bits for new parameters

Signed-off-by: Zefir Kurtisi <zefir.kurtisi@neratec.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-06 15:18:18 -04:00
Johannes Berg e8c9bd5b8d cfg80211: clarify set_channel APIs
Now that we've removed all uses of the set_channel
API except for the monitor channel and in libertas,
clarify this. Split the libertas mesh use into a
new libertas_set_mesh_channel() operation, just to
keep backward compatibility, and rename the normal
set_channel() to set_monitor_channel().

Also describe the desired set_monitor_channel()
semantics more clearly.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-06 15:18:17 -04:00
John W. Linville 7c9c46c16d Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
Conflicts:
	drivers/net/wireless/iwlwifi/iwl-drv.c
2012-06-06 14:40:06 -04:00
David S. Miller 9b97b84eb5 Merge branch 'master' of git://gitorious.org/linux-can/linux-can-next 2012-06-06 11:13:26 -07:00
John W. Linville 4e924fec59 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless into for-davem 2012-06-06 14:02:56 -04:00
Linus Torvalds ff39d0e8f0 Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux
Pull ACPI and Power Management changes from Len Brown.

This does an evil merge to fix up what I think is a mismerge by Len to
the gma500 driver, and restore it to the mainline state.

In that driver, both branches had commented out the call to
acpi_video_register(), and Len resolved the merge to that commented-out
version.

However, in mainline, further changes by Alan (commit d839ede47a:
"gma500: opregion and ACPI" to be exact) had re-enabled the ACPI video
registration, so the current state of the driver seems to want it.

Alan is apparently still feeling the effects of partying with the Queen,
so he didn't reply to my query, but I'll do the evil merge anyway.

* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux:
  ACPI: fix acpi_bus.h build warnings when ACPI is not enabled
  drivers: acpi: Fix dependency for ACPI_HOTPLUG_CPU
  tools/power turbostat: fix IVB support
  tools/power turbostat: fix un-intended affinity of forked program
  ACPI video: use after input_unregister_device()
  gma500: don't register the ACPI video bus
  acpi_video: Intel video is not always i915
  acpi_video: fix leaking PCI references
  ACPI: Ignore invalid _PSS entries, but use valid ones
  ACPI battery: only refresh the sysfs files when pertinent information changes
2012-06-06 10:47:15 -07:00
Linus Torvalds ae501be0f6 InfiniBand/RDMA fixes for 3.5-rc2, all in hardware drivers:
- Fix crash in cxgb4
  - Fixes to new ocrdma driver
  - Regression fixes for mlx4
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABCAAGBQJPz5V+AAoJEENa44ZhAt0hsXoQAIFBNbsLWLft4J9jpyDAFj5z
 SpspcZAVgJW+K7I6j38SdQXMsR/XmcwM8Yh3iJIa/YG0P/6bWXDNU20itN62mAcI
 D+LphECUv/T8PGxEcAFlwjLYy5kcgFBTs/t7AgVS57OL4z8YuDLDr7uhdcnPdq7t
 AMIptqhXZgSnM/peIkf2SWBYxHSUMhukrlu5uNB9uc9GC9VRGhioXxT3eBPwr54O
 7BwHxQGDYtFZ4fYKmFxN9sJJmFf9nl/WhYM2HwCMPEe4UzlxxfbP7/c17QNS7YGo
 e072Jvs+U2ttb4J7J2yBRcpiiSjYDAVi+7fE9OtAdWyfPDa9MmcajVq7PUnohZLc
 muNSv1RGOebj2mSjE+oc1oWZKkM/nSEwbIE7PJOvWX2RdqOs8xNNC0RjgvsXDvyf
 +lARPcyolxpJXtvIlLY/Ua1KhJf52zu+Kp1QCbEnloU/NuGcc09It6Wq6X1yU/Gs
 N29qjuFOBoHQxDzfWPc3Uhp1/eNI8UJiTfO9CSYHv2ZHJzW8BqoblbKlE2l43TDg
 frH1l1/9RYY7gTGoCVvfJByvSWM7rBJdNfpu+yJDm5en86xcF6HB7GG0nJ/okpw2
 dUqQsLu+nTKZn8KCM3jzgP/ANT+PWk1UZlS1fIaMFMwa1SLWYqbaW/KEbRrY5IeP
 H0q/TFhJH8PccBjPbcsT
 =zl8u
 -----END PGP SIGNATURE-----

Merge tag 'rdma-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband

Pull InfiniBand/RDMA fixes from Roland Dreier:
 "All in hardware drivers:
   - Fix crash in cxgb4
   - Fixes to new ocrdma driver
   - Regression fixes for mlx4"

* tag 'rdma-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
  IB/mlx4: Fix max_wqe capacity reported from query device
  mlx4_core: Fix setting VL_cap in mlx4_SET_PORT wrapper flow
  IB/mlx4: Fix EQ deallocation in legacy mode
  RDMA/cxgb4: Fix crash when peer address is 0.0.0.0
  RDMA/ocrdma: Remove unnecessary version.h includes
  RDMA/ocrdma: Fix signaled event for SRQ_LIMIT_REACHED
  RDMA/ocrdma: Correct queue free count math
2012-06-06 10:45:21 -07:00
Bjørn Mork dd03cff23d net: sierra_net: device IDs for Aircard 320U++
Adding device IDs for Aircard 320U and two other devices
found in the out-of-tree version of this driver.

Cc: linux@sierrawireless.com
Cc: Autif Khan <autif.mlist@gmail.com>
Cc: Tom Cassidy <tomas.cassidy@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-06 10:40:32 -07:00
Andrew Lunn 9a43a02648 mv643xx_eth: Fix compile error for architectures without clk.
Commit 452503ebc (ARM: Orion: Eth: Add clk/clkdev support.) broke
the building of the driver on architectures which don't have clk
support. In particular PPC32 Pegasos which uses this driver.

Add #ifdef around the clk API usage.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-06 10:38:38 -07:00
Roland Dreier 20952cdd8e Merge branches 'cxgb4', 'mlx4' and 'ocrdma' into for-linus 2012-06-06 10:08:11 -07:00
Sagi Grimberg fc2d004419 IB/mlx4: Fix max_wqe capacity reported from query device
1. Limit the max number of WQEs per QP reported when querying the
   device, so that ib_create_qp() will not fail for a QP size that the
   device claimed to support due to additional headroom WQEs being
   allocated.

2. Limit qp resources accepted for ib_create_qp() to the limits
   reported in ib_query_device().  In kernel space, make sure that the
   limits returned to the caller following qp creation also lie within
   the reported device limits. For userspace, report as before, and do
   adjustment in libmlx4 (so as not to break ABI).

Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Sagi Grimberg <sagig@mellanox.co.il>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
2012-06-06 10:08:03 -07:00
Jack Morgenstein edc4a67e15 mlx4_core: Fix setting VL_cap in mlx4_SET_PORT wrapper flow
Commit 096335b3f9 ("mlx4_core: Allow dynamic MTU configuration for
IB ports") modifies the port VL setting.  This exposes a bug in
mlx4_common_set_port(), where the VL cap value passed in (inside the
command mailbox) is incorrectly zeroed-out:

mlx4_SET_PORT modifies the VL_cap field (byte 3 of the mailbox).
Since the SET_PORT command is paravirtualized on the master as well as
on the slaves, mlx4_SET_PORT_wrapper() is invoked on the master.  This
calls mlx4_common_set_port() where mailbox byte 3 gets overwritten by
code which should only set a single bit in that byte (for the reset
qkey counter flag) -- but instead overwrites the entire byte.

The result is that when running in SR-IOV mode, the VL_cap will be set
to zero -- fix this.

Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
2012-06-06 10:07:54 -07:00
Linus Torvalds 374916ed16 md: 2 fixes for 3.5-rc
One sparse-warning fix, one bigfix for 3.4-stable
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.18 (GNU/Linux)
 
 iQIVAwUAT86Oqjnsnt1WYoG5AQJ9rhAAuLVImkvxtHHMM7j2E8ZTQ1pWT6JRf6qC
 Rsz/s41olPwSEVRuLXpZrle/dSN2l1Ys49FR2u6m+96lM0At2JlkML/Sc4Gszr0g
 Oeo8FN+Rv/Sv6Chv7MuWp0z0WOs3ruIR3AYQIo+jnaVzZLLQ2HRN8wupjvpCIZyk
 WdPu6t/9G+OtnkFWCC3FDEIyqpghg1TcoK93b1eRFD/ZoPV8yDJ9bba//fDesVVI
 OhvUJPqeJ/ow+sA1MzyLhKB6CLPmEob0qxi8++CdnTfx8fwnkYNKlgsxf0WQ8JQ5
 GSClKNUpki0yiYWJR6pJrv6+e6WbesX1DriRSRODJLKls/bQKnskaxGx4DUa73BM
 DkOUsALfaTfGD5XiXgEjTU2HR+codiqvDavQjWOlHWgwIKB2MYQWIwFLK/T2RSdC
 5f30IiM6kHJMZS3lVP2kjfXAfQ10kiTBg7E6btzCO3aso84yxr6Er65skdnlIi5r
 q1z7FCnQimfZYjlbuR8EUtdxHdGZkSQbtZ5E7X9dvmUpFstvgGGPr/SuAP3r87kM
 LbyRSoDpGk8dXZ5/epY+IKCQGsFZIeTlg+eonjSuVNN8Anr3WAE1VeRmLBQilnXk
 hGDLKAZ4v9YwRJWqoY3hewtpcYhCMqNGGk4hPKmJuh37OTOWFQl8sXVk2Pqzy1ap
 uIP66qrvvI0=
 =VrYL
 -----END PGP SIGNATURE-----

Merge tag 'md-3.5-fixes' of git://neil.brown.name/md

Pull two md fixes from NeilBrown:
 "One sparse-warning fix, one bugfix for 3.4-stable"

* tag 'md-3.5-fixes' of git://neil.brown.name/md:
  md: raid1/raid10: fix problem with merge_bvec_fn
  lib/raid6: fix sparse warnings in recovery functions
2012-06-06 09:49:28 -07:00
Linus Torvalds 9e68447f5b IOMMU fixes for v3.5-rc1
Two patches are in here which fix AMD IOMMU specific issues. One patch
 fixes a long-standing warning on resume because the amd_iommu_resume
 function enabled interrupts. The other patch fixes a deadlock in an
 error-path of the page-fault request handling code of the IOMMU driver.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJPz1wQAAoJECvwRC2XARrj6FkQAJsF4LuzKXQcAybUnzMZq3E8
 g2ii0uknErrNgsAjnooH1aTzq0vo5Ps/ZLj84XJER+V0vYkD574vhKs9dzu8Y8at
 xv20AH+Uei+0tUVy2WCPglVwZaSrQB+eVm0oqWIqNKnp28q3pVsns8iccp+Anqxz
 VV8IqJchfAUXdB8EGJCbZkT+YGfNcFGXx2bfYyiNBUvXOfE6fzzXZly0AXWcm9GB
 XLYxLdtZ5RYG874IMKnQvAUCXAfN21snK61i1hcx1aoZynzVAFvbf1SnzcINuX4M
 SqXdies6Ui8S2Ndvl4wZXfEkFYRL48v2+tpjp9bxEvvfX40WCbUHJ3M7Z+LoayvP
 Xgpshp5JaoXcgp3Rgyhyd22HzKMP291NyjObrKBgf6QxFaQSz16OIsFN9aKxEiyc
 QCMJyLgfKeBDWM64Zw2u526RIIMENPIim+YH5R2jN08kZUYd+5r611E5BcxE0I6Z
 uuuDi+eY+UCiBVyofckuJz4yVnNIZroRSFoldfsbv7BvHCE4QNOCyG5JrdVzL0e3
 81dgmMDaPCr2ga2NjJ2hebYJLNYNc4IIf/zwK8OoT/S5sD53zU42WIQ2Ug91hXmw
 ep04oobprN764te1VOaSbm9FNUCD3ykf6xLtqX9gKp254mZ/w46YaMR0GSphrUbS
 YBNnrSbIq+1z5MtruD/V
 =qLIK
 -----END PGP SIGNATURE-----

Merge tag 'iommu-fixes-3.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu

Pull IOMMU fixes from Joerg Roedel:
 "Two patches are in here which fix AMD IOMMU specific issues.  One
  patch fixes a long-standing warning on resume because the
  amd_iommu_resume function enabled interrupts.  The other patch fixes a
  deadlock in an error-path of the page-fault request handling code of
  the IOMMU driver.

* tag 'iommu-fixes-3.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu:
  iommu/amd: Fix deadlock in ppr-handling error path
  iommu/amd: Cache pdev pointer to root-bridge
2012-06-06 09:47:57 -07:00
Victor Goldenshtein 97511b15b1 wlcore: set channels 12-14 as pactive for sched scan
Introduce “pactive” scan mode – which instructs the fw to
perform a passive scan until an activity/energy is detected
on these channels, once energy detected the channel becomes
active.

Signed-off-by: Victor Goldenshtein <victorg@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-06 19:40:27 +03:00
Giuseppe CAVALLARO ba27ec66ff stmmac: fix driver Kconfig when built as module
This patches fixes the driver when built as dynamic module.
In fact, the platform part cannot be built and the probe fails
(thanks to Bob Liu that reported this bug).

v2: as D. Miller suggested, it is not necessary to make the
pci and the platform code mutually exclusive.
Having both could also help, at built time ,to verify that
all the code is validated and compiles fine.

v3: removed wrong Reviewed-by from the patch

Reported-by: Bob Liu <lliubbo@gmail.com>
cc: Rayagond Kokatanur <rayagond@vayavyalabs.com>
Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-06 09:34:56 -07:00
Giuseppe CAVALLARO ff3dd78cb8 stmmac: fix driver's doc when run kernel-doc script
Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-06 09:34:55 -07:00
Eliad Peller 587cc286c8 wlcore: compare ssid_len before comparing ssids
When comparing 2 ssids the ssid_len must be taken
into account. Otherwise, a substring will be treated
as equal.

This bug might cause ssids to get scanned as
public ssids (rather than hidden), resulting in
broadcast probe request (instead of ssid-specific
ones)

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-06 19:33:28 +03:00
Yoni Divinsky 78f85f5066 wlcore: add role_id to all the sched_scan commands
Due to a need by the firmware when working in multirole
the role id needs to be added to the structs of the
following commands:
CMD_CONNECTION_SCAN_CFG, CMD_CONNECTION_SCAN_SSID_CFG,
CMD_START_PERIODIC_SCAN, CMD_STOP_PERIODIC_SCAN

Signed-off-by: Yoni Divinsky <yoni.divinsky@ti.com>
Signed-off-by: Igal Chernobelsky <igalc@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-06 19:33:27 +03:00
Joe Perches c2fd03a011 drivers: net: Remove casts to same type
Adding casts of objects to the same type is unnecessary
and confusing for a human reader.

For example, this cast:

        int y;
        int *p = (int *)&y;

I used the coccinelle script below to find and remove these
unnecessary casts.  I manually removed the conversions this
script produces of casts with __force, __iomem and __user.

@@
type T;
T *p;
@@

-       (T *)p
+       p

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-06 09:31:33 -07:00
Joe Perches 2c208890c6 wireless: Remove casts to same type
Adding casts of objects to the same type is unnecessary
and confusing for a human reader.

For example, this cast:

        int y;
        int *p = (int *)&y;

I used the coccinelle script below to find and remove these
unnecessary casts.  I manually removed the conversions this
script produces of casts with __force, __iomem and __user.

@@
type T;
T *p;
@@

-       (T *)p
+       p

Neatened the mwifiex_deauthenticate_infra function which
was doing odd things with array pointers and not using
is_zero_ether_addr.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-06 09:31:33 -07:00
Joe Perches 6469933605 ethernet: Remove casts to same type
Adding casts of objects to the same type is unnecessary
and confusing for a human reader.

For example, this cast:

        int y;
        int *p = (int *)&y;

I used the coccinelle script below to find and remove these
unnecessary casts.  I manually removed the conversions this
script produces of casts with __force, __iomem and __user.

@@
type T;
T *p;
@@

-       (T *)p
+       p

A function in atl1e_main.c was passed a const pointer
when it actually modified elements of the structure.

Change the argument to a non-const pointer.

A function in stmmac needed a __force to avoid a sparse
warning.  Added it.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-06 09:31:33 -07:00
Eliad Peller 186b5a7c93 wl12xx/wl18xx: add erp protection IE to the beacon filter
We have to reconfigure the fw when erp protection should
be enabled/disabled. Pass beacons containing changes
in the ERP protection IE, so we could analyze them.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-06 19:28:06 +03:00
Eliad Peller 9f5b424d6c wl12xx: send beacon loss events to userspace
Send beacon loss events to userspace, so it will be
able to initiate roaming before disconnection

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-06 19:28:06 +03:00
Yoni Divinsky afbe37185c wlcore: do not send stop fwlog cmd if fw is hanged
If the driver received a watchdog interrupt then the
assumption is that the fw is hanged. Avoid sending
the stop fwlog command in case of a watchdog recovey
to avoid waiting for the 2 seconds timeout of the command.

Signed-off-by: Yoni Divinsky <yoni.divinsky@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-06 19:28:06 +03:00
Arik Nemtsov a1c597f2b2 wlcore/wl12xx/wl18xx: implement op_set_key per HW arch
The 12xx set_key just calls the common wlcore_set_key function, in order
to program the keys into the FW.

The 18xx variant changes the spare block count when a GEM or TKIP
key is set. Also modify the get_spare_blocks HW op for 18xx to return
the correct numbers of spare blocks, according to what is currently
set in FW.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-06 19:28:05 +03:00
Arik Nemtsov 2c38849f4a wlcore: stop queues on Tx flush
Stop network queues during Tx flush, and also drop other internal
mac80211 packets (mgmt) that may arrive when the queues are stopped.

When flush is done all driver queues are clear, forcefully if needed.

Protect the Tx flush operation with a new mutex, to prevent concurrency
that can mess us queue state.

Based on a patch by Eliad Peller <eliad@wizery.com>

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-06 19:28:05 +03:00
Arik Nemtsov 6639611467 wlcore: add stop reason bitmap for waking/starting queues
Allow the driver to wake/stop the queues for multiple reasons. A queue
is started when no stop-reasons exist.

Convert all wake/stop queue calls to use the new API.

Before, a stopped queue was almost synonymous a high-watermark on Tx.
Remove a bit of code in wl12xx_tx_reset() that relied on it.

Internal packets arriving from mac80211 are also discarded when a queue
is stopped. A notable exception to this is the watermark reason, which
is a "soft"-stop reason. We allow traffic to gradually come to a halt,
but we don't mind spurious packets here and there. This is merely a flow
regulation mechanism.

Based on a similar patch by Eliad Peller <eliadWizery.com>.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-06 19:28:05 +03:00
Arik Nemtsov 32bb2c03f9 wlcore/wl12xx/wl18xx: handle spare blocks spacial cases per arch
Add a HW op for getting spare blocks.

12xx cards require 2 spare blocks for GEM encrypted SKBs, regardless
of VIFs or keys programmed into the FW.

18xx cards require 2 spare blocks when there are any connected TKIP or
GEM VIFs. For now always return 2 spare blocks, as this works with all
networks. The special case TKIP/GEM functionality is added at a later
patch.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-06 19:28:05 +03:00
Arik Nemtsov 2c0133a437 wlcore/wl12xx/wl18xx: introduce quirk to remove TKIP header space
18xx chips do not require extra space in the TKIP header. Introduce a
new HW quirk to allow us to make this feature arch-specific. 12xx chip
will now have this quirk.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-06 19:28:04 +03:00
Sathya Perla 20d5ec435c be2net: update driver version
Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-06 09:06:18 -07:00
Sathya Perla d79c0a207a be2net: do not use SCRATCHPAD register
The CUST_SCRATCHPAD_CSR register is used for marking if FW cleanup is
needed. This is used in a crash kernel scenario. Do no use this register as
it is not available for some functions. Instead, always issue an FLR when
a function is probed *except* when VFs are preset (enabled in the previous
PF load).

Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-06 09:06:18 -07:00
Sathya Perla 421737bdd5 be2net: remove unnecessary usage of unlikely()
Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-06 09:06:18 -07:00
Sathya Perla 7f64006266 be2net: fix reporting number of actual rx queues
Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-06 09:06:18 -07:00
Sathya Perla 0513ac3d22 be2net: do not modify PCI MaxReadReq size
Setting the PCI MRRS to a value of 4096 (overriding the system decided
value) had provided perf improvement in TX.
But, IBM has provided feedback that on POWER platforms, this value is set
by the system firmware, and drivers modifying this value can cause
unpredictable results (like EEH errors.) So, backing off this change.
On POWER7 platforms most slots, it seems, do get a MRRS of 4096.

This patch reverts the following commit:
"be2net: Modified PCI MaxReadReq size to 4096 bytes"
commit 5a56eb10ba.

Suggested-by: Brian King <bjking1@us.ibm.com>
Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-06 09:06:18 -07:00
Sathya Perla 10329df8f9 be2net: cleanup be_vid_config()
- get rid of 2 unused arguments to the routine and some unused code
- don't use the term "vlan_tag" in place of "vid" as they are different

Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-06 09:06:17 -07:00
Sathya Perla 1d1e9a467c be2net: don't call vid_config() when there's no vlan config
be_vid_config() is called from be_setup() to replay config cmds after
a card reset. Skip calling it when no vlans are configured.

Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-06 09:06:17 -07:00
Eugeni Dodonov 67384fe3fd char/agp: add another Ironlake host bridge
This seems to come on Gigabyte H55M-S2V and was discovered through the
https://bugs.freedesktop.org/show_bug.cgi?id=50381 debugging.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=50381
Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
Cc: stable@vger.kernel.org
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-06-06 17:05:29 +02:00
Johannes Berg b1abedada3 iwlwifi: remove extern opmode ops declarations
There's no need to declare the opmode ops
as extern since they're now dynamically
registered.

Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-06-06 13:26:00 +02:00
Johannes Berg 1280d428ad iwlwifi: move RF config into NIC config
Since the RF config is done for all devices,
there's no need to keep a separate function
that is called for all devices, move it into
the general NIC config function.

Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Reviewed-by: Wey-Yi W Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-06-06 13:25:17 +02:00
Johannes Berg 12b78246aa iwlwifi: configure PHY version for 1000 series
We should also configure the PHY version in the
CSR_HW_IF_CONFIG_REG register for 1000 series
devices, not just for the other devices.

Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Reviewed-by: Wey-Yi W Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-06-06 13:24:58 +02:00
Paul Bolle 6de4902ee8 iwlwifi: fix typo 'IWL_WATCHHDOG_DISABLED'
Commit 7c5ba4a830 ("iwlwifi: move queue
watchdog into transport") introduced the named constant
'IWL_WATCHHDOG_DISABLED'. Rename it to 'IWL_WATCHDOG_DISABLED'.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-06-06 13:24:36 +02:00
Johannes Berg 26a7ca9a71 iwlwifi: refactor EEPROM reading/parsing
The EEPROM reading/parsing code is all mixed in
the driver today, and the EEPROM is parsed only
when we access data from it. This is problematic
because the NVM needs to be parsed and that is
independent of reading it. Also, the NVM format
for new devices will be different and probably
require a new parser.

Therefore refactor the reading and parsing and
create two independent components. Reading the
EEPROM requires direct hardware accesses and
therefore access to the transport, but parsing
is independent and can be done on an NVM blob.

Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-06-06 13:24:19 +02:00
Emmanuel Grumbach 08838cdeca iwlwifi: configure the SKU in the HW
This was missing. Fix the mask of the REV_TYPE on the way.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-06-06 13:22:30 +02:00
Emmanuel Grumbach 7b6a2be9e4 iwlwifi: fix rf configuration
Johannes noticed this was completely messed up.
We got confused between masks and bit position.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-06-06 13:22:11 +02:00
Johannes Berg 2baa2e57a9 iwlwifi: add iwl_set_bits_mask
In a few cases we need to set a value in
a certain mask inside a register, add the
function iwl_set_bits_mask() to make such
code easy.

Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-06-06 13:21:52 +02:00
Emmanuel Grumbach 59c647b626 iwlwifi: allocate Tx cmd pool per device
Different transports will have different needs: New tranports
need headroom for their own use before the Tx cmd. So allocate
the Tx cmd pool in the transport and give it a unique name
based on dev_name.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-06-06 13:21:22 +02:00
Emmanuel Grumbach cde5b48700 iwlwifi: update mask value for SCD queue config
Although we don't use bit 24, this bit is valid, but bit 23
is not. Update the mask accordingly.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-06-06 13:21:21 +02:00
Emmanuel Grumbach 4beaf6c2f8 iwlwifi: s/txq_setup/txq_enable
We need to be able to enable / disable Tx queues in HW
dynamically. So this function is no longer related to AGG
only. It can do the job for any queue, even AC ones. Change
the name to better reflect its role.

Also use the new function to configure the AC / CMD queues
in tx_start.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-06-06 13:21:20 +02:00
Emmanuel Grumbach d0624be65a iwlwifi: s/txq_agg_disable/txq_disable
We need to be able to enable / disable Tx queues in HW
dynamically. So this function is no longer related to AGG
only. It can do the job for any queue, even AC ones. Change
the name to better reflect its role.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-06-06 13:21:19 +02:00
Emmanuel Grumbach 559b1a257d iwlwifi: use iwl_trans_set_wr_ptrs to init the queues
This functions does the job so use it instead of duplicating
the code.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-06-06 13:21:19 +02:00
Emmanuel Grumbach fc24861531 iwlwifi: first config the SCD queues, then activate them
The DMA channels of the FH should be activated after the
configuration of the SCD queues too.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-06-06 13:21:18 +02:00
Emmanuel Grumbach 588d932044 iwlwifi: SCD_INT_MSK is obsolete - don't update it
The scheduler can issue an interrupt when moving the read
pointer. To get this interrupt, the driver needs to
configure what queue can issue an interrupt when its read
pointer moves in the scheduler: this is the SCD_INT_MSK.
The driver also needs to enable the interrupt in
CSR_INT_MASK (bit CSR_INT_BIT_SCD).

Since we don't enable the scheduler interrupt in
CSR_INT_MASK, there is no point in requesting an interrupt
from the scheduler: it will be masked anyway. So don't
configure the scheduler to issue interrupts at all.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-06-06 13:21:17 +02:00
Johannes Berg d370493f9b iwlwifi: move ht40 bitmap into config
There's no need to dynamically fill the HT40
band bitmap as it's a device parameter, just
put it into the HT configuration.

Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-06-06 13:21:16 +02:00
Johannes Berg 2587d36b1e iwlwifi: unify tx_chains_num setting
There's no need to copy the same code for all
devices since none of the 5000 series devices
(that don't have the RX SISO override) don't
set the rx_with_siso_diversity variable.

Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-06-06 13:21:15 +02:00
Johannes Berg 1023fdc485 iwlwifi: move DVM code into subdirectory
Since we're working on another mode/driver
inside iwlwifi, move the current one into a
subdirectory to more cleanly separate the
code. While at it, rename all the files.

Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-06-06 13:21:14 +02:00
Johannes Berg 20041ea622 iwlwifi: trust mac80211 HT40 setting
When mac80211 asks us to do HT40, it'll not do so
on a channel that we marked as not having HT40+/-
with IEEE80211_CHAN_NO_HT40PLUS (or MINUS). Thus,
there's no need to verify it again in the driver.

Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-06-06 13:09:51 +02:00
Johannes Berg 6468a01a71 iwlwifi: move PCIe into subdirectory
Structure the code a bit more and move all PCIe code
including the hardware configuration files into a
PCIe specific subdirectory.

Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-06-06 13:09:30 +02:00
Ilan Peer 76a3aa8993 iwlwifi: clear STATUS_SCAN_HW when PAN_PARAMS fails
The STATUS_SCAN_HW is set before calling iwlagn_set_pan_params
(used as an input to calculate slot time allocation). The bit needs
to be cleared in case sending the command fails.

Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-06-06 13:08:41 +02:00
Johannes Berg 53e1116ebd iwlwifi: give HT format to mac80211/radiotap
We know whether we received a frame in GF format
or not, add it to the radiotap information.

Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-06-06 13:08:40 +02:00
Johannes Berg cc66880ba5 iwlwifi: use mac80211 channel for radar check
In channel switch, instead of relying on our internal
channel database, just use the mac80211 channel that
we filled with that information on startup.

Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-06-06 13:08:39 +02:00
Johannes Berg d9b9d940ac iwlwifi: use mac80211 channels for reset scan
Instead of iterating our own channel list,
use the mac80211 channel list since that's
already processed per band and thus makes
for less code.

Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-06-06 13:08:38 +02:00
Johannes Berg 9dc216d740 iwlwifi: trust mac80211 channel setting
mac80211 will never set, switch to, or scan on an
invalid channel, so remove the code to validate
the channels against the driver channel list.

Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-06-06 13:06:07 +02:00
Johannes Berg 7ad580c2e6 iwlwifi: use mac80211 channel in connection init
mac80211 guarantees that the channel pointer is
always valid, so we can use that instead of our
own channel list.

Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-06-06 13:05:39 +02:00
Johannes Berg aca86268fa iwlwifi: make a lot of functions static
A lot of functions were temporarily made non-static
for experimental work, make them static again now.

Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-06-06 13:05:08 +02:00
Ilan Peer 622a926823 iwlwifi: handle race condition in ROC flow
When a remain on channel request from mac80211 is followed by
a request to tx a mgmt frame offchannel, it is possible that
the remain on channel expires before the device reported the
tx status for the frame. This causes a race condition in
mac80211.

To fix this, delay the ROC notification to mac80211 until the
device reported the Tx status for all frames in the aux queue.

Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-06-06 13:03:54 +02:00
Ilan Peer e19ebcab01 iwlwifi: Check BSS ctx active before call mac80211
It is possible that the BSS context is not active (for example
when the current mode is set to GO), or that the vif->type is
different than station. In such a case we cannot
call mac80211 to report the average rssi for the interface
(the function assumes that the vif is valid and that the type
is station).

Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-06-06 13:03:25 +02:00
John Fastabend 43e95f11ac ixgbe: IXGBE_RXD_STAT_VP set even with Rx stripping enabled
The hardware bit IXGBE_RXD_STAT_VP appears to be set even when Rx
stripping is disabled. This results in passing frames up the stack
which do not have the 802.1Q tag stripped but have the tci bits
set as if it was.

Working around this with a check for the feature flag bit. I
would welcome any better ideas or a pointer to exactly which
bits in the hardware register need to be cleared to get the
IXGBE_RXD_STAT_VP bit to be set per data sheet.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Acked-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Marcus Dennis <marcusx.e.dennis@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-06-05 21:04:25 -07:00
John Fastabend 146d4cc98d ixgbe: fix_features rxvlan is independent of DCB and needs to be set
DCB can be used independent of if RX VLAN stripping is enabled
or disabled so remove erroneous check.

Also enable or disable VLAN stripping when features are applied so
hardware and feature flags are in sync.

CC: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Tested-by: Marcus Dennis <marcusx.e.dennis@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-06-05 21:00:31 -07:00
Bruce Allan 470a54207c e1000e: test for valid check_reset_block function pointer
commit 44abd5c127 introduced NULL pointer
dereferences when attempting to access the check_reset_block function
pointer on 8257x and 80003es2lan non-copper devices.

This fix should be applied back through 3.4.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-06-05 20:47:50 -07:00
Jan Ceuleers cbfc60717b gianfar_ethtool: coding style and whitespace cleanups
Signed-off-by: Jan Ceuleers <jan.ceuleers@computer.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-05 15:38:40 -07:00
Jan Ceuleers 3a2e16c816 gianfar: Remove superfluous initialisations
Signed-off-by: Jan Ceuleers <jan.ceuleers@computer.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-05 15:38:40 -07:00
Jan Ceuleers bc4598bc07 gianfar: various coding style and whitespace cleanups
Signed-off-by: Jan Ceuleers <jan.ceuleers@computer.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-05 15:38:40 -07:00
Jan Ceuleers 0977f817df gianfar: comment cleanup
Signed-off-by: Jan Ceuleers <jan.ceuleers@computer.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-05 15:38:40 -07:00
Jan Ceuleers 2281a0f334 gianfar: whitespace cleanup - pointers and multiplications
Signed-off-by: Jan Ceuleers <jan.ceuleers@computer.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-05 15:38:40 -07:00
Stanislav Yakovlev fdbfff7340 net/wireless: ipw2200: introduce ipw_read_eeprom function
We separate reading of device's eeprom content from writing it back
to the device's sram.

Signed-off-by: Stanislav Yakovlev <stas.yakovlev@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-05 17:15:49 -04:00
Avinash Patil 605b73af32 mwifiex: support NL80211_HIDDEN_SSID_ZERO_LEN for uAP
mwifiex uAP supports NL80211_HIDDEN_SSID_ZERO_LEN type of hidden
SSID only. NL80211_HIDDEN_SSID_ZERO_CONTENTS is not supported.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-05 17:15:47 -04:00
Avinash Patil aa4bbbe448 mwifiex: invalidate bss config before setting channel for uAP
Mark bss_config parameters as invalid before setting AP channel.
This prevents from setting invalid parameters while setting AP
channel to FW.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-05 17:15:45 -04:00
Johannes Berg aa430da410 cfg80211: provide channel to start_ap function
Instead of setting the channel first and then
starting the AP, let cfg80211 store the channel
and provide it as one of the AP settings.

This means that now you have to set the channel
before you can start an AP interface, but since
hostapd/wpa_supplicant always do that we're OK
with this change.

Alternatively, it's now possible to give the
channel as an attribute to the start-ap nl80211
command, overriding any preset channel.

Cc: Kalle Valo <kvalo@qca.qualcomm.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-05 15:32:16 -04:00
Meenakshi Venkataraman d38069d1e3 iwlwifi: add debugging to shadow registers and fix typo
Add a debugging log when using shadow
registers. Also fix a minor typo in this
connection.

Signed-off-by: Meenakshi Venkataraman <meenakshi.venkataraman@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-05 15:32:14 -04:00
Johannes Berg 20d3b64752 iwlwifi: clean up coding style in PCIe transport
Mostly clean up indentation around parentheses
after if, function calls, etc. and also a few
unneeded line breaks and some other things.

Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Reviewed-by: Wey-Yi W Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-05 15:32:14 -04:00
Johannes Berg ac91f91045 iwlwifi: move notification wait into core
This code is a library to be used by multiple
opmodes, so move it into the iwlwifi module.

Reviewed-by: Donald H Fry <donald.h.fry@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-05 15:32:14 -04:00
Don Fry cc5f7e3976 iwlwifi: implement dynamic opmode loading
This is the next step in splitting up the driver,
making the uCode API dependent pieces of it live
in separate modules. Right now there's only one
so it's not user-selectable, but we're actively
working on more.

Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Don Fry <donald.h.fry@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-05 15:32:13 -04:00
Johannes Berg c08ce20c7e iwlwifi: move IWL_CMD_FAILED_MSK
This is common, not uCode API specific, so move
it to the transport together with the command
header struct definition.

Reviewed-by: Meenakshi Venkataraman <meenakshi.venkataraman@intel.com>
Reviewed-by: Guy Cohen <guy.cohen@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-05 15:32:13 -04:00
Johannes Berg 76ed2edd5b iwlwifi: properly handle device_set_wakeup_enable
This is intended to be set whenever wakeup will be
needed upon suspend, not only when suspending, so
use the new callbacks to set it then.

Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-05 15:32:13 -04:00
Gregory Greenman ff110c8f93 iwlwifi: Move IWL_MASK macro to transport.
This macro is needed by other transports besides PCIe, thus
moving to a common location.

Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Reviewed-by: Wey-Yi W Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-05 15:32:12 -04:00
Emmanuel Grumbach eec373f026 iwlwifi: s/iwlagn_unmap_tfd/iwl_unmap_tfd
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Reviewed-by: Wey-Yi W Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-05 15:32:12 -04:00
Emmanuel Grumbach bc2529c337 iwlwifi: s/iwlagn_txq_free_tfd/iwl_txq_free_tfd
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Reviewed-by: Wey-Yi W Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-05 15:32:12 -04:00
Johannes Berg 142fb5b733 iwlwifi: add __printf argument checking
Joe Perches suggested adding the __printf attribute
to the __iwl_dbg function to check arguments; add it
to all of the logging functions (err, warn, info, dbg
and crit.)

Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-05 15:32:12 -04:00
Meenakshi Venkataraman a35e270881 iwlwifi: fix debug print in iwl_sta_calc_ht_flags
We missed passing an argument to the
debug print. Fix it.

Cc: stable@kernel.org
Signed-off-by: Meenakshi Venkataraman <meenakshi.venkataraman@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-05 15:32:11 -04:00
Emmanuel Grumbach 726f23fdeb iwlwifi: fix prints in iwl_rx_handle
The debug prints were wrong and buggy. The HW pointer wasn't printed
correctly, it was mixed up with the pointer to the rxbuf.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Reviewed-by: Wey-Yi W Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-05 15:32:11 -04:00
villacis@palosanto.com ccf91bd678 rt2x00: Add support for RT5360 based PCI devices.
This chip is used at least by the D-Link DWA-525 adapter.

Signed-off-by: Alex Villac<ED>s Lasso <a_villacis@palosanto.com>
Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-05 15:32:11 -04:00
Ben Greear b90bd9d14f ath9k: Support ethtool getstats api.
This returns many of the values that formerly could
only be obtained from debugfs.  This should be an
improvement when trying to access these counters
programatically.  Currently this support is only
enabled when DEBUGFS is enabled because otherwise
these stats are not accumulated.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-05 15:32:10 -04:00
Mohammed Shafi Shajakhan d25360b190 ath9k: Fix modal EEPROM dump
we provide excess buffer size for 'simple_read_from_buffer'
for modal EEPROM dump. This results in trailing NULL bytes
at the end of EEPROM dump, fix this.

Cc: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Reported-by: Holger Schurig <holgerschurig@googlemail.com>
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Tested-by: Holger Schurig <holgerschurig@gogglemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-05 15:23:20 -04:00
Dan Carpenter 1dacd1980d brcm80211: brcmu_pkt_buf_free_skb() should handle NULL
This is potentially called with NULL pointers, for example, look at
brcmf_c_prec_enq().  Since it's a free() function, probably people
expect it to handle NULL pointers.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-05 15:23:20 -04:00
Dan Carpenter 9be0292337 brcm80211: remove an unneeded NULL check
This code causes a static checker warning because "pi" gets dereferenced
before it is checked.  The dereference is inside the write_phy_reg()
function which is called from wlc_phy_write_txmacreg_nphy().

This code is only called from wlc_phy_init_nphy() and "pi" is a
valid pointer so we can remove the check for NULL.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-05 15:23:20 -04:00
Albert Pool 8fd9d059af rt2800usb: 2001:3c17 is an RT3370 device
D-Link DWA-123 rev A1

Signed-off-by: Albert Pool<albertpool@solcon.nl>
Cc: <stable@vger.kernel.org>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-05 15:23:20 -04:00
Daniel Vetter cb05d8dede drm/i915: fix up ivb plane 3 pageflips
Or at least plug another gapping hole. Apparrently hw desingers only
moved the bit field, but did not bother ot re-enumerate the planes
when adding support for a 3rd pipe.

Discovered by i-g-t/flip_test.

This may or may not fix the reference bugzilla, because that one
smells like we have still larger fish to fry.

v2: Fixup the impossible case to catch programming errors, noticed by
Chris Wilson.

References: https://bugs.freedesktop.org/show_bug.cgi?id=50069
Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
Tested-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
Eugeni Dodonov <eugeni.dodonov@intel.com>
Cc: stable@vger.kernel.org
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-06-05 21:05:21 +02:00
Linus Torvalds 5f73639c63 Merge branch '3.5-merge-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending
Pull two scsi target fixes from Nicholas Bellinger:
 "The first is a small name-space collision fix from Stefan for the new
  sbp-target / ieee-1394 code, and second is the FILEIO backend
  conversion patch to always use O_DSYNC by default instead of O_SYNC as
  recommended by hch.  Note the latter is CC'ed stable."

* '3.5-merge-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending:
  target/file: Use O_DSYNC by default for FILEIO backends
  sbp-target: rename a variable to avoid name clash
2012-06-05 11:55:27 -07:00
Johannes Berg 0e1fa7ef25 iwlwifi: unregister LEDs if mac80211 registration fails
Otherwise the LEDs stick around and cause issues the
next time around since they're still there but not
really hooked up.

Cc: stable@kernel.org
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-05 14:27:30 -04:00
Johannes Berg f69a23b795 iwlwifi: fix double free/complete in firmware loading
Linus reported that due to mac80211 failing to register
the device (due to WoWLAN) his machine crashed etc. as
we double-freed the vmalloc() firmware area. His patch
to fix it was very similar to this one but I noticed
that there's another bug in the area: we complete the
completion before starting, so since we're running in
a work struct context stop() could be called while in
the middle of start() which will almost certainly lead
to issues.

Make a modification similar to his to avoid the double-
free but also move the completion to another spot so it
is only done after start() either finished or failed so
that stop() can have a consistent state.

Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-06-05 14:27:29 -04:00
Linus Torvalds 690efa08e2 Merge branch 'i2c-embedded/for-current' of git://git.pengutronix.de/git/wsa/linux
Pull embedded i2c update from Wolfram Sang:
 "This only contains one new driver which had multiple dependencies
  (pinctrl, i2c-mux-rework, new devm_* functions), so I decided to wait
  for rc1.  Plus, it had to wait a little for the ack of a devicetree
  maintainer since the bindings were not trivial enough for me to pass
  through.

  So, given that, I hope there is still something like the "new driver
  rule", so we could have the driver in 3.5 and people can start using
  it.  That would make merging support for some boards easier for 3.6
  since the dependency on this driver is gone then."

* 'i2c-embedded/for-current' of git://git.pengutronix.de/git/wsa/linux:
  i2c: Add generic I2C multiplexer using pinctrl API
2012-06-05 10:55:31 -07:00
Victor Goldenshtein a4203c6453 wlcore: wait for roc complete only for the first roc command
In some multi role scenarios the driver might send multi
roc requests without sending a croc first, the fw queues
those requests and starts service the next roc request as
soon as the driver sends a croc for the previous one. So,
if the fw rocs on channel X and driver asks to roc also
on channel Y, the fw will not start service Y (and will
not send roc complete event for this request) until the
driver releases the fw with croc X.

Signed-off-by: Victor Goldenshtein <victorg@ti.com>
Signed-off-by: Igal Chernobelsky <igalc@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-05 20:24:32 +03:00
Victor Goldenshtein e832837bbb wlcore: don't enable BET for high basic rates
The beacon early termination is not relevant for
high basic rates, which doesn't contribute
anything to the PS and only adds unnecessary FW
work.

Enable BET only if the basic rate is less than 9
Mbps.

Signed-off-by: Ziv Riesel <zivriesel@ti.com>
Signed-off-by: Victor Goldenshtein <victorg@ti.com>
Signed-off-by: Igal Chernobelsky <igalc@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-05 20:24:32 +03:00
Victor Goldenshtein 461b958fd6 wl18xx: fix fm_coex parameters configuration
Wrong fm_coex parameters were set during wl18xx
init phase, fix it.

Signed-off-by: Ziv Riesel <zivriesel@ti.com>
Signed-off-by: Victor Goldenshtein <victorg@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-05 20:24:32 +03:00
Victor Goldenshtein 836d3f2058 wl12xx: fix fm_coex parameters configuration
Wrong fm_coex parameters were set during wl12xx
init phase, fix it.

Signed-off-by: Ziv Riesel <zivriesel@ti.com>
Signed-off-by: Victor Goldenshtein <victorg@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-05 20:24:32 +03:00
Arik Nemtsov 5a344b87ce wlcore: remove duplicate BUG_ON during recovery
This BUG_ON also ignored the INTENDED_FW_RECOVERY flag. This would
result in a BUG() when using the bug_on_recovery module parameter during
multi-role.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-05 20:24:31 +03:00
Eliad Peller 0c21298435 wlcore: increase WL1271_EVENT_TIMEOUT
In some cases, the ROC_COMPLETE event might exceed the
current timeout (750 msec). Increase it to 1 sec.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-05 20:24:31 +03:00
Eliad Peller d1bcb53f91 wlcore: flush tx on CHANGE_CHANNEL
On CHANGE_CHANNEL indication, we should flush all the
queued tx frames, so they will be sent on the correct
(current) channel.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-05 20:24:31 +03:00
Yoni Divinsky feb47eb86b wlcore: fix the CONF_TX_AC_ANY_TID to be 0xff
In the enum conf_tx_ac CONF_TX_AC_ANY_TID should
be 0xff to match the firmware's implementation.

Signed-off-by: Yoni Divinsky <yoni.divinsky@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-05 20:24:31 +03:00
Yoni Divinsky 4a6c789b73 wl12xx: set the irq polarity before loading the fw
The polarity should be set before the firmware is loaded
since the firmware touches the same register. Access
of the firmware and driver to the same register will
cause a collision since there is no exclusion scheme.

Signed-off-by: Yoni Divinsky <yoni.divinsky@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-05 20:24:31 +03:00
Yoni Divinsky 2e42c203a9 wlcore: use psd_type indexing according to spec
In ieee80211.h the uapsd bit mask is defined such that
VO=BIT(0), VI=BIT(1), BK=BIT(2), BE=BIT(3).
The firmware uses the indexing as defined in the ieee80211
spec, meaning that VO=3, VI=2, BK=1, BE=0.

In AP mode when adding peer wlcore needs to convert
the indexing accordingly.

Signed-off-by: Yoni Divinsky <yoni.divinsky@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-05 20:24:31 +03:00
Eliad Peller bfb92ca133 wlcore: set wl->ht_cap per-band
Save the ht_cap IE per-band, so we can configure different
params to BG and A bands (we currently don't support MIMO
on A band)

[Small fix for rx_highest - Arik]

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-05 17:16:09 +03:00
Arik Nemtsov a121a5b8ab wl18xx: add dependency on mac80211
Add a dependency on mac80211 in Kconfig, and also replace some spaces
with tabs.

Reported-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-05 17:16:09 +03:00
Assaf Azulay 0a15d9b589 wlcore: increase number of BA sessions to 3
With the new FW (sigle role X.3.8.0.108, multi role X.5.4.0.21)
we are supporting 3 RX BA sessions, this change is to support this
new ability.

Signed-off-by: Assaf Azulay <assaf@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-05 17:16:08 +03:00
Igal Chernobelsky 7b052214e5 wlcore: modify bss loss parameters
Modify default parameters to reduce firmware BSS lose
probability in congested environment.

[Applied to 18xx configuration as well - Arik]

Signed-off-by: Igal Chernobelsky <igalc@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-05 17:16:08 +03:00
Eliad Peller b515d83a29 wlcore: flush before stopping AP
Make sure the deauth bcast gets sent

[Make sure we are AP as well before the flush - Arik]

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-05 17:16:08 +03:00
Eliad Peller 45b60f7ddd wlcore: use correct link for bcast/multicast frames
Multicast management frames (e.g. global deauth)
should be sent out on the bcast link, rather than
the global, which should be used only for pre-added
stations (e.g. for auth/assoc resp).

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Eyal Shapira <eyal@wizery.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-05 17:16:08 +03:00
Arik Nemtsov 6b8bf5bc5e wlcore: fixes for connection_loss_work
We can't use cancel_delayed_work_sync() from functions that take the
wl->mutex, since connection_loss_work also takes the mutex. This might
result in a deadlock. Restructure the code so the work is synchronously
canceled before taking the mutex.
Avoid a bug where we would indefinitely delay the connection loss
indication by re-queuing the connection loss work on consecutive beacon
loss events.

Cc: bartosz.markowski <bartosz.markowski@tieto.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-05 17:16:08 +03:00
Arik Nemtsov 6e066921b3 wlcore: fix dynamic_ps_timeout time regression
In patch d7b63b9fc7 we have raised the dynamic
PS timeout to 200ms to improve user experience. Re-apply the change,
since it was reverted in the wlcore split.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-05 17:16:08 +03:00
Eliad Peller 1ab0f21262 wlcore: use the original elp time in forced_ps mode
The dynamic PS timeout is meaningless in forced PS mode.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-05 17:16:08 +03:00
Arik Nemtsov d35dc739f6 wlcore: fix sparse warnings related to static functions
The "static" modifier was mistakenly forgotten for some functions.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-05 17:16:08 +03:00
Alex Deucher d430f7dbf7 drm/radeon/kms: add new Trinity PCI ids
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-06-05 15:11:09 +01:00
Luciano Coelho b5d6d9b28c wlcore/wl12xx/wl18xx: don't use TX align quirk for wl127x
Commit 4afc37 (wlcore: reorder identify_chip and get_hw_info) broke
support for wl127x chips.

When we moved the identify_chip operation to an earlier stage (ie. to
the probe function), we broke wl127x support because during HW init we
would set the WLCORE_QUIRK_TX_BLOCKSIZE_ALIGN.

To avoid this, set this quirk in the identify_chip operations and only
force it to be unset if the bus module doesn't support it.  We were
doing the opposite and setting the flag if the bus module supports it.

Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-05 16:07:16 +03:00
Assaf Azulay 3d62eb5a7e wl18xx: change default tcp_checksum to false
as tcp check sum is going to be removed from firmware, and as
there is a problem with getting dns in security when checksum is
enabled, it was decided to disable it by default.
for none security modes it can be enabled by module paramenter.

Signed-off-by: Assaf Azulay <assaf@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-05 15:59:41 +03:00
Luciano Coelho c5d94169e8 wl18xx: use new fw stats structures
Some of the structures were updated, other structures had a few
missing values and a few new ones were added.  Change the driver
structs accordingly.

Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
2012-06-05 15:59:10 +03:00
Luciano Coelho 3507efa084 wl18xx: increase tx_ba_win_size to 64
Now the firmware can support TX block ack sessions with 64 frames.

Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
2012-06-05 15:59:06 +03:00
Luciano Coelho 5a7589be34 wlcore: increase aggregation buffer size by one page
With 4 pages (16Kb), we can't fit 10 frames in the aggregation buffer
during iperf.  This is the optimal for the firmware.  Thus, increase
the buffer size by one page.

Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
2012-06-05 15:59:02 +03:00
Luciano Coelho ad62d81a9e wlcore/wl12xx/wl18xx: move lower driver debugfs to a subdir
Instead of adding more files from the lower drivers into the same
directory in debugfs as wlcore, we now add a subdirectory for the
lower driver.  This makes things a bit easier, because we can quickly
see where the debugfs entry is implemented and what is specific to the
lower driver.

Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
2012-06-05 15:58:59 +03:00
Luciano Coelho 7b03c306da wl18xx: export pwr_limit_reference_11_abg value as a module parameter
Yet another temporary module parameter requested by the firmware team.
This will be replaced by the conf binary.

Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
2012-06-05 15:58:54 +03:00
Luciano Coelho 858403ab44 wl18xx: export low/high band component values as module params
We use hardcoded values for the different board types.  In some cases
we may need to override the defaults, so export the values as module
params.  If not defined, the defaults for the specified board type
will be used.

Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
2012-06-05 15:58:51 +03:00
Luciano Coelho 5add82edd1 wl18xx: add power limit reference value to mac_and_phy settings
With more recent PHY firmware versions (>8.1.0.0.116), we need to use
the correct value for the pwr_limit_reference_11_abg parameter when
setting the mac_and_phy options.

For now we use a hardcoded 0xc8 as the value.  This will be moved to
the configuration binary when it gets implemented.

Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
2012-06-05 15:58:46 +03:00
Luciano Coelho 8334271882 wl18xx: add module parameter to force SISO 20MHz
In some cases it may be useful to force narrow-band SISO channels.
Add a new value to the ht_mode module parameter to force the device to
operate in SISO 20MHz.

Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
2012-06-05 15:58:42 +03:00
Luciano Coelho 60462b4885 wlcore: use proper values for supported local rates
We were setting all the rates bits when starting the AP role.  Instead
of doing this, we should set only the rates we really support
(eg. MIMO rates or wide-channel rates).  This commit changes that so
that we always use the default rates (basic rates + MCS0-7) and add
the values returned by the ap_get_mimo_wide_rate_mask operation.

Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
2012-06-05 15:58:36 +03:00
Luciano Coelho 174a73034c wl18xx: don't use MIMO when ht_mode is set to wide
If the wl18xx module is loaded with ht_mode=wide (the default), we
shouldn't use MIMO rates when the channel type is not HT40.  Fix this
by checking the ht_mode before deciding which rates to used.
Additionally, set the ht_mode parameter explicitly to "wide" as the
default.

Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
2012-06-05 15:58:32 +03:00
Luciano Coelho 06bba80e71 wlcore: print the interrupt status when recovery is triggered
In some cases it may be useful for debugging to check what is the
status of the interrupt register when a hardware recovery happens.
Print the contents of REG_INTERRUPT_NO_CLEAR (aka. HINT_STS_RAW) when
recovery starts.

Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
2012-06-05 15:58:28 +03:00
Luciano Coelho 283e8c425f wl18xx: print the PHY firmware version from the private static data
The wl18xx firmware writes the PHY firmware version in the static
data.  Add an operation to parse the static data and print the PHY
firmware version when booting.

Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
2012-06-05 15:58:24 +03:00
Luciano Coelho 7140df6e51 wlcore: create private static_data area and add operation to parse it
The wl18xx firmware has more information in the static_data than
wl12xx.  To be able to parse that in an abstracted way, this patch
adds a priv area to the static data struct and an operation that
allows the lower driver to parse it if necessary.

Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
2012-06-05 15:58:20 +03:00
Luciano Coelho 8c0ea1021c wl18xx: implement fw status debugfs entries
Implement the operations that are necessary to fetch the
wl18xx-specific FW statistics and export them in debugfs.

Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
2012-06-05 15:58:16 +03:00
Luciano Coelho 10b1e8a27a wl12xx: implement fw status debugfs entries
Implement the operations that are necessary to fetch the
wl12xx-specific FW statistics.  Re-add some of the code removed from
wlcore.

Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
2012-06-05 15:58:12 +03:00
Luciano Coelho bcca1bbdd4 wlcore: add debugfs macro to help print fw statistics arrays
Add a macro to make it easy to print arrays from the FW statistics
array in debugfs.  At the same time, increase the buffer size so
arrays fit more easily.

Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
2012-06-05 15:58:08 +03:00
Luciano Coelho 4987257c30 wlcore: abstract debugfs fw_stats to be handled by the lower drivers
The FW statistics differ from hardware to hardware.  This commit
prepares for hardware-specific implementation of the FW statistics
debugfs entries.

Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
2012-06-05 15:58:02 +03:00
Luciano Coelho 15e05bc059 wlcore: use all AP basic rates as default
Sometimes we get a BSS_CHANGED_BEACON_ENABLED event before the basic
rates have been properly set.  To avoid problems with the firmware not
expecting to receive frames at rates that are not set during
CMD_START_ROLE, we now start with all basic rates by default.

Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
2012-06-05 15:57:58 +03:00
Luciano Coelho 62c2e579e0 wlcore: update beacon and probe_resp templates when rates change
When the data rates change, we get BSS_CHANGED_BASIC_RATES.  At this
point, we should update all the templates to match the new rates.  We
were changing some of the templates, but the beacon and the probe
response templates were missing.

[Remove redundant min_rate variable - Arik]

Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
2012-06-05 15:57:50 +03:00
Luciano Coelho 7ae25da396 wl18xx: disable MCS_13 for wl18xx PG 1.0
There are some problems with MCS_13 in PG 1.0 hardware.  So we disable
it when PG 1.0 is detected.

Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
2012-06-05 15:57:45 +03:00
Luciano Coelho 4afc37a0c1 wlcore: reorder identify_chip and get_hw_info
We can do get the HW information and identify the chip already at
probe time.  This makes it easier to mangle with the parameters during
identify chip before registering the hardware with mac80211.

Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
2012-06-05 15:57:41 +03:00
Luciano Coelho 73d8a42464 wl18xx: change low_band_component_type value for COM8
Like HDK, COM8 uses 0x06 for the low_band_component_type as well.
Hardcode the value for COM8 until this configuration can be done in
the external configuration binary (to be implemented).

Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
2012-06-05 15:57:36 +03:00
Luciano Coelho 4f64a1e93f wlcore: add space for private area when allocating fw_status
When allocating the fw_status structure, the space for the
lower-driver private area was missing.  This was causing an illegal
write outside the allocated area, which was causing random oopses
around the kernel.

Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
2012-06-05 15:57:32 +03:00
Luciano Coelho 4b9d2365d5 wl18xx: changed default board_type to HDK
Since the most common board we're using now is an HDK board, change
the default board_type to hdk.

Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
2012-06-05 15:57:27 +03:00
Luciano Coelho 776f030aa0 wl18xx: copy the default configuration before checking the board_type
We were changing the low_band_component_type in the private
configuration structure before copying the default values to it, so
the change was overwritten and only took effect after HW recovery.

Reported-by: Dror Erez <drorer@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
2012-06-05 15:57:20 +03:00
Luciano Coelho df472894ab wlcore: add module parameter to dump SDIO reads and writes
In some cases we may want to dump all the SDIO data in order to get
detailed information for debugging the communication with the
firmware.

Add printks to dump the data and a module parameter to enable/disable
it.

Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
2012-06-05 15:57:15 +03:00
Luciano Coelho 1ddbc7d4c7 wl18xx: add a module parameter to control 11a support
In wl18xx we don't have an NVS yet, so we need to control whether 11a
is supported with a module parameter for now.  11a support is enabled
by default and can be changed by setting enable_11a to false when
loading the module.

Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
2012-06-05 15:57:11 +03:00
Luciano Coelho a5114d9c0d wl18xx: derive the MAC address from the BD_ADDR in fuse ROM
Add the get_mac operation in order to fetch the BD_ADDR from fuse ROM,
so that we can derive the WLAN MAC addresses from it.

Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
2012-06-05 15:57:06 +03:00
Arik Nemtsov 0afd04e5e5 wlcore/wl12xx/18xx: split fw_status struct into two
The number of RX packet descriptors may vary from chip to chip and
in different firmware versions.  Unfortunately, the array that
contains the actual descriptors is in the middle of the fw_status
structure.  To manage this, we split the struct into two so we can
calculate the offset of what comes after the array and access the last
elements more easily.

[Changed the STATUS_LEN macro to be placement agnostic - Arik]

Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
2012-06-05 15:56:58 +03:00
Luciano Coelho 102165c6d2 wl18xx: add module parameter to disable TCP checksum
Add a new module parameter to disable TCP checksum offload.

Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
2012-06-05 15:56:53 +03:00
Luciano Coelho e9258815a8 wl18xx: add number of antennas and dc2dc type as module params
We need to specify the number of 2.4GHz and 5GHz antennas and whether
the board has an internal or external DC2DC.  Add some module
parameters that allow changing that.

In the future this will come from the "NVS" file.

Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
2012-06-05 15:56:48 +03:00
Luciano Coelho 0a1569f82b wl18xx: change the low_band_component_type for HDK boards
Currently, all HDK boards use low_band_component_type 0x06.  In the
future this may change, but for now, we hardcode this value when the
board_type is set to HDK.

Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
2012-06-05 15:56:43 +03:00
Luciano Coelho be42aee6df wl18xx: add plt_init operation
Add the correct FW name for PLT (which is the same as the normal
firmware) and implement the plt_init operation.

Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
2012-06-05 15:56:39 +03:00
Luciano Coelho c331b344d5 wlcore/wl12xx: add plt_init op and move the code to wl12xx
PLT mode needs to be initialized differently for each chip.  This
patch adds an operation to init PLT and moves the existing PLT
initialization into the wl12xx driver.

Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
2012-06-05 15:56:33 +03:00
Arik Nemtsov 05057c0621 wl18xx: change board type enum according to new FW
Add more board types and remove a now unneeded write to SCR_PAD2 setting
the board type.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-05 15:56:31 +03:00
Arik Nemtsov 2f1d74e6e7 wl18xx: don't upload NVS to FW
In this chip family the NVS file should not be uploaded to FW. In fact,
we encounter strange bugs (sdio errors) when trying to upload it with
certain parameters.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-05 15:56:29 +03:00
Arik Nemtsov f2baf075c5 wl18xx: init Tx-released index to 0 on HW init
This ensures the index is 0 on FW recovery and prevents spurious error
prints - "WARNING illegal id in tx completion".

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-05 15:56:27 +03:00
Luciano Coelho 4b4887e971 wlcore/wl12xx: move rx_mem_pool_addr element to wl12xx
Only wl127x chips use the rx_mem_pool_addr values, which need to be
given to the firmware as part of the RX path.  Move this from core to
the wl12xx driver.

Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
2012-06-05 15:56:22 +03:00
Arik Nemtsov 549562946f wl18xx: implement hw op to read PG version
Read the HW PG version of the 18xx chip from FUSE.

Based on an earlier patch by Luciano Coelho <coelho@ti.com>.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-05 15:56:20 +03:00
Luciano Coelho a5d751bb92 wlcore/wl12xx: move ref_clock and tcxo_clock elements to wl12xx
Only wl12xx needs to get the ref_clock anc tcxo_clock values from the
platform data.  Move these elements from the wl1271 structure to
wl12xx's private data.

Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
2012-06-05 15:56:15 +03:00
Luciano Coelho 8388569a34 wlcore: rename wl12xx.h to wlcore_i.h
The wl12xx.h file now contains mostly definitions that are internal to
wlcore.  Still, some things need to me moved to the public header, so
for now we keep including it in wlcore.h.

Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
2012-06-05 15:56:10 +03:00
Luciano Coelho be65202a61 wl18xx: read clock frequency and do top init accordingly
Instead of using hardcoded values for a single frequency, we need to
read the frequency and use the appropriate values for it in the top
initialization.

Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
2012-06-05 15:56:03 +03:00
Arik Nemtsov d9fedea2a3 wl18xx: disable FW log functionality
Currently (Fw .67) appears to do more harm than good.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-05 15:56:01 +03:00
Arik Nemtsov 1c351da667 wl18xx: read FW pc on recovery
Define the FW pc in the 18xx register translation table. This specific
register is only valid in the boot partition, so change the momentarily
change partitions. This doesn't damage 12xx cards, where the FW pc is
accessible via boot partition as well.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-05 15:55:58 +03:00
Luciano Coelho d5b592764f wl18xx: translate and write the board type to SCR_PAD2
The firmware uses the SCR_PAD2 register to read the board type passed
from the driver.  The values don't match the ones used in the mac and
phy configuration, so we need to map them before writing.  This commit
adds a translation table that is used when writing the board type to
SCR_PAD2.

Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
2012-06-05 15:55:53 +03:00
Luciano Coelho a9c130d522 wl18xx: add board type module argument
Different board types (ie. FPGA, HDK and DVP/EVB) require slightly
different init configuration options.  Since we cannot probe the type
of board from the actual hardware, we need to pass it as an option
during module load.

This patch adds a module parameters that accepts the 3 different board
types, with DVP/EVB as the default, and uses this value where needed.

Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
2012-06-05 15:55:47 +03:00
Arik Nemtsov 3a8ddb6176 wl18xx: add module param for overriding HT caps
Set an alternate HT cap allowing MIMO rates (but only 20mhz) channels,
when the module is loaded with ht_mode=mimo.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-05 15:55:45 +03:00
Arik Nemtsov 0e0f5a3b5c wl18xx: set HT capabilities
Define the default HT capabilities of the 18xx chip family - these include
support for wide-channel.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-05 15:55:43 +03:00
Arik Nemtsov ebc7e57ddd wlcore/wl18xx: enable MIMO/wide-chan rates in AP-mode rate config
Add a HW op to add extra enabled rates for AP-mode data-rates. Since
the rates might depend on channel properties, reconfigure AP-mode rates
when these change.

Implement the HW op for the 18xx family, where MIMO or wide-chan rates
can be added.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-05 15:55:41 +03:00
Arik Nemtsov b3a47ee0ec wlcore: support peer MIMO rates
Parse the peer ht_cap element containing MCS8-MCS15 rates and pass it
to the FW. Rates unsupported by the HW will be sanitized by mac80211
before reaching us.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-05 15:55:40 +03:00
Arik Nemtsov f13af3484f wl18xx: ipmlement ap_rate_mask hw op
Enable wide-chan or MIMO rates when appropriate.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-05 15:55:38 +03:00
Arik Nemtsov a6298dbe95 wl18xx: send channel type to FW on role start
Translate the NL80211 channel type to a FW-specific channel type and send
it to the FW as part of the role-start command. For wl12xx this has no
effect - this element is treated as padding.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-05 15:55:33 +03:00
Arik Nemtsov 83d08d3ff3 wlcore: track current channel type per vif
Track the current 802.11 channel type, defaulting to a NO_HT channel.
Update the channel type element when changed by mac80211.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-05 15:55:31 +03:00
Luciano Coelho 23ee9bf8c3 wl18xx: add runtime configuration parameters
Now wlcore requires the lower drivers to set the correct
configuration.  Move the existing private configuration to the proper
place and add all generic configuration parameters.

The important changes are in Tx interrupt pacing and Rx BA window size.

Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
2012-06-05 15:55:25 +03:00
Arik Nemtsov 169da04f52 wlcore/wl18xx: add hw op for Rx HW checksum
Some chip families can checksum certain classes of Rx packets in FW.
Implement the Rx-checksum feature as a HW-op. For the 18xx chip-family,
set Rx-checsum according to indication from FW.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-05 15:55:23 +03:00
Arik Nemtsov 2fc28de598 wlcore/wl18xx: add hw op for setting Tx HW checksum
Some chip families are capable of checksumming certain classes of Tx
packets in HW. Indicate this fact in the netdev features and perform the
HW checksum by protocol type for the 18xx family.

Fix the location of the skb network header when we move it so we can
rely on it when setting the checksum.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-06-05 15:55:20 +03:00