Commit graph

48772 commits

Author SHA1 Message Date
Liad Kaufman c2a2b28bb7 iwlwifi: make hw rev checking more readable
Rather than ANDing with a mask - use existing macros, which
are more readable.

Signed-off-by: Liad Kaufman <liad.kaufman@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-09-14 12:56:39 +03:00
Emmanuel Grumbach 3a736bcb18 iwlwifi: trans: don't configure the set_active in SCD for dvm
This configuration is not needed for dvm, and it actually
broke it.

Reported-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-09-14 12:56:39 +03:00
Johannes Berg f7f89e7bae iwlwifi: mvm: disable aggregation queues in station DB in FW
When disabling aggregation, disable the queues in the station
DB in the firmware, otherwise we leave the tfd_queue_mask in
a wrong state after an aggregation session has been torn down.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-09-14 12:56:38 +03:00
Eyal Shapira f58220f6b9 iwlwifi: mvm: rs: don't zero tx stats after idle
Move the tx stats to the persistent area of lq_sta to
avoid them being zeroed out every time rs reinitializes
which happens after tx idle for 5 secs for example.
The automatic zeroing out made them difficult to use.

Signed-off-by: Eyal Shapira <eyalx.shapira@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-09-14 12:56:38 +03:00
Max Stepanov f3bd58f486 iwlwifi: mvm: add MVM_FW_MCAST_FILTER_PASS_ALL option
Add MVM_FW_MCAST_FILTER_PASS_ALL option to iwl-dbg-cfg.ini configuration file
to enable/disable FW multicast filtering.

Signed-off-by: Max Stepanov <Max.Stepanov@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-09-14 12:56:38 +03:00
Luciano Coelho a26d4e7b09 iwlwifi: mvm: fail temp test enabling if the ucode is not loaded
If the ucode is not loaded, don't allow the temperature test to be
started, but allow it to be changed or stopped if already running.

Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-09-14 12:56:38 +03:00
Luciano Coelho bc44886d26 iwlwifi: mvm: reset ucode_loaded flag when mac80211 stop is called
We rely on the value of the mvm->ucode_loaded flag to decide whether
or not we can perform certain operations (e.g. access to some debugfs
entries), so we need to reset it when the mac80211 stop operation is
called and the hardware is shutdown.

Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-09-14 12:56:38 +03:00
Eyal Shapira 2536e7c350 iwlwifi: mvm: rs: remove max_rate_idx
max_rate_idx constraint is deprecated and it's handling is
faulty as well as it is relevant only for legacy rates but
was considered in HT/VHT. In most cases there was no side effect
as max_rate_idx was set to -1 but in certain cases like P2P
it got set to an actual rate idx which would limit the maximum
rate in HT/VHT by mistake.
max_rate_idx should be replaced by the masks fields but for
now remove it.

Signed-off-by: Eyal Shapira <eyalx.shapira@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-09-14 12:56:37 +03:00
Eyal Shapira 099d8086a8 iwlwifi: enable LDPC in 8000 chip family
This chip family supports LDPC so enable it.

Signed-off-by: Eyal Shapira <eyalx.shapira@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-09-14 12:56:37 +03:00
Eran Harary 161bdb7780 iwlwifi: mvm: allow preventing dummy notifications
The firwmare now allows the driver to disable dummy
notifications. These notifications sent by the firmware
are an overhead for slow buses. They are still useful for
fast buses.
Add a hardware switch to prevent these notifications only
on devices that work on slow buses.

Signed-off-by: Eran <eran.harary@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-09-14 12:56:37 +03:00
Oren Givon d4200cb248 iwlwifi: add and edit 8000 series PCI IDs
Edit some 8000 series PCI IDs and add configuration to
Dual Band Wireless N 8260 devices.

Signed-off-by: Oren Givon <oren.givon@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-09-14 12:56:36 +03:00
Eyal Shapira a3576ff28e iwlwifi: mvm: add LDPC support
Use LDPC for Tx and publish support for Rx in case the chip
supports LDPC. Enable it for the 7265 family.

Signed-off-by: Eyal Shapira <eyalx.shapira@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-09-14 12:56:36 +03:00
Emmanuel Grumbach 71511c866b Merge remote-tracking branch 'iwlwifi-fixes/master' into NEXT 2014-09-14 12:54:42 +03:00
Sujith Manoharan 167bf96dd8 ath9k: Fix beacon miss handling
The NoA duration for a GO is half the beacon interval
and a concurrent context like a STA can be active only
for that duration, before switching back to the GO's
operating channel.

Currently, when multiple beacons are missed, the dwell
time for the STA context is extended to improve the
chances of receiving a beacon. But the NoA is not updated
and this will cause problems since the GO is offline
for a period that is longer than the advertised duration.

