wl12xx: move beacon_int into wlvif
authorEliad Peller <eliad@wizery.com>
Wed, 5 Oct 2011 09:55:58 +0000 (11:55 +0200)
committerLuciano Coelho <coelho@ti.com>
Fri, 7 Oct 2011 05:32:48 +0000 (08:32 +0300)
move beacon_int 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/cmd.c
drivers/net/wireless/wl12xx/debugfs.c
drivers/net/wireless/wl12xx/main.c
drivers/net/wireless/wl12xx/wl12xx.h

index 166d984cb5af243b9adaef2c45f262b8a9d2d06f..68375ffb4123cb2654088a78268b1978eafede3f 100644 (file)
@@ -573,7 +573,7 @@ int wl12xx_cmd_role_start_sta(struct wl1271 *wl, struct wl12xx_vif *wlvif)
                cmd->band = WL12XX_BAND_5GHZ;
        cmd->channel = wl->channel;
        cmd->sta.basic_rate_set = cpu_to_le32(wlvif->basic_rate_set);
-       cmd->sta.beacon_interval = cpu_to_le16(wl->beacon_int);
+       cmd->sta.beacon_interval = cpu_to_le16(wlvif->beacon_int);
        cmd->sta.ssid_type = WL12XX_SSID_TYPE_ANY;
        cmd->sta.ssid_len = wlvif->ssid_len;
        memcpy(cmd->sta.ssid, wlvif->ssid, wlvif->ssid_len);
@@ -684,7 +684,7 @@ int wl12xx_cmd_role_start_ap(struct wl1271 *wl, struct wl12xx_vif *wlvif)
        cmd->ap.global_hlid = wlvif->ap.global_hlid;
        cmd->ap.broadcast_hlid = wlvif->ap.bcast_hlid;
        cmd->ap.basic_rate_set = cpu_to_le32(wlvif->basic_rate_set);
-       cmd->ap.beacon_interval = cpu_to_le16(wl->beacon_int);
+       cmd->ap.beacon_interval = cpu_to_le16(wlvif->beacon_int);
        cmd->ap.dtim_interval = bss_conf->dtim_period;
        cmd->ap.beacon_expiry = WL1271_AP_DEF_BEACON_EXP;
        cmd->channel = wl->channel;
@@ -787,7 +787,7 @@ int wl12xx_cmd_role_start_ibss(struct wl1271 *wl, struct wl12xx_vif *wlvif)
                cmd->band = WL12XX_BAND_5GHZ;
        cmd->channel = wl->channel;
        cmd->ibss.basic_rate_set = cpu_to_le32(wlvif->basic_rate_set);
-       cmd->ibss.beacon_interval = cpu_to_le16(wl->beacon_int);
+       cmd->ibss.beacon_interval = cpu_to_le16(wlvif->beacon_int);
        cmd->ibss.dtim_interval = bss_conf->dtim_period;
        cmd->ibss.ssid_type = WL12XX_SSID_TYPE_ANY;
        cmd->ibss.ssid_len = wlvif->ssid_len;
index d8d8568236516debdfa4b5fce80d8328d6660825..439db1f8d277e5b189924fe7466e764ea4045c3c 100644 (file)
@@ -351,7 +351,6 @@ static ssize_t driver_state_read(struct file *file, char __user *user_buf,
        DRIVER_STATE_PRINT_INT(state);
        DRIVER_STATE_PRINT_INT(channel);
        DRIVER_STATE_PRINT_INT(band);
-       DRIVER_STATE_PRINT_INT(beacon_int);
        DRIVER_STATE_PRINT_INT(psm_entry_retry);
        DRIVER_STATE_PRINT_INT(ps_poll_failures);
        DRIVER_STATE_PRINT_INT(power_level);
index e8d73d70cedf53962bd997de734fbdab7f8d4d3c..577266defe9e98fa0208b07cb66aade1df7b5435 100644 (file)
@@ -1900,6 +1900,8 @@ static int wl12xx_init_vif_data(struct ieee80211_vif *vif)
        wlvif->basic_rate_set = CONF_TX_RATE_MASK_BASIC;
        wlvif->basic_rate = CONF_TX_RATE_MASK_BASIC;
        wlvif->rate_set = CONF_TX_RATE_MASK_BASIC;
+       wlvif->beacon_int = WL1271_DEFAULT_BEACON_INT;
+
        return 0;
 }
 
@@ -3286,7 +3288,7 @@ static int wl1271_bss_beacon_info_changed(struct wl1271 *wl,
                wl1271_debug(DEBUG_MASTER, "beacon interval updated: %d",
                        bss_conf->beacon_int);
 
-               wl->beacon_int = bss_conf->beacon_int;
+               wlvif->beacon_int = bss_conf->beacon_int;
        }
 
        if ((changed & BSS_CHANGED_BEACON)) {
@@ -4889,7 +4891,6 @@ struct ieee80211_hw *wl1271_alloc_hw(void)
        }
 
        wl->channel = WL1271_DEFAULT_CHANNEL;
-       wl->beacon_int = WL1271_DEFAULT_BEACON_INT;
        wl->default_key = 0;
        wl->rx_counter = 0;
        wl->psm_entry_retry = 0;
index 752b6b99210c81775f86481a9c49b294932c8f87..9d4b72e96c24862c9e798cbdd6d359b6a65313fb 100644 (file)
@@ -503,9 +503,6 @@ struct wl1271 {
        /* The current band */
        enum ieee80211_band band;
 
-       /* Beaconing interval (needed for ad-hoc) */
-       u32 beacon_int;
-
        /* Default key (for WEP) */
        u32 default_key;
 
@@ -645,6 +642,9 @@ struct wl12xx_vif {
        /* probe-req template for the current AP */
        struct sk_buff *probereq;
 
+       /* Beaconing interval (needed for ad-hoc) */
+       u32 beacon_int;
+
        /* Our association ID */
        u16 aid;