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.

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

Mesh uses a lot of BSS_CHANGED_BEACON instead of
BSS_CHANGED_BEACON_ENABLED.

Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@cozybit.com>
wcn36xx: set self sta entry for mesh as HT capable

Set the HT capable for self STA entry for bss configuration in
mesh. Otherwise, only legacy rate will be used for transmitting.

Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@cozybit.com>
wcn36xx: allow HT40 in 2.4GHz

Allow the HT40+ and HT40- in 2.4GHz, although it is not
recommended in actual deployment or usage.

Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@cozybit.com>
wcn36xx: don't delete the bss prior to STA deletion

STA deletion is failed if BSS is deleted prior to that.

Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@cozybit.com>
wcn36xx: fix typo error

Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@cozybit.com>
wcn36xx: add tx rate reporting

This patch requires the Bob's patch entitled "mac80211:
implement drv_get_link_stats()" to work.

Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@cozybit.com>
wcn36xx: always reporting fail_avg as 0

Need to use fail_avg for HWMP metric calculation but just set to
0 first and revisit this next time.

Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@cozybit.com>
wcn36xx: support the feteching of fail ACK transmit

This maybe useful for HWMP metric calculation.

Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@cozybit.com>
wcn36xx: fix the Tx Rate for rejoined mesh STA

Previously, the Tx Rate is suffered by configuring the BD as management
frame in the case of inactivity mesh STA. QoS Null frame is generated by
the firmware to monitor the link activity between mesh STAs. Now, re-insert
the inactivity mesh STA with WCN36XX_HAL_CONFIG_STA_REQ command with action
field set to update seems to solve the problem.

Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@cozybit.com>
wcn36xx: fix the mesh STA for rejoin

The firmware has triggered the QoS NULL frame to monitor the links
amongst peer mesh STAs. Once one of the peer mesh STAs is leaving or
out of the range and no ACK received from the peer mesh STA, the
firmware will automatically delete the peer mesh STA.

After deleting the mesh STA and adding the mesh STA back with the
HAL command return no error still won't work. The unicast data frame
is not able to transmit out from the mesh STA. So the only way is
force the mesh STA to use bss STA index instead of the STA index.

Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@cozybit.com>
Signed-off-by: Jason Mobarak <jam@cozybit.com>