[go: nahoru, domu]

History log of /drivers/net/wireless/mwifiex/fw.h
Revision Date Author Comments
cb91be87e12c079fcf25069a21123756c0931dd6 12-Sep-2014 Avinash Patil <patila@marvell.com> mwifiex: bring in scan channel gap feature

With scan channel gap when any station/AP is active, FW comes back
to connected channel for any pending data transfter after scanning each
channel.
We set scan channel gap TLV to FW in scan command when any of the
interface is active. This enables scan channel gap in FW.
Also when scan channel gap is enabled, we would scan maximum channels
allowed by FW.

Scan channel gap is supported only on FW with V15 FW API.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Marc Yang <yangyang@marvell.com>
Signed-off-by: Cathy Luo <cluo@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
89be7ceb80835238f04c09cb6efc2c70aabd02e8 19-Aug-2014 Amitkumar Karwar <akarwar@marvell.com> mwifiex: use firmware API revision from GET_HW_SPEC response

Newer firmware returns API revision in GET_HW_SPEC command
response. We will make use of it instead of parsing this
information from FW release number.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Cathy Luo <cluo@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
4b9fede594f05550a5b3e061784781aa13540d09 19-Aug-2014 Amitkumar Karwar <akarwar@marvell.com> mwifiex: rename macro and variables related to API revision

We will remove 'fw' prefix from these variable and macro
names and make them generic.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Cathy Luo <cluo@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
30fa51c8889bfad475a6c7ec46a203092da5c162 12-Jul-2014 Bing Zhao <bzhao@marvell.com> mwifiex: define TDLS idle timeout macro with units

The unit of this timeout is in seconds.

Reported-by: Paul Stewart <pstew@chromium.org>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
65da33f5557f0ed3f1227063bcf1f25248d456e5 20-Jun-2014 Xinming Hu <huxm@marvell.com> mwifiex: update Copyright to 2014

This patch updates mwifiex Copyright to 2014.

Signed-off-by: Xinming Hu <huxm@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
915f36d2e5cf0219835af0029cb28a24def34c65 28-May-2014 Bing Zhao <bzhao@marvell.com> mwifiex: change hscfg gap parameter to avoid potential firmware deadlock

If host sleep parameter gap is set to 0xff, firmware will wait
for an ack from host to confirm the success of host wakeup.
This prevents firmware from uploading data packet before host
actually wakes up.

Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
09869495616af7e5098aabb6f3eefdf885235699 22-May-2014 Avinash Patil <patila@marvell.com> mwifiex: update seq number correctly for packets from TDLS peer

This patch adds handling of updating rx sequence number for
packets received from TDLS peer. Current implementation of
mwifiex_queueing_ra_based assumes station would always receive
packets from AP which is not true in case of TDLS.
Fix this by adding this case.

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>
396939f94084d5923d558e9f22db48bc51156e47 07-May-2014 Avinash Patil <patila@marvell.com> mwifiex: add HT operation IE in TDLS setup confirm

This patch adds support to populate HT operatation IE in TDLS
setup confirm command. This is required for setting wider
bandwidths for TDLS operations.

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>
79ff434612aeae8b64159c61446d1ebc7d88bb50 07-May-2014 Avinash Patil <patila@marvell.com> mwifiex: disable TDLS link upon tear down event

This patch adds code to disable TDLS link upon reception of TDLS
teardown event from peer. Teardown event can happen either
because of TDLS teardown packet from peer or internal timeout
configured during TDLS setup. Event is propogated to cfg80211
so that userspace application can take appropriate action.

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>
d29caf257ae7f767edef5354524cb31b51985a40 07-May-2014 Avinash Patil <patila@marvell.com> mwifiex: configure inactivity timeout for TDLS link

This patch adds configuration timeout for TDLS link. This is
configuered at the time of TDLS link configuration. If TDLS link
is inactive for more than timeout, FW will tear this link.

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>
474a41e94dfc85167e1761bfbb8bf180f90633b2 19-Mar-2014 Maithili Hinge <maithili@marvell.com> mwifiex: update MCS set as per RX-STBC bit from hostapd

To set AP in 1X1 or 2X2 mode through hostapd, we need to set
RX-STBC* in hostapd.conf file. Depending upon RX-STBC bit in
ht_cap IE received from hostapd, we need to update mcs set in
bss_cfg appropriately before starting AP.

Signed-off-by: Maithili Hinge <maithili@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
a0b7315a198094d5e6281b798a7363ee41e27fac 08-Mar-2014 Amitkumar Karwar <akarwar@marvell.com> mwifiex: add VHT MCS rate configuration support

During Tx rate configuration, newer firmware V15 expects bitmap
for VHT MCS rates as well.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
8e17ea25b1e13075d37e976a5bacf10cc1916437 08-Mar-2014 Amitkumar Karwar <akarwar@marvell.com> mwifiex: extract firmware API version number

The firmware API version number will be used for future patches
to support different firmware API specs.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
a5333914536debe05f36ed0d0273f1ddab744eea 28-Feb-2014 Amitkumar Karwar <akarwar@marvell.com> mwifiex: update MCS information as per antenna settings

Even if the device is changed to 1X1 mode, data is sent with
higher MCS rates after association.

This patch fixes the problem by updating MCS information field
in HT capability when antenna setting changes so that correct
information will be advertised in association and probe request.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
e57f1734d87aa0e9a00905ed08888f0c62f56227 08-Feb-2014 Avinash Patil <patila@marvell.com> mwifiex: add key material v2 support

