Skip to contentSkip to conversation

w35und: Merge wbhal_f.h to wbhal_s.h

PATCH In review Pekka Enberg 3 participants 10 messages Dec 4, 2010 – Jan 5, 2011 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/6 w35und: Merge wbhal_f.h to wbhal_s.h

This patch merges HAL struct and function definitions into one header file.

---
 drivers/staging/winbond/mds.c             |    3 +-
 drivers/staging/winbond/mto.c             |    4 +-
 drivers/staging/winbond/phy_calibration.c |    4 +-
 drivers/staging/winbond/phy_calibration.h |    2 +-
 drivers/staging/winbond/reg.c             |    4 +-
 drivers/staging/winbond/wb35reg_s.h       |   74 ++++++++++++++++++++++++++
 drivers/staging/winbond/wb35tx_f.h        |    1 -
 drivers/staging/winbond/wbhal_f.h         |   81 -----------------------------
 drivers/staging/winbond/wbusb.c           |    5 ++-
 9 files changed, 90 insertions(+), 88 deletions(-)
 delete mode 100644 drivers/staging/winbond/wbhal_f.h
drivers/staging/winbond/mds.c +2 -1
index 9217762..2128e6e 100644
@@ -2,8 +2,9 @@
 #include "mlmetxrx_f.h"
 #include "mto.h"
 #include "sysdef.h"
-#include "wbhal_f.h"
+#include "wbhal_s.h"
 #include "wblinux_f.h"
+#include "wb35tx_f.h"
 
 unsigned char
 Mds_initial(struct wbsoft_priv *adapter)
drivers/staging/winbond/mto.c +3 -1
index 9cd2127..05d1262 100644
@@ -19,7 +19,9 @@
 
 #include "sysdef.h"
 #include "sme_api.h"
-#include "wbhal_f.h"
+#include "wbhal_s.h"
+#include "wb35reg_f.h"
+#include "core.h"
 
 /* Declare SQ3 to rate and fragmentation threshold table */
 /* Declare fragmentation thresholds table */
drivers/staging/winbond/phy_calibration.c +3 -1
index 2b375ba..08cec74 100644
@@ -12,7 +12,9 @@
 /****************** INCLUDE FILES SECTION ***********************************/
 #include "sysdef.h"
 #include "phy_calibration.h"
-#include "wbhal_f.h"
+#include "wbhal_s.h"
+#include "wb35reg_f.h"
+#include "core.h"
 
 
 /****************** DEBUG CONSTANT AND MACRO SECTION ************************/
drivers/staging/winbond/phy_calibration.h +1 -1
index 3032031..9fcdab1 100644
@@ -1,7 +1,7 @@
 #ifndef __WINBOND_PHY_CALIBRATION_H
 #define __WINBOND_PHY_CALIBRATION_H
 
-#include "wbhal_f.h"
+#include "wbhal_s.h"
 
 #define REG_AGC_CTRL1		0x1000
 #define REG_AGC_CTRL2		0x1004
drivers/staging/winbond/reg.c +3 -1
index 990f9d4..8df05c4 100644
@@ -1,5 +1,7 @@
 #include "sysdef.h"
