aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEliad Peller <eliad@wizery.com>2011-10-05 05:55:47 -0400
committerLuciano Coelho <coelho@ti.com>2011-10-07 01:32:38 -0400
commitfb0e707c838ac7d8aae7ab90ea448e5ac1e29697 (patch)
treed2cd4bbcb53aada25c5caaa1ffa7645e44d6fc73
parent10bcf745ae737cfbca1796386d76b0636b086770 (diff)
wl12xx: move p2p into wlvif
move p2p field 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>
-rw-r--r--drivers/net/wireless/wl12xx/main.c9
-rw-r--r--drivers/net/wireless/wl12xx/wl12xx.h2
2 files changed, 5 insertions, 6 deletions
diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c
index 50ee9d40e641..111a465ec541 100644
--- a/drivers/net/wireless/wl12xx/main.c
+++ b/drivers/net/wireless/wl12xx/main.c
@@ -1827,13 +1827,13 @@ static u8 wl12xx_get_role_type(struct wl1271 *wl, struct wl12xx_vif *wlvif)
1827{ 1827{
1828 switch (wlvif->bss_type) { 1828 switch (wlvif->bss_type) {
1829 case BSS_TYPE_AP_BSS: 1829 case BSS_TYPE_AP_BSS:
1830 if (wl->p2p) 1830 if (wlvif->p2p)
1831 return WL1271_ROLE_P2P_GO; 1831 return WL1271_ROLE_P2P_GO;
1832 else 1832 else
1833 return WL1271_ROLE_AP; 1833 return WL1271_ROLE_AP;
1834 1834
1835 case BSS_TYPE_STA_BSS: 1835 case BSS_TYPE_STA_BSS:
1836 if (wl->p2p) 1836 if (wlvif->p2p)
1837 return WL1271_ROLE_P2P_CL; 1837 return WL1271_ROLE_P2P_CL;
1838 else 1838 else
1839 return WL1271_ROLE_STA; 1839 return WL1271_ROLE_STA;
@@ -1890,7 +1890,7 @@ static int wl1271_op_add_interface(struct ieee80211_hw *hw,
1890 1890
1891 switch (ieee80211_vif_type_p2p(vif)) { 1891 switch (ieee80211_vif_type_p2p(vif)) {
1892 case NL80211_IFTYPE_P2P_CLIENT: 1892 case NL80211_IFTYPE_P2P_CLIENT:
1893 wl->p2p = 1; 1893 wlvif->p2p = 1;
1894 /* fall-through */ 1894 /* fall-through */
1895 case NL80211_IFTYPE_STATION: 1895 case NL80211_IFTYPE_STATION:
1896 wlvif->bss_type = BSS_TYPE_STA_BSS; 1896 wlvif->bss_type = BSS_TYPE_STA_BSS;
@@ -1899,7 +1899,7 @@ static int wl1271_op_add_interface(struct ieee80211_hw *hw,
1899 wlvif->bss_type = BSS_TYPE_IBSS; 1899 wlvif->bss_type = BSS_TYPE_IBSS;
1900 break; 1900 break;
1901 case NL80211_IFTYPE_P2P_GO: 1901 case NL80211_IFTYPE_P2P_GO:
1902 wl->p2p = 1; 1902 wlvif->p2p = 1;
1903 /* fall-through */ 1903 /* fall-through */
1904 case NL80211_IFTYPE_AP: 1904 case NL80211_IFTYPE_AP:
1905 wlvif->bss_type = BSS_TYPE_AP_BSS; 1905 wlvif->bss_type = BSS_TYPE_AP_BSS;
@@ -2105,7 +2105,6 @@ deinit:
2105 2105
2106 memset(wl->ssid, 0, IEEE80211_MAX_SSID_LEN + 1); 2106 memset(wl->ssid, 0, IEEE80211_MAX_SSID_LEN + 1);
2107 wl->ssid_len = 0; 2107 wl->ssid_len = 0;
2108 wl->p2p = 0;
2109 wl->band = IEEE80211_BAND_2GHZ; 2108 wl->band = IEEE80211_BAND_2GHZ;
2110 2109
2111 wl->rx_counter = 0; 2110 wl->rx_counter = 0;
diff --git a/drivers/net/wireless/wl12xx/wl12xx.h b/drivers/net/wireless/wl12xx/wl12xx.h
index 0578d750528b..d84c0deee36a 100644
--- a/drivers/net/wireless/wl12xx/wl12xx.h
+++ b/drivers/net/wireless/wl12xx/wl12xx.h
@@ -400,7 +400,6 @@ struct wl1271 {
400 s8 hw_pg_ver; 400 s8 hw_pg_ver;
401 401
402 u8 mac_addr[ETH_ALEN]; 402 u8 mac_addr[ETH_ALEN];
403 u8 p2p; /* we are using p2p role */
404 u8 ssid[IEEE80211_MAX_SSID_LEN + 1]; 403 u8 ssid[IEEE80211_MAX_SSID_LEN + 1];
405 u8 ssid_len; 404 u8 ssid_len;
406 int channel; 405 int channel;
@@ -629,6 +628,7 @@ struct wl1271_station {
629 628
630struct wl12xx_vif { 629struct wl12xx_vif {
631 u8 bss_type; 630 u8 bss_type;
631 u8 p2p; /* we are using p2p role */
632 632
633 u32 basic_rate_set; 633 u32 basic_rate_set;
634 634