diff options
Diffstat (limited to 'drivers/isdn/hisax/isdnl2.c')
-rw-r--r-- | drivers/isdn/hisax/isdnl2.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/drivers/isdn/hisax/isdnl2.c b/drivers/isdn/hisax/isdnl2.c index 9022583fd6a0..1615c1a76ab8 100644 --- a/drivers/isdn/hisax/isdnl2.c +++ b/drivers/isdn/hisax/isdnl2.c | |||
@@ -108,7 +108,8 @@ static int l2addrsize(struct Layer2 *l2); | |||
108 | static void | 108 | static void |
109 | set_peer_busy(struct Layer2 *l2) { | 109 | set_peer_busy(struct Layer2 *l2) { |
110 | test_and_set_bit(FLG_PEER_BUSY, &l2->flag); | 110 | test_and_set_bit(FLG_PEER_BUSY, &l2->flag); |
111 | if (skb_queue_len(&l2->i_queue) || skb_queue_len(&l2->ui_queue)) | 111 | if (!skb_queue_empty(&l2->i_queue) || |
112 | !skb_queue_empty(&l2->ui_queue)) | ||
112 | test_and_set_bit(FLG_L2BLOCK, &l2->flag); | 113 | test_and_set_bit(FLG_L2BLOCK, &l2->flag); |
113 | } | 114 | } |
114 | 115 | ||
@@ -754,7 +755,7 @@ l2_restart_multi(struct FsmInst *fi, int event, void *arg) | |||
754 | st->l2.l2l3(st, DL_ESTABLISH | INDICATION, NULL); | 755 | st->l2.l2l3(st, DL_ESTABLISH | INDICATION, NULL); |
755 | 756 | ||
756 | if ((ST_L2_7==state) || (ST_L2_8 == state)) | 757 | if ((ST_L2_7==state) || (ST_L2_8 == state)) |
757 | if (skb_queue_len(&st->l2.i_queue) && cansend(st)) | 758 | if (!skb_queue_empty(&st->l2.i_queue) && cansend(st)) |
758 | st->l2.l2l1(st, PH_PULL | REQUEST, NULL); | 759 | st->l2.l2l1(st, PH_PULL | REQUEST, NULL); |
759 | } | 760 | } |
760 | 761 | ||
@@ -810,7 +811,7 @@ l2_connected(struct FsmInst *fi, int event, void *arg) | |||
810 | if (pr != -1) | 811 | if (pr != -1) |
811 | st->l2.l2l3(st, pr, NULL); | 812 | st->l2.l2l3(st, pr, NULL); |
812 | 813 | ||
813 | if (skb_queue_len(&st->l2.i_queue) && cansend(st)) | 814 | if (!skb_queue_empty(&st->l2.i_queue) && cansend(st)) |
814 | st->l2.l2l1(st, PH_PULL | REQUEST, NULL); | 815 | st->l2.l2l1(st, PH_PULL | REQUEST, NULL); |
815 | } | 816 | } |
816 | 817 | ||
@@ -1014,7 +1015,7 @@ l2_st7_got_super(struct FsmInst *fi, int event, void *arg) | |||
1014 | if(typ != RR) FsmDelTimer(&st->l2.t203, 9); | 1015 | if(typ != RR) FsmDelTimer(&st->l2.t203, 9); |
1015 | restart_t200(st, 12); | 1016 | restart_t200(st, 12); |
1016 | } | 1017 | } |
1017 | if (skb_queue_len(&st->l2.i_queue) && (typ == RR)) | 1018 | if (!skb_queue_empty(&st->l2.i_queue) && (typ == RR)) |
1018 | st->l2.l2l1(st, PH_PULL | REQUEST, NULL); | 1019 | st->l2.l2l1(st, PH_PULL | REQUEST, NULL); |
1019 | } else | 1020 | } else |
1020 | nrerrorrecovery(fi); | 1021 | nrerrorrecovery(fi); |
@@ -1120,7 +1121,7 @@ l2_got_iframe(struct FsmInst *fi, int event, void *arg) | |||
1120 | return; | 1121 | return; |
1121 | } | 1122 | } |
1122 | 1123 | ||
1123 | if (skb_queue_len(&st->l2.i_queue) && (fi->state == ST_L2_7)) | 1124 | if (!skb_queue_empty(&st->l2.i_queue) && (fi->state == ST_L2_7)) |
1124 | st->l2.l2l1(st, PH_PULL | REQUEST, NULL); | 1125 | st->l2.l2l1(st, PH_PULL | REQUEST, NULL); |
1125 | if (test_and_clear_bit(FLG_ACK_PEND, &st->l2.flag)) | 1126 | if (test_and_clear_bit(FLG_ACK_PEND, &st->l2.flag)) |
1126 | enquiry_cr(st, RR, RSP, 0); | 1127 | enquiry_cr(st, RR, RSP, 0); |
@@ -1138,7 +1139,7 @@ l2_got_tei(struct FsmInst *fi, int event, void *arg) | |||
1138 | test_and_set_bit(FLG_L3_INIT, &st->l2.flag); | 1139 | test_and_set_bit(FLG_L3_INIT, &st->l2.flag); |
1139 | } else | 1140 | } else |
1140 | FsmChangeState(fi, ST_L2_4); | 1141 | FsmChangeState(fi, ST_L2_4); |
1141 | if (skb_queue_len(&st->l2.ui_queue)) | 1142 | if (!skb_queue_empty(&st->l2.ui_queue)) |
1142 | tx_ui(st); | 1143 | tx_ui(st); |
1143 | } | 1144 | } |
1144 | 1145 | ||
@@ -1301,7 +1302,7 @@ l2_pull_iqueue(struct FsmInst *fi, int event, void *arg) | |||
1301 | FsmDelTimer(&st->l2.t203, 13); | 1302 | FsmDelTimer(&st->l2.t203, 13); |
1302 | FsmAddTimer(&st->l2.t200, st->l2.T200, EV_L2_T200, NULL, 11); | 1303 | FsmAddTimer(&st->l2.t200, st->l2.T200, EV_L2_T200, NULL, 11); |
1303 | } | 1304 | } |
1304 | if (skb_queue_len(&l2->i_queue) && cansend(st)) | 1305 | if (!skb_queue_empty(&l2->i_queue) && cansend(st)) |
1305 | st->l2.l2l1(st, PH_PULL | REQUEST, NULL); | 1306 | st->l2.l2l1(st, PH_PULL | REQUEST, NULL); |
1306 | } | 1307 | } |
1307 | 1308 | ||
@@ -1347,7 +1348,7 @@ l2_st8_got_super(struct FsmInst *fi, int event, void *arg) | |||
1347 | } | 1348 | } |
1348 | invoke_retransmission(st, nr); | 1349 | invoke_retransmission(st, nr); |
1349 | FsmChangeState(fi, ST_L2_7); | 1350 | FsmChangeState(fi, ST_L2_7); |
1350 | if (skb_queue_len(&l2->i_queue) && cansend(st)) | 1351 | if (!skb_queue_empty(&l2->i_queue) && cansend(st)) |
1351 | st->l2.l2l1(st, PH_PULL | REQUEST, NULL); | 1352 | st->l2.l2l1(st, PH_PULL | REQUEST, NULL); |
1352 | } else | 1353 | } else |
1353 | nrerrorrecovery(fi); | 1354 | nrerrorrecovery(fi); |