linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Malcolm Priestley <tvboxspy@gmail.com>
To: gregkh@linuxfoundation.org
Cc: linux-wireless@vger.kernel.org, forest@alittletooquiet.net,
	Malcolm Priestley <tvboxspy@gmail.com>
Subject: [PATCH v2 01/48] staging: vt6655: deadcode remove zone file operations and vntconfiguration.dat
Date: Wed, 29 Oct 2014 17:55:19 +0000	[thread overview]
Message-ID: <1414605366-9335-2-git-send-email-tvboxspy@gmail.com> (raw)
In-Reply-To: <1414605366-9335-1-git-send-email-tvboxspy@gmail.com>

These are now all handled by mac80211.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
---
 drivers/staging/vt6655/device.h             |   2 -
 drivers/staging/vt6655/device_main.c        | 113 +---------------------------
 drivers/staging/vt6655/vntconfiguration.dat |   1 -
 3 files changed, 3 insertions(+), 113 deletions(-)
 delete mode 100644 drivers/staging/vt6655/vntconfiguration.dat

diff --git a/drivers/staging/vt6655/device.h b/drivers/staging/vt6655/device.h
index 17a36dc..214f73f 100644
--- a/drivers/staging/vt6655/device.h
+++ b/drivers/staging/vt6655/device.h
@@ -750,6 +750,4 @@ bool device_dma0_xmit(struct vnt_private *pDevice,
 		      struct sk_buff *skb, unsigned int uNodeIndex);
 bool device_alloc_frag_buf(struct vnt_private *pDevice,
 			   PSDeFragControlBlock pDeF);
-int Config_FileOperation(struct vnt_private *pDevice,
-			 bool fwrite, unsigned char *Parameter);
 #endif
diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c
index 07d2101..12fa63c 100644
--- a/drivers/staging/vt6655/device_main.c
+++ b/drivers/staging/vt6655/device_main.c
@@ -303,8 +303,6 @@ static void device_free_rd0_ring(struct vnt_private *pDevice);
 static void device_free_rd1_ring(struct vnt_private *pDevice);
 static void device_free_rings(struct vnt_private *pDevice);
 static void device_free_frag_buf(struct vnt_private *pDevice);
-static int Config_FileGetParameter(unsigned char *string,
-				   unsigned char *dest, unsigned char *source);
 
 /*---------------------  Export Variables  --------------------------*/
 
@@ -412,7 +410,6 @@ static void device_init_registers(struct vnt_private *pDevice)
 	unsigned char byValue1;
 	unsigned char byCCKPwrdBm = 0;
 	unsigned char byOFDMPwrdBm = 0;
-	int zonetype = 0;
 
 	MACbShutdown(pDevice->PortOffset);
 	BBvSoftwareReset(pDevice->PortOffset);
@@ -517,41 +514,6 @@ static void device_init_registers(struct vnt_private *pDevice)
 
 	/* zonetype initial */
 	pDevice->byOriginalZonetype = pDevice->abyEEPROM[EEP_OFS_ZONETYPE];
