aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2x00dev.c
diff options
context:
space:
mode:
authorIvo van Doorn <IvDoorn@gmail.com>2007-10-06 07:34:52 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 19:55:15 -0400
commit5c58ee51ff8c0aca74c225e0263bc5dd2b917781 (patch)
treea08e875dade8a6f55d45419b728b2b077cec6dc0 /drivers/net/wireless/rt2x00/rt2x00dev.c
parent4f5af6eb3d17f8e343597ea99d97eb2f2905b2fb (diff)
[PATCH] rt2x00: Reorganize configuration handler
Reorganize configuration handling by creating a extra structure which contains precalculated values based on the mac80211 values which are usefull for all individual drivers. This also fixes the preamble configuration problem, up untill now preamble was never configured since by default the rate->val value was used when changing the mode. Now rate->val will only be used to set the basic rate mask. The preamble configuration will now be done correctly through the erp_ie_changed callback function. Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00dev.c')
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00dev.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c
index e1410486917..bb6f46cfbb9 100644
--- a/drivers/net/wireless/rt2x00/rt2x00dev.c
+++ b/drivers/net/wireless/rt2x00/rt2x00dev.c
@@ -142,6 +142,8 @@ void rt2x00lib_disable_radio(struct rt2x00_dev *rt2x00dev)
142 cancel_work_sync(&rt2x00dev->beacon_work); 142 cancel_work_sync(&rt2x00dev->beacon_work);
143 if (work_pending(&rt2x00dev->filter_work)) 143 if (work_pending(&rt2x00dev->filter_work))
144 cancel_work_sync(&rt2x00dev->filter_work); 144 cancel_work_sync(&rt2x00dev->filter_work);
145 if (work_pending(&rt2x00dev->config_work))
146 cancel_work_sync(&rt2x00dev->config_work);
145 147
146 /* 148 /*
147 * Stop the TX queues. 149 * Stop the TX queues.
@@ -288,6 +290,16 @@ static void rt2x00lib_packetfilter_scheduled(struct work_struct *work)
288 filter, &filter, 0, NULL); 290 filter, &filter, 0, NULL);
289} 291}
290 292
293static void rt2x00lib_configuration_scheduled(struct work_struct *work)
294{
295 struct rt2x00_dev *rt2x00dev =
296 container_of(work, struct rt2x00_dev, config_work);
297 int preamble = !test_bit(CONFIG_SHORT_PREAMBLE, &rt2x00dev->flags);
298
299 rt2x00mac_erp_ie_changed(rt2x00dev->hw,
300 IEEE80211_ERP_CHANGE_PREAMBLE, 0, preamble);
301}
302
291/* 303/*
292 * Interrupt context handlers. 304 * Interrupt context handlers.
293 */ 305 */
@@ -990,6 +1002,7 @@ int rt2x00lib_probe_dev(struct rt2x00_dev *rt2x00dev)
990 */ 1002 */
991 INIT_WORK(&rt2x00dev->beacon_work, rt2x00lib_beacondone_scheduled); 1003 INIT_WORK(&rt2x00dev->beacon_work, rt2x00lib_beacondone_scheduled);
992 INIT_WORK(&rt2x00dev->filter_work, rt2x00lib_packetfilter_scheduled); 1004 INIT_WORK(&rt2x00dev->filter_work, rt2x00lib_packetfilter_scheduled);
1005 INIT_WORK(&rt2x00dev->config_work, rt2x00lib_configuration_scheduled);
993 INIT_DELAYED_WORK(&rt2x00dev->link.work, rt2x00lib_link_tuner); 1006 INIT_DELAYED_WORK(&rt2x00dev->link.work, rt2x00lib_link_tuner);
994 1007
995 /* 1008 /*