diff options
author | Juuso Oikarinen <juuso.oikarinen@nokia.com> | 2009-06-12 07:16:52 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-07-10 14:57:48 -0400 |
commit | 77cc9e43cee58303893f3a4fb8eaa2a3288c9c17 (patch) | |
tree | d24823c30e12403790132c5f5dfc60ed2096e4ab /drivers/net/wireless | |
parent | ce650b5cde686a282aed860bb5cd7368e00eac07 (diff) |
wl12xx: Use chipset specific join commands
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>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/wl12xx/cmd.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/cmd.h | 2 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/main.c | 9 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1251.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/wl12xx.h | 2 |
5 files changed, 10 insertions, 6 deletions
diff --git a/drivers/net/wireless/wl12xx/cmd.c b/drivers/net/wireless/wl12xx/cmd.c index fb4e9962d2c2..cad258de9b33 100644 --- a/drivers/net/wireless/wl12xx/cmd.c +++ b/drivers/net/wireless/wl12xx/cmd.c | |||
@@ -253,7 +253,7 @@ out: | |||
253 | return ret; | 253 | return ret; |
254 | } | 254 | } |
255 | 255 | ||
256 | int wl12xx_cmd_join(struct wl12xx *wl, u8 bss_type, u8 dtim_interval, | 256 | int wl1251_cmd_join(struct wl12xx *wl, u8 bss_type, u8 dtim_interval, |
257 | u16 beacon_interval, u8 wait) | 257 | u16 beacon_interval, u8 wait) |
258 | { | 258 | { |
259 | unsigned long timeout; | 259 | unsigned long timeout; |
diff --git a/drivers/net/wireless/wl12xx/cmd.h b/drivers/net/wireless/wl12xx/cmd.h index 7aef1f24352d..a2eae54a241c 100644 --- a/drivers/net/wireless/wl12xx/cmd.h +++ b/drivers/net/wireless/wl12xx/cmd.h | |||
@@ -36,7 +36,7 @@ int wl12xx_cmd_configure(struct wl12xx *wl, u16 id, void *buf, size_t len); | |||
36 | int wl12xx_cmd_vbm(struct wl12xx *wl, u8 identity, | 36 | int wl12xx_cmd_vbm(struct wl12xx *wl, u8 identity, |
37 | void *bitmap, u16 bitmap_len, u8 bitmap_control); | 37 | void *bitmap, u16 bitmap_len, u8 bitmap_control); |
38 | int wl12xx_cmd_data_path(struct wl12xx *wl, u8 channel, bool enable); | 38 | int wl12xx_cmd_data_path(struct wl12xx *wl, u8 channel, bool enable); |
39 | int wl12xx_cmd_join(struct wl12xx *wl, u8 bss_type, u8 dtim_interval, | 39 | int wl1251_cmd_join(struct wl12xx *wl, u8 bss_type, u8 dtim_interval, |
40 | u16 beacon_interval, u8 wait); | 40 | u16 beacon_interval, u8 wait); |
41 | int wl12xx_cmd_ps_mode(struct wl12xx *wl, u8 ps_mode); | 41 | int wl12xx_cmd_ps_mode(struct wl12xx *wl, u8 ps_mode); |
42 | int wl12xx_cmd_read_memory(struct wl12xx *wl, u32 addr, void *answer, | 42 | int wl12xx_cmd_read_memory(struct wl12xx *wl, u32 addr, void *answer, |
diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c index 245544e6434c..a2aebac9fb82 100644 --- a/drivers/net/wireless/wl12xx/main.c +++ b/drivers/net/wireless/wl12xx/main.c | |||
@@ -243,7 +243,8 @@ static void wl12xx_filter_work(struct work_struct *work) | |||
243 | if (ret < 0) | 243 | if (ret < 0) |
244 | goto out; | 244 | goto out; |
245 | 245 | ||
246 | ret = wl12xx_cmd_join(wl, wl->bss_type, 1, 100, 0); | 246 | /* FIXME: replace the magic numbers with proper definitions */ |
247 | ret = wl->chip.op_cmd_join(wl, wl->bss_type, 1, 100, 0); | ||
247 | if (ret < 0) | 248 | if (ret < 0) |
248 | goto out_sleep; | 249 | goto out_sleep; |
249 | 250 | ||
@@ -534,7 +535,7 @@ static int wl12xx_op_config(struct ieee80211_hw *hw, u32 changed) | |||
534 | 535 | ||
535 | if (channel != wl->channel) { | 536 | if (channel != wl->channel) { |
536 | /* FIXME: use beacon interval provided by mac80211 */ | 537 | /* FIXME: use beacon interval provided by mac80211 */ |
537 | ret = wl12xx_cmd_join(wl, wl->bss_type, 1, 100, 0); | 538 | ret = wl->chip.op_cmd_join(wl, wl->bss_type, 1, 100, 0); |
538 | if (ret < 0) | 539 | if (ret < 0) |
539 | goto out_sleep; | 540 | goto out_sleep; |
540 | 541 | ||
@@ -1082,7 +1083,7 @@ static void wl12xx_op_bss_info_changed(struct ieee80211_hw *hw, | |||
1082 | goto out; | 1083 | goto out; |
1083 | 1084 | ||
1084 | if (wl->bss_type != BSS_TYPE_IBSS) { | 1085 | if (wl->bss_type != BSS_TYPE_IBSS) { |
1085 | ret = wl12xx_cmd_join(wl, wl->bss_type, 5, 100, 1); | 1086 | ret = wl->chip.op_cmd_join(wl, wl->bss_type, 5, 100, 1); |
1086 | if (ret < 0) | 1087 | if (ret < 0) |
1087 | goto out; | 1088 | goto out; |
1088 | } | 1089 | } |
@@ -1106,7 +1107,7 @@ static void wl12xx_op_bss_info_changed(struct ieee80211_hw *hw, | |||
1106 | if (ret < 0) | 1107 | if (ret < 0) |
1107 | goto out; | 1108 | goto out; |
1108 | 1109 | ||
1109 | ret = wl12xx_cmd_join(wl, wl->bss_type, 1, 100, 0); | 1110 | ret = wl->chip.op_cmd_join(wl, wl->bss_type, 1, 100, 0); |
1110 | 1111 | ||
1111 | if (ret < 0) | 1112 | if (ret < 0) |
1112 | goto out; | 1113 | goto out; |
diff --git a/drivers/net/wireless/wl12xx/wl1251.c b/drivers/net/wireless/wl12xx/wl1251.c index 5f6e75c61128..77494a9046e5 100644 --- a/drivers/net/wireless/wl12xx/wl1251.c +++ b/drivers/net/wireless/wl12xx/wl1251.c | |||
@@ -717,6 +717,7 @@ void wl1251_setup(struct wl12xx *wl) | |||
717 | wl->chip.op_plt_init = wl1251_plt_init; | 717 | wl->chip.op_plt_init = wl1251_plt_init; |
718 | wl->chip.op_fw_version = wl1251_fw_version; | 718 | wl->chip.op_fw_version = wl1251_fw_version; |
719 | wl->chip.op_tx_flush = wl1251_tx_flush; | 719 | wl->chip.op_tx_flush = wl1251_tx_flush; |
720 | wl->chip.op_cmd_join = wl1251_cmd_join; | ||
720 | 721 | ||
721 | wl->chip.p_table = wl1251_part_table; | 722 | wl->chip.p_table = wl1251_part_table; |
722 | wl->chip.acx_reg_table = wl1251_acx_reg_table; | 723 | wl->chip.acx_reg_table = wl1251_acx_reg_table; |
diff --git a/drivers/net/wireless/wl12xx/wl12xx.h b/drivers/net/wireless/wl12xx/wl12xx.h index c38aa5497ebf..c673cdb42d6c 100644 --- a/drivers/net/wireless/wl12xx/wl12xx.h +++ b/drivers/net/wireless/wl12xx/wl12xx.h | |||
@@ -165,6 +165,8 @@ struct wl12xx_chip { | |||
165 | int (*op_plt_init)(struct wl12xx *wl); | 165 | int (*op_plt_init)(struct wl12xx *wl); |
166 | void (*op_tx_flush)(struct wl12xx *wl); | 166 | void (*op_tx_flush)(struct wl12xx *wl); |
167 | void (*op_fw_version)(struct wl12xx *wl); | 167 | void (*op_fw_version)(struct wl12xx *wl); |
168 | int (*op_cmd_join)(struct wl12xx *wl, u8 bss_type, u8 dtim_interval, | ||
169 | u16 beacon_interval, u8 wait); | ||
168 | 170 | ||
169 | struct wl12xx_partition_set *p_table; | 171 | struct wl12xx_partition_set *p_table; |
170 | enum wl12xx_acx_int_reg *acx_reg_table; | 172 | enum wl12xx_acx_int_reg *acx_reg_table; |