-#include "wbhal_f.h"
+#include "wbhal_s.h"
+#include "wb35reg_f.h"
+#include "core.h"
 
 /*
  * ====================================================
drivers/staging/winbond/wb35reg_s.h +74 -0

84 lines not on this page · raw message

drivers/staging/winbond/wb35tx_f.h +0 -1
index 1d3b515..018fd35 100644
@@ -2,7 +2,6 @@
 #define __WINBOND_WB35TX_F_H
 
 #include "core.h"
-#include "wbhal_f.h"
 
 /*
  * ====================================
drivers/staging/winbond/wbhal_f.h deleted +0 -81

81 lines not on this page · raw message

drivers/staging/winbond/wbusb.c +4 -1
index 3f60cf7..a053bbb 100644
@@ -16,7 +16,10 @@
 #include "mds_f.h"
 #include "mlmetxrx_f.h"
 #include "mto.h"
-#include "wbhal_f.h"
+#include "wbhal_s.h"
+#include "wb35reg_f.h"
+#include "wb35tx_f.h"
+#include "wb35rx_f.h"
 #include "wblinux_f.h"
 
 MODULE_DESCRIPTION("IS89C35 802.11bg WLAN USB Driver");
Signature · 1 line
1.7.0.4
#1 lore raw

PATCH 2/6 w35und: Rename wbhal_s.h to wbhal.h

This patch renames the wbhal_s.h header file to wbhal.h now that it contains both structure and function definitions.

---
 drivers/staging/winbond/core.h            |    2 +-
 drivers/staging/winbond/mds.c             |    2 +-
 drivers/staging/winbond/mds_f.h           |    2 +-
 drivers/staging/winbond/mto.c             |    2 +-
 drivers/staging/winbond/phy_calibration.c |    2 +-
 drivers/staging/winbond/phy_calibration.h |    2 +-
 drivers/staging/winbond/reg.c             |    2 +-
 drivers/staging/winbond/wb35reg_f.h       |    2 +-
 drivers/staging/winbond/wb35rx_f.h        |    2 +-
 drivers/staging/winbond/wbhal.h           |  525 +++++++++++++++++++++++++++++
 drivers/staging/winbond/wbhal_s.h         |  525 -----------------------------
 drivers/staging/winbond/wbusb.c           |    2 +-
 12 files changed, 535 insertions(+), 535 deletions(-)
 create mode 100644 drivers/staging/winbond/wbhal.h
 delete mode 100644 drivers/staging/winbond/wbhal_s.h
drivers/staging/winbond/core.h +1 -1
index 2b87a00..d7b3aca 100644
@@ -4,7 +4,7 @@
 #include <linux/wireless.h>
 #include <linux/types.h>
 
-#include "wbhal_s.h"
+#include "wbhal.h"
 #include "mto.h"
 
 #include "mac_structures.h"
drivers/staging/winbond/mds.c +1 -1
index 2128e6e..9ac2c87 100644
@@ -2,7 +2,7 @@
 #include "mlmetxrx_f.h"
 #include "mto.h"
 #include "sysdef.h"
-#include "wbhal_s.h"
+#include "wbhal.h"
 #include "wblinux_f.h"
 #include "wb35tx_f.h"
 
drivers/staging/winbond/mds_f.h +1 -1
index 7f68dea..d902843 100644
@@ -1,7 +1,7 @@
 #ifndef __WINBOND_MDS_F_H
 #define __WINBOND_MDS_F_H
 
-#include "wbhal_s.h"
+#include "wbhal.h"
 #include "core.h"
 
 unsigned char Mds_initial(struct wbsoft_priv *adapter);
drivers/staging/winbond/mto.c +1 -1
index 05d1262..1faebce 100644
@@ -19,7 +19,7 @@
 
 #include "sysdef.h"
 #include "sme_api.h"
-#include "wbhal_s.h"
+#include "wbhal.h"
 #include "wb35reg_f.h"
 #include "core.h"
 
drivers/staging/winbond/phy_calibration.c +1 -1
index 08cec74..0658b09 100644
@@ -12,7 +12,7 @@
 /****************** INCLUDE FILES SECTION ***********************************/
 #include "sysdef.h"
 #include "phy_calibration.h"
-#include "wbhal_s.h"
+#include "wbhal.h"
 #include "wb35reg_f.h"
 #include "core.h"
 
drivers/staging/winbond/phy_calibration.h +1 -1
index 9fcdab1..84f6e84 100644
@@ -1,7 +1,7 @@
 #ifndef __WINBOND_PHY_CALIBRATION_H
 #define __WINBOND_PHY_CALIBRATION_H
 
-#include "wbhal_s.h"
+#include "wbhal.h"
 
 #define REG_AGC_CTRL1		0x1000
 #define REG_AGC_CTRL2		0x1004
drivers/staging/winbond/reg.c +1 -1
index 8df05c4..439d213 100644
@@ -1,5 +1,5 @@
 #include "sysdef.h"
-#include "wbhal_s.h"
+#include "wbhal.h"
 #include "wb35reg_f.h"
 #include "core.h"
 
drivers/staging/winbond/wb35reg_f.h +1 -1
index bf23c10..95dc980 100644
@@ -1,7 +1,7 @@
 #ifndef __WINBOND_WB35REG_F_H
 #define __WINBOND_WB35REG_F_H
 
