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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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.
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.
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.
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.
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.
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.
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.
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
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.
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.
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>
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>
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.
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>
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>
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>
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>