mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/4] w35und: Kill empty Mds_Destroy function
@ 2010-11-01 20:29 Pekka Enberg
  2010-11-01 20:29 ` [PATCH 2/4] w35und: Kill struct hwdata ->NullPacketCount Pekka Enberg
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Pekka Enberg @ 2010-11-01 20:29 UTC (permalink / raw)
  To: gregkh; +Cc: linux-kernel, Pekka Enberg, Pavel Machek

The Mds_Destroy() function doesn't do anything so kill it.

Cc: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
---
 drivers/staging/winbond/mds.c   |    5 -----
 drivers/staging/winbond/mds_f.h |    1 -
 drivers/staging/winbond/wbusb.c |    2 --
 3 files changed, 0 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/winbond/mds.c b/drivers/staging/winbond/mds.c
index 9ac2c87..90f2cc0 100644
--- a/drivers/staging/winbond/mds.c
+++ b/drivers/staging/winbond/mds.c
@@ -18,11 +18,6 @@ Mds_initial(struct wbsoft_priv *adapter)
 	return hal_get_tx_buffer(&adapter->sHwData, &pMds->pTxBuffer);
 }
 
-void
-Mds_Destroy(struct wbsoft_priv *adapter)
-{
-}
-
 static void Mds_DurationSet(struct wbsoft_priv *adapter,  struct wb35_descriptor *pDes,  u8 *buffer)
 {
 	struct T00_descriptor *pT00;
diff --git a/drivers/staging/winbond/mds_f.h b/drivers/staging/winbond/mds_f.h
index d902843..ce8be07 100644
--- a/drivers/staging/winbond/mds_f.h
+++ b/drivers/staging/winbond/mds_f.h
@@ -5,7 +5,6 @@
 #include "core.h"
 
 unsigned char Mds_initial(struct wbsoft_priv *adapter);
-void Mds_Destroy(struct wbsoft_priv *adapter);
 void Mds_Tx(struct wbsoft_priv *adapter);
 void Mds_SendComplete(struct wbsoft_priv *adapter, struct T02_descriptor *pt02);
 void Mds_MpduProcess(struct wbsoft_priv *adapter, struct wb35_descriptor *prxdes);
diff --git a/drivers/staging/winbond/wbusb.c b/drivers/staging/winbond/wbusb.c
index df055ab..82040f4 100644
--- a/drivers/staging/winbond/wbusb.c
+++ b/drivers/staging/winbond/wbusb.c
@@ -863,8 +863,6 @@ static void hal_halt(struct hw_data *pHwData)
 
 static void wb35_hw_halt(struct wbsoft_priv *adapter)
 {
-	Mds_Destroy(adapter);
-
 	/* Turn off Rx and Tx hardware ability */
 	hal_stop(&adapter->sHwData);
 #ifdef _PE_USB_INI_DUMP_
-- 
1.7.0.4


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

* [PATCH 2/4] w35und: Kill struct hwdata ->NullPacketCount
  2010-11-01 20:29 [PATCH 1/4] w35und: Kill empty Mds_Destroy function Pekka Enberg
@ 2010-11-01 20:29 ` Pekka Enberg
  2010-11-01 21:16   ` Pavel Machek
  2010-11-01 20:29 ` [PATCH 3/4] w35und: Kill struct hwdata ->HwStop Pekka Enberg
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 6+ messages in thread
From: Pekka Enberg @ 2010-11-01 20:29 UTC (permalink / raw)
  To: gregkh; +Cc: linux-kernel, Pekka Enberg, Pavel Machek

This patch kills the NullPacketCount member of struct hwdata. It's not used for
anything so it's safe to remove it.

Cc: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
---
 drivers/staging/winbond/wbhal.h |    6 ------
 drivers/staging/winbond/wbusb.c |    9 ---------
 2 files changed, 0 insertions(+), 15 deletions(-)

