Commit graph

3298 commits

Author SHA1 Message Date
Wey-Yi Guy 07d3c15acc iwlwifi: modify #ifdef to avoid sparse complain
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-05-08 21:53:43 -04:00
Emmanuel Grumbach 8b5bed90a5 iwlwifi: don't init trans->reg_lock from the op_mode
This doesn't make any sense. Init it from the transport instead.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-05-08 20:56:09 -04:00
Stanislaw Gruszka f6b1154678 iwlwifi: add option to disable 5GHz band
There are various problems happened on 5GHz band not observed on
2.4 GHz (microcode errors, queue stuck, etc... ) . Also roaming
between 5GHz AP and 2GHz does not work very well. To workaround
the problems add option to disable 5GHz support. This will help
on environments where APs are dual-band, and devices will not try
to associate on band where issues happen.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-05-08 20:56:09 -04:00
Emmanuel Grumbach c15797e6af iwlwifi: use IWL_* instead of dev_printk when possible
Also remove a debug print when allocation error occurred.
The kernel will complain anyway.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-05-08 20:56:09 -04:00
Wey-Yi Guy 4d5ba61ca3 iwlwifi: add loose coex lut
Add the Loose coex LUT and will use later for better bt coex tpt

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-05-08 20:56:09 -04:00
Wey-Yi Guy 9dc4ca92aa iwlwifi: change kill mask based on reduce power state
In bt coex, consider reduce tx power as part of ack/cts kill mask

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-05-08 20:56:09 -04:00
Wey-Yi Guy 310fbfd985 iwlwifi: send reduce tx power info in command
Add the reduce tx power information in bt coex host command

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-05-08 20:56:08 -04:00
Wey-Yi Guy 7edae18490 iwlwifi: small define change
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-05-08 20:56:08 -04:00
Wey-Yi Guy 4aa79d91f0 iwlwifi: add reduced tx power threshold define
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-05-08 20:56:08 -04:00
Wey-Yi Guy 354ce4a4ca iwlwifi: add checking for the condition to reduce tx power
When bluetooth coex is active and certain condition matched,
driver need to decide should the tx power been reduce or not.
Adding the logic to manage it.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-05-08 20:56:08 -04:00
Wey-Yi Guy 9a00be04e6 iwlwifi: add BT reduced tx power flag
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-05-08 20:56:08 -04:00
Wey-Yi Guy a70453b5d0 iwlwifi: remove unused macros
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-05-08 20:56:08 -04:00
David S. Miller 0d6c4a2e46 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts:
	drivers/net/ethernet/intel/e1000e/param.c
	drivers/net/wireless/iwlwifi/iwl-agn-rx.c
	drivers/net/wireless/iwlwifi/iwl-trans-pcie-rx.c
	drivers/net/wireless/iwlwifi/iwl-trans.h

Resolved the iwlwifi conflict with mainline using 3-way diff posted
by John Linville and Stephen Rothwell.  In 'net' we added a bug
fix to make iwlwifi report a more accurate skb->truesize but this
conflicted with RX path changes that happened meanwhile in net-next.

In e1000e a conflict arose in the validation code for settings of
adapter->itr.  'net-next' had more sophisticated logic so that
logic was used.

Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-07 23:35:40 -04:00
Eric Dumazet ed90542b0c iwlwifi: fix skb truesize underestimation
By default, iwlwifi uses order-1 pages (8 KB) to store incoming frames,
but doesnt say so in skb->truesize.

This makes very possible to exhaust kernel memory since these skb evade
normal socket memory accounting.

As struct ieee80211_hdr is going to be pulled before calling IP stack,
there is no need to use dev_alloc_skb() to reserve NET_SKB_PAD bytes.
alloc_skb() is ok in this driver, allowing more tailroom.

Pull beginning of frame in skb header, in the hope we can reuse order-1
pages in the driver immediately for small frames and reduce their
truesize to the minimum (linear skbs)

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Cc: "John W. Linville" <linville@tuxdriver.com>
Cc: Neal Cardwell <ncardwell@google.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-05-03 10:52:30 -04:00
Wey-Yi Guy 1ed2ec37b4 iwlwifi: use 6000G2B for 6030 device series
"iwlwifi: use correct released ucode version" change
the ucode api ok from 6000G2 to 6000G2B, but it shall belong
to 6030 device series, not the 6005 device series. Fix it

Cc: stable@vger.kernel.org #3.3+
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-04-27 15:25:24 -04:00
John W. Linville d9b8ae6bd8 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem
Conflicts:
	drivers/net/wireless/iwlwifi/iwl-testmode.c
