aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wimax
diff options
context:
space:
mode:
authorPrasanna S. Panchamukhi <prasannax.s.panchamukhi@intel.com>2010-04-13 19:36:10 -0400
committerInaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>2010-05-11 17:08:43 -0400
commit0809a7bbe8fbcb4e899b0a3224d8461bd74987e0 (patch)
treed8f733a1860c3ec93114ba7c07fdc56080fcbb40 /drivers/net/wimax
parentd11a6e4495ee1fbb38b59bc88d49d050d3736929 (diff)
wimax/i2400m: fix incorrect handling of type 2 and 3 RX messages
According to Intel Wimax i3200, i5x50 and i6x60 device specification documents, the host driver must not reset the device if the normalized sequence numbers are greater than 1023 for type 2 and type 3 RX messages. This patch removes the code that incorrectly used to reset the device. Signed-off-by: Prasanna S. Panchamukhi <prasannax.s.panchamukhi@intel.com>
Diffstat (limited to 'drivers/net/wimax')
-rw-r--r--drivers/net/wimax/i2400m/rx.c51
1 files changed, 26 insertions, 25 deletions
diff --git a/drivers/net/wimax/i2400m/rx.c b/drivers/net/wimax/i2400m/rx.c
index 71b697f3a68d..66f968a24d49 100644
--- a/drivers/net/wimax/i2400m/rx.c
+++ b/drivers/net/wimax/i2400m/rx.c
@@ -743,12 +743,12 @@ unsigned __i2400m_roq_update_ws(struct i2400m *i2400m, struct i2400m_roq *roq,
743 unsigned new_nws, nsn_itr; 743 unsigned new_nws, nsn_itr;
744 744
745 new_nws = __i2400m_roq_nsn(roq, sn); 745 new_nws = __i2400m_roq_nsn(roq, sn);
746 if (unlikely(new_nws >= 1024) && d_test(1)) { 746 /*
747 dev_err(dev, "SW BUG? __update_ws new_nws %u (sn %u ws %u)\n", 747 * For type 2(update_window_start) rx messages, there is no
748 new_nws, sn, roq->ws); 748 * need to check if the normalized sequence number is greater 1023.
749 WARN_ON(1); 749 * Simply insert and deliver all packets to the host up to the
750 i2400m_roq_log_dump(i2400m, roq); 750 * window start.
751 } 751 */
752 skb_queue_walk_safe(&roq->queue, skb_itr, tmp_itr) { 752 skb_queue_walk_safe(&roq->queue, skb_itr, tmp_itr) {
753 roq_data_itr = (struct i2400m_roq_data *) &skb_itr->cb; 753 roq_data_itr = (struct i2400m_roq_data *) &skb_itr->cb;
754 nsn_itr = __i2400m_roq_nsn(roq, roq_data_itr->sn); 754 nsn_itr = __i2400m_roq_nsn(roq, roq_data_itr->sn);
@@ -890,26 +890,27 @@ void i2400m_roq_queue_update_ws(struct i2400m *i2400m, struct i2400m_roq *roq,
890 i2400m, roq, skb, sn); 890 i2400m, roq, skb, sn);
891 len = skb_queue_len(&roq->queue); 891 len = skb_queue_len(&roq->queue);
892 nsn = __i2400m_roq_nsn(roq, sn); 892 nsn = __i2400m_roq_nsn(roq, sn);
893 /*
894 * For type 3(queue_update_window_start) rx messages, there is no
895 * need to check if the normalized sequence number is greater 1023.
896 * Simply insert and deliver all packets to the host up to the
897 * window start.
898 */
893 old_ws = roq->ws; 899 old_ws = roq->ws;
894 if (unlikely(nsn >= 1024)) { 900 /* If the queue is empty, don't bother as we'd queue
895 dev_err(dev, "SW BUG? queue_update_ws nsn %u (sn %u ws %u)\n", 901 * it and immediately unqueue it -- just deliver it.
896 nsn, sn, roq->ws); 902 */
897 i2400m_roq_log_dump(i2400m, roq); 903 if (len == 0) {
898 i2400m_reset(i2400m, I2400M_RT_WARM); 904 struct i2400m_roq_data *roq_data;
899 } else { 905 roq_data = (struct i2400m_roq_data *) &skb->cb;
900 /* if the queue is empty, don't bother as we'd queue 906 i2400m_net_erx(i2400m, skb, roq_data->cs);
901 * it and inmediately unqueue it -- just deliver it */ 907 } else
902 if (len == 0) { 908 __i2400m_roq_queue(i2400m, roq, skb, sn, nsn);
903 struct i2400m_roq_data *roq_data; 909
904 roq_data = (struct i2400m_roq_data *) &skb->cb; 910 __i2400m_roq_update_ws(i2400m, roq, sn + 1);
905 i2400m_net_erx(i2400m, skb, roq_data->cs); 911 i2400m_roq_log_add(i2400m, roq, I2400M_RO_TYPE_PACKET_WS,
906 } 912 old_ws, len, sn, nsn, roq->ws);
907 else 913
908 __i2400m_roq_queue(i2400m, roq, skb, sn, nsn);
909 __i2400m_roq_update_ws(i2400m, roq, sn + 1);
910 i2400m_roq_log_add(i2400m, roq, I2400M_RO_TYPE_PACKET_WS,
911 old_ws, len, sn, nsn, roq->ws);
912 }
913 d_fnend(2, dev, "(i2400m %p roq %p skb %p sn %u) = void\n", 914 d_fnend(2, dev, "(i2400m %p roq %p skb %p sn %u) = void\n",
914 i2400m, roq, skb, sn); 915 i2400m, roq, skb, sn);
915 return; 916 return;