-	zonetype = Config_FileOperation(pDevice, false, NULL);
-
-	if (zonetype >= 0) {
-		if ((zonetype == 0) &&
-		    (pDevice->abyEEPROM[EEP_OFS_ZONETYPE] != 0x00)) {
-			/* for USA */
-			pDevice->abyEEPROM[EEP_OFS_ZONETYPE] = 0;
-			pDevice->abyEEPROM[EEP_OFS_MAXCHANNEL] = 0x0B;
-
-			pr_debug("Init Zone Type :USA\n");
-		} else if ((zonetype == 1) &&
-			 (pDevice->abyEEPROM[EEP_OFS_ZONETYPE] != 0x01)) {
-			/* for Japan */
-			pDevice->abyEEPROM[EEP_OFS_ZONETYPE] = 0x01;
-			pDevice->abyEEPROM[EEP_OFS_MAXCHANNEL] = 0x0D;
-		} else if ((zonetype == 2) &&
-			  (pDevice->abyEEPROM[EEP_OFS_ZONETYPE] != 0x02)) {
-			/* for Europe */
-			pDevice->abyEEPROM[EEP_OFS_ZONETYPE] = 0x02;
-			pDevice->abyEEPROM[EEP_OFS_MAXCHANNEL] = 0x0D;
-
-			pr_debug("Init Zone Type :Europe\n");
-		} else {
-			if (zonetype != pDevice->abyEEPROM[EEP_OFS_ZONETYPE])
-				pr_debug("zonetype in file[%02x] mismatch with in EEPROM[%02x]\n",
-					 zonetype,
-					 pDevice->abyEEPROM[EEP_OFS_ZONETYPE]);
-			else
-				pr_debug("Read Zonetype file success,use default zonetype setting[%02x]\n",
-					 zonetype);
-		}
-	} else {
-		pr_debug("Read Zonetype file fail,use default zonetype setting[%02x]\n",
-			 SROMbyReadEmbedded(pDevice->PortOffset, EEP_OFS_ZONETYPE));
-	}
 
 	/* Get RFType */
 	pDevice->byRFType = SROMbyReadEmbedded(pDevice->PortOffset, EEP_OFS_RFTYPE);
@@ -595,14 +557,9 @@ static void device_init_registers(struct vnt_private *pDevice)
 	}
 
 	/* recover 12,13 ,14channel for EUROPE by 11 channel */
-	if (((pDevice->abyEEPROM[EEP_OFS_ZONETYPE] == ZoneType_Japan) ||
-	     (pDevice->abyEEPROM[EEP_OFS_ZONETYPE] == ZoneType_Europe)) &&
-	    (pDevice->byOriginalZonetype == ZoneType_USA)) {
-		for (ii = 11; ii < 14; ii++) {
-			pDevice->abyCCKPwrTbl[ii] = pDevice->abyCCKPwrTbl[10];
-			pDevice->abyOFDMPwrTbl[ii] = pDevice->abyOFDMPwrTbl[10];
-
-		}
+	for (ii = 11; ii < 14; ii++) {
+		pDevice->abyCCKPwrTbl[ii] = pDevice->abyCCKPwrTbl[10];
+		pDevice->abyOFDMPwrTbl[ii] = pDevice->abyOFDMPwrTbl[10];
 	}
 
 	/* Load OFDM A Power Table */
@@ -2139,70 +2096,6 @@ static  irqreturn_t  device_intr(int irq,  void *dev_instance)
 	return IRQ_RETVAL(handled);
 }
 
