wl12xx: AP-mode - reconfigure templates after basic rates change
authorArik Nemtsov <arik@wizery.com>
Mon, 18 Apr 2011 11:15:26 +0000 (14:15 +0300)
committerLuciano Coelho <coelho@ti.com>
Mon, 2 May 2011 07:31:18 +0000 (10:31 +0300)
When there's a change in the basic rates of the AP, reconfigure relevant
templates with the new rates.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
drivers/net/wireless/wl12xx/init.c
drivers/net/wireless/wl12xx/init.h
drivers/net/wireless/wl12xx/main.c

index 5d0ecd2018bfc5fb6190ab258623dd92dfb9ba70..b1242a6de27b1f9f16acaecada09918dec808c5f 100644 (file)
@@ -443,7 +443,7 @@ static int wl1271_ap_hw_init(struct wl1271 *wl)
        return 0;
 }
 
-static int wl1271_ap_hw_init_post_mem(struct wl1271 *wl)
+int wl1271_ap_init_templates(struct wl1271 *wl)
 {
        int ret;
 
@@ -470,6 +470,11 @@ static int wl1271_ap_hw_init_post_mem(struct wl1271 *wl)
        return 0;
 }
 
+static int wl1271_ap_hw_init_post_mem(struct wl1271 *wl)
+{
+       return wl1271_ap_init_templates(wl);
+}
+
 int wl1271_init_ap_rates(struct wl1271 *wl)
 {
        int i, ret;
index 0dd2414a30d1e070ba1264b4d5e5ee6bdf74a615..3a3c230fd2922eec9d0a83adad3030576e1f2454 100644 (file)
@@ -34,5 +34,6 @@ int wl1271_init_energy_detection(struct wl1271 *wl);
 int wl1271_chip_specific_init(struct wl1271 *wl);
 int wl1271_hw_init(struct wl1271 *wl);
 int wl1271_init_ap_rates(struct wl1271 *wl);
+int wl1271_ap_init_templates(struct wl1271 *wl);
 
 #endif
index e9d4cf48ba35563494895f81e5b5eefaf63c00c3..433bc035741a41e5a2e08ef3d9181671313af024 100644 (file)
@@ -2503,6 +2503,10 @@ static void wl1271_bss_info_changed_ap(struct wl1271 *wl,
                        wl1271_error("AP rate policy change failed %d", ret);
                        goto out;
                }
+
+               ret = wl1271_ap_init_templates(wl);
+               if (ret < 0)
+                       goto out;
        }
 
        ret = wl1271_bss_beacon_info_changed(wl, vif, bss_conf, changed);