]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
wlcore/wl18xx/wl12xx: separate channel count between chips
authorArik Nemtsov <arik@wizery.com>
Mon, 26 Nov 2012 16:05:44 +0000 (18:05 +0200)
committerLuciano Coelho <coelho@ti.com>
Tue, 4 Dec 2012 14:36:07 +0000 (16:36 +0200)
18xx chips are capable of staying on 2 channels at the same time.
Introduce a chip-family specific parameter to set the number of channels
in the interface-combinations published by the driver.

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

index 17ee0fd14bccf79f65d53298b287e0d86dfa2385..97cc79c1bcf0e9512c3ab2c732f23ca0891a0ae8 100644 (file)
@@ -1676,6 +1676,7 @@ static int wl12xx_setup(struct wl1271 *wl)
        wl->rtable = wl12xx_rtable;
        wl->num_tx_desc = WL12XX_NUM_TX_DESCRIPTORS;
        wl->num_rx_desc = WL12XX_NUM_RX_DESCRIPTORS;
+       wl->num_channels = 1;
        wl->num_mac_addr = WL12XX_NUM_MAC_ADDRESSES;
        wl->band_rate_to_idx = wl12xx_band_rate_to_idx;
        wl->hw_tx_rate_tbl_size = WL12XX_CONF_HW_RXTX_RATE_MAX;
index c616c21bd6b78b7bf4c6481eafb2e17b99878c37..18a01b404ea5d2065373cb90d5402d20deed329a 100644 (file)
@@ -1456,6 +1456,7 @@ static int wl18xx_setup(struct wl1271 *wl)
        wl->rtable = wl18xx_rtable;
        wl->num_tx_desc = WL18XX_NUM_TX_DESCRIPTORS;
        wl->num_rx_desc = WL18XX_NUM_TX_DESCRIPTORS;
+       wl->num_channels = 2;
        wl->num_mac_addr = WL18XX_NUM_MAC_ADDRESSES;
        wl->band_rate_to_idx = wl18xx_band_rate_to_idx;
        wl->hw_tx_rate_tbl_size = WL18XX_CONF_HW_RXTX_RATE_MAX;
index 603cafc06a58ac75eb6ce108d25fbf0129a86d86..4bdf3d7b947e08f282a8d9365aa9375369b3ae1d 100644 (file)
@@ -5464,10 +5464,9 @@ static const struct ieee80211_iface_limit wlcore_iface_limits[] = {
        },
 };
 
-static const struct ieee80211_iface_combination
+static struct ieee80211_iface_combination
 wlcore_iface_combinations[] = {
        {
-         .num_different_channels = 1,
          .max_interfaces = 3,
          .limits = wlcore_iface_limits,
          .n_limits = ARRAY_SIZE(wlcore_iface_limits),
@@ -5570,6 +5569,7 @@ static int wl1271_init_ieee80211(struct wl1271 *wl)
                NL80211_PROBE_RESP_OFFLOAD_SUPPORT_P2P;
 
        /* allowed interface combinations */
+       wlcore_iface_combinations[0].num_different_channels = wl->num_channels;
        wl->hw->wiphy->iface_combinations = wlcore_iface_combinations;
        wl->hw->wiphy->n_iface_combinations =
                ARRAY_SIZE(wlcore_iface_combinations);
index 037c56e6cae0d8959b69fca2592d7a7efc75bbf9..5f580e56a19bbc697d4bc1b4264dfa8e0b3d68c2 100644 (file)
@@ -441,6 +441,9 @@ struct wl1271 {
        unsigned int min_fw_ver[NUM_FW_VER];
 
        struct completion nvs_loading_complete;
+
+       /* number of concurrent channels the HW supports */
+       u32 num_channels;
 };
 
 int __devinit wlcore_probe(struct wl1271 *wl, struct platform_device *pdev);