diff --git a/drivers/staging/winbond/wbhal.h b/drivers/staging/winbond/wbhal.h
index 821a1b3..6f4cd76 100644
--- a/drivers/staging/winbond/wbhal.h
+++ b/drivers/staging/winbond/wbhal.h
@@ -342,9 +342,6 @@ struct wb35_descriptor { /* Skip length = 8 DWORD */
 	void	*buffer_address[MAX_DESCRIPTOR_BUFFER_INDEX];
 };
 
-
-#define DEFAULT_NULL_PACKET_COUNT	180000	/* 180 seconds */
-
 #define MAX_TXVGA_EEPROM		9	/* How many word(u16) of EEPROM will be used for TxVGA */
 #define MAX_RF_PARAMETER		32
 
@@ -517,9 +514,6 @@ struct hw_data {
 
 	/* For error recover */
 	u32		HwStop;
-
-	/* For avoid AP disconnect */
-	u32		NullPacketCount;
 };
 
 #endif
diff --git a/drivers/staging/winbond/wbusb.c b/drivers/staging/winbond/wbusb.c
index 82040f4..dcb6d5b 100644
--- a/drivers/staging/winbond/wbusb.c
+++ b/drivers/staging/winbond/wbusb.c
@@ -611,15 +611,6 @@ static void hal_led_control(unsigned long data)
 			}
 			break;
 		}
-
-		/* Active send null packet to avoid AP disconnect */
-		if (pHwData->LED_LinkOn) {
-			pHwData->NullPacketCount += TimeInterval;
-			if (pHwData->NullPacketCount >=
-			    DEFAULT_NULL_PACKET_COUNT) {
-				pHwData->NullPacketCount = 0;
-			}
-		}
 	}
 
 	pHwData->time_count += TimeInterval;
-- 
1.7.0.4


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

* [PATCH 3/4] w35und: Kill struct hwdata ->HwStop
  2010-11-01 20:29 [PATCH 1/4] w35und: Kill empty Mds_Destroy function Pekka Enberg
  2010-11-01 20:29 ` [PATCH 2/4] w35und: Kill struct hwdata ->NullPacketCount Pekka Enberg
@ 2010-11-01 20:29 ` Pekka Enberg
  2010-11-01 20:29 ` [PATCH 4/4] w35und: Kill struct hwdata ->SurpriseRemoveCount Pekka Enberg
  2010-11-01 21:15 ` [PATCH 1/4] w35und: Kill empty Mds_Destroy function Pavel Machek
  3 siblings, 0 replies; 6+ messages in thread
From: Pekka Enberg @ 2010-11-01 20:29 UTC (permalink / raw)
  To: gregkh; +Cc: linux-kernel, Pekka Enberg, Pavel Machek

This patch kills the ->HwStop member of struct hwdata. It's a read-only
variable that's always zero so it's safe to remove it.

Cc: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
---
 drivers/staging/winbond/wb35rx.c |    4 ++--
 drivers/staging/winbond/wb35tx.c |    8 ++++----
 drivers/staging/winbond/wbhal.h  |    3 ---
 3 files changed, 6 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/winbond/wb35rx.c b/drivers/staging/winbond/wb35rx.c
index 448514a..5af271f 100644
--- a/drivers/staging/winbond/wb35rx.c
+++ b/drivers/staging/winbond/wb35rx.c
@@ -174,7 +174,7 @@ static void Wb35Rx_Complete(struct urb *urb)
 	/* The IRP is completed */
 	pWb35Rx->EP3vm_state = VM_COMPLETED;
 
-	if (pHwData->SurpriseRemove || pHwData->HwStop) /* Must be here, or RxBufferId is invalid */
+	if (pHwData->SurpriseRemove) /* Must be here, or RxBufferId is invalid */
 		goto error;
 
 	if (pWb35Rx->rx_halt)
@@ -239,7 +239,7 @@ static void Wb35Rx(struct ieee80211_hw *hw)
 	u32			RxBufferId;
 
 	/* Issuing URB */
