diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-15 12:40:05 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-15 12:40:05 -0400 |
commit | 2ed0e21b30b53d3a94e204196e523e6c8f732b56 (patch) | |
tree | de2635426477d86338a9469ce09ba0626052288f /net/wimax/op-msg.c | |
parent | 0fa213310cd8fa7a51071cdcf130e26fa56e9549 (diff) | |
parent | 9cbc1cb8cd46ce1f7645b9de249b2ce8460129bb (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1244 commits)
pkt_sched: Rename PSCHED_US2NS and PSCHED_NS2US
ipv4: Fix fib_trie rebalancing
Bluetooth: Fix issue with uninitialized nsh.type in DTL-1 driver
Bluetooth: Fix Kconfig issue with RFKILL integration
PIM-SM: namespace changes
ipv4: update ARPD help text
net: use a deferred timer in rt_check_expire
ieee802154: fix kconfig bool/tristate muckup
bonding: initialization rework
bonding: use is_zero_ether_addr
bonding: network device names are case sensative
bonding: elminate bad refcount code
bonding: fix style issues
bonding: fix destructor
bonding: remove bonding read/write semaphore
bonding: initialize before registration
bonding: bond_create always called with default parameters
x_tables: Convert printk to pr_err
netfilter: conntrack: optional reliable conntrack event delivery
list_nulls: add hlist_nulls_add_head and hlist_nulls_del
...
Diffstat (limited to 'net/wimax/op-msg.c')
-rw-r--r-- | net/wimax/op-msg.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/net/wimax/op-msg.c b/net/wimax/op-msg.c index 9ad4d893a566..d631a17186bc 100644 --- a/net/wimax/op-msg.c +++ b/net/wimax/op-msg.c | |||
@@ -108,6 +108,12 @@ | |||
108 | * Don't use skb_push()/skb_pull()/skb_reserve() on the skb, as | 108 | * Don't use skb_push()/skb_pull()/skb_reserve() on the skb, as |
109 | * wimax_msg_send() depends on skb->data being placed at the | 109 | * wimax_msg_send() depends on skb->data being placed at the |
110 | * beginning of the user message. | 110 | * beginning of the user message. |
111 | * | ||
112 | * Unlike other WiMAX stack calls, this call can be used way early, | ||
113 | * even before wimax_dev_add() is called, as long as the | ||
114 | * wimax_dev->net_dev pointer is set to point to a proper | ||
115 | * net_dev. This is so that drivers can use it early in case they need | ||
116 | * to send stuff around or communicate with user space. | ||
111 | */ | 117 | */ |
112 | struct sk_buff *wimax_msg_alloc(struct wimax_dev *wimax_dev, | 118 | struct sk_buff *wimax_msg_alloc(struct wimax_dev *wimax_dev, |
113 | const char *pipe_name, | 119 | const char *pipe_name, |
@@ -115,7 +121,7 @@ struct sk_buff *wimax_msg_alloc(struct wimax_dev *wimax_dev, | |||
115 | gfp_t gfp_flags) | 121 | gfp_t gfp_flags) |
116 | { | 122 | { |
117 | int result; | 123 | int result; |
118 | struct device *dev = wimax_dev->net_dev->dev.parent; | 124 | struct device *dev = wimax_dev_to_dev(wimax_dev); |
119 | size_t msg_size; | 125 | size_t msg_size; |
120 | void *genl_msg; | 126 | void *genl_msg; |
121 | struct sk_buff *skb; | 127 | struct sk_buff *skb; |
@@ -161,7 +167,6 @@ error_genlmsg_put: | |||
161 | error_new: | 167 | error_new: |
162 | nlmsg_free(skb); | 168 | nlmsg_free(skb); |
163 | return ERR_PTR(result); | 169 | return ERR_PTR(result); |
164 | |||
165 | } | 170 | } |
166 | EXPORT_SYMBOL_GPL(wimax_msg_alloc); | 171 | EXPORT_SYMBOL_GPL(wimax_msg_alloc); |
167 | 172 | ||
@@ -256,10 +261,16 @@ EXPORT_SYMBOL_GPL(wimax_msg_len); | |||
256 | * Don't use skb_push()/skb_pull()/skb_reserve() on the skb, as | 261 | * Don't use skb_push()/skb_pull()/skb_reserve() on the skb, as |
257 | * wimax_msg_send() depends on skb->data being placed at the | 262 | * wimax_msg_send() depends on skb->data being placed at the |
258 | * beginning of the user message. | 263 | * beginning of the user message. |
264 | * | ||
265 | * Unlike other WiMAX stack calls, this call can be used way early, | ||
266 | * even before wimax_dev_add() is called, as long as the | ||
267 | * wimax_dev->net_dev pointer is set to point to a proper | ||
268 | * net_dev. This is so that drivers can use it early in case they need | ||
269 | * to send stuff around or communicate with user space. | ||
259 | */ | 270 | */ |
260 | int wimax_msg_send(struct wimax_dev *wimax_dev, struct sk_buff *skb) | 271 | int wimax_msg_send(struct wimax_dev *wimax_dev, struct sk_buff *skb) |
261 | { | 272 | { |
262 | struct device *dev = wimax_dev->net_dev->dev.parent; | 273 | struct device *dev = wimax_dev_to_dev(wimax_dev); |
263 | void *msg = skb->data; | 274 | void *msg = skb->data; |
264 | size_t size = skb->len; | 275 | size_t size = skb->len; |
265 | might_sleep(); | 276 | might_sleep(); |