linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Arend van Spriel" <arend@broadcom.com>
To: gregkh@suse.de
Cc: devel@linuxdriverproject.org, linux-wireless@vger.kernel.org,
	"Roland Vossen" <rvossen@broadcom.com>,
	"Arend van Spriel" <arend@broadcom.com>
Subject: [PATCH 03/31] staging: brcm80211: removed unused #ifdef sections in fullmac
Date: Wed, 6 Jul 2011 00:02:30 +0200	[thread overview]
Message-ID: <1309903378-29021-4-git-send-email-arend@broadcom.com> (raw)
In-Reply-To: <1309903378-29021-1-git-send-email-arend@broadcom.com>

From: Roland Vossen <rvossen@broadcom.com>

CONFIG_MACH_SANDGATE2G, CONFIG_MMC_MSM7X00A,
CONFIG_HAS_EARLYSUSPEND and CONFIG_WIFI_CONTROL_FUNC were never
defined.

Signed-off-by: Arend van Spriel <arend@broadcom.com>
---
 drivers/staging/brcm80211/brcmfmac/dhd_linux.c  |  126 -----------------------
 drivers/staging/brcm80211/brcmfmac/dhd_sdio.c   |    5 -
 drivers/staging/brcm80211/include/brcmu_utils.h |    4 -
 3 files changed, 0 insertions(+), 135 deletions(-)

diff --git a/drivers/staging/brcm80211/brcmfmac/dhd_linux.c b/drivers/staging/brcm80211/brcmfmac/dhd_linux.c
index f62a3c0..423d5da 100644
--- a/drivers/staging/brcm80211/brcmfmac/dhd_linux.c
+++ b/drivers/staging/brcm80211/brcmfmac/dhd_linux.c
@@ -29,9 +29,6 @@
 #include <linux/fs.h>
 #include <linux/uaccess.h>
 #include <net/cfg80211.h>
-#if defined(CONFIG_HAS_EARLYSUSPEND)
-#include <linux/earlysuspend.h>
-#endif
 #include <defs.h>
 #include <brcmu_utils.h>
 #include <brcmu_wifi.h>
@@ -90,10 +87,6 @@ struct brcmf_info {
 	bool set_macaddress;
 	u8 macvalue[ETH_ALEN];
 	atomic_t pend_8021x_cnt;
-
-#ifdef CONFIG_HAS_EARLYSUSPEND
-	struct early_suspend early_suspend;
-#endif				/* CONFIG_HAS_EARLYSUSPEND */
 };
 
 /* Error bits */
@@ -180,108 +173,6 @@ static int brcmf_host_event(struct brcmf_info *drvr_priv, int *ifidx, void *pktd
 			    struct brcmf_event_msg *event_ptr,
 			    void **data_ptr);
 
