diff options
author | Juuso Oikarinen <juuso.oikarinen@nokia.com> | 2010-03-18 06:26:44 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-03-23 16:50:24 -0400 |
commit | a0cb7be4f4fa765dcfa82675811cd7e7713b5610 (patch) | |
tree | b3ab262437222b9bb54f28bd5fb0a1aec02dbc36 /drivers/net/wireless/wl12xx/wl1271_cmd.c | |
parent | 14b228a0d4234e4a2d4e683052da78760e8abf0f (diff) |
wl1271: Don't generate null func template for ad-hoc
The null func template is not needed for ad-hoc, and it's generation is not
supported for ad-hoc (mac80211 will WARN about it.)
Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: Teemu Paasikivi <ext-teemu.3.paasikivi@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/wireless/wl12xx/wl1271_cmd.c')
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1271_cmd.c | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1271_cmd.c b/drivers/net/wireless/wl12xx/wl1271_cmd.c index 035ddc06034c..d005729e0312 100644 --- a/drivers/net/wireless/wl12xx/wl1271_cmd.c +++ b/drivers/net/wireless/wl12xx/wl1271_cmd.c | |||
@@ -709,18 +709,30 @@ out: | |||
709 | 709 | ||
710 | int wl1271_cmd_build_null_data(struct wl1271 *wl) | 710 | int wl1271_cmd_build_null_data(struct wl1271 *wl) |
711 | { | 711 | { |
712 | struct sk_buff *skb; | 712 | struct sk_buff *skb = NULL; |
713 | int ret = 0; | 713 | int size; |
714 | void *ptr; | ||
715 | int ret = -ENOMEM; | ||
714 | 716 | ||
715 | skb = ieee80211_nullfunc_get(wl->hw, wl->vif); | ||
716 | if (!skb) | ||
717 | goto out; | ||
718 | 717 | ||
719 | ret = wl1271_cmd_template_set(wl, CMD_TEMPL_NULL_DATA, skb->data, | 718 | if (wl->bss_type == BSS_TYPE_IBSS) { |
720 | skb->len); | 719 | size = sizeof(struct wl12xx_null_data_template); |
720 | ptr = NULL; | ||
721 | } else { | ||
722 | skb = ieee80211_nullfunc_get(wl->hw, wl->vif); | ||
723 | if (!skb) | ||
724 | goto out; | ||
725 | size = skb->len; | ||
726 | ptr = skb->data; | ||
727 | } | ||
728 | |||
729 | ret = wl1271_cmd_template_set(wl, CMD_TEMPL_NULL_DATA, ptr, size); | ||
721 | 730 | ||
722 | out: | 731 | out: |
723 | dev_kfree_skb(skb); | 732 | dev_kfree_skb(skb); |
733 | if (ret) | ||
734 | wl1271_warning("cmd buld null data failed %d", ret); | ||
735 | |||
724 | return ret; | 736 | return ret; |
725 | 737 | ||
726 | } | 738 | } |