Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4aa41f12 authored by Emmanuel Grumbach's avatar Emmanuel Grumbach Committed by John W. Linville
Browse files

iwlwifi: bug fix in AGG flow - cast const to ULL



This patch fixes a bug in AGG flow:
u64 bitmap = 0;
bitmap |= 1 << 32 results to be 0xffffffff80000000.

Signed-off-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: default avatarTomas Winkler <tomas.winkler@intel.com>
Signed-off-by: default avatarZhu Yi <yi.zhu@intel.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent c785d1d5
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -2130,9 +2130,9 @@ static int iwl4965_tx_status_reply_tx(struct iwl_priv *priv,
				bitmap = bitmap << sh;
				bitmap = bitmap << sh;
				sh = 0;
				sh = 0;
			}
			}
			bitmap |= (1 << sh);
			bitmap |= 1ULL << sh;
			IWL_DEBUG_TX_REPLY("start=%d bitmap=0x%x\n",
			IWL_DEBUG_TX_REPLY("start=%d bitmap=0x%llx\n",
					   start, (u32)(bitmap & 0xFFFFFFFF));
					   start, (unsigned long long)bitmap);
		}
		}


		agg->bitmap = bitmap;
		agg->bitmap = bitmap;
+3 −3
Original line number Original line Diff line number Diff line
@@ -1228,9 +1228,9 @@ static int iwl5000_tx_status_reply_tx(struct iwl_priv *priv,
				bitmap = bitmap << sh;
				bitmap = bitmap << sh;
				sh = 0;
				sh = 0;
			}
			}
			bitmap |= (1 << sh);
			bitmap |= 1ULL << sh;
			IWL_DEBUG_TX_REPLY("start=%d bitmap=0x%x\n",
			IWL_DEBUG_TX_REPLY("start=%d bitmap=0x%llx\n",
					   start, (u32)(bitmap & 0xFFFFFFFF));
					   start, (unsigned long long)bitmap);
		}
		}


		agg->bitmap = bitmap;
		agg->bitmap = bitmap;
+1 −1
Original line number Original line Diff line number Diff line
@@ -1391,7 +1391,7 @@ static int iwl_tx_status_reply_compressed_ba(struct iwl_priv *priv,
	/* For each frame attempted in aggregation,
	/* For each frame attempted in aggregation,
	 * update driver's record of tx frame's status. */
	 * update driver's record of tx frame's status. */
	for (i = 0; i < agg->frame_count ; i++) {
	for (i = 0; i < agg->frame_count ; i++) {
		ack = bitmap & (1 << i);
		ack = bitmap & (1ULL << i);
		successes += !!ack;
		successes += !!ack;
		IWL_DEBUG_TX_REPLY("%s ON i=%d idx=%d raw=%d\n",
		IWL_DEBUG_TX_REPLY("%s ON i=%d idx=%d raw=%d\n",
			ack? "ACK":"NACK", i, (agg->start_idx + i) & 0xff,
			ack? "ACK":"NACK", i, (agg->start_idx + i) & 0xff,