diff options
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00config.c')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00config.c | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00config.c b/drivers/net/wireless/rt2x00/rt2x00config.c index aeeaa0c14245..f8e87aa86335 100644 --- a/drivers/net/wireless/rt2x00/rt2x00config.c +++ b/drivers/net/wireless/rt2x00/rt2x00config.c | |||
@@ -74,10 +74,24 @@ void rt2x00lib_config_bssid(struct rt2x00_dev *rt2x00dev, u8 *bssid) | |||
74 | rt2x00dev->ops->lib->config_bssid(rt2x00dev, ®[0]); | 74 | rt2x00dev->ops->lib->config_bssid(rt2x00dev, ®[0]); |
75 | } | 75 | } |
76 | 76 | ||
77 | void rt2x00lib_config_type(struct rt2x00_dev *rt2x00dev, int type) | 77 | void rt2x00lib_config_type(struct rt2x00_dev *rt2x00dev, const int type) |
78 | { | 78 | { |
79 | if (type != INVALID_INTERFACE) | 79 | int tsf_sync; |
80 | rt2x00dev->ops->lib->config_type(rt2x00dev, type); | 80 | |
81 | switch (type) { | ||
82 | case IEEE80211_IF_TYPE_IBSS: | ||
83 | case IEEE80211_IF_TYPE_AP: | ||
84 | tsf_sync = TSF_SYNC_BEACON; | ||
85 | break; | ||
86 | case IEEE80211_IF_TYPE_STA: | ||
87 | tsf_sync = TSF_SYNC_INFRA; | ||
88 | break; | ||
89 | default: | ||
90 | tsf_sync = TSF_SYNC_NONE; | ||
91 | break; | ||
92 | } | ||
93 | |||
94 | rt2x00dev->ops->lib->config_type(rt2x00dev, type, tsf_sync); | ||
81 | } | 95 | } |
82 | 96 | ||
83 | void rt2x00lib_config(struct rt2x00_dev *rt2x00dev, | 97 | void rt2x00lib_config(struct rt2x00_dev *rt2x00dev, |