-#if defined(CONFIG_HAS_EARLYSUSPEND)
-static int brcmf_set_suspend(int value, struct brcmf_pub *drvr)
-{
-	int power_mode = PM_MAX;
-	/* struct wl_pkt_filter_enable       enable_parm; */
-	char iovbuf[32];
-	int bcn_li_dtim = 3;
-
-	DHD_TRACE(("%s: enter, value = %d in_suspend=%d\n",
-		   __func__, value, drvr->in_suspend));
-
-	if (drvr && drvr->up) {
-		if (value && drvr->in_suspend) {
-
-			/* Kernel suspended */
-			DHD_TRACE(("%s: force extra Suspend setting\n",
-				   __func__));
-
-			brcmf_proto_cdc_set_ioctl(drvr, 0, BRCMF_C_SET_PM,
-					 (char *)&power_mode,
-					 sizeof(power_mode));
-
-			/* Enable packet filter, only allow unicast
-				 packet to send up */
-			brcmf_set_packet_filter(1, drvr);
-
-			/* if dtim skip setup as default force it
-			 * to wake each third dtim
-			 * for better power saving.
-			 * Note that side effect is chance to miss BC/MC
-			 * packet
-			 */
-			if ((drvr->dtim_skip == 0) || (drvr->dtim_skip == 1))
-				bcn_li_dtim = 3;
-			else
-				bcn_li_dtim = drvr->dtim_skip;
-			brcmu_mkiovar("bcn_li_dtim", (char *)&bcn_li_dtim,
-				    4, iovbuf, sizeof(iovbuf));
-			brcmf_proto_cdc_set_ioctl(drvr, 0, BRCMF_C_SET_VAR,
-						  iovbuf, sizeof(iovbuf));
-		} else {
-
-			/* Kernel resumed  */
-			DHD_TRACE(("%s: Remove extra suspend setting\n",
-				   __func__));
-
-			power_mode = PM_FAST;
-			brcmf_proto_cdc_set_ioctl(drvr, 0, BRCMF_C_SET_PM,
-						  (char *)&power_mode,
-						  sizeof(power_mode));
-
-			/* disable pkt filter */
-			brcmf_set_packet_filter(0, drvr);
-
-			/* restore pre-suspend setting for dtim_skip */
-			brcmu_mkiovar("bcn_li_dtim", (char *)&drvr->dtim_skip,
-				    4, iovbuf, sizeof(iovbuf));
-
-			brcmf_proto_cdc_set_ioctl(drvr, 0, BRCMF_C_SET_VAR,
-						  iovbuf, sizeof(iovbuf));
-		}
-	}
-
-	return 0;
-}
-
-static void brcmf_suspend_resume_helper(struct brcmf_info *drvr_priv, int val)
-{
-	struct brcmf_pub *drvr = &drvr_priv->pub;
-
-	brcmf_os_proto_block(drvr);
-	/* Set flag when early suspend was called */
-	drvr->in_suspend = val;
-	if (!drvr->suspend_disable_flag)
-		brcmf_set_suspend(val, drvr);
-	brcmf_os_proto_unblock(drvr);
-}
-
-static void brcmf_early_suspend(struct early_suspend *h)
-{
-	struct brcmf_info *drvr_priv =
-			container_of(h, struct brcmf_info, early_suspend);
-
-	DHD_TRACE(("%s: enter\n", __func__));
-
-	if (drvr_priv)
-		brcmf_suspend_resume_helper(drvr_priv, 1);
-
-}
-
-static void brcmf_late_resume(struct early_suspend *h)
-{
-	struct brcmf_info *drvr_priv =
-			container_of(h, struct brcmf_info, early_suspend);
-
-	DHD_TRACE(("%s: enter\n", __func__));
-
-	if (drvr_priv)
-		brcmf_suspend_resume_helper(drvr_priv, 0);
-}
-#endif				/* defined(CONFIG_HAS_EARLYSUSPEND) */
-
 /*
  * Generalized timeout mechanism.  Uses spin sleep with exponential
  * back-off until
@@ -1479,20 +1370,9 @@ struct brcmf_pub *brcmf_attach(struct brcmf_bus *bus, uint bus_hdrlen)
 	 */
 	memcpy(netdev_priv(net), &drvr_priv, sizeof(drvr_priv));
 
-#if defined(CUSTOMER_HW2) && defined(CONFIG_WIFI_CONTROL_FUNC)
-	g_bus = bus;
-#endif
 #if defined(CONFIG_PM_SLEEP)
 	atomic_set(&brcmf_mmc_suspend, false);
 #endif	/* defined(CONFIG_PM_SLEEP) */
-	/* Init lock suspend to prevent kernel going to suspend */
-#ifdef CONFIG_HAS_EARLYSUSPEND
-	drvr_priv->early_suspend.level = EARLY_SUSPEND_LEVEL_BLANK_SCREEN + 20;
-	drvr_priv->early_suspend.suspend = brcmf_early_suspend;
-	drvr_priv->early_suspend.resume = brcmf_late_resume;
-	register_early_suspend(&drvr_priv->early_suspend);
-#endif
-
 	return &drvr_priv->pub;
 
 fail:
@@ -1664,12 +1544,6 @@ void brcmf_detach(struct brcmf_pub *drvr)
 			struct brcmf_if *ifp;
 			int i;
 
-#if defined(CONFIG_HAS_EARLYSUSPEND)
-			if (drvr_priv->early_suspend.suspend)
-				unregister_early_suspend(
-					&drvr_priv->early_suspend);
-#endif				/* defined(CONFIG_HAS_EARLYSUSPEND) */
-
 			for (i = 1; i < BRCMF_MAX_IFS; i++)
 				if (drvr_priv->iflist[i])
 					brcmf_del_if(drvr_priv, i);
diff --git a/drivers/staging/brcm80211/brcmfmac/dhd_sdio.c b/drivers/staging/brcm80211/brcmfmac/dhd_sdio.c
index c5552f1..4c801e7 100644
--- a/drivers/staging/brcm80211/brcmfmac/dhd_sdio.c
+++ b/drivers/staging/brcm80211/brcmfmac/dhd_sdio.c
@@ -166,13 +166,8 @@ struct rte_console {
 
 #define TXRETRIES	2	/* # of retries for tx frames */
 
-#if defined(CONFIG_MACH_SANDGATE2G)
-#define BRCMF_RXBOUND	250	/* Default for max rx frames in
-				 one scheduling */
-#else
 #define BRCMF_RXBOUND	50	/* Default for max rx frames in
 				 one scheduling */
-#endif				/* defined(CONFIG_MACH_SANDGATE2G) */
 
 #define BRCMF_TXBOUND	20	/* Default for max tx frames in
 				 one scheduling */
diff --git a/drivers/staging/brcm80211/include/brcmu_utils.h b/drivers/staging/brcm80211/include/brcmu_utils.h
index d0039d7..2d54cc5 100644
--- a/drivers/staging/brcm80211/include/brcmu_utils.h
+++ b/drivers/staging/brcm80211/include/brcmu_utils.h
@@ -205,12 +205,8 @@ extern int brcmu_iovar_lencheck(const struct brcmu_iovar *table, void *arg,
 #define	ISPOWEROF2(x)		((((x)-1)&(x)) == 0)
 
 /* map physical to virtual I/O */
-#if !defined(CONFIG_MMC_MSM7X00A)
 #define REG_MAP(pa, size)       ioremap_nocache((unsigned long)(pa), \
 					(unsigned long)(size))
-#else
-#define REG_MAP(pa, size)       (void *)(0)
-#endif
 
 /* the largest reasonable packet buffer driver uses for ethernet MTU in bytes */
 #define	PKTBUFSZ	2048
-- 
1.7.4.1



  parent reply	other threads:[~2011-07-05 22:03 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-05 22:02 [PATCH 00/31] staging: brcm80211: fullmac cleanup and checkpatch fixes Arend van Spriel
2011-07-05 22:02 ` [PATCH 01/31] staging: brcm80211: clean up checkpatch error Arend van Spriel
2011-07-05 22:02 ` [PATCH 02/31] staging: brcm80211: removed occurrences of 'dhd' Arend van Spriel
2011-07-05 22:02 ` Arend van Spriel [this message]
2011-07-05 22:02 ` [PATCH 04/31] staging: brcm80211: rename macros in dhd_dbg.h Arend van Spriel
2011-07-05 22:02 ` [PATCH 05/31] staging: brcm80211: removed asserts from two fullmac files Arend van Spriel
2011-07-05 22:02 ` [PATCH 06/31] staging: brcm80211: removed asserts from bcmsdh.c Arend van Spriel
2011-07-05 22:02 ` [PATCH 07/31] staging: brcm80211: removed asserts from dhd_cdc.c and dhd_common.c Arend van Spriel
2011-07-06  9:24   ` Dan Carpenter
2011-07-06 14:27     ` Roland Vossen
2011-07-05 22:02 ` [PATCH 08/31] staging: brcm80211: removed asserts from dhd_linux.c Arend van Spriel
2011-07-05 22:02 ` [PATCH 09/31] staging: brcm80211: removed asserts from dhd_sdio.c Arend van Spriel
2011-07-05 22:02 ` [PATCH 10/31] staging: brcm80211: removed remains of assert mechanism in fullmac Arend van Spriel
2011-07-05 22:02 ` [PATCH 11/31] staging: brcm80211: replaced various typedefs in softmac Arend van Spriel
2011-07-05 22:02 ` [PATCH 12/31] staging: brcm80211: replaced typedef phy_info_t by struct brcms_phy Arend van Spriel
2011-07-05 22:02 ` [PATCH 13/31] staging: brcm80211: replaced typedef wlc_phy_t with struct brcms_phy_pub Arend van Spriel
2011-07-05 22:02 ` [PATCH 14/31] staging: brcm80211: replaced typedef tx_power_t by struct brcms_tx_power Arend van Spriel
2011-07-05 22:02 ` [PATCH 15/31] staging: brcm80211: renamed structures in softmac Arend van Spriel
2011-07-05 22:02 ` [PATCH 16/31] staging: brcm80211: remove checkpatch warnings 'suspect code indent' Arend van Spriel
2011-07-05 22:02 ` [PATCH 17/31] staging: brcm80211: made name lookup arrays more const Arend van Spriel
2011-07-05 22:02 ` [PATCH 18/31] staging: brcm80211: remove checkpatch warnings from phy_n.c Arend van Spriel
2011-07-05 22:02 ` [PATCH 19/31] staging: brcm80211: replaced Broadcom specific acronym WLC Arend van Spriel
2011-07-05 22:02 ` [PATCH 20/31] staging: brcm80211: deleted two fullmac source files Arend van Spriel
2011-07-05 22:02 ` [PATCH 21/31] staging: brcm80211: merged dngl_stats.h into dhd.h Arend van Spriel
2011-07-05 22:02 ` [PATCH 22/31] staging: brcm80211: merged sbsdio.h into sdio_host.h Arend van Spriel
2011-07-05 22:02 ` [PATCH 23/31] staging: brcm80211: merged bcmsdbus.h " Arend van Spriel
2011-07-05 22:02 ` [PATCH 24/31] staging: brcm80211: moved fullmac definitions from .h to .c files Arend van Spriel
2011-07-05 22:02 ` [PATCH 25/31] staging: brcm80211: removed #ifdef SDIOH_API_ACCESS_RETRY_LIMIT Arend van Spriel
2011-07-05 22:02 ` [PATCH 26/31] staging: brcm80211: replace occurrences of __attribute__((packed)) Arend van Spriel
2011-07-05 22:02 ` [PATCH 27/31] staging: brcm80211: remove several externs from dhd_linux.c Arend van Spriel
2011-07-05 22:02 ` [PATCH 28/31] staging: brcm80211: remove external definitions from phy_lcn.c Arend van Spriel
2011-07-05 22:02 ` [PATCH 29/31] staging: brcm80211: remove macro WLBANDINITFN from brcmsmac Arend van Spriel
2011-07-05 22:02 ` [PATCH 30/31] staging: brcm80211: simpler string handling in brcmf_c_pktfilter_offload_set() Arend van Spriel
2011-07-05 22:02 ` [PATCH 31/31] staging: brcm80211: added newlines to some debug macros in bcmsdh_sdmmc.c Arend van Spriel

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=1309903378-29021-4-git-send-email-arend@broadcom.com \
    --to=arend@broadcom.com \
    --cc=devel@linuxdriverproject.org \
    --cc=gregkh@suse.de \
    --cc=linux-wireless@vger.kernel.org \
    --cc=rvossen@broadcom.com \
    /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).