Fix this by ensuring that the NoA is updated first before
extending the time slot for the STA context. Also make
sure that non-periodic NoA is used for a one-time, longer
absence period.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-09-11 15:27:40 -04:00
Sujith Manoharan 4899827d39 ath9k: Fix channel switch time duration
Since the NoA duration is the maximum time the GO interface
can be offline, it needs to include the time take to
switch channels in the HW.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-09-11 15:27:39 -04:00
Sujith Manoharan 124130d766 ath9k: Clear offchannel duration properly
Clearing the offchannel duration value in the
scheduler unconditionally breaks NoA when
multiple contexts are active and an offchannel
request is deferred, for example, in a scan run.

Fix this by clearing the duration only if there
is no pending offchannel request.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-09-11 15:27:39 -04:00
Sujith Manoharan d0975edd59 ath9k: Fix Notice of Absence issues
* The index has to incremented only when advertising
  a new NoA schedule.

* Switch to non-periodic NoA when starting a scan operation
  and multiple channel contexts are active.

* Make sure that periodic NoA is advertised again when
  scan ends. Since the offchannel timer moves the offchannel
  state to IDLE after the GO operating channel becomes
  active, use a flag "force_noa_update" to update the
  NoA contents.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-09-11 15:27:39 -04:00
Sujith Manoharan cbc775db2e ath9k: Assign offchannel duration properly
In multi-channel mode, an offchannel request will
be deferred if both contexts are active. The duration
of the offchannel operation is calculated but is
not stored in the scheduler state. Fix this.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-09-11 15:27:39 -04:00
Vladimir Kondratiev 867fa0d49c wil6210: fix PTR_ERR() usage after initialization to constant
Reported by coccinelle:

tree:   git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next.git master
head:   6a5d088a92
commit: b7cde47009 [18/80] wil6210: convert debugfs to the table mode

coccinelle warnings: (new ones prefixed by >>)

>> drivers/net/wireless/ath/wil6210/debugfs.c:327:17-24: ERROR: PTR_ERR applied after initialization to constant on line 304

vim +327 drivers/net/wireless/ath/wil6210/debugfs.c

   298                                          struct dentry *dbg, void *base,
   299                                          const struct dbg_off * const tbl)
   300  {
   301          int i;
   302
   303          for (i = 0; tbl[i].name; i++) {

 > 304                  struct dentry *f = NULL;
   305
   306                  switch (tbl[i].type) {
   307                  case doff_u32:
   308                          f = debugfs_create_u32(tbl[i].name, tbl[i].mode, dbg,
   309                                                 base + tbl[i].off);
   310                          break;
   311                  case doff_x32:
   312                          f = debugfs_create_x32(tbl[i].name, tbl[i].mode, dbg,
   313                                                 base + tbl[i].off);
   314                          break;
   315                  case doff_ulong:
   316                          f = wil_debugfs_create_ulong(tbl[i].name, tbl[i].mode,
   317                                                       dbg, base + tbl[i].off);
   318                          break;
   319                  case doff_io32:
   320                          f = wil_debugfs_create_iomem_x32(tbl[i].name,
   321                                                           tbl[i].mode, dbg,
   322                                                           base + tbl[i].off);
   323                          break;
   324                  }
   325                  if (IS_ERR_OR_NULL(f))
   326                          wil_err(wil, "Create file \"%s\": err %ld\n",

 > 327                                  tbl[i].name, PTR_ERR(f));
   328          }
   329  }
   330

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-09-11 15:27:39 -04:00
Vladimir Kondratiev 73d839ae50 wil6210: fix for oops while stopping interface
When interface stopped while running intensive Rx traffic, the following oops
observed:

[89846.734683] Call trace:
[89846.737117] [<ffffffc00083aa64>] dev_gro_receive+0xac/0x358
[89846.742674] [<ffffffc00083ae94>] napi_gro_receive+0x24/0xa4
[89846.748251] [<ffffffbffc1c2f88>] $x+0xec/0x1f8 [wil6210]         wil_netif_rx_any
[89846.753547] [<ffffffbffc1c4830>] $x+0x34/0x54 [wil6210]          wil_release_reorder_frame
[89846.758755] [<ffffffbffc1c48ac>] wil_release_reorder_frames+0x5c/0x78 [wil6210]
[89846.766044] [<ffffffbffc1c4bf8>] wil_tid_ampdu_rx_free+0x20/0x48 [wil6210]
[89846.772901] [<ffffffbffc1bedc8>] $x+0x190/0x1e8 [wil6210]
[89846.778285] [<ffffffbffc1c0ed4>] wmi_event_worker+0x230/0x2f8 [wil6210]
[89846.784865] [<ffffffc0000b0bc8>] process_one_work+0x278/0x3fc
[89846.790591] [<ffffffc0000b1218>] worker_thread+0x200/0x330
[89846.796060] [<ffffffc0000b6664>] kthread+0xac/0xb8
[89846.800836] Code: b940c661 f9406a62 8b010041 f9400026 (f8636882)
[89846.807008] ---[ end trace d6fdc17cd27d18f6 ]---

