wl1251: create qos null data template
The qos null data template is needed for U-APSD. Signed-off-by: Kalle Valo <kalle.valo@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
558a6669d7
commit
8f8ff91652
@ -563,6 +563,27 @@ static void wl1251_op_remove_interface(struct ieee80211_hw *hw,
|
|||||||
mutex_unlock(&wl->mutex);
|
mutex_unlock(&wl->mutex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int wl1251_build_qos_null_data(struct wl1251 *wl)
|
||||||
|
{
|
||||||
|
struct ieee80211_qos_hdr template;
|
||||||
|
|
||||||
|
memset(&template, 0, sizeof(template));
|
||||||
|
|
||||||
|
memcpy(template.addr1, wl->bssid, ETH_ALEN);
|
||||||
|
memcpy(template.addr2, wl->mac_addr, ETH_ALEN);
|
||||||
|
memcpy(template.addr3, wl->bssid, ETH_ALEN);
|
||||||
|
|
||||||
|
template.frame_control = cpu_to_le16(IEEE80211_FTYPE_DATA |
|
||||||
|
IEEE80211_STYPE_QOS_NULLFUNC |
|
||||||
|
IEEE80211_FCTL_TODS);
|
||||||
|
|
||||||
|
/* FIXME: not sure what priority to use here */
|
||||||
|
template.qos_ctrl = cpu_to_le16(0);
|
||||||
|
|
||||||
|
return wl1251_cmd_template_set(wl, CMD_QOS_NULL_DATA, &template,
|
||||||
|
sizeof(template));
|
||||||
|
}
|
||||||
|
|
||||||
static int wl1251_op_config(struct ieee80211_hw *hw, u32 changed)
|
static int wl1251_op_config(struct ieee80211_hw *hw, u32 changed)
|
||||||
{
|
{
|
||||||
struct wl1251 *wl = hw->priv;
|
struct wl1251 *wl = hw->priv;
|
||||||
@ -948,6 +969,10 @@ static void wl1251_op_bss_info_changed(struct ieee80211_hw *hw,
|
|||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
goto out_sleep;
|
goto out_sleep;
|
||||||
|
|
||||||
|
ret = wl1251_build_qos_null_data(wl);
|
||||||
|
if (ret < 0)
|
||||||
|
goto out;
|
||||||
|
|
||||||
if (wl->bss_type != BSS_TYPE_IBSS) {
|
if (wl->bss_type != BSS_TYPE_IBSS) {
|
||||||
ret = wl1251_join(wl, wl->bss_type, wl->channel,
|
ret = wl1251_join(wl, wl->bss_type, wl->channel,
|
||||||
wl->beacon_int, wl->dtim_period);
|
wl->beacon_int, wl->dtim_period);
|
||||||
|
Loading…
Reference in New Issue
Block a user