2012-04-26 15:03:48 -04:00
Meenakshi Venkataraman 78cbcf2b9d iwlwifi: use correct released ucode version
Report correctly the latest released version
of the iwlwifi firmware for all
iwlwifi-supported devices.

Cc: stable@vger.kernel.org #3.3+
Signed-off-by: Meenakshi Venkataraman <meenakshi.venkataraman@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-04-24 14:25:26 -04:00
Johannes Berg 5ef4acd58a iwlwifi: fix hardware queue programming
Newer devices have 20 (5000 series) or 30 (6000 series)
hardware queues, rather than the 16 that 4965 had. This
was added to the driver a long time ago, but improperly:
the queue registers for the higher queues aren't just
continuations of the registers for the first 16 queues,
they are in other places. Therefore, the hardware would
lock up when trying to activate queue 16 or above and
the device would have to be restarted.

Thanks goes to Emmanuel who identified this and told me
how the queue programming should be done.

Note that we don't use queues 20 and higher today and
doing so needs more work than this.

Cc: stable@vger.kernel.org
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>
2012-04-24 14:14:55 -04:00
Johannes Berg 1479177ba6 iwlwifi: use new mac80211 queue scheme
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-04-23 14:31:07 -07:00
Johannes Berg 65de7e84fd iwlwifi: clean up module parameters
For now at least, all module parameters should be
with the core functionality, so move them there,
while at it rename to iwlwifi_mod_params. Also
rename iwl-shared.h to iwl-modparams.h to reflect
the real contents.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-04-23 14:30:51 -07:00
Don Fry eb4887b6c6 iwlwifi: revert workaround to restore 1000 rx throughput
A workaround in commit c0486b7ccc5 resulted in a 40% drop in receive
throughput in order to fix a transmit problem.  The transmit problem
no longer occurs, so restore the receive throughput.

Signed-off-by: Don Fry <donald.h.fry@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-04-23 14:30:38 -07:00
Johannes Berg d1ff52536a iwlwifi: use direct calls for transport free
Since the transport allocates and frees itself in
the transport specific code, there's no need for
virtual functions for it. Remove the free method
and call the correct functions directly.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-04-23 14:30:29 -07:00
Johannes Berg 0db19cde17 iwlwifi: clean up some hw file includes
We can't get rid of everything yet due to
the BT definitions that I'm not quite sure
yet how to handle, but we can get rid of
most unneeded includes.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-04-23 14:30:16 -07:00
Johannes Berg 9fcf4ad4d6 iwlwifi: move OTP defines
Since the PCI core shouldn't include the
iwl-eeprom.h header file, move the OTP
definitions into iwl-agn-hw.h which can
be included.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-04-23 14:30:01 -07:00
Johannes Berg 61e98de820 iwlwifi: move antenna definitions to config
Since they're used in the config, they
should be declared in iwl-config.h.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-04-23 14:29:50 -07:00
Johannes Berg 586aed9660 iwlwifi: move eeprom versions to HW files
The hardware files belong to the core PCI
functionality, but the eeprom header file
mixes higher-level functionality and the
defines, so move out the specific defines
and put them into the appropriate HW files
instead.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-04-23 14:29:40 -07:00
Johannes Berg f1f80a8c3b iwlwifi: move watchdog definitions to config
Since they're used in the config, they
should be declared in iwl-config.h.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-04-23 14:29:28 -07:00
Johannes Berg 6c4e926297 iwlwifi: move PLCP defines to config
Since they're used in the config, they
should be declared in iwl-config.h.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-04-23 14:29:11 -07:00
Johannes Berg 825751027d iwlwifi: move driver defines to iwl-drv.h
These defines will have to be shared
between modules, but they seem better
placed in iwl-drv.h than iwl-shared.h.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-04-23 14:29:02 -07:00
Johannes Berg 24e4986283 iwlwifi: remove duplicate iwlagn_mod_params declaration
We only need one declaration, not multiple.
Keep the one in iwl-shared.h, which will
probably be renamed to iwl-modparams.h at
some point in the future.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-04-23 14:28:51 -07:00
Johannes Berg 56322f5e0d iwlwifi: remove TX/RX frame statistics
Keeping statistics per frame type really isn't
very useful, and needs a huge amount of code
so remove it. Since that is the only thing in
iwl-core.{c,h} now, those files can be killed.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-04-23 14:27:56 -07:00
Johannes Berg 063c51667f iwlwifi: remove traffic log
This is superseded by tracing and no longer needed.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-04-23 14:23:29 -07:00
Johannes Berg c98c8d9976 iwlwifi: move iwl_cmd_echo_test
The function can be static with the only user.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-04-23 14:23:17 -07:00
Johannes Berg ccc369a6b6 iwlwifi: move TIME_UNIT
We're getting rid of iwl-core.h, move TIME_UNIT out.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-04-23 14:23:04 -07:00
Johannes Berg 65aa2e5540 iwlwifi: remove bt_siso_mode declaration
That variable doesn't exist anywhere.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-04-23 14:22:08 -07:00
Wey-Yi Guy bb982e3af8 iwlwifi: include net/mac80211.h to avoid compiler error
without the include, kernel compiling will fail, but not compat.
this patch need to be merge with iwlwifi-clean-up-iwl-shared.h-includes.patch

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-04-23 14:21:53 -07:00
Johannes Berg 6238b00880 iwlwifi: clean up iwl-shared.h includes
That file is now holding just a few defines and
the module parameters, so it shouldn't include
anything. Make sure the right users include the
right files instead.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-04-23 14:21:38 -07:00
Johannes Berg 26470b075a iwlwifi: move iwl_have_debug_level
This function belongs into the debugging framework.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-04-23 14:21:24 -07:00
Johannes Berg 0e9f6aca34 iwlwifi: move debugfs registration function declarations
They clearly belong into iwl-agn.h as they have no
relation to the (generic) debug logging framework.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-04-23 14:20:39 -07:00
Johannes Berg f9e75447d9 iwlwifi: remove debugfs logspam
There really is no point in printing very verbose
error messages when somebody tries to access a
debugfs file before it is ready. Or even worse,
printing verbose messages when memory allocation
fails which *already* prints a huge warning.

