Implement remove_key

Remove all keys when disassociating

Signed-off-by: Eugene Krasnikov <k.eugene.e@gmail.com>
Set beacon interval before calling config_bss

For joining wcn36xx need to have a proper beacon interval.

Signed-off-by: Eugene Krasnikov <k.eugene.e@gmail.com>
Do not report tx_status when it was not requested

If report tx_status without TX_ACK flag set mac80211 will treat
this packet as dropped. Not to leek memory just free skb.

Signed-off-by: Eugene Krasnikov <k.eugene.e@gmail.com>
Change name of rates table

Change the name of the rates table to something more appropriate.
llb and lla (yes.. lowercase L) are not that descriptive, especially
since lla was used for 2.4GHz action as well.

Signed-off-by: Olof Johansson <dev@skyshaper.net>
Move channel and rates definitions to beginning of file

These will need to be accessed in different places across the file.
Move them to the beginning of the file for easy access.

Signed-off-by: Olof Johansson <dev@skyshaper.net>
Change hw_values of rates to the values used by hardware

The hardware expects these values in the rates table sent to them.
Let's use them here for easy access later.

Signed-off-by: Olof Johansson <dev@skyshaper.net>
Change name of wcn_legacy_rates to wcn_2ghz_rates

These are not legacy rates but the rates used on 2.4GHz. Naming now
also better matches the rate table for 5GHz.

Signed-off-by: Olof Johansson <dev@skyshaper.net>
Do not encrypt null frame

Null frame must not be encrypted.

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

config_bss will return DPU signature that must be set
in BD when transfering data frames.

Signed-off-by: Eugene Krasnikov <k.eugene.e@gmail.com>
Update the allowed rates before association

This function will set the set of rates allowed for this access point
before the rates are sent to the firmware.

Signed-off-by: Olof Johansson <dev@skyshaper.net>
Enable n-rates

This will enable n-rates on access points with support for n-rates.

Signed-off-by: Olof Johansson <dev@skyshaper.net>
Use self_sta_index and self_dpu_desc_index for MGMT frames

For management frames set self_sta_index and self_dpu_desc_index
in BD that were received from WCN36XX_HAL_ADD_STA_SELF_RSP

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

Adapt to AP rates and enable n-rates
Merge pull request #53 from KrasnikovEugene/con_impr

Con impr
Use WCN36XX_BD_RATE_CTRL for 5G band

For MGMT frames on 5G band use WCN36XX_BD_RATE_CTRL rate.
The same must be done in future for P2P interface.

Signed-off-by: Eugene Krasnikov <k.eugene.e@gmail.com>
Do not report TX_ACK due to instability

FW will not report status on NULL packet that was sent during
scanning. This will stop all queus. Disable untill issue
https://github.com/KrasnikovEugene/wcn36xx/issues/57 is fixed.

Signed-off-by: Eugene Krasnikov <k.eugene.e@gmail.com>
Bail out from bss_info_changed in case of error

There is no need to proceed with execution.

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

In remove_interface ops correct address must be deleted.
Otherwise in case of having more than one interface second
call will fail.

Signed-off-by: Eugene Krasnikov <k.eugene.e@gmail.com>
Configure bss when encryption is set

Before setting keys update HW with encryption type.

Signed-off-by: Eugene Krasnikov <k.eugene.e@gmail.com>
Print hexdumps with offset instead of address

Print hexdumps with offset instead of address. This change is
done to be able to use the wcn36xx-dissector wireshark plugin
available here:
https://github.com/kanstrup/wcn36xx-dissector

Signed-off-by: Mikael Kanstrup <mikael.kanstrup@gmail.com>