Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/inaky/wimax
authorDavid S. Miller <davem@davemloft.net>
Sun, 16 May 2010 06:14:16 +0000 (23:14 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sun, 16 May 2010 06:14:16 +0000 (23:14 -0700)
1  2 
drivers/net/wimax/i2400m/control.c
drivers/net/wimax/i2400m/driver.c
drivers/net/wimax/i2400m/netdev.c
drivers/net/wimax/i2400m/rx.c

Simple merge
Simple merge
Simple merge
@@@ -310,9 -313,11 +313,10 @@@ void i2400m_rx_ctl_ack(struct i2400m *i
        return;
  
  error_waiter_cancelled:
-       kfree_skb(ack_skb);
+       if (!IS_ERR(ack_skb))
+               kfree_skb(ack_skb);
  error_no_waiter:
        spin_unlock_irqrestore(&i2400m->rx_lock, flags);
 -      return;
  }
  
  
@@@ -885,28 -894,30 +889,29 @@@ void i2400m_roq_queue_update_ws(struct 
                  i2400m, roq, skb, sn);
        len = skb_queue_len(&roq->queue);
        nsn = __i2400m_roq_nsn(roq, sn);
+       /*
+        * For type 3(queue_update_window_start) rx messages, there is no
+        * need to check if the normalized sequence number is greater 1023.
+        * Simply insert and deliver all packets to the host up to the
+        * window start.
+        */
        old_ws = roq->ws;
-       if (unlikely(nsn >= 1024)) {
-               dev_err(dev, "SW BUG? queue_update_ws nsn %u (sn %u ws %u)\n",
-                       nsn, sn, roq->ws);
-               i2400m_roq_log_dump(i2400m, roq);
-               i2400m_reset(i2400m, I2400M_RT_WARM);
-       } else {
-               /* if the queue is empty, don't bother as we'd queue
-                * it and inmediately unqueue it -- just deliver it */
-               if (len == 0) {
-                       struct i2400m_roq_data *roq_data;
-                       roq_data = (struct i2400m_roq_data *) &skb->cb;
-                       i2400m_net_erx(i2400m, skb, roq_data->cs);
-               }
-               else
-                       __i2400m_roq_queue(i2400m, roq, skb, sn, nsn);
-               __i2400m_roq_update_ws(i2400m, roq, sn + 1);
-               i2400m_roq_log_add(i2400m, roq, I2400M_RO_TYPE_PACKET_WS,
-                                  old_ws, len, sn, nsn, roq->ws);
-       }
+       /* If the queue is empty, don't bother as we'd queue
+        * it and immediately unqueue it -- just deliver it.
+        */
+       if (len == 0) {
+               struct i2400m_roq_data *roq_data;
+               roq_data = (struct i2400m_roq_data *) &skb->cb;
+               i2400m_net_erx(i2400m, skb, roq_data->cs);
+       } else
+               __i2400m_roq_queue(i2400m, roq, skb, sn, nsn);
+       __i2400m_roq_update_ws(i2400m, roq, sn + 1);
+       i2400m_roq_log_add(i2400m, roq, I2400M_RO_TYPE_PACKET_WS,
+                          old_ws, len, sn, nsn, roq->ws);
        d_fnend(2, dev, "(i2400m %p roq %p skb %p sn %u) = void\n",
                i2400m, roq, skb, sn);
 -      return;
  }