]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
wl12xx: Use chipset specific join commands
authorJuuso Oikarinen <juuso.oikarinen@nokia.com>
Fri, 12 Jun 2009 11:16:52 +0000 (14:16 +0300)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 10 Jul 2009 18:57:48 +0000 (14:57 -0400)
Add implementation to use chipset specific join commands.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/wl12xx/cmd.c
drivers/net/wireless/wl12xx/cmd.h
drivers/net/wireless/wl12xx/main.c
drivers/net/wireless/wl12xx/wl1251.c
drivers/net/wireless/wl12xx/wl12xx.h

index fb4e9962d2c2932868325e6fd6fd6ee112f5dce1..cad258de9b3315f241876ba299adbd5c59b78aa8 100644 (file)
@@ -253,7 +253,7 @@ out:
        return ret;
 }
 
-int wl12xx_cmd_join(struct wl12xx *wl, u8 bss_type, u8 dtim_interval,
+int wl1251_cmd_join(struct wl12xx *wl, u8 bss_type, u8 dtim_interval,
                    u16 beacon_interval, u8 wait)
 {
        unsigned long timeout;
index 7aef1f24352dc44f8fd0b351480561db215e4498..a2eae54a241cd9a93d4ca3efbc3720c5f220a40e 100644 (file)
@@ -36,7 +36,7 @@ int wl12xx_cmd_configure(struct wl12xx *wl, u16 id, void *buf, size_t len);
 int wl12xx_cmd_vbm(struct wl12xx *wl, u8 identity,
                   void *bitmap, u16 bitmap_len, u8 bitmap_control);
 int wl12xx_cmd_data_path(struct wl12xx *wl, u8 channel, bool enable);
-int wl12xx_cmd_join(struct wl12xx *wl, u8 bss_type, u8 dtim_interval,
+int wl1251_cmd_join(struct wl12xx *wl, u8 bss_type, u8 dtim_interval,
                    u16 beacon_interval, u8 wait);
 int wl12xx_cmd_ps_mode(struct wl12xx *wl, u8 ps_mode);
 int wl12xx_cmd_read_memory(struct wl12xx *wl, u32 addr, void *answer,
index 245544e6434c4581dc27eda6fa49bf66e97b35ce..a2aebac9fb8202c170c566eb9fe7706f0210306f 100644 (file)
@@ -243,7 +243,8 @@ static void wl12xx_filter_work(struct work_struct *work)
        if (ret < 0)
                goto out;
 
-       ret = wl12xx_cmd_join(wl, wl->bss_type, 1, 100, 0);
+       /* FIXME: replace the magic numbers with proper definitions */
+       ret = wl->chip.op_cmd_join(wl, wl->bss_type, 1, 100, 0);
        if (ret < 0)
                goto out_sleep;
 
@@ -534,7 +535,7 @@ static int wl12xx_op_config(struct ieee80211_hw *hw, u32 changed)
 
        if (channel != wl->channel) {
                /* FIXME: use beacon interval provided by mac80211 */
-               ret = wl12xx_cmd_join(wl, wl->bss_type, 1, 100, 0);
+               ret = wl->chip.op_cmd_join(wl, wl->bss_type, 1, 100, 0);
                if (ret < 0)
                        goto out_sleep;
 
@@ -1082,7 +1083,7 @@ static void wl12xx_op_bss_info_changed(struct ieee80211_hw *hw,
                        goto out;
 
                if (wl->bss_type != BSS_TYPE_IBSS) {
-                       ret = wl12xx_cmd_join(wl, wl->bss_type, 5, 100, 1);
+                       ret = wl->chip.op_cmd_join(wl, wl->bss_type, 5, 100, 1);
                        if (ret < 0)
                                goto out;
                }
@@ -1106,7 +1107,7 @@ static void wl12xx_op_bss_info_changed(struct ieee80211_hw *hw,
                if (ret < 0)
                        goto out;
 
-               ret = wl12xx_cmd_join(wl, wl->bss_type, 1, 100, 0);
+               ret = wl->chip.op_cmd_join(wl, wl->bss_type, 1, 100, 0);
 
                if (ret < 0)
                        goto out;
index 5f6e75c611285b330df6c24ff64a088cf1562c9b..77494a9046e570b817008783a74c3280b68bd9aa 100644 (file)
@@ -717,6 +717,7 @@ void wl1251_setup(struct wl12xx *wl)
        wl->chip.op_plt_init = wl1251_plt_init;
        wl->chip.op_fw_version = wl1251_fw_version;
        wl->chip.op_tx_flush = wl1251_tx_flush;
+       wl->chip.op_cmd_join = wl1251_cmd_join;
 
        wl->chip.p_table = wl1251_part_table;
        wl->chip.acx_reg_table = wl1251_acx_reg_table;
index c38aa5497ebfd46b80e07169e04075bc45839975..c673cdb42d6c70cee39e54e79fa7ee0eef562bb2 100644 (file)
@@ -165,6 +165,8 @@ struct wl12xx_chip {
        int (*op_plt_init)(struct wl12xx *wl);
        void (*op_tx_flush)(struct wl12xx *wl);
        void (*op_fw_version)(struct wl12xx *wl);
+       int (*op_cmd_join)(struct wl12xx *wl, u8 bss_type, u8 dtim_interval,
+                           u16 beacon_interval, u8 wait);
 
        struct wl12xx_partition_set *p_table;
        enum wl12xx_acx_int_reg *acx_reg_table;