Reason is the following: when removing Rx vring
(wil_netdev_ops.ndo_stop -> wil_stop -> wil_down -> __wil_down -> wil_rx_fini),
Rx interrupt occurs. It trigger Rx NAPI, calling wil_rx_handle() that reaps
(already cleaned) buffer, causing skb referring to garbage memory being set into reorder buffer.
Then, network stack trying to access this buffer and fails.

Prevent Rx NAPI from being scheduled if device going to stop. Bit wil_status_napi_en reflects
NAPI enablement state, check it when triggering Rx NAPI.

Testing shows that check for wil_status_napi_en sometimes gets negative, and new error message
get printed - in this case kernel oops would be observed. Original oops is no more reproducible.

This change requires also changes in the AP flows.
Properly enable/disable NAPI for the AP. Make sure Rx VRING is disabled
when resetting target.

For this, promote __wil_up() and __wil_down() to the module scope, and use it
in the relevant flows.

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-09-11 15:27:39 -04:00
Vladimir Kondratiev e4dbb093de wil6210: rename [en|dis]able irq to [un]mask
To better reflect real action performed, rename:
s/wil6210_disable_irq/wil_mask_irq/
s/wil6210_enable_irq/wil_unmask_irq/

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-09-11 15:27:39 -04:00
Vladimir Kondratiev d00a6367d2 wil6210: fix typo in comment
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-09-11 15:27:38 -04:00
Vladimir Kondratiev 77c91295ea wil6210: specify max. IE length
Expose firmware limit for the max_scan_ie_len;
also do actually set IE's for the probe request

max_scan_ie_len used to be 0, this blocks scan requests with non-zero IE's

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-09-11 15:27:38 -04:00
Dedy Lansky 595026472e wil6210: introduce separate completion for WMI
re-use of wmi_ready for both FW ready event and for wmi_call was causing
false "FW not ready" indication in case wmi_call() was invoked while reset
took place.
add wmi_call completion variable instead of re-using wmi_ready.

Signed-off-by: Dedy Lansky <qca_dlansky@qca.qualcomm.com>
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-09-11 15:27:38 -04:00
Vladimir Kondratiev e0106adade wil6210: enlarge TX/RX buffer length
HW supports upto 2304 packet size on the air.
HW is responsible for adding (Tx) or removing (Rx) the following headers:
802.11 hdr: 26B
SNAP: 8B
CRC: 4B
Security (optional): 24B
HW adds max 62B to the payload passed from driver. It means driver can use
max packet size of 2304-62 = 2242B

Signed-off-by: Dedy Lansky <qca_dlansky@qca.qualcomm.com>
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-09-11 15:27:38 -04:00
Vladimir Kondratiev 1bd922fce2 wil6210: add change_beacon() driver callback
This allows updating IEs (e.g. from hostapd) when AP is already started

Signed-off-by: Dedy Lansky <qca_dlansky@qca.qualcomm.com>
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-09-11 15:27:38 -04:00
Vladimir Kondratiev ac4acdb7af wil6210: send connect request IEs to FW also for non-secure connection
Driver is sending connect request IEs to FW only for secure connection and
ignores them for non-secure connection.
This is fixed by always sending the IEs to FW upon connect request

Signed-off-by: Dedy Lansky <qca_dlansky@qca.qualcomm.com>
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-09-11 15:27:38 -04:00
Dedy Lansky ec81b5adf4 wil6210: fix race condition between BACK event and Rx data
While handling Rx packet, BACK event arrives and frees tid_ampdu_rx array.
This causes kernel panic while accessing already freed spinlock

The fix is to remove tid_ampdu_rx[]'s spinlock and instead use single
sta's spinlock to guard the whole tid_ampdu_rx array.

Signed-off-by: Dedy Lansky <qca_dlansky@qca.qualcomm.com>
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-09-11 15:27:38 -04:00
Dedy Lansky 4cf99c93d2 wil6210: modify confusing printout
When WMI event received when driver not ready to accept it, the printed error
message is misleading and hints that HW is stuck. Modify the error message
to make it clearer

Signed-off-by: Dedy Lansky <qca_dlansky@qca.qualcomm.com>
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-09-11 15:27:37 -04:00
Dedy Lansky 8c86f757b1 wil6210: fix race condition of disconnect while BACK event
This race condition was causing double free of tid_ampdu_rx structures

Signed-off-by: Dedy Lansky <qca_dlansky@qca.qualcomm.com>
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-09-11 15:27:37 -04:00
Vladimir Kondratiev 871d8c4bbb wil6210: fix usage of print_hex_dump_debug
When CONFIG_DYNAMIC_DEBUG is not defined, print_hex_dump_debug
is mapped directly to print_hex_dump which might cause
printout to exist all the time

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-09-11 15:27:37 -04:00
Dedy Lansky f172b56309 wil6210: fix for memory corruption upon rmmod
Driver disabled PCI master before making sure HW is idle.
This caused memory corruption in case HW access system memory after
PCI master got disabled.
The fix is to change uninit sequence. Make sure FW/HW is idle before
disabling PCI

