diff options
author | Kalle Valo <kalle.valo@nokia.com> | 2010-03-18 06:26:36 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-03-23 16:50:22 -0400 |
commit | 023e082609ba3225dbd5c33933a90156d2201d7f (patch) | |
tree | c13854f118c35a5fbc0ede6fdc74caff13f1f6a2 /drivers/net | |
parent | 818e3063a9546fcd826155dd47582a6e2f4d1c37 (diff) |
wl1271: create qos nullfunc template
Needed for U-APSD.
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1271_cmd.c | 22 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1271_cmd.h | 1 |
2 files changed, 23 insertions, 0 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1271_cmd.c b/drivers/net/wireless/wl12xx/wl1271_cmd.c index 8364270b2d5c..0cbb0e1e3d40 100644 --- a/drivers/net/wireless/wl12xx/wl1271_cmd.c +++ b/drivers/net/wireless/wl12xx/wl1271_cmd.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/crc7.h> | 26 | #include <linux/crc7.h> |
27 | #include <linux/spi/spi.h> | 27 | #include <linux/spi/spi.h> |
28 | #include <linux/etherdevice.h> | 28 | #include <linux/etherdevice.h> |
29 | #include <linux/ieee80211.h> | ||
29 | 30 | ||
30 | #include "wl1271.h" | 31 | #include "wl1271.h" |
31 | #include "wl1271_reg.h" | 32 | #include "wl1271_reg.h" |
@@ -778,6 +779,27 @@ out: | |||
778 | return ret; | 779 | return ret; |
779 | } | 780 | } |
780 | 781 | ||
782 | int wl1271_build_qos_null_data(struct wl1271 *wl) | ||
783 | { | ||
784 | struct ieee80211_qos_hdr template; | ||
785 | |||
786 | memset(&template, 0, sizeof(template)); | ||
787 | |||
788 | memcpy(template.addr1, wl->bssid, ETH_ALEN); | ||
789 | memcpy(template.addr2, wl->mac_addr, ETH_ALEN); | ||
790 | memcpy(template.addr3, wl->bssid, ETH_ALEN); | ||
791 | |||
792 | template.frame_control = cpu_to_le16(IEEE80211_FTYPE_DATA | | ||
793 | IEEE80211_STYPE_QOS_NULLFUNC | | ||
794 | IEEE80211_FCTL_TODS); | ||
795 | |||
796 | /* FIXME: not sure what priority to use here */ | ||
797 | template.qos_ctrl = cpu_to_le16(0); | ||
798 | |||
799 | return wl1271_cmd_template_set(wl, CMD_TEMPL_QOS_NULL_DATA, &template, | ||
800 | sizeof(template)); | ||
801 | } | ||
802 | |||
781 | int wl1271_cmd_set_default_wep_key(struct wl1271 *wl, u8 id) | 803 | int wl1271_cmd_set_default_wep_key(struct wl1271 *wl, u8 id) |
782 | { | 804 | { |
783 | struct wl1271_cmd_set_keys *cmd; | 805 | struct wl1271_cmd_set_keys *cmd; |
diff --git a/drivers/net/wireless/wl12xx/wl1271_cmd.h b/drivers/net/wireless/wl12xx/wl1271_cmd.h index e936d3ace7b8..6324bbf36843 100644 --- a/drivers/net/wireless/wl12xx/wl1271_cmd.h +++ b/drivers/net/wireless/wl12xx/wl1271_cmd.h | |||
@@ -51,6 +51,7 @@ int wl1271_cmd_build_ps_poll(struct wl1271 *wl, u16 aid); | |||
51 | int wl1271_cmd_build_probe_req(struct wl1271 *wl, | 51 | int wl1271_cmd_build_probe_req(struct wl1271 *wl, |
52 | const u8 *ssid, size_t ssid_len, | 52 | const u8 *ssid, size_t ssid_len, |
53 | const u8 *ie, size_t ie_len, u8 band); | 53 | const u8 *ie, size_t ie_len, u8 band); |
54 | int wl1271_build_qos_null_data(struct wl1271 *wl); | ||
54 | int wl1271_cmd_set_default_wep_key(struct wl1271 *wl, u8 id); | 55 | int wl1271_cmd_set_default_wep_key(struct wl1271 *wl, u8 id); |
55 | int wl1271_cmd_set_key(struct wl1271 *wl, u16 action, u8 id, u8 key_type, | 56 | int wl1271_cmd_set_key(struct wl1271 *wl, u16 action, u8 id, u8 key_type, |
56 | u8 key_size, const u8 *key, const u8 *addr, | 57 | u8 key_size, const u8 *key, const u8 *addr, |