Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 183628
b: refs/heads/master
c: 8f8ff91
h: refs/heads/master
v: v3
  • Loading branch information
Kalle Valo authored and John W. Linville committed Jan 12, 2010
1 parent 5efca87 commit d2317ab
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 558a6669d7cb407fbb0b5aec184b5c3b9a893d30
refs/heads/master: 8f8ff91652fcf62b9fced5387956b4b269fde634
25 changes: 25 additions & 0 deletions trunk/drivers/net/wireless/wl12xx/wl1251_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -563,6 +563,27 @@ static void wl1251_op_remove_interface(struct ieee80211_hw *hw,
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)
{
struct wl1251 *wl = hw->priv;
Expand Down Expand Up @@ -948,6 +969,10 @@ static void wl1251_op_bss_info_changed(struct ieee80211_hw *hw,
if (ret < 0)
goto out_sleep;

ret = wl1251_build_qos_null_data(wl);
if (ret < 0)
goto out;

if (wl->bss_type != BSS_TYPE_IBSS) {
ret = wl1251_join(wl, wl->bss_type, wl->channel,
wl->beacon_int, wl->dtim_period);
Expand Down

0 comments on commit d2317ab

Please sign in to comment.