wcn36xx: enable the beaconing in mesh mode

Enable the beaconing in wnc36xx by tweaking the tim offset and
force the use of AP-style beaconing. Otherwise, beaconing is not
working. The tim offset is set to 256. Otherwise, this will
overwrite mesh beacon submitted by mac80211

Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@cozybit.com>
wcn36xx: enable beacon change using BSS_CHANGED_BEACON

Enable the beacon changed using BSS_CHANGED_BEACON. This is
especially useful for mesh mode.

Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@cozybit.com>
Merge pull request #128 from chunyeow/ft-mesh-support

Enable Mesh Beaconing and Changed
wcn36xx: set self STA default HT parameters

These default HT parameters are required for self STA entry.
In example, set the HT capable of self STA entry for bss
configuration in mesh allows the MCS rate to be used. Otherwise,
only legacy rate will be used.

Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@gmail.com>
Merge pull request #129 from chunyeow/ft-mesh-HT

wcn36xx: set self STA default HT parameters
wcn36xx: Fix copy paste error hal_exit_bmps -> hal_keep_alive

Signed-off-by: Pontus Fuchs <pontus.fuchs@gmail.com>
wcn36xx_msm: Fix compilation on newer qualcomm kernels

Add missing include mach/msm_smsm.h

Signed-off-by: Pontus Fuchs <pontus.fuchs@gmail.com>
wcn36xx: Improve feature caps exchange

* Response format is not in the canonical format.
  wcn36xx_smd_rsp_status_check cannot be used.

* Save the FW caps in wcn36xx struct for later use.

Signed-off-by: Pontus Fuchs <pontus.fuchs@gmail.com>
wcn36xx: Print FW capabilities

After fw caps exchange, print the FW's capabilities.

Signed-off-by: Pontus Fuchs <pontus.fuchs@gmail.com>
wcn36xx: Add support for 3680

3680 has a few registers on other addresses.

Signed-off-by: Pontus Fuchs <pontus.fuchs@gmail.com>
Merge pull request #130 from pof2/wcn3680

Wcn3680
Add the missing unlock before return from function
wcn36xx_smd_update_proberesp_tmpl() in the error
handling case.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
wcn36xx: missing unlocks on error paths

There are several places which are missing unlocks.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
wcn36xx: Fix logging macro with unnecessary semicolon

The wcn36xx_err macro should not end in a semicolon as
there are 2 consecutive semicolons in the preprocessed
output.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Eugene Krasnikov <k.eugene.e@gmail.com>
Cache nv to avoid request_firmware on resume path

If wowlan if off mac80211 will stop / start the driver on suspend /
resume. This causes problems on resume since request_firmware is called
from start. Fix this by caching the nv.

Signed-off-by: Pontus Fuchs <pontus.fuchs@gmail.com>
wcn36xx: Wait longer for SMD commands to complete

On some wcnss firmwares the start command can take up to 300ms to
complete. Currently there is a 200ms timeout for SMD command to
complete which causes the start to fail.

Increase the timeout to 500ms. Also improve debug information
regarding SMD command completion time.

Signed-off-by: Pontus Fuchs <pontus.fuchs@gmail.com>
Merge pull request #131 from pof2/misc

Misc
wcn36xx: Rename wcn36xx_vif.ucast_dpu_signature to self_ucast_dpu_sign

This is more line with the names of the other members

Signed-off-by: Pontus Fuchs <pontus.fuchs@gmail.com>
wcn36xx: Track dpu signature per sta

This fixes problems seen with multiple softap clients and reconnecting
softap clients.

Signed-off-by: Pontus Fuchs <pontus.fuchs@gmail.com>
wcn36xx: Update dtim period before starting BSS

The dtim period sent to FW was 0 because the dtim period
was never set. This caused an incorrect dtim count to be sent in
beacons.

Signed-off-by: Pontus Fuchs <pontus.fuchs@gmail.com>