Signed-off-by: Dedy Lansky <qca_dlansky@qca.qualcomm.com>
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-09-11 15:27:37 -04:00
Dedy Lansky 6977805973 wil6210: fix for memory corruption while insmod
After setting interrupt handler, driver enabled interrupts.
This caused stale (old) HW interrupts to fire before driver is
fully initialized.
The fix is to enable interrupts only when driver is fully initialized
and after FW/HW reset (to prevent any stale interrupts)

Signed-off-by: Dedy Lansky <qca_dlansky@qca.qualcomm.com>
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-09-11 15:27:37 -04:00
Vladimir Kondratiev 9cf10d623e wil6210: add more debug printouts
added misc printouts in some init/uninit functions for better traceability

Signed-off-by: Dedy Lansky <qca_dlansky@qca.qualcomm.com>
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-09-11 15:27:37 -04:00
Vladimir Kondratiev f772ebfb94 wil6210: platform specific module
New module (wil_platform) for handling platform specific tasks

Signed-off-by: Dedy Lansky <qca_dlansky@qca.qualcomm.com>
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-09-11 15:27:37 -04:00
Vladimir Kondratiev 8fe596274d wil6210: coding style fixes
- parentheses, indentation, typos
- seq_puts() instead of seq_printf() with single argument
- sizeof(var) vs. sizeof(type)

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-09-11 15:27:36 -04:00
Vladimir Kondratiev 028e1836d3 wil6210: some more debug for the WMI mechanism
Log worker thread start/stop; as well as every handler invocation

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-09-11 15:27:36 -04:00
Vladimir Kondratiev 8ca26163e5 wil6210: print more information when connecting
when connecting, print some info about BSS

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-09-11 15:27:36 -04:00
Vladimir Kondratiev ef77285fc3 wil6210: debug prints for vring de-allocation
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-09-11 15:27:36 -04:00
Vladimir Kondratiev 151a970650 wil6210: firmware download
Firmware download implemented but is still experimental feature;
flag controlling it added, no_fw_load. It is true by default,
use no_fw_load=N to activate feature.

Reset flows also got some adjustment for the fw download to work

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-09-11 15:27:36 -04:00
Rafał Miłecki bc94450655 b43: HT-PHY: Set MAC frequency to correct values
I misunderstood original Broadcom comment and used wrong values.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-09-11 15:27:36 -04:00
Larry Finger dbb30ebeef rtlwifi: btcoexist: Fix "always true" warning from commit ed364abffd
The 0-DAY kernel build testing backend reports the following warning:
drivers/net/wireless/rtlwifi/btcoexist/halbtcoutsrc.c:516 halbtc_bitmask_write_1byte()
warn: always true condition '(bit_mask != 4294967295) => (0-255 != u32max)'

This problem was introduced in commit ed364abffd,
and arises because the caller of halbtc_bitmask_write_1byte() is using a
u8 rather than a u32 for the data.

Reported-by: Kbuild test robot <kbuild-all@01.org>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Kbuild test robot <kbuild-all@01.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-09-11 15:27:36 -04:00
Rafał Miłecki ea422b2c33 b43: HT-PHY: Complete radio init (add missing entries)
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-09-11 15:27:35 -04:00
Rafał Miłecki 28f051f554 b43: HT-PHY: Define some regs for 0x2059 radio
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-09-11 15:27:35 -04:00
Rafał Miłecki 5db4a37bec b43: HT-PHY: Move radio calibration to separated functions
Also use b43_radio_wait_value to simplify the code and usleep_range when
needed.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-09-11 15:27:35 -04:00
Rafał Miłecki 85e6c26fb6 b43: HT-PHY: Move radio preparation into init function
Radio should be prepared only before initialization. We need this to be
able to call b43_radio_2059_init conditionally (in the future).
This also documents RF control register a bit.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-09-11 15:27:35 -04:00
Hans Wennborg 4f4378dead rtlwifi: fix %d confusingly prefixed with 0x in format strings
Signed-off-by: Hans Wennborg <hans@hanshq.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-09-11 15:26:29 -04:00
Hans Wennborg 595a23fe15 iwl4965: fix %d confusingly prefixed with 0x in format string
Signed-off-by: Hans Wennborg <hans@hanshq.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-09-11 15:26:29 -04:00
Eliad Peller 0d8614b4b9 mac80211: replace SMPS hw flags with wiphy feature bits
Use the new static_smps / dynamic_smps feature bits
instead of mac80211-internal hw flags.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2014-09-11 13:37:02 +02:00
Sujith Manoharan 367b341edb ath9k: Fix MCC scanning
Scanning is curently broken when two channel contexts
are active. For example in a P2P-GO/STA setup, the
offchannel timer allows HZ / 10 to elapse before initiating
a switch to the next scan channel from the current operating
channel, which in this case would be the P2P-GO context.

But, the channel context timer might decide to switch
to the STA context when an SWBA comes early and a beacon
is sent out. Since pending offchannel requests are processed
in EVENT_BEACON_PREPARE, this causes inconsistent scanning.

