linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] iwlwifi: protect headers from double inclusion
@ 2008-10-15 18:06 Reinette Chatre
  2008-10-15 18:06 ` [PATCH 2/2] iwlwifi: don't update TFD free counter for invalid station Reinette Chatre
  0 siblings, 1 reply; 3+ messages in thread
From: Reinette Chatre @ 2008-10-15 18:06 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, ipw3945-devel, Tomas Winkler, Reinette Chatre

From: Tomas Winkler <tomas.winkler@intel.com>

This patch protects iwl-csr.h and iwl-fh.h from double inclusion
by ifndef define endif idiom

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
---
 drivers/net/wireless/iwlwifi/iwl-csr.h |    4 +++-
 drivers/net/wireless/iwlwifi/iwl-fh.h  |    3 +++
 2 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl-csr.h b/drivers/net/wireless/iwlwifi/iwl-csr.h
index 662edf4..84f56a2 100644
--- a/drivers/net/wireless/iwlwifi/iwl-csr.h
+++ b/drivers/net/wireless/iwlwifi/iwl-csr.h
@@ -60,6 +60,8 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  *****************************************************************************/
+#ifndef __iwl_csr_h__
+#define __iwl_csr_h__
 /*=== CSR (control and status registers) ===*/
 #define CSR_BASE    (0x000)
 
@@ -286,4 +288,4 @@
 #define HBUS_TARG_MBX_C_REG_BIT_CMD_BLOCKED         (0x00000004)
 
 
-
+#endif /* !__iwl_csr_h__ */
diff --git a/drivers/net/wireless/iwlwifi/iwl-fh.h b/drivers/net/wireless/iwlwifi/iwl-fh.h
index a72efdf..8c48d88 100644
--- a/drivers/net/wireless/iwlwifi/iwl-fh.h
+++ b/drivers/net/wireless/iwlwifi/iwl-fh.h
@@ -60,6 +60,8 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  *****************************************************************************/
+#ifndef __iwl_fh_h__
+#define __iwl_fh_h__
 
 /****************************/
 /* Flow Handler Definitions */
@@ -391,3 +393,4 @@
 /* TCSR: tx_config register values */
 #define FH_RSCSR_FRAME_SIZE_MSK	(0x00003FFF)	/* bits 0-13 */
 
+#endif /* !__iwl_fh_h__ */
-- 
1.5.4.3


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] iwlwifi: don't update TFD free counter for invalid station
  2008-10-15 18:06 [PATCH 1/2] iwlwifi: protect headers from double inclusion Reinette Chatre
@ 2008-10-15 18:06 ` Reinette Chatre
  2008-10-22 21:15   ` John W. Linville
  0 siblings, 1 reply; 3+ messages in thread
From: Reinette Chatre @ 2008-10-15 18:06 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, ipw3945-devel, Tomas Winkler, Reinette Chatre

From: Tomas Winkler <tomas.winkler@intel.com>

This patch makes sure that station table is not accessed
with invalid station id in 4965 TX response path

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Reported-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
---
 drivers/net/wireless/iwlwifi/iwl-4965.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c
index 7cf5e2c..b2d8647 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965.c
+++ b/drivers/net/wireless/iwlwifi/iwl-4965.c
@@ -2236,7 +2236,7 @@ static void iwl4965_rx_reply_tx(struct iwl_priv *priv,
 				   tx_resp->failure_frame);
 
 		freed = iwl_tx_queue_reclaim(priv, txq_id, index);
-		if (qc)
+		if (qc && likely(sta_id != IWL_INVALID_STATION))
 			priv->stations[sta_id].tid[tid].tfds_in_queue -= freed;
 
 		if (priv->mac80211_registered &&
@@ -2244,7 +2244,7 @@ static void iwl4965_rx_reply_tx(struct iwl_priv *priv,
 			ieee80211_wake_queue(priv->hw, txq_id);
 	}
 
-	if (qc)
+	if (qc && likely(sta_id != IWL_INVALID_STATION))
 		iwl_txq_check_empty(priv, sta_id, tid, txq_id);
 
 	if (iwl_check_bits(status, TX_ABORT_REQUIRED_MSK))
-- 
1.5.4.3


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 2/2] iwlwifi: don't update TFD free counter for invalid station
  2008-10-15 18:06 ` [PATCH 2/2] iwlwifi: don't update TFD free counter for invalid station Reinette Chatre
@ 2008-10-22 21:15   ` John W. Linville
  0 siblings, 0 replies; 3+ messages in thread
From: John W. Linville @ 2008-10-22 21:15 UTC (permalink / raw)
  To: Reinette Chatre; +Cc: linux-wireless, ipw3945-devel, Tomas Winkler

On Wed, Oct 15, 2008 at 11:06:24AM -0700, Reinette Chatre wrote:
> From: Tomas Winkler <tomas.winkler@intel.com>
> 
> This patch makes sure that station table is not accessed
> with invalid station id in 4965 TX response path
> 
> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
> Reported-by: Johannes Berg <johannes@sipsolutions.net>
> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>

This doesn't apply, probably due to the merge failures mentioned
earlier.

John
-- 
John W. Linville		Linux should be at the core
linville@tuxdriver.com			of your literate lifestyle.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-10-22 21:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-15 18:06 [PATCH 1/2] iwlwifi: protect headers from double inclusion Reinette Chatre
2008-10-15 18:06 ` [PATCH 2/2] iwlwifi: don't update TFD free counter for invalid station Reinette Chatre
2008-10-22 21:15   ` John W. Linville

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).