aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-05-26 02:26:10 -0400
committerDavid S. Miller <davem@davemloft.net>2008-05-26 02:26:10 -0400
commit43154d08d6bb5c69aa0d0e3448fb348b4cd84e91 (patch)
tree176edb26aad2d33e8be36530b66b19d0603c4b1d /include/net
parent03194379a77b02df3404ec4848a50c6784e9a8a5 (diff)
parent289c79a4bd350e8a25065102563ad1a183d1b402 (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts: drivers/net/cpmac.c net/mac80211/mlme.c
Diffstat (limited to 'include/net')
-rw-r--r--include/net/mac80211.h25
-rw-r--r--include/net/ndisc.h4
-rw-r--r--include/net/netlink.h11
3 files changed, 33 insertions, 7 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 909956c97c44..2f9853997992 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -1602,13 +1602,16 @@ void ieee80211_wake_queues(struct ieee80211_hw *hw);
1602void ieee80211_scan_completed(struct ieee80211_hw *hw); 1602void ieee80211_scan_completed(struct ieee80211_hw *hw);
1603 1603
1604/** 1604/**
1605 * ieee80211_iterate_active_interfaces - iterate active interfaces 1605 * ieee80211_iterate_active_interfaces- iterate active interfaces
1606 * 1606 *
1607 * This function iterates over the interfaces associated with a given 1607 * This function iterates over the interfaces associated with a given
1608 * hardware that are currently active and calls the callback for them. 1608 * hardware that are currently active and calls the callback for them.
1609 * This function allows the iterator function to sleep, when the iterator
1610 * function is atomic @ieee80211_iterate_active_interfaces_atomic can
1611 * be used.
1609 * 1612 *
1610 * @hw: the hardware struct of which the interfaces should be iterated over 1613 * @hw: the hardware struct of which the interfaces should be iterated over
1611 * @iterator: the iterator function to call, cannot sleep 1614 * @iterator: the iterator function to call
1612 * @data: first argument of the iterator function 1615 * @data: first argument of the iterator function
1613 */ 1616 */
1614void ieee80211_iterate_active_interfaces(struct ieee80211_hw *hw, 1617void ieee80211_iterate_active_interfaces(struct ieee80211_hw *hw,
@@ -1617,6 +1620,24 @@ void ieee80211_iterate_active_interfaces(struct ieee80211_hw *hw,
1617 void *data); 1620 void *data);
1618 1621
1619/** 1622/**
1623 * ieee80211_iterate_active_interfaces_atomic - iterate active interfaces
1624 *
1625 * This function iterates over the interfaces associated with a given
1626 * hardware that are currently active and calls the callback for them.
1627 * This function requires the iterator callback function to be atomic,
1628 * if that is not desired, use @ieee80211_iterate_active_interfaces instead.
1629 *
1630 * @hw: the hardware struct of which the interfaces should be iterated over
1631 * @iterator: the iterator function to call, cannot sleep
1632 * @data: first argument of the iterator function
1633 */
1634void ieee80211_iterate_active_interfaces_atomic(struct ieee80211_hw *hw,
1635 void (*iterator)(void *data,
1636 u8 *mac,
1637 struct ieee80211_vif *vif),
1638 void *data);
1639
1640/**
1620 * ieee80211_start_tx_ba_session - Start a tx Block Ack session. 1641 * ieee80211_start_tx_ba_session - Start a tx Block Ack session.
1621 * @hw: pointer as obtained from ieee80211_alloc_hw(). 1642 * @hw: pointer as obtained from ieee80211_alloc_hw().
1622 * @ra: receiver address of the BA session recipient 1643 * @ra: receiver address of the BA session recipient
diff --git a/include/net/ndisc.h b/include/net/ndisc.h
index 9c451ff2f4f4..a01b7c4dc763 100644
--- a/include/net/ndisc.h
+++ b/include/net/ndisc.h
@@ -129,6 +129,10 @@ extern int ndisc_ifinfo_sysctl_change(struct ctl_table *ctl,
129 void __user *buffer, 129 void __user *buffer,
130 size_t *lenp, 130 size_t *lenp,
131 loff_t *ppos); 131 loff_t *ppos);
132int ndisc_ifinfo_sysctl_strategy(ctl_table *ctl, int __user *name,
133 int nlen, void __user *oldval,
134 size_t __user *oldlenp,
135 void __user *newval, size_t newlen);
132#endif 136#endif
133 137
134extern void inet6_ifinfo_notify(int event, 138extern void inet6_ifinfo_notify(int event,
diff --git a/include/net/netlink.h b/include/net/netlink.h
index a5506c42f03c..112dcdf7e34e 100644
--- a/include/net/netlink.h
+++ b/include/net/netlink.h
@@ -772,12 +772,13 @@ static inline int __nla_parse_nested_compat(struct nlattr *tb[], int maxtype,
772 const struct nla_policy *policy, 772 const struct nla_policy *policy,
773 int len) 773 int len)
774{ 774{
775 if (nla_len(nla) < len) 775 int nested_len = nla_len(nla) - NLA_ALIGN(len);
776
777 if (nested_len < 0)
776 return -1; 778 return -1;
777 if (nla_len(nla) >= NLA_ALIGN(len) + sizeof(struct nlattr)) 779 if (nested_len >= nla_attr_size(0))
778 return nla_parse_nested(tb, maxtype, 780 return nla_parse(tb, maxtype, nla_data(nla) + NLA_ALIGN(len),
779 nla_data(nla) + NLA_ALIGN(len), 781 nested_len, policy);
780 policy);
781 memset(tb, 0, sizeof(struct nlattr *) * (maxtype + 1)); 782 memset(tb, 0, sizeof(struct nlattr *) * (maxtype + 1));
782 return 0; 783 return 0;
783} 784}