This patch adds key material V2 support to mwifiex.
Newer FW supports this feature and FW KEY API version is used
to determine which command structure needs to be used.

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>
7f445d0435017ba0daeb83574028fc16c68df1f5 08-Feb-2014 Avinash Patil <patila@marvell.com> mwifiex: parse API version from FW

This patch adds support to parse FW API version TLVs.
Currently only API version for key_material is supported.

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>
5f6d5983394fd7b918385dbee7e4d983a7b990d9 08-Feb-2014 Avinash Patil <patila@marvell.com> mwifiex: add VHT support for TDLS

During TDLS setup request/response, if HW is 11ac capable,
we add VHT Capability IEs in outgoing data frame. Also while
processing received setup request/response, we preserve peer's
11ac capability retrieved from IEs.

Patch also gets VHT parameters from config_station handlers and
sets it to FW using TDLS config command.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
1f4dfd8a1e911cd9e12994cd7cc1180e94ee1bc5 08-Feb-2014 Avinash Patil <patila@marvell.com> mwifiex: add cfg80211 change_station handler support

This patch adds cfg80211 change_station handler support for mwifiex
which is needed for TDLS link setup. Driver creates a command to
modify peer link capabilities and issues command to FW.

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>
429d90d2212b561859767a74e3bb855f32b4600d 08-Feb-2014 Avinash Patil <patila@marvell.com> mwifiex: add cfg80211 tdls_oper handler support

This patch adds cfg80211 handler tdls_oper handler support to
mwifiex. Upon enable link, driver sets status as TDLS status as
setup complete and also sets AMSDU size, AMPDU params for direct
link. Upon disable link, driver issues command to FW to delete
this link in FW.

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>
b23bce296568011b76c27103032dea5a90291d8a 08-Feb-2014 Avinash Patil <patila@marvell.com> mwifiex: add tdls_mgmt handler support

This patch adds support for TDLS management frames transmit
handler. mwifiex driver supports TDLS with external support,
i.e. expects user space application to form TDLS frames.
Same is advertised to cfg80211 during registration.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
79d9a54cf0e7c77dd6eada44c1461ad2e7da83b8 08-Feb-2014 Amitkumar Karwar <akarwar@marvell.com> mwifiex: advertise correct beamforming information for VHT

Currently MU/SU beamformer and MU beamformee features are
not supported.

Hence this patch modifies VHT capability information accordingly.
Number of sounding dimensions should be zero in this case.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
645097cea620cb94d620360226508c6074ec278b 08-Feb-2014 Amitkumar Karwar <akarwar@marvell.com> mwifiex: update beamforming capability field for HT

This patch makes sure that beamforming capability field in
ht capability info gets filled if hardware supports the feature.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
21f58d200388480547df909b5464b5aafebf299d 12-Feb-2014 Amitkumar Karwar <akarwar@marvell.com> mwifiex: implement extended scan feature

In extended scan, host gets scan results through one or
multiple events instead of scan command response. Host will
send next scan command when all the events are received.

Legacy scan sometimes truncates scan results in a noisy
environment due to buffer length limitation. This issue
is addressed in extended scan.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
b8b3ecec91f106e2f26ac2e24dcda21f63336286 08-Feb-2014 Amitkumar Karwar <akarwar@marvell.com> mwifiex: change beacon parameter structure

'mwifiex_bcn_param' structure contains five parameters which
are present in beacon buffer in case of legacy scan.

'rssi' field won't be there in this buffer for extended scan.
Hence 'bssid' and 'rssi' are removed from the structure and it is
renamed as 'mwifiex_fixed_bcn_param' so that we can have common
parsing logic later for both.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
f25b14315e8084efbcc5c672cec8ee1f691dc2fd 08-Feb-2014 Bing Zhao <bzhao@marvell.com> mwifiex: remove unsupported code in 11ac

bit12 in fw_cap_info is for testing only.
Remove all related code.

Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
7abf4129e6dfe231e81a07af5bde0488bba6f95b 08-Feb-2014 Bing Zhao <bzhao@marvell.com> mwifiex: make use of IEEE80211_VHT_MCS_NOT_SUPPORTED

Remove driver's macro and use ieee80211's definition instead

Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
1e202242ee1432d68a8bea4919b2ae0ef19d9e06 15-Jan-2014 Bing Zhao <bzhao@marvell.com> mwifiex: fix wrong 11ac bits setting in fw_cap_info

bit 14 is actually reserved and bit 12 & 13 should be used for
11ac capability in fw_cap_info.

Cc: <stable@vger.kernel.org> # 3.9+
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
d39fbc88956ef56a67b8030d53c7e8fa645a4e00 14-Dec-2013 Bing Zhao <bzhao@marvell.com> mwifiex: remove cfg_data construction

The cfg_data buffer will include the cfg_data structure header
(action, type, data_len). This makes it work for all data types
without extra parsing.

Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
a6efc5b7f8e737c8e7c97b3c671ae211c5ece3d8 03-Dec-2013 Amitkumar Karwar <akarwar@marvell.com> mwifiex: declare snap_type as __be16 variable

Actually we are updating snap_type with h_proto (__be16 variable)
in ethernet frame header. Hence endianness conversion is not
required.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
4348d085b8ef9067e32ccc1a9e90e33c0e4b4e66 03-Dec-2013 Ujjal Roy <royujjal@gmail.com> mwifiex: use little-endian variables in firmware structures

The firmware expects the command structure members in little
endianness.

Signed-off-by: Ujjal Roy <royujjal@gmail.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
930fd35c8de88cc1ce934aa655181c4879422a37 23-Oct-2013 Amitkumar Karwar <akarwar@marvell.com> mwifiex: replace u16 with __le16 in struct mwifiex_types_power_group

