Stanislaw Gruszka [Wed, 17 Apr 2013 06:23:50 +0000 (08:23 +0200)]
iwlwifi: remove unneeded goto from iwl_dbgfs_log_event_read
Make code simpler a bit.
Reported-by: Jonas Gorski <jogo@openwrt.org>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Alexander Bondar [Wed, 3 Apr 2013 13:28:47 +0000 (16:28 +0300)]
iwlwifi: mvm: remove usage of power_save module parameter
Make power management in MVM driver enabled by default and
remove using the power_save module parameter. Rely only on
the power_scheme parameter to decide if power management
should be used.
Signed-off-by: Alexander Bondar <alexander.bondar@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Stanislaw Gruszka [Tue, 16 Apr 2013 13:40:54 +0000 (15:40 +0200)]
iwlwifi: remove redundant argument from iwl_dump_nic_event_log
We can check buf against NULL instead of having additional bool
variable.
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Stanislaw Gruszka [Tue, 16 Apr 2013 13:38:29 +0000 (15:38 +0200)]
iwlwifi: fix freeing uninitialized pointer
If on iwl_dump_nic_event_log() error occurs before that function
initialize buf, we process uninitiated pointer in
iwl_dbgfs_log_event_read() and can hit "BUG at mm/slub.c:3409"
Resolves:
https://bugzilla.redhat.com/show_bug.cgi?id=951241
Cc: stable@vger.kernel.org
Reported-by: ian.odette@eprize.com
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Alexander Bondar [Sun, 14 Apr 2013 07:18:25 +0000 (10:18 +0300)]
iwlwifi: mvm: change TX/RX AM-to-PSM transition time for LP mode
Recently in low power (LP) mode FW moved from active to power save mode
after TX/RX completion faster than in balanced power mode (BPS).
Change AM-to-PSM transition time so that it will be the same as for BPS.
Signed-off-by: Alexander Bondar <alexander.bondar@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Emmanuel Grumbach [Sun, 14 Apr 2013 11:41:03 +0000 (14:41 +0300)]
iwlwifi: mvm: fix first_antenna
first_antenna is supposed to return the first antenna as a
0-based bitmap: ANT_A is BIT(0), ANT_B is BIT(1), etc...
Since ffs is 1 based (ffs(BIT(0)) = 1), then we had an
off-by-one bug:
BIT(ffs(ANT_A)) = BIT(ffs(BIT(0))) = BIT(1) = ANT_B.
So what we really want is:
BIT(ffs(ANT_A) - 1) = BIT(ffs(BIT(0)) - 1) = BIT(0) = ANT_A.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Emmanuel Grumbach [Sun, 14 Apr 2013 13:28:39 +0000 (16:28 +0300)]
iwlwifi: mvm: remove TODO which has been addressed
Chain noise is done in the firmware and Bluetooth Coexistence
is implemented now.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Emmanuel Grumbach [Sun, 7 Apr 2013 07:13:44 +0000 (10:13 +0300)]
iwlwifi: dvm: handle FLUSH ampdu actions from mac80211
Until now we didn't handle properly the FLUSH ampdu action
coming from mac80211. This could result in SCD queue leak:
mac80211 would STOP_FLUSH an AMPDU Tx session and remove
the station. If we had still packets on the ring, we
wouldn't deallocate the SCD queue and wait for it to be
empty.
The indication of the queue being empty comes from the Tx
response flow which relies on the tid_data structure. The
problem is that this structure has been cleared when the
station has been removed.
In order to solve this issue, block in the STOP_FLUSH
ampdu_action until the SCD queue is flushed, and only then,
let mac80211 move forward to remove the station.
iwlagn_txfifo_flush had to be enhanced to allow this.
The bug fixed here caused the "txq_id mismatch: 12 0" print.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Emmanuel Grumbach [Wed, 3 Apr 2013 17:10:06 +0000 (20:10 +0300)]
iwlwifi: mvm: remove users of nvm_data->valid_tx_ant
In commit
332235427a566d8be04b9676a7ac380c8853aa9b
"iwlwifi: mvm: take the valid_{rx,tx}_ant from the TLV"
I replaced the access to nvm_data->valid_tx_ant to an inline
cheking the TLV flags but forgot a few occurences. Fix that.
Change-Id: I92daac735b46738d97fe2dbd5934bb177fd0751b
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Reviewed-on: https://gerrit.rds.intel.com/12308
Tested-by: IWL Jenkins
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Thu, 4 Apr 2013 08:35:23 +0000 (10:35 +0200)]
iwlwifi: print warning on request_module failure
If request_module() failed then we didn't have the correct
opmode module that the driver needs to function, so print
a warning in this case to make it more obvious what could
be wrong. This still won't catch the case where the module
simply doesn't exist because it wasn't compiled though.
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Emmanuel Grumbach [Fri, 29 Mar 2013 11:56:19 +0000 (14:56 +0300)]
iwlwifi: mvm: rename iwl_mvm_new_bt_coex_notif
It actually handles a BT coex notification, so rename it
to be more self explained.
Also, this function can always look at mvm->last_bt_notif
provided that the latter is updated on time.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Emmanuel Grumbach [Tue, 19 Mar 2013 14:16:00 +0000 (16:16 +0200)]
iwlwifi: mvm: clean up invalid station handling
Using IWL_MVM_STATION_COUNT and IWL_INVALID_STATION together
isn't a good idea as they have different values. Always use
IWL_MVM_STATION_COUNT for an invalid station in MVM and move
the definition of the IWL_INVALID_STATION constant into the
DVM driver to avoid making such mistakes again. The one use
in the transport code can be hard-coded to -1 instead as the
station ID is passed as an integer there.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Shuduo Sang [Sat, 30 Mar 2013 06:26:37 +0000 (14:26 +0800)]
iwlwifi: add new pci id for 6x35 series
some new thinkpad laptops use intel chip with new pci id need be added
lspci -vnn output:
Network controller [0280]: Intel Corporation Centrino Advanced-N 6235
[8086:088f] (rev 24)
Subsystem: Intel Corporation Device [8086:5260]
Signed-off-by: Shuduo Sang <sangshuduo@gmail.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Emmanuel Grumbach [Fri, 29 Mar 2013 11:52:17 +0000 (14:52 +0300)]
iwlwifi: mvm: beautify code in BT Coex
The iterators don't need to know what bt_kill_msk means.
All they need to know is if reduced Tx power is enabled
on an interface or not. So change the member of the
iterator to be a bool.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Ilan Peer [Tue, 19 Mar 2013 14:28:56 +0000 (16:28 +0200)]
iwlwifi: mvm: Sync FW API time event notification change
The firmware API changed to differentiate between event and
fragment start/end. Change the time-event handling accordingly.
Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Fri, 15 Feb 2013 10:00:58 +0000 (11:00 +0100)]
iwlwifi: sleep for at least 10 seconds
Many platforms have issues processing a wakeup signal
while they're still suspending, and will ignore it.
Since our device thinks it woke the platform, and the
platform ignored the signal, it will sleep without
WoWLAN being enabled as the device disables WoWLAN
when having woken the platform.
Resolve this by making the device wait for 10 seconds
after getting the suspend signal before waking up the
platform.
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Tue, 26 Mar 2013 10:41:51 +0000 (11:41 +0100)]
iwlwifi: print opmode when firmware is loaded
Print the sub-driver (opmode, i.e. DVM or MVM) when the
firmware is loaded.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Alexander Bondar [Wed, 6 Mar 2013 14:28:43 +0000 (16:28 +0200)]
iwlwifi: mvm: remove redundant iwl_power_get_params()
The function just wraps an existing one, remove it.
Signed-off-by: Alexander Bondar <alexander.bondar@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Alexander Bondar [Wed, 6 Mar 2013 13:38:11 +0000 (15:38 +0200)]
iwlwifi: mvm: change active-to-powersave transition time for BPS
The requirement for TX/RX active to powersave transition time for
the Balanced Power Save (BPS) scheme changed. Change the driver
accordingly and set transition time to 100 msec.
Signed-off-by: Alexander Bondar <alexander.bondar@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Alexander Bondar [Tue, 5 Mar 2013 12:08:23 +0000 (14:08 +0200)]
iwlwifi: mvm: encapsulate power table command log message
Encapsulate the power table command logging in a separate
function to print the same information in both cases.
Signed-off-by: Alexander Bondar <alexander.bondar@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Alexander Bondar [Tue, 5 Mar 2013 12:01:27 +0000 (14:01 +0200)]
iwlwifi: mvm: set keepalive period regardless of PM state
The firmware starts sending nulldata frames for keepalive immediately
after association, regardless of power management state. The driver
thus needs to configure keep alive period unconditionally.
Signed-off-by: Alexander Bondar <alexander.bondar@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Alexander Bondar [Tue, 5 Mar 2013 10:54:00 +0000 (12:54 +0200)]
iwlwifi: mvm: always send power table command
The driver distinguishes between power management and device's power
down enablement. Power management enablement depends both on driver's
module power parameters and mac80211 decision. The device's power down
depends only on driver's module power parameters. Change the driver to
always send Power Table command to enable or disable both power
management and device's power down.
Signed-off-by: Alexander Bondar <alexander.bondar@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Alexander Bondar [Tue, 5 Mar 2013 08:41:34 +0000 (10:41 +0200)]
iwlwifi: mvm: Fix active-to-powersave transition time units
Active to power save mode transition time for TX/RX in the power
table command is in microseconds, fix the units in the driver.
Signed-off-by: Alexander Bondar <alexander.bondar@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Alexander Bondar [Tue, 5 Mar 2013 08:16:40 +0000 (10:16 +0200)]
iwlwifi: mvm: don't disable power management due to P2P device
Currently power management is supported only when only a single
virtual interface is present. The driver verifies number of created
interfaces and disables power management when multiple interfaces
present. However, this rule does not extend to a P2P device that is
handled differently in the firmware. If a P2P device is added power
management can remain enabled.
Signed-off-by: Alexander Bondar <alexander.bondar@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Alexander Bondar [Tue, 5 Mar 2013 11:47:04 +0000 (13:47 +0200)]
iwlwifi: mvm: Rename some power management definitions and methods
Replace SLEEP_OVER_DTIM by SKIP_OVER_DTIM.
Add iwl_mvm prefix to a function name.
Signed-off-by: Alexander Bondar <alexander.bondar@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Alexander Bondar [Sun, 3 Feb 2013 19:26:44 +0000 (21:26 +0200)]
iwlwifi: mvm: downgrade to old power management API
Current available FW still doesn't support new PM API.
Therefore, to enable basic power management with the
existing firmware, change the API in the driver back
to the API used in the current firmware.
Signed-off-by: Alexander Bondar <alexander.bondar@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Emmanuel Grumbach [Wed, 20 Mar 2013 13:28:27 +0000 (15:28 +0200)]
iwlwifi: mvm: remove BT Coex constraints upon roaming to A band
When we roam to A band, we don't need to constraint WiFi
any more since it is operating on a different band.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Emmanuel Grumbach [Thu, 24 Jan 2013 08:35:13 +0000 (10:35 +0200)]
iwlwifi: mvm: implement reduced Tx power
This allows to have better wifi TPT when BT is active under
good RSSI conditions.
Wifi will have better chance to send Acks and Cts even if BT
is active.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Tue, 26 Mar 2013 09:47:53 +0000 (10:47 +0100)]
iwlwifi: mvm: add per-interface debugfs with mac_params file
Use the per-interface debugfs infrastructure to create a
directory and symlink, and add a file containing debug
data related to each virtual interface.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Tue, 26 Mar 2013 09:35:50 +0000 (10:35 +0100)]
Merge remote-tracking branch 'wireless-next/master' into iwlwifi-next
Emmanuel Grumbach [Wed, 20 Mar 2013 15:12:46 +0000 (17:12 +0200)]
iwlwifi: mvm: split long debug print
This caused issues with tracing as it's longer than
the buffer size used there.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Emmanuel Grumbach [Tue, 19 Mar 2013 21:09:58 +0000 (23:09 +0200)]
iwlwifi: mvm: ignore bt_ch_announce module parameter
This module parameter isn't and won't be used. So ignore
its value and set BT_CH_ANNOUNCE unconditionally.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Hauke Mehrtens [Thu, 21 Mar 2013 19:28:40 +0000 (20:28 +0100)]
b43: remove warning for LP-PHY with sprom < 8
The BCM5354 SoC has a build in ieee80211 core rev 13 with a LP-PHY on
it. This devices has a sprom version 3 stored in the nvram. This patch
removes the warning and uses the opo values from the sprom as mentioned
in the specs.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Hauke Mehrtens [Thu, 21 Mar 2013 19:25:21 +0000 (20:25 +0100)]
ssb: read additional sprom v2 and v3 attributes.
These attributes should be in the sprom for rev 2 and 3, but they were
not read out.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Hauke Mehrtens [Thu, 21 Mar 2013 15:26:19 +0000 (16:26 +0100)]
ssb: fix sprom constant for ant_available_{bg,a}
This was done accordingly to new specs.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Hauke Mehrtens [Thu, 21 Mar 2013 15:19:45 +0000 (16:19 +0100)]
b43: use bcma_chipco_gpio_control()
With this patch the same registers are written, but this access is now
protected by a lock.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Tue, 19 Mar 2013 15:58:59 +0000 (16:58 +0100)]
bcma: define board types
Using that IDs we can write workarounds for various cards
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Tue, 19 Mar 2013 15:58:58 +0000 (16:58 +0100)]
ssb: define more board types
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Tue, 19 Mar 2013 12:18:44 +0000 (13:18 +0100)]
bcma: extract board_type from SPROM
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Tue, 19 Mar 2013 12:18:43 +0000 (13:18 +0100)]
ssb: extract board_type from SPROM
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Yogesh Ashok Powar [Tue, 19 Mar 2013 03:06:03 +0000 (20:06 -0700)]
mwifiex: add support to configure VHT for AP mode
Currently, default VHT configuration from the firmware is used
for the VHT operations. Adding vhtcfg command to configure the
firmware based on input received from cfg.
Enable VHT for AP mode only when cfg80211_ap_settings has a
VHT IE i.e., when ieee80211ac is set to 1 in the hostapd.conf.
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Jussi Kivilinna [Sun, 17 Mar 2013 09:59:29 +0000 (11:59 +0200)]
rtlwifi: usb: add NET_IP_ALIGN padding to RX skb when needed
Add proper alignment at first packet copy, to avoid extra copies made later
in networking stack.
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Jussi Kivilinna [Sun, 17 Mar 2013 09:59:24 +0000 (11:59 +0200)]
rtlwifi: usb: defer rx processing to tasklet
Move processing of received packets to tasklet from hard-irq context.
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Jussi Kivilinna [Sun, 17 Mar 2013 09:59:18 +0000 (11:59 +0200)]
rtlwifi: usb: remove extra skb copy on RX path
RX path has extra copying of packets, that can be avoided.
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Jussi Kivilinna [Sun, 17 Mar 2013 09:59:13 +0000 (11:59 +0200)]
rtlwifi: usb: use usb_alloc_coherent for RX buffers
Use dedicated DMA coherent buffers for RX urbs, to avoid allocation of large
skbuffs in hard-irq context and improve performance.
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
John W. Linville [Mon, 25 Mar 2013 20:40:52 +0000 (16:40 -0400)]
Merge branch 'for-linville' of git://git./linux/kernel/git/luca/wl12xx
John W. Linville [Mon, 25 Mar 2013 20:39:06 +0000 (16:39 -0400)]
Merge branch 'for-upstream' of git://git./linux/kernel/git/bluetooth/bluetooth-next
John W. Linville [Mon, 25 Mar 2013 20:38:28 +0000 (16:38 -0400)]
Merge branch 'for-john' of git://git./linux/kernel/git/iwlwifi/iwlwifi-next
John W. Linville [Mon, 25 Mar 2013 20:38:02 +0000 (16:38 -0400)]
Merge branch 'for-john' of git://git./linux/kernel/git/jberg/mac80211-next
Luciano Coelho [Mon, 25 Mar 2013 15:06:37 +0000 (17:06 +0200)]
Merge branch 'wl12xx-next' into for-linville
Luciano Coelho [Fri, 8 Mar 2013 07:41:53 +0000 (09:41 +0200)]
wlcore: move handling from hardirq to the irq thread function
Spin locks and completions are expensive in hard IRQ context and cause
problems with RT kernels. In RT kernels, both spin locks and
completions can schedule(), so we can't use them in hard irq context.
Move handling code into the irq thread function to avoid that.
Reported-by: Gregoire Gentil <gregoire@alwaysinnovating.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Luciano Coelho [Tue, 12 Mar 2013 15:04:01 +0000 (17:04 +0200)]
wlcore: use print_hex_dump_debug()
We were printing out all the hex dumps regardless of whether dynamic
debugging was enabled or not. Now that print_hex_dump_debug() has
been implemented, we can use that instead.
Reported-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Arik Nemtsov [Tue, 12 Mar 2013 15:19:46 +0000 (17:19 +0200)]
wlcore: consider dummy packets when tx queues are empty
Don't ignore dummy packets when our queues are empty. This causes dummy
packets never to be sent when traffic is not suspended by FW thresholds,
which happens only in high Tx throughput situations. This may hurt Rx
performance.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Arik Nemtsov [Tue, 12 Mar 2013 15:19:45 +0000 (17:19 +0200)]
wlcore: correctly check state before regdomain conf
The wlcore state was checked without the mutex being taken. This leads
to WARN_ONs sometimes if a notification arrives when the driver
is on, but the mutex is only taken after it is off. This usually
happens if stopping the driver while connected to a network.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Arik Nemtsov [Tue, 12 Mar 2013 15:19:44 +0000 (17:19 +0200)]
wlcore: AP-mode - recover security seq num for stations
Save the sequence number of the broadcast AP link in the wlvif. For each
connected station, save the sequence number in the drv_priv part of
ieee80211_sta. Use the saved numbers on recovery/resume, with the
obligatory increment on recovery.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Arik Nemtsov [Tue, 12 Mar 2013 15:19:43 +0000 (17:19 +0200)]
wlcore: free AP global links properly on recovery
Dont use free_sta() on AP global links. It would fail an internal check
within the function and various structures within the link struct would
not be reset.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Victor Goldenshtein [Tue, 12 Mar 2013 15:19:42 +0000 (17:19 +0200)]
wl18xx: print chip info during boot
Print board type, PG with metal and ROM versions.
This might help debugging HW related issues.
Signed-off-by: Victor Goldenshtein <victorg@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Eyal Shapira [Tue, 12 Mar 2013 15:19:41 +0000 (17:19 +0200)]
wlcore: don't attempt to roam in case of p2p
For STA we report beacon loss to higher levels so that wpa_s
can attempt to roam without disconnecting. In case of P2P CLI
we don't want to attempt roaming and instead disconnect immediately
upon beacon loss.
Signed-off-by: Eyal Shapira <eyal@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Arik Nemtsov [Tue, 12 Mar 2013 15:19:40 +0000 (17:19 +0200)]
wlcore: change warn on missing lock in wlcore_queue_xx funcs
On !CONFIG_SMP builds spin_is_locked always returns 0. Assert the
locking using assert_spin_locked, which is written to behave correctly
in all cases.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Nadim Zubidat [Tue, 12 Mar 2013 15:19:39 +0000 (17:19 +0200)]
wlcore: report rssi from roaming statistics
report the average beacon rssi which is calculated
by firmware for roaming statistics instead of the
last rx packet rssi. this results a more accurate
rssi reporting
Signed-off-by: Nadim Zubidat <nadimz@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Arik Nemtsov [Tue, 12 Mar 2013 15:19:38 +0000 (17:19 +0200)]
wlcore: consolidate tx_seq handling on recovery
Accumulate the total number of sent packets per-link to find out how far
the encryption sequence number has progressed. Use this number as the
initial security sequence number after recovery.
This consolidates security sequence handling for both chip families, as
we no longer have to rely on 12xx specific Tx completion.
A fortunate side effect of this is correct management of seq numbers for
AP roles and multi-role scenarios.
When a link is removed we save the last seq number on a persistent part
of the wlvif. This helps the data survive through recoveries/suspends,
which also entail changes in the hlid of the link.
This functionality is STA only currently.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Arik Nemtsov [Tue, 12 Mar 2013 15:19:37 +0000 (17:19 +0200)]
wlcore: don't risk using stale HLID during .sta_state callback
The HLID of a STA can change, particularly during recovery. Don't cache
the HLID before it was potentially allocated.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Arik Nemtsov [Tue, 12 Mar 2013 15:19:36 +0000 (17:19 +0200)]
wlcore: fix link count in single-link-PSM optimization
commit
144614f3eebd7d only allowed a single active link when
turning on the optimization, ignoring the fact that an AP has two
additional global links.
Use 3 links as an indication for a single active link. Use the
FW PSM bits to verify the extra active link belongs to the AP role.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Igal Chernobelsky [Tue, 12 Mar 2013 15:19:35 +0000 (17:19 +0200)]
wlcore: set max num of Rx BA sessions per chip
Maximum number of supported RX BA sessions depends on chip type.
wl18xx supports 5 RX BA sessions while wl12xx supports 3.
Signed-off-by: Igal Chernobelsky <igalc@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Igal Chernobelsky [Tue, 12 Mar 2013 15:19:34 +0000 (17:19 +0200)]
wlcore: enter elp in force ps mode in 5ms
It is requiered to enter sleep mode with smaller delay in forced PS mode.
This fixes issue of testing force PS mode during VoIP traffic where packets
are sent every 20ms. Chip never enters ps mode with default 30 ms delay
in such test.
Signed-off-by: Igal Chernobelsky <igalc@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Wei Yongjun [Wed, 20 Mar 2013 12:23:37 +0000 (20:23 +0800)]
Bluetooth: fix error return code in rfcomm_add_listener()
Fix to return a negative error code from the error handling
case instead of 0, as returned elsewhere in this function.
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Ilan Peer [Wed, 13 Feb 2013 09:05:18 +0000 (11:05 +0200)]
iwlwifi: mvm: Add support for different ROC types
Schedule different time event based on the ROC type
Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Wed, 20 Mar 2013 13:30:42 +0000 (14:30 +0100)]
Merge remote-tracking branch 'wireless-next/master' into iwlwifi-next
Ilan Peer [Wed, 20 Feb 2013 06:41:54 +0000 (08:41 +0200)]
iwlwifi: mvm: Increase the max remain on channel time
Increase the maximal remain on channel time as longer remain
on channel requests are handled by the FW using fragmented
time events.
This reduces the number of user/kernel space iterations during
flows such as p2p_listen. In addition it is currently required
for flows which require longer duration such as p2p_sd.
Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Wed, 20 Mar 2013 09:40:05 +0000 (10:40 +0100)]
iwlwifi: mvm: fix WoWLAN RF-kill bug
The RF-kill wakeup trigger flag is set in the wrong command,
which means it won't work. Also fix the comment in the TCP
wakeup trigger code -- the firmware was changed to look at
all the different trigger flags.
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Emmanuel Grumbach [Tue, 19 Mar 2013 12:40:38 +0000 (14:40 +0200)]
iwlwifi: mvm: tune the move to static SMPS due to BT load
We should disable MIMO only if bt_traffic_load goes up to 3.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Emmanuel Grumbach [Sat, 9 Mar 2013 18:38:19 +0000 (20:38 +0200)]
iwlwifi: mvm: take the valid_{rx,tx}_ant from the TLV
This is the right source of information for the valid Tx
antennas, not the NVM.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Emmanuel Grumbach [Thu, 7 Mar 2013 15:27:40 +0000 (17:27 +0200)]
iwlwifi: mvm: take the radio type / step / dash from TLVs
This data should taken from TLVs and not from the NVM. This
is true for the value written in CSR_HW_IF_CONFIG_REG too.
Also, no need to set the CSR_HW_IF_CONFIG_REG_BIT_MAC_SI bit
for 7000 devices which are the only devices currently
supported.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Mon, 18 Mar 2013 12:04:50 +0000 (13:04 +0100)]
iwlwifi: mvm: specify filter flags in monitor mode
In firmware "listener" (monitor) mode, we still need to
open up the filters with the filter flags to receive all
frames.
Reviewed-by: Ilan Peer <ilan.peer@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Emmanuel Grumbach [Wed, 13 Mar 2013 20:16:20 +0000 (22:16 +0200)]
iwlwifi: add debug message when a CMD is dropped in RFKILL
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Emmanuel Grumbach [Wed, 13 Mar 2013 15:02:41 +0000 (17:02 +0200)]
iwlwifi: mvm: print the flags in ALIVE notification
This has valuable data about RFkill state seen from the fw
side.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Stanislaw Gruszka [Tue, 12 Mar 2013 16:35:58 +0000 (17:35 +0100)]
iwlwifi: remove 5ghz_disable option
5ghz_disable has no effect any longer, that was changed during
refactoring of EEPROM reading/parsing. Remove it, wpa_supplicant
allow now to specify frequencies, on which device will operate.
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Ilan Peer [Wed, 13 Mar 2013 12:52:04 +0000 (14:52 +0200)]
iwlwifi: mvm: Fix quota handling for monitor interface
1. Quota for the monitor interface should be added only if there is
a channel context assigned to the interface.
2. In the unassign channel context flow, need to remove the quota
for the monitor interface binding, before unbinding.
Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Andrei Epure [Sun, 10 Mar 2013 13:22:33 +0000 (15:22 +0200)]
iwlwifi: use kmemdup instead of kmalloc+memcpy
Signed-off-by: Andrei Epure <epure.andrei@gmail.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Ilan Peer [Wed, 13 Mar 2013 13:20:35 +0000 (15:20 +0200)]
iwlwifi: mvm: Remove obsolete queue definitions
Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Emmanuel Grumbach [Sun, 10 Mar 2013 10:06:12 +0000 (12:06 +0200)]
iwlwifi: mvm: don't support multi-channel inhibition
This feature is not implemented yet in firmware.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Emmanuel Grumbach [Sun, 10 Mar 2013 18:15:24 +0000 (20:15 +0200)]
iwlwifi: mvm: fix the {ack,cts}_kill_msk
The masks were wrong. They should be 0xffffffff when SCO,
HID or SNIFF profiles are used. They should be 0xffff0000
in any other case (default) to get a bit more throughput
when the BT profile allows for it.
Fix a debug print on the way.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Wei Yongjun [Wed, 20 Mar 2013 12:22:54 +0000 (20:22 +0800)]
cfg80211: fix error return code in cfg80211_init()
Fix to return a negative error code from the error handling
case instead of 0, as returned elsewhere in this function.
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Wed, 20 Mar 2013 13:05:52 +0000 (14:05 +0100)]
cfg80211: fix potential connection work crash
If wpa_supplicant and iw/iwconfig are used together, very
rarely the system crashes. It seems to be related to the
connection parameters not being set up, but it's not all
clear to me how this happens. In any case, checking that
the conn pointer exists here is probably a good idea.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Kalle Valo [Tue, 19 Mar 2013 13:25:20 +0000 (15:25 +0200)]
ath6kl: fix size_t printf warnings
My new tracing code for ath6kl introduced these warnings on 64-bit:
trace.h:38:1: warning: format '%d' expects argument of type 'int',
but argument 4 has type 'size_t' [-Wformat]
trace.h:61:1: warning: format '%d' expects argument of type 'int',
but argument 4 has type 'size_t' [-Wformat]
trace.h:84:1: warning: format '%d' expects argument of type 'int',
but argument 6 has type 'size_t' [-Wformat]
trace.h:119:1: warning: format '%d' expects argument of type 'int',
but argument 7 has type 'size_t' [-Wformat]
trace.h:173:1: warning: format '%d' expects argument of type 'int',
but argument 3 has type 'size_t' [-Wformat]
trace.h:193:1: warning: format '%d' expects argument of type 'int',
but argument 5 has type 'size_t' [-Wformat]
trace.h:221:1: warning: format '%d' expects argument of type 'int',
but argument 5 has type 'size_t' [-Wformat]
Fix them by using %zd.
Reported-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Ilan Peer [Tue, 5 Mar 2013 13:26:03 +0000 (15:26 +0200)]
iwlwifi: mvm: Add beacon notification handler
Mostly for debugging purposes
Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Wed, 6 Mar 2013 12:15:21 +0000 (13:15 +0100)]
iwlwifi: mvm: suppress key error messages in AP mode
In AP mode, don't attempt to program GTKs into the
device, they're used for TX only so not needed and
programming them causes error messages. Also, in
this case and if key programming fails, avoid trying
to remove the key that isn't present later.
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Emmanuel Grumbach [Wed, 6 Mar 2013 09:34:44 +0000 (11:34 +0200)]
iwlwifi: mvm: MVM op_mode is supported on 7000 only
The code removed in this patch was used for bring up on
older NICs. No MVM capable fw will ever be released for
older NICs, so remove that code.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Mon, 18 Mar 2013 21:13:18 +0000 (22:13 +0100)]
mac80211_hwsim: assign CAB queue properly on interface type change
When an interface change type, the CAB queue must be reassigned,
do this in hwsim to avoid warnings/crashes.
Reported-by: Jouni Malinen <j@w1.fi>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Stanislaw Gruszka [Sat, 16 Mar 2013 18:19:53 +0000 (19:19 +0100)]
rt2800: 5592: add more USB devices IDs
Reported-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Tested-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Stanislaw Gruszka [Sat, 16 Mar 2013 18:19:52 +0000 (19:19 +0100)]
rt2800: 5592: iq calibration for 5GHz
Based on:
RT5592_IQCalibration()
DPO_RT5572_LinuxSTA_2.6.1.3_20121022/cips/rt5592.c
Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Tested-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Stanislaw Gruszka [Sat, 16 Mar 2013 18:19:51 +0000 (19:19 +0100)]
rt2800: 5592: add Kconfig
Enable support to 5592 chip.
Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Tested-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Stanislaw Gruszka [Sat, 16 Mar 2013 18:19:50 +0000 (19:19 +0100)]
rt2800: 5592: TXWI & RXWI descriptors size
Based on:
TXWI_STRUC
RXWI_STRUC
from:
DPO_RT5572_LinuxSTA_2.6.1.3_20121022/include/chip/rtmp_mac.h
Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Tested-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Stanislaw Gruszka [Sat, 16 Mar 2013 18:19:49 +0000 (19:19 +0100)]
rt2800: 5592: add chip specific vgc calculations
Based on:
RT5592_ChipAGCAdjust()
from:
DPO_RT5572_LinuxSTA_2.6.1.3_20121022/chips/rt5592.c
Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Tested-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Stanislaw Gruszka [Sat, 16 Mar 2013 18:19:48 +0000 (19:19 +0100)]
rt2800: 5592: add AGC init
Based on:
RT5592_RTMPAGCInit()
from:
DPO_RT5572_LinuxSTA_2.6.1.3_20121022/chips/rt5592.c
Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Tested-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Stanislaw Gruszka [Sat, 16 Mar 2013 18:19:47 +0000 (19:19 +0100)]
rt2800: add write_with_rx_chain function
Based on:
AsicBBPWriteWithRxChain()
from:
DPO_RT5572_LinuxSTA_2.6.1.3_20121022/chips/rtmp_chip.c
Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Tested-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Stanislaw Gruszka [Sat, 16 Mar 2013 18:19:46 +0000 (19:19 +0100)]
rt2800: rearrange bbp/rfcsr initialization
This makes order of initialization of various registers similar like
on vendor driver.
Based on:
NICInitializeAsic()
RT5592LoadRFNormalModeSetup()
from:
DPO_RT5572_LinuxSTA_2.6.1.3_20121022/common/rtmp_init.c
DPO_RT5572_LinuxSTA_2.6.1.3_20121022/chip/rt5592.c
Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Tested-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Stanislaw Gruszka [Sat, 16 Mar 2013 18:19:45 +0000 (19:19 +0100)]
rt2800: 5592: add iq calibration
Based on:
GetIQCalibration()
IQCalibration()
from:
DPO_RT5572_LinuxSTA_2.6.1.3_20121022/chips/rtmp_chip.c
Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Tested-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Stanislaw Gruszka [Sat, 16 Mar 2013 18:19:44 +0000 (19:19 +0100)]
rt2800: 5592: more channel switch registers settings (BBP & GLRT)
Based on:
RT5592_ChipSwitchChannel()
from:
DPO_RT5572_LinuxSTA_2.6.1.3_20121022/chips/rt5592.c
Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Tested-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Stanislaw Gruszka [Sat, 16 Mar 2013 18:19:43 +0000 (19:19 +0100)]
rt2800: 5592: enable rf init
Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Tested-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>