aboutsummaryrefslogtreecommitdiffstats
path: root/net/irda
diff options
context:
space:
mode:
Diffstat (limited to 'net/irda')
-rw-r--r--net/irda/irlan/irlan_client.c4
-rw-r--r--net/irda/irlan/irlan_common.c2
-rw-r--r--net/irda/irlap_frame.c17
-rw-r--r--net/irda/irsysctl.c50
-rw-r--r--net/irda/irttp.c14
-rw-r--r--net/irda/timer.c2
6 files changed, 43 insertions, 46 deletions
diff --git a/net/irda/irlan/irlan_client.c b/net/irda/irlan/irlan_client.c
index 6be1ec26b30c..42f7d960d055 100644
--- a/net/irda/irlan/irlan_client.c
+++ b/net/irda/irlan/irlan_client.c
@@ -436,7 +436,6 @@ static void irlan_check_response_param(struct irlan_cb *self, char *param,
436 __u16 tmp_cpu; /* Temporary value in host order */ 436 __u16 tmp_cpu; /* Temporary value in host order */
437 __u8 *bytes; 437 __u8 *bytes;
438 int i; 438 int i;
439 DECLARE_MAC_BUF(mac);
440 439
441 IRDA_DEBUG(4, "%s(), parm=%s\n", __func__ , param); 440 IRDA_DEBUG(4, "%s(), parm=%s\n", __func__ , param);
442 441
@@ -521,8 +520,7 @@ static void irlan_check_response_param(struct irlan_cb *self, char *param,
521 /* FILTER_ENTRY, have we got an ethernet address? */ 520 /* FILTER_ENTRY, have we got an ethernet address? */
522 if (strcmp(param, "FILTER_ENTRY") == 0) { 521 if (strcmp(param, "FILTER_ENTRY") == 0) {
523 bytes = value; 522 bytes = value;
524 IRDA_DEBUG(4, "Ethernet address = %s\n", 523 IRDA_DEBUG(4, "Ethernet address = %pM\n", bytes);
525 print_mac(mac, bytes));
526 for (i = 0; i < 6; i++) 524 for (i = 0; i < 6; i++)
527 self->dev->dev_addr[i] = bytes[i]; 525 self->dev->dev_addr[i] = bytes[i];
528 } 526 }
diff --git a/net/irda/irlan/irlan_common.c b/net/irda/irlan/irlan_common.c
index 9a1cd87e7142..774d73a76852 100644
--- a/net/irda/irlan/irlan_common.c
+++ b/net/irda/irlan/irlan_common.c
@@ -207,7 +207,7 @@ static struct irlan_cb *irlan_open(__u32 saddr, __u32 daddr)
207 if (!dev) 207 if (!dev)
208 return NULL; 208 return NULL;
209 209
210 self = dev->priv; 210 self = netdev_priv(dev);
211 self->dev = dev; 211 self->dev = dev;
212 212
213 /* 213 /*
diff --git a/net/irda/irlap_frame.c b/net/irda/irlap_frame.c
index f17b65af9c9b..2562ebc1b22c 100644
--- a/net/irda/irlap_frame.c
+++ b/net/irda/irlap_frame.c
@@ -1325,6 +1325,7 @@ int irlap_driver_rcv(struct sk_buff *skb, struct net_device *dev,
1325 struct irlap_cb *self; 1325 struct irlap_cb *self;
1326 int command; 1326 int command;
1327 __u8 control; 1327 __u8 control;
1328 int ret = -1;
1328 1329
1329 if (!net_eq(dev_net(dev), &init_net)) 1330 if (!net_eq(dev_net(dev), &init_net))
1330 goto out; 1331 goto out;
@@ -1333,25 +1334,21 @@ int irlap_driver_rcv(struct sk_buff *skb, struct net_device *dev,
1333 self = (struct irlap_cb *) dev->atalk_ptr; 1334 self = (struct irlap_cb *) dev->atalk_ptr;
1334 1335
1335 /* If the net device is down, then IrLAP is gone! */ 1336 /* If the net device is down, then IrLAP is gone! */
1336 if (!self || self->magic != LAP_MAGIC) { 1337 if (!self || self->magic != LAP_MAGIC)
1337 dev_kfree_skb(skb); 1338 goto err;
1338 return -1;
1339 }
1340 1339
1341 /* We are no longer an "old" protocol, so we need to handle 1340 /* We are no longer an "old" protocol, so we need to handle
1342 * share and non linear skbs. This should never happen, so 1341 * share and non linear skbs. This should never happen, so
1343 * we don't need to be clever about it. Jean II */ 1342 * we don't need to be clever about it. Jean II */
1344 if ((skb = skb_share_check(skb, GFP_ATOMIC)) == NULL) { 1343 if ((skb = skb_share_check(skb, GFP_ATOMIC)) == NULL) {
1345 IRDA_ERROR("%s: can't clone shared skb!\n", __func__); 1344 IRDA_ERROR("%s: can't clone shared skb!\n", __func__);
1346 dev_kfree_skb(skb); 1345 goto err;
1347 return -1;
1348 } 1346 }
1349 1347
1350 /* Check if frame is large enough for parsing */ 1348 /* Check if frame is large enough for parsing */
1351 if (!pskb_may_pull(skb, 2)) { 1349 if (!pskb_may_pull(skb, 2)) {
1352 IRDA_ERROR("%s: frame too short!\n", __func__); 1350 IRDA_ERROR("%s: frame too short!\n", __func__);
1353 dev_kfree_skb(skb); 1351 goto err;
1354 return -1;
1355 } 1352 }
1356 1353
1357 command = skb->data[0] & CMD_FRAME; 1354 command = skb->data[0] & CMD_FRAME;
@@ -1442,7 +1439,9 @@ int irlap_driver_rcv(struct sk_buff *skb, struct net_device *dev,
1442 break; 1439 break;
1443 } 1440 }
1444out: 1441out:
1442 ret = 0;
1443err:
1445 /* Always drop our reference on the skb */ 1444 /* Always drop our reference on the skb */
1446 dev_kfree_skb(skb); 1445 dev_kfree_skb(skb);
1447 return 0; 1446 return ret;
1448} 1447}
diff --git a/net/irda/irsysctl.c b/net/irda/irsysctl.c
index 9ab3df15425d..57f8817c3979 100644
--- a/net/irda/irsysctl.c
+++ b/net/irda/irsysctl.c
@@ -118,8 +118,8 @@ static ctl_table irda_table[] = {
118 .data = &sysctl_discovery, 118 .data = &sysctl_discovery,
119 .maxlen = sizeof(int), 119 .maxlen = sizeof(int),
120 .mode = 0644, 120 .mode = 0644,
121 .proc_handler = &do_discovery, 121 .proc_handler = do_discovery,
122 .strategy = &sysctl_intvec 122 .strategy = sysctl_intvec
123 }, 123 },
124 { 124 {
125 .ctl_name = NET_IRDA_DEVNAME, 125 .ctl_name = NET_IRDA_DEVNAME,
@@ -127,8 +127,8 @@ static ctl_table irda_table[] = {
127 .data = sysctl_devname, 127 .data = sysctl_devname,
128 .maxlen = 65, 128 .maxlen = 65,
129 .mode = 0644, 129 .mode = 0644,
130 .proc_handler = &do_devname, 130 .proc_handler = do_devname,
131 .strategy = &sysctl_string 131 .strategy = sysctl_string
132 }, 132 },
133#ifdef CONFIG_IRDA_DEBUG 133#ifdef CONFIG_IRDA_DEBUG
134 { 134 {
@@ -137,7 +137,7 @@ static ctl_table irda_table[] = {
137 .data = &irda_debug, 137 .data = &irda_debug,
138 .maxlen = sizeof(int), 138 .maxlen = sizeof(int),
139 .mode = 0644, 139 .mode = 0644,
140 .proc_handler = &proc_dointvec 140 .proc_handler = proc_dointvec
141 }, 141 },
142#endif 142#endif
143#ifdef CONFIG_IRDA_FAST_RR 143#ifdef CONFIG_IRDA_FAST_RR
@@ -147,7 +147,7 @@ static ctl_table irda_table[] = {
147 .data = &sysctl_fast_poll_increase, 147 .data = &sysctl_fast_poll_increase,
148 .maxlen = sizeof(int), 148 .maxlen = sizeof(int),
149 .mode = 0644, 149 .mode = 0644,
150 .proc_handler = &proc_dointvec 150 .proc_handler = proc_dointvec
151 }, 151 },
152#endif 152#endif
153 { 153 {
@@ -156,8 +156,8 @@ static ctl_table irda_table[] = {
156 .data = &sysctl_discovery_slots, 156 .data = &sysctl_discovery_slots,
157 .maxlen = sizeof(int), 157 .maxlen = sizeof(int),
158 .mode = 0644, 158 .mode = 0644,
159 .proc_handler = &proc_dointvec_minmax, 159 .proc_handler = proc_dointvec_minmax,
160 .strategy = &sysctl_intvec, 160 .strategy = sysctl_intvec,
161 .extra1 = &min_discovery_slots, 161 .extra1 = &min_discovery_slots,
162 .extra2 = &max_discovery_slots 162 .extra2 = &max_discovery_slots
163 }, 163 },
@@ -167,7 +167,7 @@ static ctl_table irda_table[] = {
167 .data = &sysctl_discovery_timeout, 167 .data = &sysctl_discovery_timeout,
168 .maxlen = sizeof(int), 168 .maxlen = sizeof(int),
169 .mode = 0644, 169 .mode = 0644,
170 .proc_handler = &proc_dointvec 170 .proc_handler = proc_dointvec
171 }, 171 },
172 { 172 {
173 .ctl_name = NET_IRDA_SLOT_TIMEOUT, 173 .ctl_name = NET_IRDA_SLOT_TIMEOUT,
@@ -175,8 +175,8 @@ static ctl_table irda_table[] = {
175 .data = &sysctl_slot_timeout, 175 .data = &sysctl_slot_timeout,
176 .maxlen = sizeof(int), 176 .maxlen = sizeof(int),
177 .mode = 0644, 177 .mode = 0644,
178 .proc_handler = &proc_dointvec_minmax, 178 .proc_handler = proc_dointvec_minmax,
179 .strategy = &sysctl_intvec, 179 .strategy = sysctl_intvec,
180 .extra1 = &min_slot_timeout, 180 .extra1 = &min_slot_timeout,
181 .extra2 = &max_slot_timeout 181 .extra2 = &max_slot_timeout
182 }, 182 },
@@ -186,8 +186,8 @@ static ctl_table irda_table[] = {
186 .data = &sysctl_max_baud_rate, 186 .data = &sysctl_max_baud_rate,
187 .maxlen = sizeof(int), 187 .maxlen = sizeof(int),
188 .mode = 0644, 188 .mode = 0644,
189 .proc_handler = &proc_dointvec_minmax, 189 .proc_handler = proc_dointvec_minmax,
190 .strategy = &sysctl_intvec, 190 .strategy = sysctl_intvec,
191 .extra1 = &min_max_baud_rate, 191 .extra1 = &min_max_baud_rate,
192 .extra2 = &max_max_baud_rate 192 .extra2 = &max_max_baud_rate
193 }, 193 },
@@ -197,8 +197,8 @@ static ctl_table irda_table[] = {
197 .data = &sysctl_min_tx_turn_time, 197 .data = &sysctl_min_tx_turn_time,
198 .maxlen = sizeof(int), 198 .maxlen = sizeof(int),
199 .mode = 0644, 199 .mode = 0644,
200 .proc_handler = &proc_dointvec_minmax, 200 .proc_handler = proc_dointvec_minmax,
201 .strategy = &sysctl_intvec, 201 .strategy = sysctl_intvec,
202 .extra1 = &min_min_tx_turn_time, 202 .extra1 = &min_min_tx_turn_time,
203 .extra2 = &max_min_tx_turn_time 203 .extra2 = &max_min_tx_turn_time
204 }, 204 },
@@ -208,8 +208,8 @@ static ctl_table irda_table[] = {
208 .data = &sysctl_max_tx_data_size, 208 .data = &sysctl_max_tx_data_size,
209 .maxlen = sizeof(int), 209 .maxlen = sizeof(int),
210 .mode = 0644, 210 .mode = 0644,
211 .proc_handler = &proc_dointvec_minmax, 211 .proc_handler = proc_dointvec_minmax,
212 .strategy = &sysctl_intvec, 212 .strategy = sysctl_intvec,
213 .extra1 = &min_max_tx_data_size, 213 .extra1 = &min_max_tx_data_size,
214 .extra2 = &max_max_tx_data_size 214 .extra2 = &max_max_tx_data_size
215 }, 215 },
@@ -219,8 +219,8 @@ static ctl_table irda_table[] = {
219 .data = &sysctl_max_tx_window, 219 .data = &sysctl_max_tx_window,
220 .maxlen = sizeof(int), 220 .maxlen = sizeof(int),
221 .mode = 0644, 221 .mode = 0644,
222 .proc_handler = &proc_dointvec_minmax, 222 .proc_handler = proc_dointvec_minmax,
223 .strategy = &sysctl_intvec, 223 .strategy = sysctl_intvec,
224 .extra1 = &min_max_tx_window, 224 .extra1 = &min_max_tx_window,
225 .extra2 = &max_max_tx_window 225 .extra2 = &max_max_tx_window
226 }, 226 },
@@ -230,8 +230,8 @@ static ctl_table irda_table[] = {
230 .data = &sysctl_max_noreply_time, 230 .data = &sysctl_max_noreply_time,
231 .maxlen = sizeof(int), 231 .maxlen = sizeof(int),
232 .mode = 0644, 232 .mode = 0644,
233 .proc_handler = &proc_dointvec_minmax, 233 .proc_handler = proc_dointvec_minmax,
234 .strategy = &sysctl_intvec, 234 .strategy = sysctl_intvec,
235 .extra1 = &min_max_noreply_time, 235 .extra1 = &min_max_noreply_time,
236 .extra2 = &max_max_noreply_time 236 .extra2 = &max_max_noreply_time
237 }, 237 },
@@ -241,8 +241,8 @@ static ctl_table irda_table[] = {
241 .data = &sysctl_warn_noreply_time, 241 .data = &sysctl_warn_noreply_time,
242 .maxlen = sizeof(int), 242 .maxlen = sizeof(int),
243 .mode = 0644, 243 .mode = 0644,
244 .proc_handler = &proc_dointvec_minmax, 244 .proc_handler = proc_dointvec_minmax,
245 .strategy = &sysctl_intvec, 245 .strategy = sysctl_intvec,
246 .extra1 = &min_warn_noreply_time, 246 .extra1 = &min_warn_noreply_time,
247 .extra2 = &max_warn_noreply_time 247 .extra2 = &max_warn_noreply_time
248 }, 248 },
@@ -252,8 +252,8 @@ static ctl_table irda_table[] = {
252 .data = &sysctl_lap_keepalive_time, 252 .data = &sysctl_lap_keepalive_time,
253 .maxlen = sizeof(int), 253 .maxlen = sizeof(int),
254 .mode = 0644, 254 .mode = 0644,
255 .proc_handler = &proc_dointvec_minmax, 255 .proc_handler = proc_dointvec_minmax,
256 .strategy = &sysctl_intvec, 256 .strategy = sysctl_intvec,
257 .extra1 = &min_lap_keepalive_time, 257 .extra1 = &min_lap_keepalive_time,
258 .extra2 = &max_lap_keepalive_time 258 .extra2 = &max_lap_keepalive_time
259 }, 259 },
diff --git a/net/irda/irttp.c b/net/irda/irttp.c
index 74e439e80823..ecf4eb2717cb 100644
--- a/net/irda/irttp.c
+++ b/net/irda/irttp.c
@@ -201,7 +201,7 @@ static void irttp_todo_expired(unsigned long data)
201 * 201 *
202 * Flushes (removes all frames) in transitt-buffer (tx_list) 202 * Flushes (removes all frames) in transitt-buffer (tx_list)
203 */ 203 */
204void irttp_flush_queues(struct tsap_cb *self) 204static void irttp_flush_queues(struct tsap_cb *self)
205{ 205{
206 struct sk_buff* skb; 206 struct sk_buff* skb;
207 207
@@ -1266,9 +1266,9 @@ static void irttp_connect_confirm(void *instance, void *sap,
1266 * Some other device is connecting to this TSAP 1266 * Some other device is connecting to this TSAP
1267 * 1267 *
1268 */ 1268 */
1269void irttp_connect_indication(void *instance, void *sap, struct qos_info *qos, 1269static void irttp_connect_indication(void *instance, void *sap,
1270 __u32 max_seg_size, __u8 max_header_size, 1270 struct qos_info *qos, __u32 max_seg_size, __u8 max_header_size,
1271 struct sk_buff *skb) 1271 struct sk_buff *skb)
1272{ 1272{
1273 struct tsap_cb *self; 1273 struct tsap_cb *self;
1274 struct lsap_cb *lsap; 1274 struct lsap_cb *lsap;
@@ -1579,8 +1579,8 @@ EXPORT_SYMBOL(irttp_disconnect_request);
1579 * Disconnect indication, TSAP disconnected by peer? 1579 * Disconnect indication, TSAP disconnected by peer?
1580 * 1580 *
1581 */ 1581 */
1582void irttp_disconnect_indication(void *instance, void *sap, LM_REASON reason, 1582static void irttp_disconnect_indication(void *instance, void *sap,
1583 struct sk_buff *skb) 1583 LM_REASON reason, struct sk_buff *skb)
1584{ 1584{
1585 struct tsap_cb *self; 1585 struct tsap_cb *self;
1586 1586
@@ -1664,7 +1664,7 @@ static void irttp_do_data_indication(struct tsap_cb *self, struct sk_buff *skb)
1664 * Check if we have any frames to be transmitted, or if we have any 1664 * Check if we have any frames to be transmitted, or if we have any
1665 * available credit to give away. 1665 * available credit to give away.
1666 */ 1666 */
1667void irttp_run_rx_queue(struct tsap_cb *self) 1667static void irttp_run_rx_queue(struct tsap_cb *self)
1668{ 1668{
1669 struct sk_buff *skb; 1669 struct sk_buff *skb;
1670 int more = 0; 1670 int more = 0;
diff --git a/net/irda/timer.c b/net/irda/timer.c
index d730099080a2..0335ba0cc593 100644
--- a/net/irda/timer.c
+++ b/net/irda/timer.c
@@ -219,7 +219,7 @@ static void irlap_backoff_timer_expired(void *data)
219 * 219 *
220 * 220 *
221 */ 221 */
222void irlap_media_busy_expired(void* data) 222static void irlap_media_busy_expired(void *data)
223{ 223{
224 struct irlap_cb *self = (struct irlap_cb *) data; 224 struct irlap_cb *self = (struct irlap_cb *) data;
225 225