diff options
author | Kalle Valo <kalle.valo@nokia.com> | 2010-01-12 03:43:07 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-01-12 14:21:04 -0500 |
commit | 8f8ff91652fcf62b9fced5387956b4b269fde634 (patch) | |
tree | 76146243c6a3459e5e7354f5621033e5ecc41c1b /drivers/net | |
parent | 558a6669d7cb407fbb0b5aec184b5c3b9a893d30 (diff) |
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>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1251_main.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1251_main.c b/drivers/net/wireless/wl12xx/wl1251_main.c index f17ce06b6c24..d469d3dcd054 100644 --- a/drivers/net/wireless/wl12xx/wl1251_main.c +++ b/drivers/net/wireless/wl12xx/wl1251_main.c | |||
@@ -563,6 +563,27 @@ static void wl1251_op_remove_interface(struct ieee80211_hw *hw, | |||
563 | mutex_unlock(&wl->mutex); | 563 | mutex_unlock(&wl->mutex); |
564 | } | 564 | } |
565 | 565 | ||
566 | static int wl1251_build_qos_null_data(struct wl1251 *wl) | ||
567 | { | ||
568 | struct ieee80211_qos_hdr template; | ||
569 | |||
570 | memset(&template, 0, sizeof(template)); | ||
571 | |||
572 | memcpy(template.addr1, wl->bssid, ETH_ALEN); | ||
573 | memcpy(template.addr2, wl->mac_addr, ETH_ALEN); | ||
574 | memcpy(template.addr3, wl->bssid, ETH_ALEN); | ||
575 | |||
576 | template.frame_control = cpu_to_le16(IEEE80211_FTYPE_DATA | | ||
577 | IEEE80211_STYPE_QOS_NULLFUNC | | ||
578 | IEEE80211_FCTL_TODS); | ||
579 | |||
580 | /* FIXME: not sure what priority to use here */ | ||
581 | template.qos_ctrl = cpu_to_le16(0); | ||
582 | |||
583 | return wl1251_cmd_template_set(wl, CMD_QOS_NULL_DATA, &template, | ||
584 | sizeof(template)); | ||
585 | } | ||
586 | |||
566 | static int wl1251_op_config(struct ieee80211_hw *hw, u32 changed) | 587 | static int wl1251_op_config(struct ieee80211_hw *hw, u32 changed) |
567 | { | 588 | { |
568 | struct wl1251 *wl = hw->priv; | 589 | struct wl1251 *wl = hw->priv; |
@@ -948,6 +969,10 @@ static void wl1251_op_bss_info_changed(struct ieee80211_hw *hw, | |||
948 | if (ret < 0) | 969 | if (ret < 0) |
949 | goto out_sleep; | 970 | goto out_sleep; |
950 | 971 | ||
972 | ret = wl1251_build_qos_null_data(wl); | ||
973 | if (ret < 0) | ||
974 | goto out; | ||
975 | |||
951 | if (wl->bss_type != BSS_TYPE_IBSS) { | 976 | if (wl->bss_type != BSS_TYPE_IBSS) { |
952 | ret = wl1251_join(wl, wl->bss_type, wl->channel, | 977 | ret = wl1251_join(wl, wl->bss_type, wl->channel, |
953 | wl->beacon_int, wl->dtim_period); | 978 | wl->beacon_int, wl->dtim_period); |