提交 07896fe2 编写于 作者: H Helmut Schaa 提交者: John W. Linville

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: NHelmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: NIvo van Doorn <IvDoorn@gmail.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 4dee32f5
...@@ -178,6 +178,28 @@ static void rt2x00lib_intf_scheduled(struct work_struct *work) ...@@ -178,6 +178,28 @@ static void rt2x00lib_intf_scheduled(struct work_struct *work)
/* /*
* Interrupt context handlers. * Interrupt context handlers.
*/ */
static void rt2x00lib_bc_buffer_iter(void *data, u8 *mac,
struct ieee80211_vif *vif)
{
struct rt2x00_dev *rt2x00dev = data;
struct sk_buff *skb;
/*
* Only AP mode interfaces do broad- and multicast buffering
*/
if (vif->type != NL80211_IFTYPE_AP)
return;
/*
* Send out buffered broad- and multicast frames
*/
skb = ieee80211_get_buffered_bc(rt2x00dev->hw, vif);
while (skb) {
rt2x00mac_tx(rt2x00dev->hw, skb);
skb = ieee80211_get_buffered_bc(rt2x00dev->hw, vif);
}
}
static void rt2x00lib_beacondone_iter(void *data, u8 *mac, static void rt2x00lib_beacondone_iter(void *data, u8 *mac,
struct ieee80211_vif *vif) struct ieee80211_vif *vif)
{ {
...@@ -197,6 +219,12 @@ void rt2x00lib_beacondone(struct rt2x00_dev *rt2x00dev) ...@@ -197,6 +219,12 @@ void rt2x00lib_beacondone(struct rt2x00_dev *rt2x00dev)
if (!test_bit(DEVICE_STATE_ENABLED_RADIO, &rt2x00dev->flags)) if (!test_bit(DEVICE_STATE_ENABLED_RADIO, &rt2x00dev->flags))
return; return;
/* send buffered bc/mc frames out for every bssid */
ieee80211_iterate_active_interfaces(rt2x00dev->hw,
rt2x00lib_bc_buffer_iter,
rt2x00dev);
/* fetch next beacon */
ieee80211_iterate_active_interfaces(rt2x00dev->hw, ieee80211_iterate_active_interfaces(rt2x00dev->hw,
rt2x00lib_beacondone_iter, rt2x00lib_beacondone_iter,
rt2x00dev); rt2x00dev);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册