-#include "wbhal_s.h"
+#include "wbhal.h"
 
 /*
  * ====================================
drivers/staging/winbond/wb35rx_f.h +1 -1
index 98acce5..1fdf65e 100644
@@ -2,7 +2,7 @@
 #define __WINBOND_WB35RX_F_H
 
 #include <net/mac80211.h>
-#include "wbhal_s.h"
+#include "wbhal.h"
 
 //====================================
 // Interface function declare
drivers/staging/winbond/wbhal.h new file +525 -0

525 lines not on this page · raw message

drivers/staging/winbond/wbhal_s.h deleted +0 -525

525 lines not on this page · raw message

drivers/staging/winbond/wbusb.c +1 -1
index a053bbb..df055ab 100644
@@ -16,7 +16,7 @@
 #include "mds_f.h"
 #include "mlmetxrx_f.h"
 #include "mto.h"
-#include "wbhal_s.h"
+#include "wbhal.h"
 #include "wb35reg_f.h"
 #include "wb35tx_f.h"
 #include "wb35rx_f.h"
Signature · 1 line
1.7.0.4
#2 lore raw

PATCH 3/6 w35und: Kill empty Mds_Destroy function

In reply to Pekka Enberg

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

---
 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(-)
drivers/staging/winbond/mds.c +0 -5
index 9ac2c87..90f2cc0 100644
@@ -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;
drivers/staging/winbond/mds_f.h +0 -1
index d902843..ce8be07 100644
@@ -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);
drivers/staging/winbond/wbusb.c +0 -2
index df055ab..82040f4 100644
@@ -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_
Signature · 1 line
1.7.0.4
#3 lore raw

PATCH 4/6 w35und: Kill struct hwdata ->NullPacketCount

In reply to Pekka Enberg

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

---
 drivers/staging/winbond/wbhal.h |    6 ------
 drivers/staging/winbond/wbusb.c |    9 ---------
 2 files changed, 0 insertions(+), 15 deletions(-)
drivers/staging/winbond/wbhal.h +0 -6
index 821a1b3..6f4cd76 100644
@@ -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
drivers/staging/winbond/wbusb.c +0 -9
index 82040f4..dcb6d5b 100644
@@ -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;
Signature · 1 line
1.7.0.4
#4 lore raw

PATCH 5/6 w35und: Kill struct hwdata ->HwStop

In reply to Pekka Enberg

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.

---
 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(-)
drivers/staging/winbond/wb35rx.c +2 -2
index 448514a..5af271f 100644
@@ -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)
drivers/staging/winbond/wb35tx.c +4 -4
index 2a9d055..fd52554 100644
@@ -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)
drivers/staging/winbond/wbhal.h +0 -3
index 6f4cd76..1c91588 100644
@@ -511,9 +511,6 @@ struct hw_data {
 
 	/* For global timer */
 	u32		time_count;	/* TICK_TIME_100ms 1 = 100ms */
-
-	/* For error recover */
-	u32		HwStop;
 };
 
 #endif
Signature · 1 line
1.7.0.4
#5 lore raw

PATCH 6/6 w35und: Kill struct hwdata ->SurpriseRemoveCount

In reply to Pekka Enberg

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

---
 drivers/staging/winbond/wbhal.h |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
drivers/staging/winbond/wbhal.h +0 -2
index 1c91588..dcf3b21 100644
@@ -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 */
 };
Signature · 1 line
1.7.0.4
#6 lore raw

Re: [PATCH 1/6] Staging: w35und: Merge wbhal_f.h to wbhal_s.h

In reply to Pekka Enberg
Quoted 1 line · Pekka Enberg

This patch merges HAL struct and function definitions into one header file.

This patch doesn't apply at all, what was it made against?

Care to refresh this whole series so it can be applied?

thanks,

greg k-h

#7 lore raw

Re: [PATCH 1/6] Staging: w35und: Merge wbhal_f.h to wbhal_s.h

Quoted 3 lines · Greg KH
Quoted 1 line · Pekka Enberg

This patch merges HAL struct and function definitions into one header file.

This patch doesn't apply at all, what was it made against?

They're actually patches that predate the ones you merged recently from me. I just pulled your tree to mine and did "git format-patch" without thinking about it too much.

Quoted 1 line

Care to refresh this whole series so it can be applied?

Sure, I can do that.

Pekka

#8 lore raw

Re: [PATCH 1/6] Staging: w35und: Merge wbhal_f.h to wbhal_s.h

Hi!

Quoted 9 lines
Quoted 1 line

This patch doesn't apply at all, what was it made against?

They're actually patches that predate the ones you merged recently from me. I just pulled your tree to mine and did "git format-patch" without thinking about it too much.

Quoted 1 line

Care to refresh this whole series so it can be applied?

Sure, I can do that.

Thanks... and ACK for the whole series.
Pavel

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#9 lore raw

Re: [PATCH 1/6] Staging: w35und: Merge wbhal_f.h to wbhal_s.h

Quoted 8 lines · Pavel Machek

Hi!

Quoted 6 lines
Quoted 1 line

This patch doesn't apply at all, what was it made against?

They're actually patches that predate the ones you merged recently from me. I just pulled your tree to mine and did "git format-patch" without thinking about it too much.

Quoted 5 lines
Quoted 3 lines
Quoted 1 line

Care to refresh this whole series so it can be applied?

Sure, I can do that.

Thanks... and ACK for the whole series.

Interesting enough, Greg had already merged them before I resent them:

http://git.kernel.org/?p=linux/kernel/git/gregkh/staging-2.6.git;a=commitdiff;h=72ca8819f7f4ac4ddf82ab72ee614075821a3d00

I guess either me or Git was confused to think they hadn't been merged. It also explains why the patches didn't apply. ;-)