From: mabbas <mabbas@linux.intel.com>
Date: Thu, 25 Oct 2007 09:15:34 +0000 (+0800)
Subject: iwlwifi: accept up to 4K frame size on Rx side to fit A-MSDU frame
X-Git-Tag: firefly_0821_release~23655^2~661
X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=a033f37ee4381a3d9fa0cf4ec28a23357080ed50;p=firefly-linux-kernel-4.4.55.git

iwlwifi: accept up to 4K frame size on Rx side to fit A-MSDU frame

The driver drops any Rx frame larger than 2332 bytes, but with A-MSDU
frame, it could be up to 4K. This patch makes sure we can process larger
A-MSDU frame.

Signed-off-by: Mohamed Abbas <mabbas@linux.intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
---

diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c
index baf6e60d49ae..a728c45b0d33 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965.c
+++ b/drivers/net/wireless/iwlwifi/iwl-4965.c
@@ -3522,8 +3522,8 @@ static void iwl4965_handle_data_packet(struct iwl_priv *priv, int is_data,
 		rx_start->byte_count = amsdu->byte_count;
 		rx_end = (__le32 *) (((u8 *) hdr) + len);
 	}
-	if (len > 2342 || len < 16) {
-		IWL_DEBUG_DROP("byte count out of range [16,2342]"
+	if (len > IWL_RX_BUF_SIZE || len < 16) {
+		IWL_WARNING("byte count out of range [16,4K]"
 			       " : %d\n", len);
 		return;
 	}