Fix this by making sure that a context switch happens
before processing the pending offchannel request. This
also makes sure that active channel contexts will always
have higher priority than offchannel operations and the
scan sequence looks like this:

p2p-go, sta, p2p-go, offchannel, p2p-go, sta, p2p-go, offchannel,.....

The oper-channel is p2p-go, so the STA context has to
switch to p2p-go again before switching offchannel.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-09-09 15:27:22 -04:00
Sujith Manoharan da0162f3f0 ath9k: Fix offchannel operation
When multiple channel contexts are active, an offchannel
request will not be handled immediately, but will be
queued to be handled later. But, currently, the channel definition
is not copied to the local offchannel state. This
breaks operation like scanning when MCC is active.

Fix this by storing the offchannel parameters properly.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-09-09 15:27:22 -04:00
Sujith Manoharan a402764452 ath9k: Use a subroutine to assign HW queues
Reduces code duplication.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-09-09 15:27:22 -04:00
Sujith Manoharan ca529c9373 ath9k: Fix interface accounting
Currently, the interface count is maintained globally,
but this causes problems in RX filter calculation.
Make the interface count a per-channel-context variable
to fix this.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-09-09 15:27:21 -04:00
Sujith Manoharan fce3443099 ath9k: Fix RX filters in channel contexts
Maintain the RX filter on a per-channel-context
basis and not globally. Not doing so was resulting
in incorrect filter calculation.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-09-09 15:27:21 -04:00
Sujith Manoharan 3d1132d008 ath9k: Fix COMP_BAR filter
ATH9K_RX_FILTER_COMP_BAR is used to receive BAR
completion frames and is set if the current channel
is HT. When channel contexts are enabled, instead of using
the mac80211 helpers, check if the current channel
definition is HT.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-09-09 15:27:21 -04:00
Sujith Manoharan 19ec477f16 ath9k: Fix ath_startrecv()
Since ath_startrecv() doesn't return an error value,
cleanup the callsites.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-09-09 15:27:21 -04:00
Sujith Manoharan 9019f646b2 ath9k: Fix RX filter calculation
If multiple channel contexts are active, then the opmode
can be different in each context. Since the RX filter is
calculated in ath_startrecv() before switching to the
new opmode, the wrong filters are chosen.

Fix this by calling ath9k_calculate_summary_state() before
the RX module is started.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-09-09 15:27:21 -04:00
Sujith Manoharan fdcf1bd44f ath9k: Add CTWindow support
Since CTWindow can be used for improving discoverability,
fill this field in the NoA Attribute properly.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-09-09 15:27:21 -04:00
Sujith Manoharan bb628eb9f0 ath9k: Fix offchannel duration calculation
Currently, different units are used for handling
sc->offchannel.duration. In scan mode, it contains jiffies and in RoC
mode, milliseconds is used. This causes confusion since in
ath_chanctx_switch(), TU_TO_USEC is used to determine the offchannel
duration, resulting in incorrect values. Fix this by using jiffies in
both modes.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-09-09 15:27:20 -04:00
Sujith Manoharan bd81533dbd ath9k: Fix NoA start time calculation
The start time field in the NoA attribute needs to be
updated based on the TSF timer when an absence notification
is sent by the P2P GO. When two channel contexts are active,
continuous, cyclic NoA is announced by setting the count value to 255,
but the start time is updated only once, for one beacon and
the same value is sent in all subsequent beacons, even
though the timestamp keeps moving.

Fix this by removing the check for 'periodic_noa_duration'
and assign the interface's start_time/duration values directly
when there is more than one active context.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-09-09 15:27:20 -04:00
Sujith Manoharan 9bf30ff93d ath9k: Fix panic when adding an AP interface
If a station interface is already assigned to a context
and is active and a second interface of type AP is added,
then beaconing on the new interface has to be begin only
after the BSS_CHANGED_BEACON_ENABLED flag is sent by mac80211
to the driver.

But, since we issue ATH_CHANCTX_EVENT_ENABLE_MULTICHANNEL as soon
as a new channel context is added, a switch occurs almost immediately
before BSS_CHANGED_BEACON_ENABLED is received. When a HW reset
is done for the new context, beacons are enabled for the
interface since "enable_beacon" in the BSS config maintained
in mac80211 is true - but the driver hasn't been notified yet.
This causes a panic, since the beacon interval is zero for this
interface and ath9k_cmn_beacon_config_ap() doesn't have a safety check.

Fix this panic by checking if the beacon params has been cached
for this context and use the "enable_beacon" flag maintained
locally in the driver. Also, recalculate the summary data
after the beacon params have been cached when BSS_CHANGED_BEACON_ENABLED
is received.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-09-09 15:27:20 -04:00
Sujith Manoharan 602607b6e7 ath9k: Fix beacons for managed mode
If the current opmode is managed, the ATH_OP_BEACONS flag
needs to be set only when there is a primary station interface
and it is associated/active.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-09-09 15:27:20 -04:00
Sujith Manoharan 12a1b3d4c3 ath9k: Fix beacon configuration for channel contexts
In channel context mode, when a new context is added,
mac80211 issues a bss_info_changed() notfication when
preparing the connection for the new interface/context.