__le16 to u16 conversion is missing for "pg_tlv_hdr->length"
in mwifiex_get_power_level(). This creates a problem on big
endian machines.
It is resolved by changing definition of the structure
and making required endianness changes.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
68f95b09c80af7a0b7a27a03227fa802d55f3616 24-Aug-2013 Avinash Patil <patila@marvell.com> mwifiex: fix ext_capab IE structure definition

EXT_CAPAB_IE format involves IEEE header followed by bytestream of
capabilities. Current structure has incorrect member u8 for data;
fix it by defining it as u8[0].

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>
562fc5b30f228d4a8c1dad90c82897a5440d7a0b 06-Aug-2013 Amitkumar Karwar <akarwar@marvell.com> mwifiex: add packet coalesce support

Coalesce filters are configured in firmware based on settings
received from cfg80211.

Packet type which is required by firmware is determined based on
provided patterns in a rule:

Unicast: if pattern '01' with offset 0 is found
Multicast: if pattern '33:33' or '01:00:5e' with offset 0 is found
Broadcast: if pattern 'ff:ff:ff:ff' with offset 0 is found

Some example coalesce configuration files:

1) Coalesce Rx data packets from 192.168.0.88
mac address of our device is 00:50:43:21:53:7A
Source IP address offset comes out as 52 after following
calculations:
32 bytes of HW 802.11 header + 8 bytes LLC +
12 bytes in IPV4 header till source IP address
Destination mac is at offset 6 in HW header.

delay=100
condition=1
patterns=01,6+00:50:43:22,10+53:7A,52+c0:a8:00:58

2) Coalesce all broadcast and multicast packets(Multiple packet
types are not allowed in a single rule. Hence created separate
rules)

delay=400
condition=1
patterns=33:33
delay=400
condition=1
patterns=ff:ff:ff:ff

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
afd84de47309cbdf96ea80d073233834f28393a5 06-Aug-2013 Amitkumar Karwar <akarwar@marvell.com> mwifiex: increase max supported pattern offset

The offset number is increased to accomodate requests from
user to match more fields in a Rx packet.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
6b21a69fbc5c60c44634963f3fe3e6f1d9140d3a 23-Jul-2013 Amitkumar Karwar <akarwar@marvell.com> mwifiex: remove duplicate structure host_cmd_tlv

We already have 'struct mwifiex_ie_types_header' with same
definition. Hence host_cmd_tlv is removed in this patch.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
d00062e318b1e4a4bec8a8e343efe8bc92d3b109 23-Jul-2013 Amitkumar Karwar <akarwar@marvell.com> mwifiex: reduce firmware poll retries

After downloading the firmware, firmware status is checked by
reading a register. Polling interval is 100 msecs. Therefore 100
retries means the status is checked for 10 secs which is more than
sufficient for firmware to get ready.

This patch removes 1000 retries macro usage, because 100secs
time is not practical.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
b887664d882ee4f6a67e0bf05e5f141d32fcc067 19-Jun-2013 Amitkumar Karwar <akarwar@marvell.com> mwifiex: channel switch handling for station

After receiving channel switch announcement from AP, scan and
association on that channel is blocked for DFS_CHAN_MOVE_TIME
(10 seconds). Hence station will be able to connect to the AP,
once it is moved to new channel.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: Paul Stewart <pstew@chromium.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2a7305c88d245f104c3d6bd3babafb029fd07477 19-Jun-2013 Amitkumar Karwar <akarwar@marvell.com> mwifiex: add basic 11h support for station

This patch adds code to parse requested AP's 11h capabilities
and add 11h information in association request.

Also, deauth is sent to the AP after receiving channel switch
announcement event from firmware. This happens when AP advertises
WLAN_EID_CHANNEL_SWITCH IE in it's beacon.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: Paul Stewart <pstew@chromium.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
388ec385d5ce4916f0677918a42e592ba423092d 18-May-2013 Amitkumar Karwar <akarwar@marvell.com> mwifiex: add calibration data download feature

User can provide a text file containing calibration data in hex
format while loading mwifiex module. It will be downloaded to
firmware.
eg. insmod mwifiex.ko cal_data_cfg=cal_data.conf

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
0f9e9b8ba72bc75ee6189d0e86639f7e7a494a30 18-May-2013 Avinash Patil <patila@marvell.com> mwifiex: add del_station handler

This patch adds cfg80211 del_station handler for mwifiex.
If bss is not started or there are no stations in associated
stations list, no action is taken. If argument received is
null/broadcast mac, all stations in associated station list are
deauthenticated.

Patch also deletes related RxReorder stream and TxBA stream tables
for related station.

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>
83c78da983d672e214b5daedf83b26df95dd8407 19-Mar-2013 Yogesh Ashok Powar <yogeshp@marvell.com> 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>
43283febfdd6ce2ca9e76982c459a03524ef9755 14-Mar-2013 Yogesh Ashok Powar <yogeshp@marvell.com> mwifiex: cleanup VHT cap

Firmware returned VHT cap has the same format that cfg80211
expects. There is no need to parse the vht cap from the firmware
and then set it to ieee80211_sta_vht_cap. Just copying is
sufficient.

Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
7da060c1c01b103d181dba39bce9bd141a945f99 05-Mar-2013 Amitkumar Karwar <akarwar@marvell.com> mwifiex: add WOWLAN support

Currently 'magic-packet' and 'patterns' options in 'iw wowlan'
command are supported.

Appropriate packet filters for wowlan are configured in firmware
based on provided patterns and/or magic-packet option.

For examples,