Remove all IWL_ERR messages from debugfs.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-04-23 14:20:27 -07:00
Johannes Berg 9543c5f3d6 iwlwifi: properly set basic rates
This fixes a long-standing bug: iwlwifi always assumes
that the CCK ACK rates are 1 and 2 MBps and the OFDM
ACK rates are 6, 12 and 24 MBps. Fix this problem by
using the basic rates the AP (or in AP case hostapd)
told us to use and add the necessary mandatory rates
to the mix.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-04-23 14:20:13 -07:00
David Spinadel 647ad135e3 iwlwifi: Added debugfs calib disabled write
Added the option to disable calibration via debugfs.

Signed-off-by: David Spinadel <david.spinadel@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-04-23 14:20:00 -07:00
Emmanuel Grumbach 218733cf7d iwlwifi: provide proper API to disable all interrupts
Since the op_mode may go away, the transport needs to be able to
be told not to update the op_mode at all (even for RF kill).
Provide this API and use it in the proper places.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-04-23 14:19:47 -07:00
Emmanuel Grumbach d23f78e61f iwlwifi: check RF kill register when interrupts have been disabled
Since the interrupts have been disabled, we may have missed an RF
kill interrupt. Check the register to be sure the op_mode is in
sync.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-04-23 14:19:31 -07:00
Emmanuel Grumbach 226c02ca7f iwlwifi: enable RF kill interrupt in start_hw
The op_mode wants to know about changes in HW RF kill state.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-04-23 14:19:19 -07:00
Emmanuel Grumbach 8c46bb703b iwlwifi: first enable RF kill interrupt, then check register
This can solve a race (very unlikely to happen though).

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-04-23 14:19:06 -07:00
Emmanuel Grumbach 8d425517f1 iwlwifi: make a static inline to read the RF kill register
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-04-23 14:18:52 -07:00
Stanislaw Gruszka 8db4c7e25d iwlwifi: do not nulify ctx->vif on reset
ctx->vif is dereferenced in different part of iwlwifi code, so do not
nullify it.

This should address at least one of the possible reasons of WARNING at
iwlagn_mac_remove_interface, and perhaps some random crashes when
firmware reset is performed.

Cc: stable@vger.kernel.org
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-04-23 14:56:12 -04:00
David Spinadel a104104fd7 iwlwifi: Remove inconsistent and redundant declaration
Remove declaration of iwl_alloc_traffic_mem from iwl-agn.h,
from methods that was exposed to support MVM.

MVM doesn't have to use this declaration.

CC: netdev@vger.kernel.org
Signed-off-by: David Spinadel <david.spinadel@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-04-19 16:55:14 -04:00
John W. Linville 59ef43e681 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem
Conflicts:
	drivers/net/wireless/iwlwifi/iwl-testmode.c
	include/net/nfc/nfc.h
	net/nfc/netlink.c
	net/wireless/nl80211.c
2012-04-18 14:27:48 -04:00