iwmc3200wifi: Fix test of unsigned in iwm_ntf_stop_resume_tx()
authorRoel Kluin <roel.kluin@gmail.com>
Wed, 16 Dec 2009 16:01:38 +0000 (17:01 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 21 Dec 2009 16:32:25 +0000 (11:32 -0500)
`queue' was unsigned so the test did not work.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Reviewed-by: Pavel Roskin <proski@gnu.org>
Acked-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/iwmc3200wifi/iwm.h
drivers/net/wireless/iwmc3200wifi/netdev.c
drivers/net/wireless/iwmc3200wifi/rx.c

index 5a26bb05a33ae8867f77179c5329053d9f258a11..79ffa3b98d73c687c968e2b815272a1843f6e0ba 100644 (file)
@@ -349,7 +349,7 @@ int iwm_up(struct iwm_priv *iwm);
 int iwm_down(struct iwm_priv *iwm);
 
 /* TX API */
-u16 iwm_tid_to_queue(u16 tid);
+int iwm_tid_to_queue(u16 tid);
 void iwm_tx_credit_inc(struct iwm_priv *iwm, int id, int total_freed_pages);
 void iwm_tx_worker(struct work_struct *work);
 int iwm_xmit_frame(struct sk_buff *skb, struct net_device *netdev);
index e4f0f8705f65c29b3935d81e5dc481b1f0b0055d..c4c0d23c63ecbcefc6a8b7896849bbd779ece0dc 100644 (file)
@@ -76,7 +76,7 @@ static int iwm_stop(struct net_device *ndev)
  */
 static const u16 iwm_1d_to_queue[8] = { 1, 0, 0, 1, 2, 2, 3, 3 };
 
-u16 iwm_tid_to_queue(u16 tid)
+int iwm_tid_to_queue(u16 tid)
 {
        if (tid > IWM_UMAC_TID_NR - 2)
                return -EINVAL;
index 72c27a3e5528a0d7ed76092cd5a09242935bca5c..3db3d8b07491c1428bda6b166fd624ac9a1166bf 100644 (file)
@@ -1126,7 +1126,7 @@ static int iwm_ntf_stop_resume_tx(struct iwm_priv *iwm, u8 *buf,
 
                if (!stop) {
                        struct iwm_tx_queue *txq;
-                       u16 queue = iwm_tid_to_queue(bit);
+                       int queue = iwm_tid_to_queue(bit);
 
                        if (queue < 0)
                                continue;