wake-on ARP request for 192.168.0.100:
iw phy0 wowlan enable patterns ff:ff:ff:ff:ff:ff 20+08:06
46+c0:a8:00:64

wake-on RX packets sent from IP address 192.168.0.88:
iw phy0 wowlan enable patterns 34+c0:a8:00:58

wake-on RX packets with TCP destination port 80
iw phy0 wowlan enable patterns 44+50

wake-on MagicPacket:
iw phy0 wowlan enable magic-packet

wake-on MagicPacket or patterns:
iw phy0 wowlan enable magic-packet patterns 12+00:11:22:33:44:55
18+00:50:43:21

wake-on IPv4 multicast packets:
iw phy0 wowlan enable patterns 01:00:5e

wake-on IPv6 multicast packets:
iw phy0 wowlan enable patterns 33:33

disable all wowlan options
iw phy0 wowlan disable

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
0d7f53e34d3f5f82c0f4941356a02285a78807a4 05-Mar-2013 Amitkumar Karwar <akarwar@marvell.com> mwifiex: add "ethtool wol" command support

Host sleep wakeup condition is configured using this command.

Supports Wake-on: pumb

For examples:

wake-on any unicast packets:
ethtool -s mlan0 wol u

wake-on multicast/broadcast packet:
ethtool -s mlan0 wol mb

wake-on unicast packets and MAC events:
ethtool -s mlan0 wol pu

wake-on unicast/multicast/broadcast packets and MAC events:
ethtool -s mlan0 wol pmbu

disable all wake-on options:
ethtool -s mlan0 wol d

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
cc0b5a64b8e79b7fb73b8dfd4f71ac86d3ac94c7 05-Mar-2013 Amitkumar Karwar <akarwar@marvell.com> mwifiex: shorten the host sleep configuration macro names

As we are adding a few more macros in this category in next
patch, this cleanup work is required.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
a5f390562a375a315292648e2da865a12b42f280 16-Feb-2013 Yogesh Ashok Powar <yogeshp@marvell.com> mwifiex: add 802.11AC support

For STA mode, collect VHT realated IEs from the Beacons or Probe
Responses and append similar VHT related IEs to association
requests.

For AP mode, get VHT related capability information and share it
with cfg80211 at the time of wiphy register. This information is
further used by cfg80211 and hostapd to start an AP with 802.11AC
support.

Currently only 8897 supports 802.11AC.

Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Nishant Sarmukadam <nishants@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: Frank Huang <frankh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
7532c7d0138a4984eb0c8b12b9c310cf8a6d6977 18-Jan-2013 Amitkumar Karwar <akarwar@marvell.com> mwifiex: correction in status codes used for association failure

When AP responds with appropriate status code, we forward that
code correctly to cfg80211. But sometimes when there is no
response from AP, our firmware uses proprietary status codes.
We will map authentication timeout to WLAN_STATUS_AUTH_TIMEOUT
and other proprietary codes to WLAN_STATUS_UNSPECIFIED_FAILURE.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
54428c57b6d7a9dc172ecfa80b07f17431015d09 03-Jan-2013 Avinash Patil <patila@marvell.com> mwifiex: parse WMM IEs from hostapd for mwifiex AP

This patch adds support for parsing WMM IEs from hostapd
and setting them to FW via sys configure command.

Patch also sets wiphy flag to advertise AP uAPSD support.

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>
dd0d83c220086dba81055e59b7c1f63f94b27003 27-Nov-2012 Avinash Patil <patila@marvell.com> mwifiex: advertise GreenField, 40MHz intolerance support to cfg80211

This patch adds support for advertising GreenField, 40MHz intolerance
or LDPC coding support to cfg80211.

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>
8b4509f642743e87f9a5c34bacb5d4b63ac730b4 26-Sep-2012 Kevin Gan <ganhy@marvell.com> mwifiex: add inactivity deauth support for ap

The firmware has support for this feature, so we offload it to
firmware. In start_ap, driver passes the inactivity timeout
value to firmware via TLVs and firmware will report STA_DEAUTH
event to driver when inactivity timer is fired.

Signed-off-by: Kevin Gan <ganhy@marvell.com>
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Nishant Sarmukadam <nishants@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9197ab9e5f3016ad05e1aa3e627ddf7d08927ccf 26-Sep-2012 Stone Piao <piaoyun@marvell.com> mwifiex: add support for P2P GO in interface type change

When cfg80211 calls to change interface type for P2P GO, send
P2P mode config commands to firmware and set bss role and bss
mode accordingly.

Signed-off-by: Stone Piao <piaoyun@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>
e1a2b7a394ad8c2da9d7f4276680aa9c42e0bd97 26-Sep-2012 Stone Piao <piaoyun@marvell.com> mwifiex: add support for P2P client in interface type change

When cfg80211 calls to change interface type for P2P client,
send P2P mode config commands to firmware.

Signed-off-by: Stone Piao <piaoyun@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
eab1c76bfc40904ddc9edc4f076ff7749696870a 26-Sep-2012 Stone Piao <piaoyun@marvell.com> mwifiex: process remain on channel expired event

Process remain on channel expired event, and notify cfg80211.

Signed-off-by: Stone Piao <piaoyun@marvell.com>
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
7feb4c48313d58b445a91a598d99c025029ce00b 26-Sep-2012 Stone Piao <piaoyun@marvell.com> mwifiex: implement remain_on_channel and cancel_remain_on_channel

Add a new command to implement remain_on_channel and
cancel_remain_on_channel.

Signed-off-by: Stone Piao <piaoyun@marvell.com>
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2dbaf751b1dec3a603130a475f94cc4d3f404362 26-Sep-2012 Stone Piao <piaoyun@marvell.com> mwifiex: report received management frames to cfg80211