-//2008-8-4 <add> by chester
-static int Config_FileGetParameter(unsigned char *string,
-				   unsigned char *dest, unsigned char *source)
-{
-	unsigned char buf1[100];
-	int source_len = strlen(source);
-
-	memset(buf1, 0, 100);
-	strcat(buf1, string);
-	strcat(buf1, "=");
-	source += strlen(buf1);
-
-	memcpy(dest, source, source_len - strlen(buf1));
-	return true;
-}
-
-int Config_FileOperation(struct vnt_private *pDevice,
-			 bool fwrite, unsigned char *Parameter)
-{
-	unsigned char *buffer = kmalloc(1024, GFP_KERNEL);
-	unsigned char tmpbuffer[20];
-	struct file *file;
-	int result = 0;
-
-	if (!buffer) {
-		pr_err("allocate mem for file fail?\n");
-		return -1;
-	}
-	file = filp_open(CONFIG_PATH, O_RDONLY, 0);
-	if (IS_ERR(file)) {
-		kfree(buffer);
-		pr_err("Config_FileOperation:open file fail?\n");
-		return -1;
-	}
-
-	if (kernel_read(file, 0, buffer, 1024) < 0) {
-		pr_err("read file error?\n");
-		result = -1;
-		goto error1;
-	}
-
-	if (Config_FileGetParameter("ZONETYPE", tmpbuffer, buffer) != true) {
-		pr_err("get parameter error?\n");
-		result = -1;
-		goto error1;
-	}
-
-	if (memcmp(tmpbuffer, "USA", 3) == 0) {
-		result = ZoneType_USA;
-	} else if (memcmp(tmpbuffer, "JAPAN", 5) == 0) {
-		result = ZoneType_Japan;
-	} else if (memcmp(tmpbuffer, "EUROPE", 5) == 0) {
-		result = ZoneType_Europe;
-	} else {
-		result = -1;
-		pr_err("Unknown Zonetype[%s]?\n", tmpbuffer);
-	}
-
-error1:
-	kfree(buffer);
-	fput(file);
-	return result;
-}
-
 static void device_set_multi(struct net_device *dev) {
 	struct vnt_private *pDevice = netdev_priv(dev);
 	PSMgmtObject     pMgmt = pDevice->pMgmt;
diff --git a/drivers/staging/vt6655/vntconfiguration.dat b/drivers/staging/vt6655/vntconfiguration.dat
deleted file mode 100644
index 0064ddc..0000000
--- a/drivers/staging/vt6655/vntconfiguration.dat
+++ /dev/null
@@ -1 +0,0 @@
-ZONETYPE=EUROPE
\ No newline at end of file
-- 
2.1.0


  reply	other threads:[~2014-10-29 17:56 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-29 17:55 [PATCH v2 00/48] staging: vt6655: remove dead code Malcolm Priestley
2014-10-29 17:55 ` Malcolm Priestley [this message]
2014-10-29 17:55 ` [PATCH v2 02/48] staging: vt6655: dead code remove zones and channel table elements Malcolm Priestley
2014-10-29 17:55 ` [PATCH v2 03/48] staging: vt6655: dead code remove net device code Malcolm Priestley
2014-10-29 17:55 ` [PATCH v2 04/48] staging: vt6655: dead code remove iwctl.c/h Malcolm Priestley
2014-10-29 17:55 ` [PATCH v2 05/48] staging: vt6655: dead code remove ioctl.c/h Malcolm Priestley
2014-10-29 17:55 ` [PATCH v2 06/48] staging: vt6655: dead code remove legacy hostap.c/h Malcolm Priestley
2014-10-29 17:55 ` [PATCH v2 07/48] staging: vt6655: dead code remove wpactl.c/h Malcolm Priestley
2014-10-29 17:55 ` [PATCH v2 08/48] staging: vt6655: dpc.c/h remove dead functions Malcolm Priestley
2014-10-29 17:55 ` [PATCH v2 09/48] staging: vt6655: remove dead functions in power.c/h Malcolm Priestley
2014-10-29 17:55 ` [PATCH v2 10/48] staging: vt6655: dead code remove wmgr.c Malcolm Priestley
2014-10-29 17:55 ` [PATCH v2 11/48] staging: vt6655: dead code remove wcmd.c Malcolm Priestley
2014-10-29 17:55 ` [PATCH v2 12/48] staging: vt6655: rxtx remove dead functions Malcolm Priestley
2014-10-29 17:55 ` [PATCH v2 13/48] staging: vt6655: s_cbFillTxBufHead remove unused parameters Malcolm Priestley
2014-10-29 17:55 ` [PATCH v2 14/48] staging: vt6655: dead code remove bssdb.c Malcolm Priestley
2014-10-29 17:55 ` [PATCH v2 15/48] staging: vt6655: dead code datarate.c/h Malcolm Priestley
2014-10-29 17:55 ` [PATCH v2 16/48] staging: vt6655: dead code remove IEEE11.h.c/h Malcolm Priestley
2014-10-29 17:55 ` [PATCH v2 17/48] staging: vt6655: card.c/h remove dead functions Malcolm Priestley
2014-10-29 17:55 ` [PATCH v2 18/48] staging: vt6655: deadcode remove wroute.c/h Malcolm Priestley
2014-10-29 17:55 ` [PATCH v2 19/48] staging: vt6655: dead code remove wpa/wpa2 Malcolm Priestley
2014-10-29 17:55 ` [PATCH v2 20/48] staging: vt6655: deadcode remove aes_ccmp/rc4/tkip Malcolm Priestley
2014-10-29 17:55 ` [PATCH v2 21/48] staging: vt6655: dead code remove michael.c/h Malcolm Priestley
2014-10-29 17:55 ` [PATCH v2 22/48] staging: vt6655: dead code remove vntwifi.c functions Malcolm Priestley
2014-10-29 17:55 ` [PATCH v2 23/48] staging: vt6655: key.c remove dead functions Malcolm Priestley
2014-10-29 17:55 ` [PATCH v2 24/48] staging: vt6655: mib remove unused functions and structure members Malcolm Priestley
2014-10-29 17:55 ` [PATCH v2 25/48] staging: vt6655L remove tether.c functions Malcolm Priestley
2014-10-29 17:55 ` [PATCH v2 26/48] staging: vt6655: dead code remove tcrc.c/h Malcolm Priestley
2014-10-29 17:55 ` [PATCH v2 27/48] staging: vt6655: dead code remove 80211mgr.c and functions Malcolm Priestley
2014-10-29 17:55 ` [PATCH v2 28/48] staging: vt6655: dead code remove wctl.c/h Malcolm Priestley
2014-10-29 17:55 ` [PATCH v2 29/48] staging: vt6655: channel.c remove dead functions Malcolm Priestley
2014-10-29 17:55 ` [PATCH v2 30/48] staging: vt6655: move all RATE_* macros to device.h Malcolm Priestley
2014-10-29 17:55 ` [PATCH v2 31/48] staging: vt6655: dead code remove vntwifi.h Malcolm Priestley
2014-10-29 17:55 ` [PATCH v2 32/48] staging: vt6655: wmgr.h remove management structures Malcolm Priestley
2014-10-29 17:55 ` [PATCH v2 33/48] staging: vt6655: dead code remove ndis and pmkid strutures Malcolm Priestley
2014-10-29 17:55 ` [PATCH v2 34/48] staging: vt6655: dead remove wcmd.h and typedefs Malcolm Priestley
2014-10-29 17:55 ` [PATCH v2 35/48] staging: vt6655: dead code remove bssdb.h header Malcolm Priestley
2014-10-29 17:55 ` [PATCH v2 36/48] staging: vt6655: dead code remove tether.h Malcolm Priestley
2014-10-29 17:55 ` [PATCH v2 37/48] staging: vt6655: dead code remove 80211mgr.h Malcolm Priestley
2014-10-29 17:55 ` [PATCH v2 38/48] staging: vt6655: dead code remove iowpa.h Malcolm Priestley
2014-10-29 17:55 ` [PATCH v2 39/48] staging: vt6655: dead code remove iocmd.h Malcolm Priestley
2014-10-29 17:55 ` [PATCH v2 40/48] staging: vt6655: dead code remove country.h Malcolm Priestley
2014-10-29 17:55 ` [PATCH v2 41/48] staging: vt6655: struct vnt_private remove dead members Malcolm Priestley
2014-10-29 17:56 ` [PATCH v2 42/48] staging: vt6655: device.h remove dead strutures and macros Malcolm Priestley
2014-10-29 17:56 ` [PATCH v2 43/48] staging: vt6655: dead code remove 80211hdr.h Malcolm Priestley
2014-10-29 17:56 ` [PATCH v2 44/48] staging: vt6655: remove typedef void *TimerFunction Malcolm Priestley
2014-10-29 17:56 ` [PATCH v2 45/48] staging: vt6655: Move LIFETIME RES 64us macros to rxtx.h Malcolm Priestley
2014-10-29 17:56 ` [PATCH v2 46/48] staging: vt6655: move MAKE_BEACON_RESERVED to device.h Malcolm Priestley
2014-10-29 17:56 ` [PATCH v2 47/48] staging: vt6655: dead code remove wmgr.h Malcolm Priestley
2014-10-29 17:56 ` [PATCH v2 48/48] staging: vt6655: dead code remove header type.h Malcolm Priestley
2014-10-29 20:35 ` [PATCH v2 00/48] staging: vt6655: remove dead code Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1414605366-9335-2-git-send-email-tvboxspy@gmail.com \
    --to=tvboxspy@gmail.com \
    --cc=forest@alittletooquiet.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).