diff options
author | Adrian Bunk <bunk@stusta.de> | 2005-06-25 17:59:18 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-06-25 19:25:07 -0400 |
commit | 672c3fd9069e5a138f9d4afc9aeb5aa34aacce32 (patch) | |
tree | eed95f7e577680c4a92e7f22b22b221b53934fd1 /drivers/isdn/hisax/isdnl2.c | |
parent | 8b3d4a2a3ef9488d4477e8823106abfd6039eb66 (diff) |
[PATCH] drivers/isdn/hisax/: possible cleanups
This patch contains the following possible cleanups:
- make needlessly global code static
- remove the compiled but unused st5481_hdlc.{c,h}
- kill enternow.h
- enternow_pci.c: kill InByte/OutByte/BYTE
- isdnl2.c: kill FreeSkb
- remove or #if 0 the following unused functions:
- config.c: IsdnCardState
- ipacx.c: ipacx_new_ph
- ipacx.c: dch_bh
- ipacx.c: setup_ipacx
- isdnl2.c: IsRR
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Acked-by: Kai Germaschewski <kai@germaschewski.name>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/isdn/hisax/isdnl2.c')
-rw-r--r-- | drivers/isdn/hisax/isdnl2.c | 100 |
1 files changed, 42 insertions, 58 deletions
diff --git a/drivers/isdn/hisax/isdnl2.c b/drivers/isdn/hisax/isdnl2.c index d311b5fbf895..9022583fd6a0 100644 --- a/drivers/isdn/hisax/isdnl2.c +++ b/drivers/isdn/hisax/isdnl2.c | |||
@@ -142,7 +142,7 @@ freewin1(struct Layer2 *l2) | |||
142 | return cnt; | 142 | return cnt; |
143 | } | 143 | } |
144 | 144 | ||
145 | inline void | 145 | static inline void |
146 | freewin(struct PStack *st) | 146 | freewin(struct PStack *st) |
147 | { | 147 | { |
148 | freewin1(&st->l2); | 148 | freewin1(&st->l2); |
@@ -157,7 +157,7 @@ ReleaseWin(struct Layer2 *l2) | |||
157 | printk(KERN_WARNING "isdl2 freed %d skbuffs in release\n", cnt); | 157 | printk(KERN_WARNING "isdl2 freed %d skbuffs in release\n", cnt); |
158 | } | 158 | } |
159 | 159 | ||
160 | inline unsigned int | 160 | static inline unsigned int |
161 | cansend(struct PStack *st) | 161 | cansend(struct PStack *st) |
162 | { | 162 | { |
163 | unsigned int p1; | 163 | unsigned int p1; |
@@ -169,7 +169,7 @@ cansend(struct PStack *st) | |||
169 | return ((p1 < st->l2.window) && !test_bit(FLG_PEER_BUSY, &st->l2.flag)); | 169 | return ((p1 < st->l2.window) && !test_bit(FLG_PEER_BUSY, &st->l2.flag)); |
170 | } | 170 | } |
171 | 171 | ||
172 | inline void | 172 | static inline void |
173 | clear_exception(struct Layer2 *l2) | 173 | clear_exception(struct Layer2 *l2) |
174 | { | 174 | { |
175 | test_and_clear_bit(FLG_ACK_PEND, &l2->flag); | 175 | test_and_clear_bit(FLG_ACK_PEND, &l2->flag); |
@@ -178,7 +178,7 @@ clear_exception(struct Layer2 *l2) | |||
178 | clear_peer_busy(l2); | 178 | clear_peer_busy(l2); |
179 | } | 179 | } |
180 | 180 | ||
181 | inline int | 181 | static inline int |
182 | l2headersize(struct Layer2 *l2, int ui) | 182 | l2headersize(struct Layer2 *l2, int ui) |
183 | { | 183 | { |
184 | return (((test_bit(FLG_MOD128, &l2->flag) && (!ui)) ? 2 : 1) + | 184 | return (((test_bit(FLG_MOD128, &l2->flag) && (!ui)) ? 2 : 1) + |
@@ -223,40 +223,31 @@ enqueue_super(struct PStack *st, | |||
223 | 223 | ||
224 | #define enqueue_ui(a, b) enqueue_super(a, b) | 224 | #define enqueue_ui(a, b) enqueue_super(a, b) |
225 | 225 | ||
226 | inline int | 226 | static inline int |
227 | IsUI(u_char * data) | 227 | IsUI(u_char * data) |
228 | { | 228 | { |
229 | return ((data[0] & 0xef) == UI); | 229 | return ((data[0] & 0xef) == UI); |
230 | } | 230 | } |
231 | 231 | ||
232 | inline int | 232 | static inline int |
233 | IsUA(u_char * data) | 233 | IsUA(u_char * data) |
234 | { | 234 | { |
235 | return ((data[0] & 0xef) == UA); | 235 | return ((data[0] & 0xef) == UA); |
236 | } | 236 | } |
237 | 237 | ||
238 | inline int | 238 | static inline int |
239 | IsDM(u_char * data) | 239 | IsDM(u_char * data) |
240 | { | 240 | { |
241 | return ((data[0] & 0xef) == DM); | 241 | return ((data[0] & 0xef) == DM); |
242 | } | 242 | } |
243 | 243 | ||
244 | inline int | 244 | static inline int |
245 | IsDISC(u_char * data) | 245 | IsDISC(u_char * data) |
246 | { | 246 | { |
247 | return ((data[0] & 0xef) == DISC); | 247 | return ((data[0] & 0xef) == DISC); |
248 | } | 248 | } |
249 | 249 | ||
250 | inline int | 250 | static inline int |
251 | IsRR(u_char * data, struct PStack *st) | ||
252 | { | ||
253 | if (test_bit(FLG_MOD128, &st->l2.flag)) | ||
254 | return (data[0] == RR); | ||
255 | else | ||
256 | return ((data[0] & 0xf) == 1); | ||
257 | } | ||
258 | |||
259 | inline int | ||
260 | IsSFrame(u_char * data, struct PStack *st) | 251 | IsSFrame(u_char * data, struct PStack *st) |
261 | { | 252 | { |
262 | register u_char d = *data; | 253 | register u_char d = *data; |
@@ -266,7 +257,7 @@ IsSFrame(u_char * data, struct PStack *st) | |||
266 | return(((d & 0xf3) == 1) && ((d & 0x0c) != 0x0c)); | 257 | return(((d & 0xf3) == 1) && ((d & 0x0c) != 0x0c)); |
267 | } | 258 | } |
268 | 259 | ||
269 | inline int | 260 | static inline int |
270 | IsSABME(u_char * data, struct PStack *st) | 261 | IsSABME(u_char * data, struct PStack *st) |
271 | { | 262 | { |
272 | u_char d = data[0] & ~0x10; | 263 | u_char d = data[0] & ~0x10; |
@@ -274,25 +265,25 @@ IsSABME(u_char * data, struct PStack *st) | |||
274 | return (test_bit(FLG_MOD128, &st->l2.flag) ? d == SABME : d == SABM); | 265 | return (test_bit(FLG_MOD128, &st->l2.flag) ? d == SABME : d == SABM); |
275 | } | 266 | } |
276 | 267 | ||
277 | inline int | 268 | static inline int |
278 | IsREJ(u_char * data, struct PStack *st) | 269 | IsREJ(u_char * data, struct PStack *st) |
279 | { | 270 | { |
280 | return (test_bit(FLG_MOD128, &st->l2.flag) ? data[0] == REJ : (data[0] & 0xf) == REJ); | 271 | return (test_bit(FLG_MOD128, &st->l2.flag) ? data[0] == REJ : (data[0] & 0xf) == REJ); |
281 | } | 272 | } |
282 | 273 | ||
283 | inline int | 274 | static inline int |
284 | IsFRMR(u_char * data) | 275 | IsFRMR(u_char * data) |
285 | { | 276 | { |
286 | return ((data[0] & 0xef) == FRMR); | 277 | return ((data[0] & 0xef) == FRMR); |
287 | } | 278 | } |
288 | 279 | ||
289 | inline int | 280 | static inline int |
290 | IsRNR(u_char * data, struct PStack *st) | 281 | IsRNR(u_char * data, struct PStack *st) |
291 | { | 282 | { |
292 | return (test_bit(FLG_MOD128, &st->l2.flag) ? data[0] == RNR : (data[0] & 0xf) == RNR); | 283 | return (test_bit(FLG_MOD128, &st->l2.flag) ? data[0] == RNR : (data[0] & 0xf) == RNR); |
293 | } | 284 | } |
294 | 285 | ||
295 | int | 286 | static int |
296 | iframe_error(struct PStack *st, struct sk_buff *skb) | 287 | iframe_error(struct PStack *st, struct sk_buff *skb) |
297 | { | 288 | { |
298 | int i = l2addrsize(&st->l2) + (test_bit(FLG_MOD128, &st->l2.flag) ? 2 : 1); | 289 | int i = l2addrsize(&st->l2) + (test_bit(FLG_MOD128, &st->l2.flag) ? 2 : 1); |
@@ -315,7 +306,7 @@ iframe_error(struct PStack *st, struct sk_buff *skb) | |||
315 | return 0; | 306 | return 0; |
316 | } | 307 | } |
317 | 308 | ||
318 | int | 309 | static int |
319 | super_error(struct PStack *st, struct sk_buff *skb) | 310 | super_error(struct PStack *st, struct sk_buff *skb) |
320 | { | 311 | { |
321 | if (skb->len != l2addrsize(&st->l2) + | 312 | if (skb->len != l2addrsize(&st->l2) + |
@@ -325,7 +316,7 @@ super_error(struct PStack *st, struct sk_buff *skb) | |||
325 | return 0; | 316 | return 0; |
326 | } | 317 | } |
327 | 318 | ||
328 | int | 319 | static int |
329 | unnum_error(struct PStack *st, struct sk_buff *skb, int wantrsp) | 320 | unnum_error(struct PStack *st, struct sk_buff *skb, int wantrsp) |
330 | { | 321 | { |
331 | int rsp = (*skb->data & 0x2) >> 1; | 322 | int rsp = (*skb->data & 0x2) >> 1; |
@@ -341,7 +332,7 @@ unnum_error(struct PStack *st, struct sk_buff *skb, int wantrsp) | |||
341 | return 0; | 332 | return 0; |
342 | } | 333 | } |
343 | 334 | ||
344 | int | 335 | static int |
345 | UI_error(struct PStack *st, struct sk_buff *skb) | 336 | UI_error(struct PStack *st, struct sk_buff *skb) |
346 | { | 337 | { |
347 | int rsp = *skb->data & 0x2; | 338 | int rsp = *skb->data & 0x2; |
@@ -357,7 +348,7 @@ UI_error(struct PStack *st, struct sk_buff *skb) | |||
357 | return 0; | 348 | return 0; |
358 | } | 349 | } |
359 | 350 | ||
360 | int | 351 | static int |
361 | FRMR_error(struct PStack *st, struct sk_buff *skb) | 352 | FRMR_error(struct PStack *st, struct sk_buff *skb) |
362 | { | 353 | { |
363 | int headers = l2addrsize(&st->l2) + 1; | 354 | int headers = l2addrsize(&st->l2) + 1; |
@@ -444,51 +435,44 @@ send_uframe(struct PStack *st, u_char cmd, u_char cr) | |||
444 | enqueue_super(st, skb); | 435 | enqueue_super(st, skb); |
445 | } | 436 | } |
446 | 437 | ||
447 | inline u_char | 438 | static inline u_char |
448 | get_PollFlag(struct PStack * st, struct sk_buff * skb) | 439 | get_PollFlag(struct PStack * st, struct sk_buff * skb) |
449 | { | 440 | { |
450 | return (skb->data[l2addrsize(&(st->l2))] & 0x10); | 441 | return (skb->data[l2addrsize(&(st->l2))] & 0x10); |
451 | } | 442 | } |
452 | 443 | ||
453 | inline void | 444 | static inline u_char |
454 | FreeSkb(struct sk_buff *skb) | ||
455 | { | ||
456 | dev_kfree_skb(skb); | ||
457 | } | ||
458 | |||
459 | |||
460 | inline u_char | ||
461 | get_PollFlagFree(struct PStack *st, struct sk_buff *skb) | 445 | get_PollFlagFree(struct PStack *st, struct sk_buff *skb) |
462 | { | 446 | { |
463 | u_char PF; | 447 | u_char PF; |
464 | 448 | ||
465 | PF = get_PollFlag(st, skb); | 449 | PF = get_PollFlag(st, skb); |
466 | FreeSkb(skb); | 450 | dev_kfree_skb(skb); |
467 | return (PF); | 451 | return (PF); |
468 | } | 452 | } |
469 | 453 | ||
470 | inline void | 454 | static inline void |
471 | start_t200(struct PStack *st, int i) | 455 | start_t200(struct PStack *st, int i) |
472 | { | 456 | { |
473 | FsmAddTimer(&st->l2.t200, st->l2.T200, EV_L2_T200, NULL, i); | 457 | FsmAddTimer(&st->l2.t200, st->l2.T200, EV_L2_T200, NULL, i); |
474 | test_and_set_bit(FLG_T200_RUN, &st->l2.flag); | 458 | test_and_set_bit(FLG_T200_RUN, &st->l2.flag); |
475 | } | 459 | } |
476 | 460 | ||
477 | inline void | 461 | static inline void |
478 | restart_t200(struct PStack *st, int i) | 462 | restart_t200(struct PStack *st, int i) |
479 | { | 463 | { |
480 | FsmRestartTimer(&st->l2.t200, st->l2.T200, EV_L2_T200, NULL, i); | 464 | FsmRestartTimer(&st->l2.t200, st->l2.T200, EV_L2_T200, NULL, i); |
481 | test_and_set_bit(FLG_T200_RUN, &st->l2.flag); | 465 | test_and_set_bit(FLG_T200_RUN, &st->l2.flag); |
482 | } | 466 | } |
483 | 467 | ||
484 | inline void | 468 | static inline void |
485 | stop_t200(struct PStack *st, int i) | 469 | stop_t200(struct PStack *st, int i) |
486 | { | 470 | { |
487 | if(test_and_clear_bit(FLG_T200_RUN, &st->l2.flag)) | 471 | if(test_and_clear_bit(FLG_T200_RUN, &st->l2.flag)) |
488 | FsmDelTimer(&st->l2.t200, i); | 472 | FsmDelTimer(&st->l2.t200, i); |
489 | } | 473 | } |
490 | 474 | ||
491 | inline void | 475 | static inline void |
492 | st5_dl_release_l2l3(struct PStack *st) | 476 | st5_dl_release_l2l3(struct PStack *st) |
493 | { | 477 | { |
494 | int pr; | 478 | int pr; |
@@ -501,7 +485,7 @@ st5_dl_release_l2l3(struct PStack *st) | |||
501 | st->l2.l2l3(st, pr, NULL); | 485 | st->l2.l2l3(st, pr, NULL); |
502 | } | 486 | } |
503 | 487 | ||
504 | inline void | 488 | static inline void |
505 | lapb_dl_release_l2l3(struct PStack *st, int f) | 489 | lapb_dl_release_l2l3(struct PStack *st, int f) |
506 | { | 490 | { |
507 | if (test_bit(FLG_LAPB, &st->l2.flag)) | 491 | if (test_bit(FLG_LAPB, &st->l2.flag)) |
@@ -802,7 +786,7 @@ l2_connected(struct FsmInst *fi, int event, void *arg) | |||
802 | l2_mdl_error_ua(fi, event, arg); | 786 | l2_mdl_error_ua(fi, event, arg); |
803 | return; | 787 | return; |
804 | } | 788 | } |
805 | FreeSkb(skb); | 789 | dev_kfree_skb(skb); |
806 | 790 | ||
807 | if (test_and_clear_bit(FLG_PEND_REL, &st->l2.flag)) | 791 | if (test_and_clear_bit(FLG_PEND_REL, &st->l2.flag)) |
808 | l2_disconnect(fi, event, arg); | 792 | l2_disconnect(fi, event, arg); |
@@ -840,7 +824,7 @@ l2_released(struct FsmInst *fi, int event, void *arg) | |||
840 | l2_mdl_error_ua(fi, event, arg); | 824 | l2_mdl_error_ua(fi, event, arg); |
841 | return; | 825 | return; |
842 | } | 826 | } |
843 | FreeSkb(skb); | 827 | dev_kfree_skb(skb); |
844 | 828 | ||
845 | stop_t200(st, 6); | 829 | stop_t200(st, 6); |
846 | lapb_dl_release_l2l3(st, CONFIRM); | 830 | lapb_dl_release_l2l3(st, CONFIRM); |
@@ -889,7 +873,7 @@ l2_st6_dm_release(struct FsmInst *fi, int event, void *arg) | |||
889 | } | 873 | } |
890 | } | 874 | } |
891 | 875 | ||
892 | inline void | 876 | static inline void |
893 | enquiry_cr(struct PStack *st, u_char typ, u_char cr, u_char pf) | 877 | enquiry_cr(struct PStack *st, u_char typ, u_char cr, u_char pf) |
894 | { | 878 | { |
895 | struct sk_buff *skb; | 879 | struct sk_buff *skb; |
@@ -912,7 +896,7 @@ enquiry_cr(struct PStack *st, u_char typ, u_char cr, u_char pf) | |||
912 | enqueue_super(st, skb); | 896 | enqueue_super(st, skb); |
913 | } | 897 | } |
914 | 898 | ||
915 | inline void | 899 | static inline void |
916 | enquiry_response(struct PStack *st) | 900 | enquiry_response(struct PStack *st) |
917 | { | 901 | { |
918 | if (test_bit(FLG_OWN_BUSY, &st->l2.flag)) | 902 | if (test_bit(FLG_OWN_BUSY, &st->l2.flag)) |
@@ -922,7 +906,7 @@ enquiry_response(struct PStack *st) | |||
922 | test_and_clear_bit(FLG_ACK_PEND, &st->l2.flag); | 906 | test_and_clear_bit(FLG_ACK_PEND, &st->l2.flag); |
923 | } | 907 | } |
924 | 908 | ||
925 | inline void | 909 | static inline void |
926 | transmit_enquiry(struct PStack *st) | 910 | transmit_enquiry(struct PStack *st) |
927 | { | 911 | { |
928 | if (test_bit(FLG_OWN_BUSY, &st->l2.flag)) | 912 | if (test_bit(FLG_OWN_BUSY, &st->l2.flag)) |
@@ -1004,7 +988,7 @@ l2_st7_got_super(struct FsmInst *fi, int event, void *arg) | |||
1004 | PollFlag = (skb->data[0] & 0x10); | 988 | PollFlag = (skb->data[0] & 0x10); |
1005 | nr = (skb->data[0] >> 5) & 0x7; | 989 | nr = (skb->data[0] >> 5) & 0x7; |
1006 | } | 990 | } |
1007 | FreeSkb(skb); | 991 | dev_kfree_skb(skb); |
1008 | 992 | ||
1009 | if (PollFlag) { | 993 | if (PollFlag) { |
1010 | if (rsp) | 994 | if (rsp) |
@@ -1047,7 +1031,7 @@ l2_feed_i_if_reest(struct FsmInst *fi, int event, void *arg) | |||
1047 | if (!test_bit(FLG_L3_INIT, &st->l2.flag)) | 1031 | if (!test_bit(FLG_L3_INIT, &st->l2.flag)) |
1048 | skb_queue_tail(&st->l2.i_queue, skb); | 1032 | skb_queue_tail(&st->l2.i_queue, skb); |
1049 | else | 1033 | else |
1050 | FreeSkb(skb); | 1034 | dev_kfree_skb(skb); |
1051 | } | 1035 | } |
1052 | 1036 | ||
1053 | static void | 1037 | static void |
@@ -1093,7 +1077,7 @@ l2_got_iframe(struct FsmInst *fi, int event, void *arg) | |||
1093 | nr = (skb->data[i] >> 5) & 0x7; | 1077 | nr = (skb->data[i] >> 5) & 0x7; |
1094 | } | 1078 | } |
1095 | if (test_bit(FLG_OWN_BUSY, &l2->flag)) { | 1079 | if (test_bit(FLG_OWN_BUSY, &l2->flag)) { |
1096 | FreeSkb(skb); | 1080 | dev_kfree_skb(skb); |
1097 | if(PollFlag) enquiry_response(st); | 1081 | if(PollFlag) enquiry_response(st); |
1098 | } else if (l2->vr == ns) { | 1082 | } else if (l2->vr == ns) { |
1099 | (l2->vr)++; | 1083 | (l2->vr)++; |
@@ -1111,7 +1095,7 @@ l2_got_iframe(struct FsmInst *fi, int event, void *arg) | |||
1111 | st->l2.l2l3(st, DL_DATA | INDICATION, skb); | 1095 | st->l2.l2l3(st, DL_DATA | INDICATION, skb); |
1112 | } else { | 1096 | } else { |
1113 | /* n(s)!=v(r) */ | 1097 | /* n(s)!=v(r) */ |
1114 | FreeSkb(skb); | 1098 | dev_kfree_skb(skb); |
1115 | if (test_and_set_bit(FLG_REJEXC, &l2->flag)) { | 1099 | if (test_and_set_bit(FLG_REJEXC, &l2->flag)) { |
1116 | if (PollFlag) | 1100 | if (PollFlag) |
1117 | enquiry_response(st); | 1101 | enquiry_response(st); |
@@ -1309,7 +1293,7 @@ l2_pull_iqueue(struct FsmInst *fi, int event, void *arg) | |||
1309 | skb = alloc_skb(oskb->len + i, GFP_ATOMIC); | 1293 | skb = alloc_skb(oskb->len + i, GFP_ATOMIC); |
1310 | memcpy(skb_put(skb, i), header, i); | 1294 | memcpy(skb_put(skb, i), header, i); |
1311 | memcpy(skb_put(skb, oskb->len), oskb->data, oskb->len); | 1295 | memcpy(skb_put(skb, oskb->len), oskb->data, oskb->len); |
1312 | FreeSkb(oskb); | 1296 | dev_kfree_skb(oskb); |
1313 | } | 1297 | } |
1314 | st->l2.l2l1(st, PH_PULL | INDICATION, skb); | 1298 | st->l2.l2l1(st, PH_PULL | INDICATION, skb); |
1315 | test_and_clear_bit(FLG_ACK_PEND, &st->l2.flag); | 1299 | test_and_clear_bit(FLG_ACK_PEND, &st->l2.flag); |
@@ -1349,7 +1333,7 @@ l2_st8_got_super(struct FsmInst *fi, int event, void *arg) | |||
1349 | PollFlag = (skb->data[0] & 0x10); | 1333 | PollFlag = (skb->data[0] & 0x10); |
1350 | nr = (skb->data[0] >> 5) & 0x7; | 1334 | nr = (skb->data[0] >> 5) & 0x7; |
1351 | } | 1335 | } |
1352 | FreeSkb(skb); | 1336 | dev_kfree_skb(skb); |
1353 | 1337 | ||
1354 | if (rsp && PollFlag) { | 1338 | if (rsp && PollFlag) { |
1355 | if (legalnr(st, nr)) { | 1339 | if (legalnr(st, nr)) { |
@@ -1391,7 +1375,7 @@ l2_got_FRMR(struct FsmInst *fi, int event, void *arg) | |||
1391 | establishlink(fi); | 1375 | establishlink(fi); |
1392 | test_and_clear_bit(FLG_L3_INIT, &st->l2.flag); | 1376 | test_and_clear_bit(FLG_L3_INIT, &st->l2.flag); |
1393 | } | 1377 | } |
1394 | FreeSkb(skb); | 1378 | dev_kfree_skb(skb); |
1395 | } | 1379 | } |
1396 | 1380 | ||
1397 | static void | 1381 | static void |
@@ -1655,7 +1639,7 @@ isdnl2_l1l2(struct PStack *st, int pr, void *arg) | |||
1655 | datap += len; | 1639 | datap += len; |
1656 | else { | 1640 | else { |
1657 | FsmEvent(&st->l2.l2m, EV_L2_FRAME_ERROR, (void *) 'N'); | 1641 | FsmEvent(&st->l2.l2m, EV_L2_FRAME_ERROR, (void *) 'N'); |
1658 | FreeSkb(skb); | 1642 | dev_kfree_skb(skb); |
1659 | return; | 1643 | return; |
1660 | } | 1644 | } |
1661 | if (!(*datap & 1)) { /* I-Frame */ | 1645 | if (!(*datap & 1)) { /* I-Frame */ |
@@ -1684,16 +1668,16 @@ isdnl2_l1l2(struct PStack *st, int pr, void *arg) | |||
1684 | ret = FsmEvent(&st->l2.l2m, EV_L2_FRMR, skb); | 1668 | ret = FsmEvent(&st->l2.l2m, EV_L2_FRMR, skb); |
1685 | } else { | 1669 | } else { |
1686 | FsmEvent(&st->l2.l2m, EV_L2_FRAME_ERROR, (void *) 'L'); | 1670 | FsmEvent(&st->l2.l2m, EV_L2_FRAME_ERROR, (void *) 'L'); |
1687 | FreeSkb(skb); | 1671 | dev_kfree_skb(skb); |
1688 | ret = 0; | 1672 | ret = 0; |
1689 | } | 1673 | } |
1690 | if(c) { | 1674 | if(c) { |
1691 | FreeSkb(skb); | 1675 | dev_kfree_skb(skb); |
1692 | FsmEvent(&st->l2.l2m, EV_L2_FRAME_ERROR, (void *)(long)c); | 1676 | FsmEvent(&st->l2.l2m, EV_L2_FRAME_ERROR, (void *)(long)c); |
1693 | ret = 0; | 1677 | ret = 0; |
1694 | } | 1678 | } |
1695 | if (ret) | 1679 | if (ret) |
1696 | FreeSkb(skb); | 1680 | dev_kfree_skb(skb); |
1697 | break; | 1681 | break; |
1698 | case (PH_PULL | CONFIRM): | 1682 | case (PH_PULL | CONFIRM): |
1699 | FsmEvent(&st->l2.l2m, EV_L2_ACK_PULL, arg); | 1683 | FsmEvent(&st->l2.l2m, EV_L2_ACK_PULL, arg); |