Commit 4099e2f4 authored by Jussi Kivilinna's avatar Jussi Kivilinna Committed by John W. Linville

zd1211rw: implement beacon fetching and handling ieee80211_get_buffered_bc()

Signed-off-by: default avatarJussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent b91a515d
...@@ -938,6 +938,34 @@ static int zd_op_config(struct ieee80211_hw *hw, u32 changed) ...@@ -938,6 +938,34 @@ static int zd_op_config(struct ieee80211_hw *hw, u32 changed)
return zd_chip_set_channel(&mac->chip, conf->channel->hw_value); return zd_chip_set_channel(&mac->chip, conf->channel->hw_value);
} }
static void zd_beacon_done(struct zd_mac *mac)
{
struct sk_buff *skb, *beacon;
if (!mac->vif || mac->vif->type != NL80211_IFTYPE_AP)
return;
/*
* Send out buffered broad- and multicast frames.
*/
while (!ieee80211_queue_stopped(mac->hw, 0)) {
skb = ieee80211_get_buffered_bc(mac->hw, mac->vif);
if (!skb)
break;
zd_op_tx(mac->hw, skb);
}
/*
* Fetch next beacon so that tim_count is updated.
*/
beacon = ieee80211_beacon_get(mac->hw, mac->vif);
if (!beacon)
return;
zd_mac_config_beacon(mac->hw, beacon);
kfree_skb(beacon);
}
static void zd_process_intr(struct work_struct *work) static void zd_process_intr(struct work_struct *work)
{ {
u16 int_status; u16 int_status;
...@@ -948,10 +976,12 @@ static void zd_process_intr(struct work_struct *work) ...@@ -948,10 +976,12 @@ static void zd_process_intr(struct work_struct *work)
int_status = le16_to_cpu(*(__le16 *)(mac->intr_buffer + 4)); int_status = le16_to_cpu(*(__le16 *)(mac->intr_buffer + 4));
spin_unlock_irqrestore(&mac->lock, flags); spin_unlock_irqrestore(&mac->lock, flags);
if (int_status & INT_CFG_NEXT_BCN) if (int_status & INT_CFG_NEXT_BCN) {
dev_dbg_f_limit(zd_mac_dev(mac), "INT_CFG_NEXT_BCN\n"); /*dev_dbg_f_limit(zd_mac_dev(mac), "INT_CFG_NEXT_BCN\n");*/
else zd_beacon_done(mac);
} else {
dev_dbg_f(zd_mac_dev(mac), "Unsupported interrupt\n"); dev_dbg_f(zd_mac_dev(mac), "Unsupported interrupt\n");
}
zd_chip_enable_hwint(&mac->chip); zd_chip_enable_hwint(&mac->chip);
} }
...@@ -1135,7 +1165,8 @@ struct ieee80211_hw *zd_mac_alloc_hw(struct usb_interface *intf) ...@@ -1135,7 +1165,8 @@ struct ieee80211_hw *zd_mac_alloc_hw(struct usb_interface *intf)
hw->wiphy->bands[IEEE80211_BAND_2GHZ] = &mac->band; hw->wiphy->bands[IEEE80211_BAND_2GHZ] = &mac->band;
hw->flags = IEEE80211_HW_RX_INCLUDES_FCS | hw->flags = IEEE80211_HW_RX_INCLUDES_FCS |
IEEE80211_HW_SIGNAL_UNSPEC; IEEE80211_HW_SIGNAL_UNSPEC |
IEEE80211_HW_HOST_BROADCAST_PS_BUFFERING;
hw->wiphy->interface_modes = hw->wiphy->interface_modes =
BIT(NL80211_IFTYPE_MESH_POINT) | BIT(NL80211_IFTYPE_MESH_POINT) |
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment