Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 193845
b: refs/heads/master
c: a0cb7be
h: refs/heads/master
i:
  193843: f05fb27
v: v3
  • Loading branch information
Juuso Oikarinen authored and John W. Linville committed Mar 23, 2010
1 parent 2495b23 commit a48dd80
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 14b228a0d4234e4a2d4e683052da78760e8abf0f
refs/heads/master: a0cb7be4f4fa765dcfa82675811cd7e7713b5610
26 changes: 19 additions & 7 deletions trunk/drivers/net/wireless/wl12xx/wl1271_cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -709,18 +709,30 @@ int wl1271_cmd_template_set(struct wl1271 *wl, u16 template_id,

int wl1271_cmd_build_null_data(struct wl1271 *wl)
{
struct sk_buff *skb;
int ret = 0;
struct sk_buff *skb = NULL;
int size;
void *ptr;
int ret = -ENOMEM;

skb = ieee80211_nullfunc_get(wl->hw, wl->vif);
if (!skb)
goto out;

ret = wl1271_cmd_template_set(wl, CMD_TEMPL_NULL_DATA, skb->data,
skb->len);
if (wl->bss_type == BSS_TYPE_IBSS) {
size = sizeof(struct wl12xx_null_data_template);
ptr = NULL;
} else {
skb = ieee80211_nullfunc_get(wl->hw, wl->vif);
if (!skb)
goto out;
size = skb->len;
ptr = skb->data;
}

ret = wl1271_cmd_template_set(wl, CMD_TEMPL_NULL_DATA, ptr, size);

out:
dev_kfree_skb(skb);
if (ret)
wl1271_warning("cmd buld null data failed %d", ret);

return ret;

}
Expand Down
6 changes: 2 additions & 4 deletions trunk/drivers/net/wireless/wl12xx/wl1271_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1619,12 +1619,10 @@ static void wl1271_op_bss_info_changed(struct ieee80211_hw *hw,
*/
memcmp(wl->bssid, bss_conf->bssid, ETH_ALEN)) {
memcpy(wl->bssid, bss_conf->bssid, ETH_ALEN);

ret = wl1271_cmd_build_null_data(wl);
if (ret < 0) {
wl1271_warning("cmd buld null data failed %d",
ret);
if (ret < 0)
goto out_sleep;
}

/* filter out all packets not from this BSSID */
wl1271_configure_filters(wl, 0);
Expand Down

0 comments on commit a48dd80

Please sign in to comment.