But, this is done prior to the mgd_prepare_tx() call which
is where we switch to the new context. Since the current
context will be different when the earlier bss_info_changed()
is handled, the beacon information for the VIF is not
updated, but discarded since the rules for the current context
disallows it.

In the subsequent association process for the new context/vif,
this becomes a problem because the beacon parameters are invalid.
This causes problems with the TSF timer, causing large jumps.

To fix this, check if the beacon info is being updated for a
different context and if so, allow it without any checks since
we limit the max. interfaces to two anyway.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-09-09 15:27:20 -04:00
Larry Finger ed364abffd rtlwifi: btcoexist: Update remaining old parts of the driver
This patch makes halbtcoutsrc.{c,h} work with the new pieces of the driver.
Also included are some modifications to various header files.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: troy_tan@realsil.com.cn
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-09-09 15:27:19 -04:00
Larry Finger c96fd200e9 rtlwifi: btcoexist: Add second part of BT coexistence routines for rtl8821ae
This code comes from the V062414 version of the drivers from Realtek.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: troy_tan@realsil.com.cn
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-09-09 15:27:19 -04:00
Larry Finger 2ec7f01c35 rtlwifi: btcoexist: Add BT coexistence routines for driver rtl8821ae
This patch adds the code needed for the new rtl8821ae driver.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: troy_tan@realsil.com.cn
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-09-09 15:27:19 -04:00
Larry Finger f5b5869095 rtlwifi: btcoexist: Modify driver to support BT coexistence in rtl8723be
This patch adds the routines found in the V062814 Realtek version.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: troy_tan@realsil.com.cn
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-09-09 15:27:19 -04:00
Larry Finger 2187e9a2ce rtlwifi: btcoexist: Modify driver for V062814 Realtek driver
This patch adds the routines needed to support BT coexistence with the
new rtl8192ee driver.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: troy_tan@realsil.com.cn
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-09-09 15:27:19 -04:00
Larry Finger e8f3fef412 rtlwifi: btcoexist: Modify rtl_btc for changes in latest Realtek code
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: troy_tan@realsil.com.cn
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-09-09 15:27:19 -04:00
Larry Finger e79fff2858 rtlwifi: btcoexist: Modify btcoexist for changes in the V062814 Realtek version
This patch is the first of a set to bring this driver up to the latest Realtek code.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: troy_tan@realsil.com.cn
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-09-09 15:27:18 -04:00
Eyal Shapira 2cddddc56a iwlwifi: mvm: fix an overflow in iwl_mvm_get_signal_strength
The idea here is to translate a value of 0 received from
the firmware to the lowest rssi figure. As rx_status->chain_signal
is a signed byte the lowest possible value is -128 and not -256.
-256 was causing 0 to get stored in the signed byte.

Signed-off-by: Eyal Shapira <eyalx.shapira@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-09-08 19:47:22 +03:00
Oren Givon 498abba6a0 iwlwifi: add PCI IDs and add then new 3165 series
This change does the following:
1) Add a new 7265 series PCI ID
2) Add two new 3160 series PCI IDs
3) Add the new 3165 series PCI IDs and configurations

Signed-off-by: Oren Givon <oren.givon@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-09-08 19:47:16 +03:00
John W. Linville 61a3d4f9d5 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless 2014-09-08 11:14:56 -04:00
Emmanuel Grumbach f8dfc607b2 iwlwifi: dvm: disable power save by default
In
https://bugzilla.kernel.org/show_bug.cgi?id=84031,
the submitter said that disabling power saving helped,
do just that.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-09-08 09:18:47 +03:00
Johannes Berg 582de30afa iwlwifi: mvm: BT Coex - always initialize smps_mode
smps_mode is used uninitialized in a debug statement in AP
mode, so always initialize it.

While at it, fix a typo.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Reviewed-by: Luciano Coelho <luciano.coelho@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-09-08 09:18:36 +03:00
Emmanuel Grumbach 717e2390dc iwlwiwi: mvm: use bss_conf->dtim_period instead of conf.ps_dtim_period
The latter is meant for software implementation of power
save and is not per-virtual interface. Since our driver
supports multiple virtual interfaces, we need to use
vif->bss_conf.dtim_period.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-09-08 09:17:49 +03:00
Eyal Shapira aa11bbf3df iwlwifi: mvm: treat EAPOLs like mgmt frames wrt rate
Using the LQ table which is initially set according to
the rssi could lead to EAPOLs being sent in high legacy
rates like 54mbps.
It's better to avoid sending EAPOLs in high rates as it reduces
the chances of a successful 4-Way handshake.
Avoid this and treat them like other mgmt frames which would
initially get sent at the basic rate.

