aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/wl12xx/cmd.c
diff options
context:
space:
mode:
authorEliad Peller <eliad@wizery.com>2011-10-10 04:13:10 -0400
committerLuciano Coelho <coelho@ti.com>2011-10-11 08:12:13 -0400
commit61f845f4f441a90e5328a78c6c4e0646d99fc2f0 (patch)
tree0f7c492d19b196be357d6df2cd44cb93e4afa5b6 /drivers/net/wireless/wl12xx/cmd.c
parent1b92f15ee0e0f06222d4fd36dc36960d217243b3 (diff)
wl12xx: add channel field to wlvif
add channel into the per-interface data. mac80211 configures some values (e.g. band, channel) globally, while we configure them per-interface. In order to make it easier to keep track of the configured value for each value while keeping sync with mac80211, save these values both globally and per-vif. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
Diffstat (limited to 'drivers/net/wireless/wl12xx/cmd.c')
-rw-r--r--drivers/net/wireless/wl12xx/cmd.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/net/wireless/wl12xx/cmd.c b/drivers/net/wireless/wl12xx/cmd.c
index 6cf8cdc72b59..4c5c51810fda 100644
--- a/drivers/net/wireless/wl12xx/cmd.c
+++ b/drivers/net/wireless/wl12xx/cmd.c
@@ -483,7 +483,7 @@ int wl12xx_cmd_role_start_dev(struct wl1271 *wl, struct wl12xx_vif *wlvif)
483 cmd->role_id = wlvif->dev_role_id; 483 cmd->role_id = wlvif->dev_role_id;
484 if (wlvif->band == IEEE80211_BAND_5GHZ) 484 if (wlvif->band == IEEE80211_BAND_5GHZ)
485 cmd->band = WL12XX_BAND_5GHZ; 485 cmd->band = WL12XX_BAND_5GHZ;
486 cmd->channel = wl->channel; 486 cmd->channel = wlvif->channel;
487 487
488 if (wlvif->dev_hlid == WL12XX_INVALID_LINK_ID) { 488 if (wlvif->dev_hlid == WL12XX_INVALID_LINK_ID) {
489 ret = wl12xx_allocate_link(wl, wlvif, &wlvif->dev_hlid); 489 ret = wl12xx_allocate_link(wl, wlvif, &wlvif->dev_hlid);
@@ -573,7 +573,7 @@ int wl12xx_cmd_role_start_sta(struct wl1271 *wl, struct wl12xx_vif *wlvif)
573 cmd->role_id = wlvif->role_id; 573 cmd->role_id = wlvif->role_id;
574 if (wlvif->band == IEEE80211_BAND_5GHZ) 574 if (wlvif->band == IEEE80211_BAND_5GHZ)
575 cmd->band = WL12XX_BAND_5GHZ; 575 cmd->band = WL12XX_BAND_5GHZ;
576 cmd->channel = wl->channel; 576 cmd->channel = wlvif->channel;
577 cmd->sta.basic_rate_set = cpu_to_le32(wlvif->basic_rate_set); 577 cmd->sta.basic_rate_set = cpu_to_le32(wlvif->basic_rate_set);
578 cmd->sta.beacon_interval = cpu_to_le16(wlvif->beacon_int); 578 cmd->sta.beacon_interval = cpu_to_le16(wlvif->beacon_int);
579 cmd->sta.ssid_type = WL12XX_SSID_TYPE_ANY; 579 cmd->sta.ssid_type = WL12XX_SSID_TYPE_ANY;
@@ -689,7 +689,7 @@ int wl12xx_cmd_role_start_ap(struct wl1271 *wl, struct wl12xx_vif *wlvif)
689 cmd->ap.beacon_interval = cpu_to_le16(wlvif->beacon_int); 689 cmd->ap.beacon_interval = cpu_to_le16(wlvif->beacon_int);
690 cmd->ap.dtim_interval = bss_conf->dtim_period; 690 cmd->ap.dtim_interval = bss_conf->dtim_period;
691 cmd->ap.beacon_expiry = WL1271_AP_DEF_BEACON_EXP; 691 cmd->ap.beacon_expiry = WL1271_AP_DEF_BEACON_EXP;
692 cmd->channel = wl->channel; 692 cmd->channel = wlvif->channel;
693 693
694 if (!bss_conf->hidden_ssid) { 694 if (!bss_conf->hidden_ssid) {
695 /* take the SSID from the beacon for backward compatibility */ 695 /* take the SSID from the beacon for backward compatibility */
@@ -787,7 +787,7 @@ int wl12xx_cmd_role_start_ibss(struct wl1271 *wl, struct wl12xx_vif *wlvif)
787 cmd->role_id = wlvif->role_id; 787 cmd->role_id = wlvif->role_id;
788 if (wlvif->band == IEEE80211_BAND_5GHZ) 788 if (wlvif->band == IEEE80211_BAND_5GHZ)
789 cmd->band = WL12XX_BAND_5GHZ; 789 cmd->band = WL12XX_BAND_5GHZ;
790 cmd->channel = wl->channel; 790 cmd->channel = wlvif->channel;
791 cmd->ibss.basic_rate_set = cpu_to_le32(wlvif->basic_rate_set); 791 cmd->ibss.basic_rate_set = cpu_to_le32(wlvif->basic_rate_set);
792 cmd->ibss.beacon_interval = cpu_to_le16(wlvif->beacon_int); 792 cmd->ibss.beacon_interval = cpu_to_le16(wlvif->beacon_int);
793 cmd->ibss.dtim_interval = bss_conf->dtim_period; 793 cmd->ibss.dtim_interval = bss_conf->dtim_period;
@@ -1608,7 +1608,7 @@ static int wl12xx_cmd_roc(struct wl1271 *wl, struct wl12xx_vif *wlvif,
1608 struct wl12xx_cmd_roc *cmd; 1608 struct wl12xx_cmd_roc *cmd;
1609 int ret = 0; 1609 int ret = 0;
1610 1610
1611 wl1271_debug(DEBUG_CMD, "cmd roc %d (%d)", wl->channel, role_id); 1611 wl1271_debug(DEBUG_CMD, "cmd roc %d (%d)", wlvif->channel, role_id);
1612 1612
1613 if (WARN_ON(role_id == WL12XX_INVALID_ROLE_ID)) 1613 if (WARN_ON(role_id == WL12XX_INVALID_ROLE_ID))
1614 return -EINVAL; 1614 return -EINVAL;
@@ -1620,7 +1620,7 @@ static int wl12xx_cmd_roc(struct wl1271 *wl, struct wl12xx_vif *wlvif,
1620 } 1620 }
1621 1621
1622 cmd->role_id = role_id; 1622 cmd->role_id = role_id;
1623 cmd->channel = wl->channel; 1623 cmd->channel = wlvif->channel;
1624 switch (wlvif->band) { 1624 switch (wlvif->band) {
1625 case IEEE80211_BAND_2GHZ: 1625 case IEEE80211_BAND_2GHZ:
1626 cmd->band = RADIO_BAND_2_4GHZ; 1626 cmd->band = RADIO_BAND_2_4GHZ;