Process the management frames received from firmware and report
them to cfg80211.

Signed-off-by: Stone Piao <piaoyun@marvell.com>
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Signed-off-by: Kevin Gan <ganhy@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
3cec68701a104c8aa0b5c38b6bfad4193cdff3fe 26-Sep-2012 Stone Piao <piaoyun@marvell.com> mwifiex: implement cfg80211 mgmt_frame_register handler

Add a new command to implement mgmt_frame_register.

Signed-off-by: Stone Piao <piaoyun@marvell.com>
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
fd4c45112800573f2c40a6372c419f6218885b58 11-Sep-2012 Bing Zhao <bzhao@marvell.com> mwifiex: disable WOW by default

Some platforms do not support WOW. Let's change the default wakeup
criteria to 0.

Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
a3c2c4f6d8bcd473a7016db93da4f10b3f10f25f 28-Aug-2012 Avinash Patil <patila@marvell.com> mwifiex: parse rate info for AP

This patch adds support for parsing rates from cfg80211_ap_settings
of start_ap handler. This in turn adds support for 11a and 11b phy
configurations.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
b877f4cf5af86528e07a0182e2b369ded38ccf38 04-Aug-2012 Ying Luo <luoy@marvell.com> mwifiex: add AES_CMAC support in key_material cmd

The sequence counter will be sent to firmware via key_material
command.

Signed-off-by: Ying Luo <luoy@marvell.com>
Signed-off-by: Stone Piao <piaoyun@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
838e4f44929782a2163c7bc95a7cd2da5d8b47f9 04-Aug-2012 Avinash Patil <patila@marvell.com> mwifiex: improve uAP RX handling

1. Separate file for uAP RX handling.
2. If received packet is broadcast/multicast, send it to kernel
as well as requeue it back to uAP TX queue.
3. If received packet is for associated STA (intra-BSS), requeue
it back to uAP TX queue.
4. In all other cases (packets for AP or inter-BSS packets),
pass packet to kernel to handle it accordingly.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
ed1ea6f42ecedbbb3a8c4e0211ad683b8680eebe 04-Aug-2012 Amitkumar Karwar <akarwar@marvell.com> mwifiex: do le_to_cpu conversion for Rx packet header elements

We do similar conversion for Tx packet header but it was missing
for Rx packet header. Without this fix, Rx packet header won't
be correctly parsed on big endian platform.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
1f45b39ececbdfb13a7bf4d2f644d2e89a8b415f 14-Jul-2012 Amitkumar Karwar <akarwar@marvell.com> mwifiex: remove redundant code in set channel path

1) Recently we removed set_channel cfg80211 handler. Also, cfg80211
blocks ibss connection requests if ibss network is already started
/joined. Hence the code to restart ibss network in new channel
(mwifiex_drv_change_adhoc_chan() function) becomes redundant.

2) mwifiex_bss_set_channel() function is redundant. It does some
error checking and calculate adhoc start band and adhoc channel.
Cfg80211 already takes care of error checking and provides correct
channel information to the driver. Adhoc start band is already
calculated in mwifiex_set_rf_channel() function.

Other associated code is also removed in this patch.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
8a279d5b4dc128a4fcc3f8c545603adbce59bcfa 03-Jul-2012 Amitkumar Karwar <akarwar@marvell.com> mwifiex: add set_antenna handler support

This enables user to set mode of Tx/Rx path using "iw set antenna"
command. For non MIMO chips, the command will be used for selecting
specific antenna or configuring antenna diversity mode.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
caa8984f59b8be220767886ae27de855f77e6a61 28-Jun-2012 Amitkumar Karwar <akarwar@marvell.com> mwifiex: use correct firmware command to get power limits

"priv->max_tx_power_level" and "priv->min_tx_power_level" variables
are initialized to maximum and minimum power levels supported by
hardware by sending correct firmware command.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
96893538564c43276dffe5e294b56935197cf1c8 15-Jun-2012 Avinash Patil <patila@marvell.com> mwifiex: support for WEP in AP mode

This patch adds support for WEP open/shared encryption in AP mode.

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>
2228125600b3031657b825502d1a1999e4c02566 15-Jun-2012 Avinash Patil <patila@marvell.com> mwifiex: set HT capability based on cfg80211_ap_settings

Parse HT IE from cfg80211 and set HT capabilities accordingly
to FW. If HT IE is missing, 11n would be disabled in FW.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
605b73af3273336b2465962d99a937069710e104 17-May-2012 Avinash Patil <patila@marvell.com> mwifiex: support NL80211_HIDDEN_SSID_ZERO_LEN for uAP

mwifiex uAP supports NL80211_HIDDEN_SSID_ZERO_LEN type of hidden
SSID only. NL80211_HIDDEN_SSID_ZERO_CONTENTS is not supported.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
7a1c99343c5305c47b5e078d1af2144f9026df40 30-May-2012 Avinash Patil <patila@marvell.com> mwifiex: support NL80211_HIDDEN_SSID_ZERO_LEN for uAP

mwifiex uAP supports NL80211_HIDDEN_SSID_ZERO_LEN type of hidden
SSID only. NL80211_HIDDEN_SSID_ZERO_CONTENTS is not supported.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
f31acabe3dd0699c61a8ec4ba4f70816d58b4dc9 09-May-2012 Avinash Patil <patila@marvell.com> mwifiex: retrieve IEs from cfg80211_beacon_data and send to firmware

This patch adds logic for setting tail beacon IE, probe response IE
and assoc response IE from cfg80211_ap_settings parameter of
start_ap handler into FW.