Cc: <stable@vger.kernel.org> [3.13+]
Signed-off-by: Eyal Shapira <eyalx.shapira@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-09-08 09:17:29 +03:00
Johannes Berg 1bc10d3b50 iwlwifi: mvm: correctly handle PM/QoS changes from mac80211
When mac80211 requests multiple BSS config changes, as for example
while associating, we ignore power management and QoS changes and
only apply them later. Fix that by removing the "else" and making
the conditions independent.

Also move it after (potential) beacon filter enablement to have
that already enabled when going into power management code.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-09-08 09:17:28 +03:00
Eliad Peller 22d059a5c7 iwlwifi: increase DEFAULT_MAX_TX_POWER
The chip is able to transmit up to 22dBm, so set
the constant appropriately.

CC: <stable@vger.kernel.org> [3.13+]
Signed-off-by: Eliad Peller <eliadx.peller@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-09-08 09:17:19 +03:00
Emmanuel Grumbach 86974bff06 iwlwifi: mvm: fix endianity issues with Smart Fifo commands
This code was broken on big endian systems. Sparse didn't
catch the bug since the firmware command was not tagged as
little endian.
Fix the bug for big endian systems and tag the field in the
firmware command to prevent such issues in the future.

Cc: stable@vger.kernel.org [3.14+]
Fixes: 1f3b0ff8ec ("iwlwifi: mvm: Add Smart FIFO support")
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-09-08 09:17:09 +03:00
Luciano Coelho 7c8b3bc688 iwlwifi: mvm: set MAC_FILTER_IN_BEACON correctly for STA/P2P client
In commit cad3f08c (iwlwifi: mvm: enable MAC_FILTER_IN_BEACON when
forced_assoc_off is set) the code to set the MAC_FILTER_IN_BEACON flag
was accidentally moved to the main block of the if statement, while it
should be in the else block instead.  Move it to the right place.

Fixes: cad3f08c23 ("iwlwifi: mvm: enable MAC_FILTER_IN_BEACON when forced_assoc_off is set")
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-09-08 09:17:08 +03:00
Johannes Berg 787d6c1f17 iwlwifi: mvm: BT Coex - remove shadowing variable
The variable 'u32 mode' exists twice, the latter shadowing
the former - remove the latter since there's no need for
two variables.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-09-08 09:16:55 +03:00
Lorenzo Bianconi a4bcaf5556 mac80211: extend set_coverage_class signature
Extend mac80211 set_coverage_class API in order to enable ACK timeout
estimation algorithm (dynack) passing coverage class equals to -1
to lower drivers. Synchronize set_coverage_class routine signature with
mac80211 function pointer for p54, ath9k, ath9k_htc and ath5k drivers.

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2014-09-05 13:54:07 +02:00
Jade Bilkey db906eb210 ath5k: added debugfs file for dumping eeprom
Signed-off-by: Jade Bilkey <herself@thefumon.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-09-04 13:50:12 -04:00
John W. Linville d17ec4d552 Merge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next 2014-09-04 13:45:56 -04:00
John W. Linville ef4ead3f29 Not that much content this time. Some RCU cleanups, crypto
performance improvements, and various patches all over,
 rather than listing them one might as well look into the
 git log instead.
 -----BEGIN PGP SIGNATURE-----
 
 iQIcBAABCAAGBQJUAIx4AAoJEDBSmw7B7bqrUYcP/3t4qdFxm0bd4j2AEkl3mPwB
 Qu7obTicOTfBRoJNEgS+8AU2u3PfztU6+ErZs4ETLUuqaZwXisqmwBiMo86+Wtdf
 gx9KonwEW051g7YmB0+6EMwuy04MGzTEk8VavQwqM4g9LIPJ4Buo/kj7MNJ51m11
 XyRmJqZJnKKeiiQ4eC0gPf8e44qiQqaDuYZ0r1UDnNRg2KrbAHlGTBKYI3VRl2u4
 xRpPGVnHwT0qkWb1Zw9fk0VfPr9m1ETthzcZvnhk6uMnJ28D+1B1FjZR1GJU6BW7
 Zx2FbevbZTjDoNT1GQpLGMXBuW0lsZFetXVFiJCr/StaPBtHmtdu28fuNVm8yJYz
 euDlEgrE8F4npdec2F5R2zh7Ue2U7eMEL2uxxjciNSJOipHgx5EXH12Y/5QtrChy
 4OHPbNHgpmqFB7TmkvHDgP/0A7XdyqKVc+NtIV+eECIwE4tHcJ6A+bQ+ZCoRV2Vw
 zmsNuNeNeDW7NEAw9veRXissLZMy/EjUnsOrnW29BpO/yG+2YjqpyQ6JQpcXeCPD
 WQgl2FHpk6ap3jpVjxminxw2HkDnQ0oTKusGLcezalhUlWMo7VYNN59aLzcphxX5
 Fotp/8v1sbDTF46uc/QJ38N5TqflwWeFpxvGkdNGuAT4llP03NaXV0ORBecFmMW2
 esb+PLwlByCDeVFu53q+
 =Qth6
 -----END PGP SIGNATURE-----

Merge tag 'mac80211-next-for-john-2014-08-29' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next

