summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2011-09-16 15:14:19 -0400
committerDavid S. Miller <davem@davemloft.net>2011-09-16 15:14:19 -0400
commit9c223f9bbad78aabfe9c4dfd75ca2660f78f20f9 (patch)
tree865ebb0156db6d127184486031e78f57d850ec85 /net
parent986eaa904129fc888c6c3882f6405a0055110e51 (diff)
parentb4d3de8ca25fcdf697da38d9f9785cb508edea4d (diff)
Merge branch 'for-davem' of git://git.infradead.org/users/linville/wireless-next
Diffstat (limited to 'net')
-rw-r--r--net/mac80211/debugfs.c14
-rw-r--r--net/mac80211/mesh_pathtbl.c8
2 files changed, 7 insertions, 15 deletions
diff --git a/net/mac80211/debugfs.c b/net/mac80211/debugfs.c
index 186e02f7cc3..267ed45ef6a 100644
--- a/net/mac80211/debugfs.c
+++ b/net/mac80211/debugfs.c
@@ -195,20 +195,12 @@ static ssize_t uapsd_queues_write(struct file *file,
size_t count, loff_t *ppos)
{
struct ieee80211_local *local = file->private_data;
- unsigned long val;
- char buf[10];
- size_t len;
+ u8 val;
int ret;
- len = min(count, sizeof(buf) - 1);
- if (copy_from_user(buf, user_buf, len))
- return -EFAULT;
- buf[len] = '\0';
-
- ret = strict_strtoul(buf, 0, &val);
-
+ ret = kstrtou8_from_user(user_buf, count, 0, &val);
if (ret)
- return -EINVAL;
+ return ret;
if (val & ~IEEE80211_WMM_IE_STA_QOSINFO_AC_MASK)
return -ERANGE;
diff --git a/net/mac80211/mesh_pathtbl.c b/net/mac80211/mesh_pathtbl.c
index 7fde32159fd..f97d17cb073 100644
--- a/net/mac80211/mesh_pathtbl.c
+++ b/net/mac80211/mesh_pathtbl.c
@@ -307,14 +307,14 @@ static void mesh_path_move_to_queue(struct mesh_path *gate_mpath,
while (num_skbs--) {
skb = __skb_dequeue(&failq);
- if (copy)
+ if (copy) {
cp_skb = skb_copy(skb, GFP_ATOMIC);
+ if (cp_skb)
+ __skb_queue_tail(&failq, cp_skb);
+ }
prepare_for_gate(skb, gate_mpath->dst, gate_mpath);
__skb_queue_tail(&gateq, skb);
-
- if (copy && cp_skb)
- __skb_queue_tail(&failq, cp_skb);
}
spin_lock_irqsave(&gate_mpath->frame_queue.lock, flags);