RSN IE is also retrieved from tail IE buffer and sent to firmware.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
ede98bfa914ec3285761da4bb9c25d1e160ea85b 09-May-2012 Avinash Patil <patila@marvell.com> mwifiex: add custom IE framework

1. support for setting custom IE from application hostapd etc.
Custom IE addition using auto-indexing and Custom IE deletion using
static indices (which are allocated during IE addition and stored in
driver) are supported.
2. Separate file for handling IE related execution.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
e76268da22f9dbe8794d68e6a504a781dfd36998 09-May-2012 Avinash Patil <patila@marvell.com> mwifiex: rearrange AP sys configure code

This patch takes into account AP config_type
(bss config/custom ie config) while preparing AP
sys_configure command buffer.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
f752dcd52923b8de82881cf1269f0dc03dbd1088 09-May-2012 Avinash Patil <patila@marvell.com> mwifiex: add WPA2 support for AP

1. Support for parsing security related parameters from
cfg80211_ap_settings in start_ap cfg80211 handler
2. Conversion of these security information into FW understandle TLVs
and setting into FW thru sys_config command
3. key management is done on host. This ensures that FW forwards EAPOL
key packets to host instead of processing on its own.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
e568634ae7ac379661c90731d480e067929420a1 09-May-2012 Avinash Patil <patila@marvell.com> mwifiex: add AP event handling framework

Added logic to handle AP event that are generated
by the firmware. As MLME/SME is implemented in the
firmware, events such as station association and
deauthentication, must be sent to userspace (hostapd)
for creating and deleting station database.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Yogesh Powar <yogeshp@marvell.com>
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12190c5d80bd3c880c76fdaee5a56314ff0bd256 09-May-2012 Avinash Patil <patila@marvell.com> mwifiex: add cfg80211 start_ap and stop_ap handlers

1. add start AP and stop AP handlers
2. support for parsing ssid, beacon period, DTIM period
from beacon_parameters structure and setting it to FW.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9b930eaed9c7e722eb1ae4f4632ff1ab285b3c4a 09-May-2012 Avinash Patil <patila@marvell.com> mwifiex: common set_wiphy_params cfg80211 handler for AP and STA interface

Add support for setting fragmentation threshold, RTS threshold
and retry limit.
Since wiphy parameters are properties of physical device,
appropriate function to set phy parameters is invoked depending
upon bss_type(STA or AP) for each virtual interface.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
4db16a18c25394348f821f0a1b4a7caa8567e071 09-May-2012 Avinash Patil <patila@marvell.com> mwifiex: add AP command sys_config and set channel

1. support for AP sys_config command and added parsing of channel
information.
2. support for setting AP channel from cfg80211 set_channel handler

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
40d07030625840156bffe2da3e9f14f87d7a4a99 09-May-2012 Avinash Patil <patila@marvell.com> mwifiex: add bss start and bss stop commands for AP

1. separate file for preparing uAP command buffer
2. definition of bss_start and bss_stop commands being sent to
firmware

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
75edd2c6803aec27083643e21aeb9b531587803f 09-May-2012 Avinash Patil <patila@marvell.com> mwifiex: append peer mac address TLV in key material command to firmware

Modify key related cfg80211 handlers to copy peer mac address for
pairwise keys. If peer mac address is not present or group keys,
it will be sent as broadcast mac address.
This would be required since hostapd downloads per peer PTK.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2e4c14a5582addd655e53277861b7ad853bfd6c3 26-Apr-2012 Amitkumar Karwar <akarwar@marvell.com> mwifiex: fix static checker warnings

"oui_type" in structure "ieee_types_vendor_header" is not used separately,
so include it in "oui" array. Now complete oui will be compared fixing
following warnings.

drivers/net/wireless/mwifiex/sta_ioctl.c:1410 mwifiex_set_gen_ie_helper()
error: memcmp() 'pvendor_ie->oui' too small (3 vs 4)
drivers/net/wireless/mwifiex/sta_ioctl.c:1435 mwifiex_set_gen_ie_helper()
error: memcmp() 'pvendor_ie->oui' too small (3 vs 4)
drivers/net/wireless/mwifiex/scan.c:1177 mwifiex_update_bss_desc_with_ie()
error: memcmp() 'vendor_ie->vend_hdr.oui' too small (3 vs 4)
drivers/net/wireless/mwifiex/scan.c:1185 mwifiex_update_bss_desc_with_ie()
error: memcmp() 'vendor_ie->vend_hdr.oui' too small (3 vs 4)

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
4daffe3543667419294b6f22901b7255cbdebdf4 19-Apr-2012 Amitkumar Karwar <akarwar@marvell.com> mwifiex: add support for Marvell USB8797 chipset

This patch supports Avastar 88W8797 chipset with USB interface.

The corresponding firmware image file is located at:
"mrvl/usb8797_uapsta.bin"

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Signed-off-by: Frank Huang <frankh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
b5abcf0219263f4e961dca71cbe26e06c5b0ee68 17-Apr-2012 Amitkumar Karwar <akarwar@marvell.com> mwifiex: corrections in timestamp related code

We get two timing related fields for each bss from firmware in scan
results.
1) timestamp - Actual timestamp information in probe response/beacon
2) network_tsf - firmware's TSF value at the time the beacon or probe
response was received.
Both are needed while associating by firmware.