Johannes Berg <johannes@sipsolutions.net> says:

"Not that much content this time. Some RCU cleanups, crypto
performance improvements, and various patches all over,
rather than listing them one might as well look into the
git log instead."

Signed-off-by: John W. Linville <linville@tuxdriver.com>

Conflicts:
	drivers/net/wireless/ath/wil6210/wmi.c
2014-09-04 13:41:33 -04:00
John W. Linville 1bd3fa7b8c Merge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-fixes 2014-09-04 13:12:02 -04:00
Johannes Berg 712b24adc1 iwlwifi: mvm: clean up AUX station handling
The auxiliary station is being handled using the internal
station helper functions, clean that up and make the helpers
static.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-09-03 22:49:13 +03:00
Johannes Berg 013290aa46 iwlwifi: mvm: clean up broadcast station handling
Unify all the functions that handle the per-interface broadcast
station and make them have mvm and vif parameters. While at it,
add a new function to allocate the broadcast station instead of
open-coding it, and make the combined alloc+send and free+send
functions use the alloc/free & send functions.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-09-03 22:49:13 +03:00
Johannes Berg 110cf81085 iwlwifi: mvm: use iwl_mvm_mac_get_queues_mask() more
There are a few places that can call the function
iwl_mvm_mac_get_queues_mask() instead of open-coding the
equivalent, so do that. This requires changing it to return
the multicast queue as part of the bitmap, which broke GO
mode because including it in the broadcast station queues
seems to confuse the firmware, so work around that.

Also, the API defines that the CAB queue shouldn't be
included in the TFD queue mask, adjust the comment
accordingly (not a bug).

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-09-03 22:49:12 +03:00
Johannes Berg 9e848010bf iwlwifi: mvm: use tdls indication from mac80211
Instead of checking whether a given station is the first to
be added on a client interface check for the new TDLS flag
and warn in the unexpected cases.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-09-03 22:49:11 +03:00
Johannes Berg df197c00bf iwlwifi: mvm: clarify stop_count, remove transport_stopped
The queue handling is a bit unclear - we have an array for
stop_count[IWL_MAX_HW_QUEUES] but indices really are the
mac80211 queue numbers. Change the array to be only of the
right size for mac80211 queues (IEEE80211_MAX_QUEUES) and
rename it to be clearer.

While at it, also remove the unused transport queue stop
bitmap in mvm.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-09-03 22:49:10 +03:00
Johannes Berg b2d81db7b3 iwlwifi: mvm: clean up FIFO definitions
Move all FIFO definitions together into the firmware API
header file and use the same enum/naming scheme for the
command FIFO.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-09-03 22:49:10 +03:00
Johannes Berg 3dfd3a97c8 iwlwifi: mvm: correct firmware disassoc command sequence
The firmware would like to have a MAC context (unassoc)
before the AP station is removed (we do this) but would
like to keep the BSSID until after it is removed, so we
need to send two commands - one with the BSSID before
and one without the BSSID after.

In order to do this, we need to store the BSSID as it
will have been cleared by mac80211 by the time we get
notified of the disassociation. Also pass it around as
an override to the various functions needing it, and
keep taking it from the mac80211 data otherwise. This
avoids having to keep track of the BSSID in all modes.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-09-03 22:49:09 +03:00
Luciano Coelho 0ce04ce797 iwlwifi: mvm: set the TX disable bit when doing a chanctx switch
During a channel switch we should tell the firmware to disable TX
temporarily and re-enable it after the switch is done.

Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-09-03 22:49:08 +03:00
Johannes Berg 8b4139dc9f iwlwifi: add Intel Mobile Communications copyright
Our legal structure changed at some point (see wikipedia), but
we forgot to immediately switch over to the new copyright
notice.

For files that we have modified in the time since the change,
add the proper copyright notice now.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-09-03 22:49:07 +03:00
Avri Altman 002a9e2677 iwlwifi: trans: configure the scheduler enable register
Currently the firmware is handling this, but that is wrong as it then
needs to assume a certain command queue, therefore this should be in
the driver; add it here so it can be removed from the firmware in the
future.

Signed-off-by: Avri Altman <avri.altman@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-09-03 22:49:06 +03:00
Johannes Berg 64ba893066 iwlwifi: trans: make aggregation explicit for TX queue handling
Currently a valid sta_id is assumed to mean that the queue is
meant to also be aggregated, but that assumption will not be
true in the future, so don't make it in the lower level but
only in the inline wrapper.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-09-03 22:49:06 +03:00
Johannes Berg d4578ea810 iwlwifi: trans: allow skipping scheduler hardware config
In a later patch, the hardware configuration will be moved to
firmware. Prepare for this by allowing hardware configuration
in the transport to be skipped by not passing a configuration
on enable and passing configure_scd=false on disable.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-09-03 22:49:05 +03:00
Eran Harary 0ade579cce iwlwifi: mvm: fix comment typo
Signed-off-by: Eran Harary <eran.harary@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-09-03 22:49:04 +03:00