-	if (pHwData->SurpriseRemove || pHwData->HwStop)
+	if (pHwData->SurpriseRemove)
 		goto error;
 
 	if (pWb35Rx->rx_halt)
diff --git a/drivers/staging/winbond/wb35tx.c b/drivers/staging/winbond/wb35tx.c
index 2a9d055..fd52554 100644
--- a/drivers/staging/winbond/wb35tx.c
+++ b/drivers/staging/winbond/wb35tx.c
@@ -41,7 +41,7 @@ static void Wb35Tx_complete(struct urb * pUrb)
 	pWb35Tx->TxSendIndex++;
 	pWb35Tx->TxSendIndex %= MAX_USB_TX_BUFFER_NUMBER;
 
-	if (pHwData->SurpriseRemove || pHwData->HwStop) // Let WbWlanHalt to handle surprise remove
+	if (pHwData->SurpriseRemove) // Let WbWlanHalt to handle surprise remove
 		goto error;
 
 	if (pWb35Tx->tx_halt)
@@ -74,7 +74,7 @@ static void Wb35Tx(struct wbsoft_priv *adapter)
 	u32		SendIndex;
 
 
-	if (pHwData->SurpriseRemove || pHwData->HwStop)
+	if (pHwData->SurpriseRemove)
 		goto cleanup;
 
 	if (pWb35Tx->tx_halt)
@@ -222,7 +222,7 @@ static void Wb35Tx_EP2VM_complete(struct urb * pUrb)
 	pWb35Tx->EP2VM_status = pUrb->status;
 
 	// For Linux 2.4. Interrupt will always trigger
-	if (pHwData->SurpriseRemove || pHwData->HwStop) // Let WbWlanHalt to handle surprise remove
+	if (pHwData->SurpriseRemove) // Let WbWlanHalt to handle surprise remove
 		goto error;
 
 	if (pWb35Tx->tx_halt)
@@ -263,7 +263,7 @@ static void Wb35Tx_EP2VM(struct wbsoft_priv *adapter)
 	u32 *	pltmp = (u32 *)pWb35Tx->EP2_buf;
 	int		retv;
 
-	if (pHwData->SurpriseRemove || pHwData->HwStop)
+	if (pHwData->SurpriseRemove)
 		goto error;
 
 	if (pWb35Tx->tx_halt)
diff --git a/drivers/staging/winbond/wbhal.h b/drivers/staging/winbond/wbhal.h
index 6f4cd76..1c91588 100644
--- a/drivers/staging/winbond/wbhal.h
+++ b/drivers/staging/winbond/wbhal.h
@@ -511,9 +511,6 @@ struct hw_data {
 
 	/* For global timer */
 	u32		time_count;	/* TICK_TIME_100ms 1 = 100ms */
-
-	/* For error recover */
-	u32		HwStop;
 };
 
 #endif
-- 
1.7.0.4


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

* [PATCH 4/4] w35und: Kill struct hwdata ->SurpriseRemoveCount
  2010-11-01 20:29 [PATCH 1/4] w35und: Kill empty Mds_Destroy function Pekka Enberg
  2010-11-01 20:29 ` [PATCH 2/4] w35und: Kill struct hwdata ->NullPacketCount Pekka Enberg
  2010-11-01 20:29 ` [PATCH 3/4] w35und: Kill struct hwdata ->HwStop Pekka Enberg
@ 2010-11-01 20:29 ` Pekka Enberg
  2010-11-01 21:15 ` [PATCH 1/4] w35und: Kill empty Mds_Destroy function Pavel Machek
  3 siblings, 0 replies; 6+ messages in thread
From: Pekka Enberg @ 2010-11-01 20:29 UTC (permalink / raw)
  To: gregkh; +Cc: linux-kernel, Pekka Enberg, Pavel Machek

This patch kills the ->SurpriseRemoveCount member of struct hwdata. It's not
used at all so it's safe to remove it.