The patch takes care of following things.
1) We should pass "timestamp" to cfg80211_inform_bss(), but currently
"network_tsf" is being provided. This error is corrected here.
2) Rename "network_tsf" to "fw_tsf"
3) Make use of u64 variable instead of an array of u8/u32 to save
parsed "timestamp" information.
4) Use timestamp provided to stack in scan results using
cfg80211_inform_bss() while associating. (bss->tsf)
5) Allocate space to save fw_tsf in "priv" of cfg80211_bss
and retrieve it while associating.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13d7ba78b514d8b720a82b9bddaaee0c004f2a1f 10-Apr-2012 Avinash Patil <patila@marvell.com> mwifiex: add support for WPS2.0

This patches enables setting association request and probe request
IE for station interface. WPS exchange between WPS2.0 AP and mwifiex
STA Enrollee/External Registrar completes successfully.

Tested with wpa_supplicant 1.0 and 2.0 devel.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
99fec5dee8f717daf2b1789e8ac5913863c6dee8 27-Mar-2012 Johannes Berg <johannes.berg@intel.com> mwifiex: don't use IEEE80211_MAX_QUEUES

IEEE80211_MAX_QUEUES is an internal mac80211 value,
it is not guaranteed to be always 4. The firmware
API in mwifiex almost certainly doesn't care about
mac80211 changing though, so mwifiex shouldn't use
this value.

Maybe it should use IEEE80211_NUM_ACS instead and
that is what I'm doing here as at least that value
will probably never change, but maybe it should
have its own define instead.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Acked-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
fa444bf88ce2ba17d24dd0bb279e3106acf86bed 16-Mar-2012 Amitkumar Karwar <akarwar@marvell.com> mwifiex: add set_cqm_rssi_config handler support

In this handler LOW_RSSI and HIGH_RSSI events are subscribed
to FW using provided threshold value so that FW will monitor
connection quality and trigger any of these events.

Driver will notify cfg80211 about connection quality based on
inputs from FW and provided hysteresis.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
074d46d1d23f27488a3f314e29cae2453541f17d 15-Mar-2012 Johannes Berg <johannes.berg@intel.com> wireless: rename ht_info to ht_operation

Since some of the HT code pre-dates 802.11n-2009
some names are wrong. The one that bothers me most
is that "HT operation" is called "HT information"
in our code and that causes confusion.

Rename "HT information" to "HT operation" and also
the control_chan field to primary_chan to match
the name used in the spec.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Acked-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
931f15842a9e1251d46a681bd10d2033f6fb1ffd 14-Mar-2012 Yogesh Ashok Powar <yogeshp@marvell.com> mwifiex: fix checkpatch --strict warnings/errors Part 3

For files fw.h, init.c and join.c

Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
be0b281e8f7afd56d2250a568b85dafc850bc9ae 28-Feb-2012 Amitkumar Karwar <akarwar@marvell.com> mwifiex: fix bug in wildcard scan handling

Currently if valid SSID list is provided in scan request, driver
performs specific SSID scan otherwise wildcard scan is chosen.

When wpa_supplicant provides valid SSID list followed by
zero-length SSID for wildcard scan, only specific SSID scan is
performed by driver. Actually driver is expected to do both type
of scanning in this case. The patch fixes this issue.

Also, use SSID list pointer provided by stack directly, instead
of copying SSID's to local structure.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
5eb02e44adc92a71bae3ff60acb1eea5ada14e93 25-Feb-2012 Amitkumar Karwar <akarwar@marvell.com> mwifiex: remove unnecessary enum MWIFIEX_802_11_WEP_STATUS

Instead of defining an 'enum', we can simply use 'u8' flag for WEP
status. Rename 'wep_status' to 'wep_enabled' to match with
'wpa_enabled' and 'wpa2_enabled'.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
21c3ba346486c3df39d23a2a085fcdfc7a59a853 21-Dec-2011 Amitkumar Karwar <akarwar@marvell.com> mwifiex: use IEEE80211_HT_PARAM_CHA_SEC_* macros

Replace driver specific macros with the corresponding
IEEE80211_HT_PARAM_CHA_SEC_* macros defined in ieee80211.h.
Also, rename 'adapter->chan_offset' to 'adapter->sec_chan_offset'
for consistency.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
e3bea1c8751d297c197949db01aa1e7adbc1104d 17-Nov-2011 Bing Zhao <bzhao@marvell.com> mwifiex: add support for Marvell sd8797 device

This patch supports Marvell chipset 88W8797 (Avastar) with
SDIO interface.

The corresponding firmware image file is located at:
"mrvl/sd8797_uapsta.bin"

Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: Tristan Xu <xurf@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Signed-off-by: Frank Huang <frankh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
63af63330f4c8b4fdcc13dec082dea3b81d53b0a 08-Nov-2011 Yogesh Ashok Powar <yogeshp@marvell.com> mwifiex: fix coding style

Rename DataRate to data_rate and arrange 'for' loop
for better readability.

Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
711825a06bb288e04f8236d77c4e12eba9a1c478 13-Oct-2011 Amitkumar Karwar <akarwar@marvell.com> mwifiex: fix make namespacecheck warnings

This patch takes care of warnings found by running
'make namespacecheck':

1. Remove dead code.
2. Reorder function definitions to avoid forward declarations.
3. Remove unnecessary function/structure declarations and mark
them as static.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
d930faee141bd0a6a4873791996c5354c9a85ca7 12-Oct-2011 Amitkumar Karwar <akarwar@marvell.com> mwifiex: add support for Marvell pcie8766 chipset

This patch supports 88W8766P chipset with a PCIe interface.

The corresponding firmware image file is located at:
"mrvl/pcie8766_uapsta.bin"

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Ramesh Radhakrishnan <rramesh@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: Frank Huang <frankh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
7c6fa2a843c5ac0f8e3e4bf679cee9c93d5e3437 11-Aug-2011 Amitkumar Karwar <akarwar@marvell.com> mwifiex: use cfg80211 dynamic scan table and cfg80211_get_bss API

