diff options
author | Helmut Schaa <helmut.schaa@googlemail.com> | 2010-07-11 06:27:58 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-07-12 16:05:35 -0400 |
commit | 07896fe2f4df3802a224a2ee1aad1c7345d2513c (patch) | |
tree | 8ea79fcf85037f80d11930f24707eee67d017b9b /drivers/net/wireless | |
parent | 4dee32f51b0beba25a70e8011652858c6e55f792 (diff) |
rt2x00: Implement broad- and multicast buffering
Although mac80211 buffers broad- and mutlicast frames for us in AP mode
we still have to send them out after a DTIM beacon. Implement this
behavior by sending out the buffered frames when the beacondone
interrupt is processed.
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00dev.c | 32 |
1 files changed, 30 insertions, 2 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c index e2557257565c..ae0adff0b832 100644 --- a/drivers/net/wireless/rt2x00/rt2x00dev.c +++ b/drivers/net/wireless/rt2x00/rt2x00dev.c | |||
@@ -178,6 +178,28 @@ static void rt2x00lib_intf_scheduled(struct work_struct *work) | |||
178 | /* | 178 | /* |
179 | * Interrupt context handlers. | 179 | * Interrupt context handlers. |
180 | */ | 180 | */ |
181 | static void rt2x00lib_bc_buffer_iter(void *data, u8 *mac, | ||
182 | struct ieee80211_vif *vif) | ||
183 | { | ||
184 | struct rt2x00_dev *rt2x00dev = data; | ||
185 | struct sk_buff *skb; | ||
186 | |||
187 | /* | ||
188 | * Only AP mode interfaces do broad- and multicast buffering | ||
189 | */ | ||
190 | if (vif->type != NL80211_IFTYPE_AP) | ||
191 | return; | ||
192 | |||
193 | /* | ||
194 | * Send out buffered broad- and multicast frames | ||
195 | */ | ||
196 | skb = ieee80211_get_buffered_bc(rt2x00dev->hw, vif); | ||
197 | while (skb) { | ||
198 | rt2x00mac_tx(rt2x00dev->hw, skb); | ||
199 | skb = ieee80211_get_buffered_bc(rt2x00dev->hw, vif); | ||
200 | } | ||
201 | } | ||
202 | |||
181 | static void rt2x00lib_beacondone_iter(void *data, u8 *mac, | 203 | static void rt2x00lib_beacondone_iter(void *data, u8 *mac, |
182 | struct ieee80211_vif *vif) | 204 | struct ieee80211_vif *vif) |
183 | { | 205 | { |
@@ -197,9 +219,15 @@ void rt2x00lib_beacondone(struct rt2x00_dev *rt2x00dev) | |||
197 | if (!test_bit(DEVICE_STATE_ENABLED_RADIO, &rt2x00dev->flags)) | 219 | if (!test_bit(DEVICE_STATE_ENABLED_RADIO, &rt2x00dev->flags)) |
198 | return; | 220 | return; |
199 | 221 | ||
222 | /* send buffered bc/mc frames out for every bssid */ | ||
200 | ieee80211_iterate_active_interfaces(rt2x00dev->hw, | 223 | ieee80211_iterate_active_interfaces(rt2x00dev->hw, |
201 | rt2x00lib_beacondone_iter, | 224 | rt2x00lib_bc_buffer_iter, |
202 | rt2x00dev); | 225 | rt2x00dev); |
226 | |||
227 | /* fetch next beacon */ | ||
228 | ieee80211_iterate_active_interfaces(rt2x00dev->hw, | ||
229 | rt2x00lib_beacondone_iter, | ||
230 | rt2x00dev); | ||
203 | 231 | ||
204 | } | 232 | } |
205 | EXPORT_SYMBOL_GPL(rt2x00lib_beacondone); | 233 | EXPORT_SYMBOL_GPL(rt2x00lib_beacondone); |