[PATCH 2/3] Configure AP in correct order
Eugene Krasnikov
k.eugene.e at gmail.com
Fri Jun 7 08:54:14 EDT 2013
wcn36xx_smd_send_beacon and wcn36xx_smd_update_proberesp_tmpl
must be called in proper order otherwise it will cause FW crash.
Signed-off-by: Eugene Krasnikov <k.eugene.e at gmail.com>
---
main.c | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/main.c b/main.c
index 2c2fb6f..f382f4f 100644
--- a/main.c
+++ b/main.c
@@ -295,6 +295,7 @@ static void wcn36xx_bss_info_changed(struct ieee80211_hw *hw,
{
struct wcn36xx *wcn = hw->priv;
struct sk_buff *skb = NULL;
+ struct sk_buff *skb2 = NULL;
u16 tim_off, tim_len;
enum wcn36xx_hal_link_state link_state;
wcn->current_vif = (struct wcn36xx_vif *)vif->drv_priv;
@@ -389,7 +390,6 @@ static void wcn36xx_bss_info_changed(struct ieee80211_hw *hw,
wcn36xx_smd_config_bss(wcn, wcn->iftype,
wcn->addresses[0].addr, false,
wcn->beacon_interval);
- wcn36xx_smd_send_beacon(wcn, skb, tim_off, 0);
if (vif->type == NL80211_IFTYPE_ADHOC ||
vif->type == NL80211_IFTYPE_MESH_POINT)
@@ -399,6 +399,17 @@ static void wcn36xx_bss_info_changed(struct ieee80211_hw *hw,
wcn36xx_smd_set_link_st(wcn, vif->addr, vif->addr,
link_state);
+ wcn36xx_smd_send_beacon(wcn, skb, tim_off, 0);
+
+ skb2 = ieee80211_proberesp_get(hw, vif);
+ /*
+ * If driver does not call update_proberesp right after
+ * send_beacon FW will crash. Revisit this in future
+ * maybe FW will be fixed and there is no need to do
+ * that any more.
+ */
+ wcn36xx_smd_update_proberesp_tmpl(wcn, skb2);
+
} else {
/* FIXME: disable beaconing */
}
@@ -682,6 +693,8 @@ static int wcn36xx_init_ieee80211(struct wcn36xx *wcn)
wcn->hw->wiphy->cipher_suites = cipher_suites;
wcn->hw->wiphy->n_cipher_suites = ARRAY_SIZE(cipher_suites);
+ wcn->hw->wiphy->flags |= WIPHY_FLAG_AP_PROBE_RESP_OFFLOAD;
+
/* TODO make a conf file where to read this information from */
wcn->hw->max_listen_interval = 200;
--
1.7.11.3
More information about the wcn36xx
mailing list