Cc: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
---
 drivers/staging/winbond/wbhal.h |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/winbond/wbhal.h b/drivers/staging/winbond/wbhal.h
index 1c91588..dcf3b21 100644
--- a/drivers/staging/winbond/wbhal.h
+++ b/drivers/staging/winbond/wbhal.h
@@ -507,8 +507,6 @@ struct hw_data {
 	u32		RxByteCountLast;
 	u32		TxByteCountLast;
 
-	atomic_t	SurpriseRemoveCount;
-
 	/* For global timer */
 	u32		time_count;	/* TICK_TIME_100ms 1 = 100ms */
 };
-- 
1.7.0.4


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

* Re: [PATCH 1/4] w35und: Kill empty Mds_Destroy function
  2010-11-01 20:29 [PATCH 1/4] w35und: Kill empty Mds_Destroy function Pekka Enberg
                   ` (2 preceding siblings ...)
  2010-11-01 20:29 ` [PATCH 4/4] w35und: Kill struct hwdata ->SurpriseRemoveCount Pekka Enberg
@ 2010-11-01 21:15 ` Pavel Machek
  3 siblings, 0 replies; 6+ messages in thread
From: Pavel Machek @ 2010-11-01 21:15 UTC (permalink / raw)
  To: Pekka Enberg; +Cc: gregkh, linux-kernel

On Mon 2010-11-01 22:29:28, Pekka Enberg wrote:
> The Mds_Destroy() function doesn't do anything so kill it.
> 
> Cc: Pavel Machek <pavel@ucw.cz>
> Signed-off-by: Pekka Enberg <penberg@kernel.org>

ACK.

> ---
>  drivers/staging/winbond/mds.c   |    5 -----
>  drivers/staging/winbond/mds_f.h |    1 -
>  drivers/staging/winbond/wbusb.c |    2 --
>  3 files changed, 0 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/staging/winbond/mds.c b/drivers/staging/winbond/mds.c
> index 9ac2c87..90f2cc0 100644
> --- a/drivers/staging/winbond/mds.c
> +++ b/drivers/staging/winbond/mds.c
> @@ -18,11 +18,6 @@ Mds_initial(struct wbsoft_priv *adapter)
>  	return hal_get_tx_buffer(&adapter->sHwData, &pMds->pTxBuffer);
>  }
>  
> -void
> -Mds_Destroy(struct wbsoft_priv *adapter)
> -{
> -}
> -
>  static void Mds_DurationSet(struct wbsoft_priv *adapter,  struct wb35_descriptor *pDes,  u8 *buffer)
>  {
>  	struct T00_descriptor *pT00;
> diff --git a/drivers/staging/winbond/mds_f.h b/drivers/staging/winbond/mds_f.h
> index d902843..ce8be07 100644
> --- a/drivers/staging/winbond/mds_f.h
> +++ b/drivers/staging/winbond/mds_f.h
> @@ -5,7 +5,6 @@
>  #include "core.h"
>  
>  unsigned char Mds_initial(struct wbsoft_priv *adapter);
> -void Mds_Destroy(struct wbsoft_priv *adapter);
>  void Mds_Tx(struct wbsoft_priv *adapter);
>  void Mds_SendComplete(struct wbsoft_priv *adapter, struct T02_descriptor *pt02);
>  void Mds_MpduProcess(struct wbsoft_priv *adapter, struct wb35_descriptor *prxdes);
> diff --git a/drivers/staging/winbond/wbusb.c b/drivers/staging/winbond/wbusb.c
> index df055ab..82040f4 100644
> --- a/drivers/staging/winbond/wbusb.c
> +++ b/drivers/staging/winbond/wbusb.c
> @@ -863,8 +863,6 @@ static void hal_halt(struct hw_data *pHwData)
>  
>  static void wb35_hw_halt(struct wbsoft_priv *adapter)
>  {
> -	Mds_Destroy(adapter);
> -
>  	/* Turn off Rx and Tx hardware ability */
>  	hal_stop(&adapter->sHwData);
>  #ifdef _PE_USB_INI_DUMP_

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

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

* Re: [PATCH 2/4] w35und: Kill struct hwdata ->NullPacketCount
  2010-11-01 20:29 ` [PATCH 2/4] w35und: Kill struct hwdata ->NullPacketCount Pekka Enberg