Instead of maintaining static scan table in driver, scan list is sent
to cfg80211 stack (after parsing each scan command response).
In assoc handler (for infra and ibss network) requested BSS information
is retrieved using cfg80211_get_bss() API.

With the changes above some redundant code are removed.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
cd27bc3c3efb95ee20e5b627c483eb9513cd0350 09-Jul-2011 Amitkumar Karwar <akarwar@marvell.com> mwifiex: 11n specific configuration for transmit

Currently device is not able to transmit in 40MHz in spite of
enabling 40MHz support in HTCapInfo IE in assoc req, because
11n specific FW capabilities for transmission are not initialized.
This patch adds code to initilize these capabilities.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
a8c485652ad4217800015aab25f1b70b96adb1a9 11-May-2011 Bing Zhao <bzhao@marvell.com> mwifiex: cleanup ioctl.h

Some structures and macros in ioctl.h are redundant or no longer
used.

Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
7cc5eb629cefa9a40295ff5ee4b1ec41ad855e8d 10-May-2011 Amitkumar Karwar <akarwar@marvell.com> mwifiex: remove unnecessary struct mwifiex_opt_sleep_confirm_buffer

The structure definition is
struct mwifiex_opt_sleep_confirm_buffer {
u8 hdr[4];
struct mwifiex_opt_sleep_confirm ps_cfm_sleep;
} __packed;

For sleep_confirm command we already reserve 4 bytes (using skb_reserve())
for an interface header. It will be filled later by interface specific code.
We don't need "hdr[4]" element in above structure. So we can use
"struct mwifiex_opt_sleep_confirm" directly instead of
"struct mwifiex_opt_sleep_confirm_buffer".

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
a37316586d926a10d66b5585c5d91683d6468f68 16-Apr-2011 Amitkumar Karwar <akarwar@marvell.com> mwifiex: remove some macro definitions

use corresponding macros defined in include/linux/ieee80211.h

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
6a35a0ac5771fa962c45926678d1f194cbc98c4e 07-Apr-2011 Yogesh Ashok Powar <yogeshp@marvell.com> mwifiex: use common keyinfo bitmap for different key types

Instead of having separate key information definitions for
each type of key, a common key information bitmap is used.

Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
7327890a1f42046c50030c8723bdbd9266d781bc 31-Mar-2011 Bing Zhao <bzhao@marvell.com> mwifiex: remove struct mwifiex_802_11_fixed_ies

struct mwifiex_802_11_fixed_ies is not necessary.
struct mwifiex_event_wep_icv_err is not used any more.

Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2b06bdbe073f8dff93eb476f07352df43dcdba44 31-Mar-2011 Marc Yang <yangyang@marvell.com> mwifiex: cleanup power save related struct and macros

remove redundant structures and unused macros

Signed-off-by: Marc Yang <yangyang@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
4f3f1ee9f373abfdc09bb3bed87969b7fe0fba06 29-Mar-2011 Marc Yang <yangyang@marvell.com> mwifiex: remove unused macros in fw.h

These definitions are no longer used after previous cleanups.

Signed-off-by: Marc Yang <yangyang@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
fd2e401a35500c9af63dc7ffbc545d2e3c478702 29-Mar-2011 Marc Yang <yangyang@marvell.com> mwifiex: remove unused radio_on variable and macros

The radio_on variable is defined but never used.

Signed-off-by: Marc Yang <yangyang@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
6d2bd916afe6950b50f750cd82bbb9c6ff58611f 26-Mar-2011 Marc Yang <yangyang@marvell.com> mwifiex: use IEEE80211_HT_CAP_ macros for 11n cap_info

The hw_dot_11n_dev_cap reported by firmware hw_spec
has different format than the 11n capabilities.
Hence a lot of SET_ and RESET_ bit operation macros
were used to convert the dev_cap format to 11n
capability format. However the locally defined 11n
ht_cap macros are not necessary as we can use
IEEE80211_HT_CAP_ macros directly.

The 32-bit dev_cap bitmap is added as comment to
explain the mapping between firmware and 11n spec.

Some unused macros and unnecessary adapter variables
are also removed.

Signed-off-by: Marc Yang <yangyang@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
b93f85f0fb019f527b68569aafb836c94b89a47e 26-Mar-2011 Bing Zhao <bzhao@marvell.com> mwifiex: remove macro SHORT_SLOT_TIME_DISABLED

and SHORT_SLOT_TIME_ENABLED.
Use WLAN_CAPABILITY_SHORT_SLOT_TIME instead.

Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
0022801c893e953ebff8e0ad00cc22716055babf 25-Mar-2011 Yogesh Ashok Powar <yogeshp@marvell.com> mwifiex: remove helper functions for displaying 11n capabilities

'iw list' is sufficient to retrieve the information which
was displayed by these functions.

Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
5e6e3a92b9a4c9416b17f468fa5c7fa2233b8b4e 22-Mar-2011 Bing Zhao <bzhao@marvell.com> wireless: mwifiex: initial commit for Marvell mwifiex driver

This driver adds WiFi support for Marvell 802.11n based chipsets
with SDIO interface. Currently only SD8787 is supported. More
chipsets will be supported later.

drivers/net/wireless/mwifiex/

Signed-off-by: Nishant Sarmukadam <nishants@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Marc Yang <yangyang@marvell.com>
Signed-off-by: Ramesh Radhakrishnan <rramesh@marvell.com>
Signed-off-by: Frank Huang <frankh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>