Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 315647
b: refs/heads/master
c: bf722d1
h: refs/heads/master
i:
  315645: 57d6503
  315643: a04a8f1
  315639: 12c8357
  315631: 3ce6f21
  315615: 0f77f84
  315583: 256e6f1
  315519: c63b886
  315391: 759ec0d
v: v3
  • Loading branch information
Yair Shapira authored and Luciano Coelho committed Jul 18, 2012
1 parent 3440357 commit 8df9f2f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 22 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: ff324317e6133ed4a88380eb675a93c76a9e0d5e
refs/heads/master: bf722d1defc3020e9382106045f24c2978407e55
39 changes: 18 additions & 21 deletions trunk/drivers/net/wireless/ti/wlcore/testmode.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,12 @@ static int wl1271_tm_cmd_test(struct wl1271 *wl, struct nlattr *tb[])
goto out_sleep;
}

if (nla_put(skb, WL1271_TM_ATTR_DATA, buf_len, buf))
goto nla_put_failure;
if (nla_put(skb, WL1271_TM_ATTR_DATA, buf_len, buf)) {
kfree_skb(skb);
ret = -EMSGSIZE;
goto out_sleep;
}

ret = cfg80211_testmode_reply(skb);
if (ret < 0)
goto out_sleep;
Expand All @@ -142,11 +146,6 @@ static int wl1271_tm_cmd_test(struct wl1271 *wl, struct nlattr *tb[])
mutex_unlock(&wl->mutex);

return ret;

nla_put_failure:
kfree_skb(skb);
ret = -EMSGSIZE;
goto out_sleep;
}

static int wl1271_tm_cmd_interrogate(struct wl1271 *wl, struct nlattr *tb[])
Expand Down Expand Up @@ -192,8 +191,12 @@ static int wl1271_tm_cmd_interrogate(struct wl1271 *wl, struct nlattr *tb[])
goto out_free;
}

if (nla_put(skb, WL1271_TM_ATTR_DATA, sizeof(*cmd), cmd))
goto nla_put_failure;
if (nla_put(skb, WL1271_TM_ATTR_DATA, sizeof(*cmd), cmd)) {
kfree_skb(skb);
ret = -EMSGSIZE;
goto out_free;
}

ret = cfg80211_testmode_reply(skb);
if (ret < 0)
goto out_free;
Expand All @@ -206,11 +209,6 @@ static int wl1271_tm_cmd_interrogate(struct wl1271 *wl, struct nlattr *tb[])
mutex_unlock(&wl->mutex);

return ret;

nla_put_failure:
kfree_skb(skb);
ret = -EMSGSIZE;
goto out_free;
}

static int wl1271_tm_cmd_configure(struct wl1271 *wl, struct nlattr *tb[])
Expand Down Expand Up @@ -343,20 +341,19 @@ static int wl12xx_tm_cmd_get_mac(struct wl1271 *wl, struct nlattr *tb[])
goto out;
}

if (nla_put(skb, WL1271_TM_ATTR_DATA, ETH_ALEN, mac_addr))
goto nla_put_failure;
if (nla_put(skb, WL1271_TM_ATTR_DATA, ETH_ALEN, mac_addr)) {
kfree_skb(skb);
ret = -EMSGSIZE;
goto out;
}

ret = cfg80211_testmode_reply(skb);
if (ret < 0)
goto out;

out:
mutex_unlock(&wl->mutex);
return ret;

nla_put_failure:
kfree_skb(skb);
ret = -EMSGSIZE;
goto out;
}

int wl1271_tm_cmd(struct ieee80211_hw *hw, void *data, int len)
Expand Down

0 comments on commit 8df9f2f

Please sign in to comment.