Remove firmware allocation from wcn struct

Remove the nv pointer from the wcn struct and keep it inside the
smd_load_nv function as local. This way we don't keep it allocated
throught the life of the module and won't waste memory.

This commit also includes minor cleanup of unused variables in the
smd_load_nv function.

Signed-off-by: Olof Johansson <dev@skyshaper.net>
Do not configure bss in AP mode

config_bss was called after sta connects to
encrypted AP. That screwed AP confs.

Signed-off-by: Eugene Krasnikov <k.eugene.e@gmail.com>
In AP mode use correct sta_index and dpu_index

Towards encrypted AP connection always failed because of
wrong sta_index and dpu_index.

Use sta_index and dpu_index that came from confgi_sta.

Signed-off-by: Eugene Krasnikov <k.eugene.e@gmail.com>
Merge pull request #79 from Coi-l/cleaning

Remove firmware allocation from wcn struct
Merge pull request #81 from KrasnikovEugene/ap_en

Ap en
Set HT caps in config_sta

Configure HW with correct high throughput capabilities in config_sta.

Signed-off-by: Eugene Krasnikov <k.eugene.e@gmail.com>
Remove redundant parameters from config_sta

vif and sta already contains bssid address and address
of the station that is trying to connect to bss.

Signed-off-by: Eugene Krasnikov <k.eugene.e@gmail.com>
Merge pull request #82 from KrasnikovEugene/ht

Set HT caps in config_sta
Add ieee80211_sta parameter to config_bss

Config_bss need to set HT capabilities. For that pass
ieee80211_sta to config_bss function.

Signed-off-by: Eugene Krasnikov <k.eugene.e@gmail.com>
Remove redundant beacon_interval parameter

config_bss does not need to have extra parameter for
beacon_interval since it’s available from wcn struct.

Signed-off-by: Eugene Krasnikov <k.eugene.e@gmail.com>
Configure secondary channel offset

Keys exchange always fails on 5GHz with 40MHz channel
because extension channel was not set to secondary channel
offset.

Signed-off-by: Eugene Krasnikov <k.eugene.e@gmail.com>
Get beacon_int, ht_operation_mode and hidden_ssid from vif

Set correct config_bss parameters from vif

Signed-off-by: Eugene Krasnikov <k.eugene.e@gmail.com>
Back off if ring buffer is full

If ring is full stop mac80211 queues so upper layers will not try to
send any frames until bottom half has capacity for sending frames.

Signed-off-by: Eugene Krasnikov <k.eugene.e@gmail.com>
Merge pull request #84 from KrasnikovEugene/config_bss

Config bss
Merge pull request #85 from KrasnikovEugene/dxe_crash

Back off if ring buffer is full
Set correct tx_channel_width_set in config_bss

Based on IE IEEE80211_HT_CAP_SUP_WIDTH_20_40 configure
HW if bss supports 40MHz channel or not.

Signed-off-by: Eugene Krasnikov <k.eugene.e@gmail.com>
Do not send FEATURE_CAPS_EXCHANGE to old FW

Only latest FW supports smd command FEATURE_CAPS_EXCHANGE.
Do not send this command for old FW version.

Signed-off-by: Eugene Krasnikov <k.eugene.e@gmail.com>
Set correct listen_interval

listen_interval was hardcoded but must be set dynamically.

Signed-off-by: Eugene Krasnikov <k.eugene.e@gmail.com>
Merge pull request #86 from KrasnikovEugene/bss_refactor

Bss refactor
Dump RX BD structure for each packet

For RX path debugging it’s useful to dump BD.

Signed-off-by: Eugene Krasnikov <k.eugene.e@gmail.com>