wl12xx: move probereq into wlvif
authorEliad Peller <eliad@wizery.com>
Wed, 5 Oct 2011 09:55:49 +0000 (11:55 +0200)
committerLuciano Coelho <coelho@ti.com>
Fri, 7 Oct 2011 05:32:40 +0000 (08:32 +0300)
move probereq into the per-interface data, rather than
being global.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
drivers/net/wireless/wl12xx/main.c
drivers/net/wireless/wl12xx/scan.c
drivers/net/wireless/wl12xx/wl12xx.h

index 0da9ddc8b6cf0d13f913a1bd360ecd13faa397a3..006e17458130cfd9282eafabc0c4cf80797d4932 100644 (file)
@@ -3525,11 +3525,12 @@ sta_not_found:
                        /*
                         * Get a template for hardware connection maintenance
                         */
-                       dev_kfree_skb(wl->probereq);
-                       wl->probereq = wl1271_cmd_build_ap_probe_req(wl, NULL);
+                       dev_kfree_skb(wlvif->probereq);
+                       wlvif->probereq = wl1271_cmd_build_ap_probe_req(wl,
+                                                                       NULL);
                        ieoffset = offsetof(struct ieee80211_mgmt,
                                            u.probe_req.variable);
-                       wl1271_ssid_set(vif, wl->probereq, ieoffset);
+                       wl1271_ssid_set(vif, wlvif->probereq, ieoffset);
 
                        /* enable the connection monitoring feature */
                        ret = wl1271_acx_conn_monit_params(wl, true);
@@ -3546,8 +3547,8 @@ sta_not_found:
                        wl->aid = 0;
 
                        /* free probe-request template */
-                       dev_kfree_skb(wl->probereq);
-                       wl->probereq = NULL;
+                       dev_kfree_skb(wlvif->probereq);
+                       wlvif->probereq = NULL;
 
                        /* re-enable dynamic ps - just in case */
                        ieee80211_enable_dyn_ps(wl->vif);
index 197d2c2b1e7413570f7b14b2154950637b69b82f..e3b863b895f34c5cb1d1f05ec7a88a800171fd1f 100644 (file)
@@ -64,7 +64,7 @@ void wl1271_scan_complete_work(struct work_struct *work)
 
        if (test_bit(WL1271_FLAG_STA_ASSOCIATED, &wl->flags)) {
                /* restore hardware connection monitoring template */
-               wl1271_cmd_build_ap_probe_req(wl, wl->probereq);
+               wl1271_cmd_build_ap_probe_req(wl, wlvif->probereq);
        }
 
        /* return to ROC if needed */
index 539cf40be535743e6553d2f66c5403ce1113ec64..8d100561522c255437f76bb25d9bd36bfaeea0f4 100644 (file)
@@ -507,9 +507,6 @@ struct wl1271 {
 
        bool sched_scanning;
 
-       /* probe-req template for the current AP */
-       struct sk_buff *probereq;
-
        /* Our association ID */
        u16 aid;
 
@@ -641,6 +638,9 @@ struct wl12xx_vif {
         */
        u32 basic_rate;
        u32 rate_set;
+
+       /* probe-req template for the current AP */
+       struct sk_buff *probereq;
 };
 
 static inline struct wl12xx_vif *wl12xx_vif_to_data(struct ieee80211_vif *vif)