@ 2010-11-01 21:16   ` Pavel Machek
  0 siblings, 0 replies; 6+ messages in thread
From: Pavel Machek @ 2010-11-01 21:16 UTC (permalink / raw)
  To: Pekka Enberg; +Cc: gregkh, linux-kernel

On Mon 2010-11-01 22:29:29, Pekka Enberg wrote:
> This patch kills the NullPacketCount member of struct hwdata. It's not used for
> anything so it's safe to remove it.
> 
> Cc: Pavel Machek <pavel@ucw.cz>
> Signed-off-by: Pekka Enberg <penberg@kernel.org>

ACK.

> ---
>  drivers/staging/winbond/wbhal.h |    6 ------
>  drivers/staging/winbond/wbusb.c |    9 ---------
>  2 files changed, 0 insertions(+), 15 deletions(-)
> 
> diff --git a/drivers/staging/winbond/wbhal.h b/drivers/staging/winbond/wbhal.h
> index 821a1b3..6f4cd76 100644
> --- a/drivers/staging/winbond/wbhal.h
> +++ b/drivers/staging/winbond/wbhal.h
> @@ -342,9 +342,6 @@ struct wb35_descriptor { /* Skip length = 8 DWORD */
>  	void	*buffer_address[MAX_DESCRIPTOR_BUFFER_INDEX];
>  };
>  
> -
> -#define DEFAULT_NULL_PACKET_COUNT	180000	/* 180 seconds */
> -
>  #define MAX_TXVGA_EEPROM		9	/* How many word(u16) of EEPROM will be used for TxVGA */
>  #define MAX_RF_PARAMETER		32
>  
> @@ -517,9 +514,6 @@ struct hw_data {
>  
>  	/* For error recover */
>  	u32		HwStop;
> -
> -	/* For avoid AP disconnect */
> -	u32		NullPacketCount;
>  };
>  
>  #endif
> diff --git a/drivers/staging/winbond/wbusb.c b/drivers/staging/winbond/wbusb.c
> index 82040f4..dcb6d5b 100644
> --- a/drivers/staging/winbond/wbusb.c
> +++ b/drivers/staging/winbond/wbusb.c
> @@ -611,15 +611,6 @@ static void hal_led_control(unsigned long data)
>  			}
>  			break;
>  		}
> -
> -		/* Active send null packet to avoid AP disconnect */
> -		if (pHwData->LED_LinkOn) {
> -			pHwData->NullPacketCount += TimeInterval;
> -			if (pHwData->NullPacketCount >=
> -			    DEFAULT_NULL_PACKET_COUNT) {
> -				pHwData->NullPacketCount = 0;
> -			}
> -		}
>  	}
>  
>  	pHwData->time_count += TimeInterval;

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

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

end of thread, other threads:[~2010-11-01 21:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-01 20:29 [PATCH 1/4] w35und: Kill empty Mds_Destroy function Pekka Enberg
2010-11-01 20:29 ` [PATCH 2/4] w35und: Kill struct hwdata ->NullPacketCount Pekka Enberg
2010-11-01 21:16   ` Pavel Machek
2010-11-01 20:29 ` [PATCH 3/4] w35und: Kill struct hwdata ->HwStop Pekka Enberg
2010-11-01 20:29 ` [PATCH 4/4] w35und: Kill struct hwdata ->SurpriseRemoveCount Pekka Enberg
2010-11-01 21:15 ` [PATCH 1/4] w35und: Kill empty Mds_Destroy function Pavel Machek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome