linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Franky Lin" <frankyl@broadcom.com>
To: gregkh@suse.de
Cc: devel@linuxdriverproject.org, linux-wireless@vger.kernel.org
Subject: [PATCH 11/35] staging: brcm80211: removed function declaration typedefs from main.h,pub.h
Date: Thu, 14 Jul 2011 14:29:07 -0700	[thread overview]
Message-ID: <1310678971-28952-12-git-send-email-frankyl@broadcom.com> (raw)
In-Reply-To: <1310678971-28952-1-git-send-email-frankyl@broadcom.com>

From: Roland Vossen <rvossen@broadcom.com>

Softmac related code cleanup. Typedefs are undesirable according to the
CodingStyle document.

Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
---
 drivers/staging/brcm80211/brcmsmac/main.c |    4 +-
 drivers/staging/brcm80211/brcmsmac/main.h |   46 +++++++++++++++++++++-------
 drivers/staging/brcm80211/brcmsmac/pub.h  |   27 ++---------------
 3 files changed, 39 insertions(+), 38 deletions(-)

diff --git a/drivers/staging/brcm80211/brcmsmac/main.c b/drivers/staging/brcm80211/brcmsmac/main.c
index bd3d5f0..66de7ef 100644
--- a/drivers/staging/brcm80211/brcmsmac/main.c
+++ b/drivers/staging/brcm80211/brcmsmac/main.c
@@ -6265,8 +6265,8 @@ _brcms_c_ioctl(struct brcms_c_info *wlc, int cmd, void *arg, int len,
  * register watchdog and down handlers.
  */
 int brcms_c_module_register(struct brcms_pub *pub,
-			const char *name, void *hdl,
-			watchdog_fn_t w_fn, down_fn_t d_fn)
+		const char *name, void *hdl,
+		int (*w_fn)(void *handle), int (*d_fn)(void *handle))
 {
 	struct brcms_c_info *wlc = (struct brcms_c_info *) pub->wlc;
 	int i;
diff --git a/drivers/staging/brcm80211/brcmsmac/main.h b/drivers/staging/brcm80211/brcmsmac/main.h
index bf36f10..e61f047 100644
--- a/drivers/staging/brcm80211/brcmsmac/main.h
+++ b/drivers/staging/brcm80211/brcmsmac/main.h
@@ -408,11 +408,11 @@ struct brcms_band {
 	u16 bcntsfoff;	/* beacon tsf offset */
 };
 
-/* tx completion callback takes 3 args */
-typedef void (*pkcb_fn_t) (struct brcms_c_info *wlc, uint txstatus, void *arg);
-
 struct pkt_cb {
-	pkcb_fn_t fn;		/* function to call when tx frame completes */
+	/* function to call when tx frame completes */
+	/* tx completion callback takes 3 args */
+	void (*fn)(struct brcms_c_info *wlc, uint txstatus, void *arg);
+
 	void *arg;		/* void arg for fn */
 	u8 nextidx;		/* index of next call back if threading */
 	bool entered;		/* recursion check */
@@ -423,19 +423,41 @@ struct modulecb {
 	char name[32];		/* module name : NULL indicates empty array member */
 	const struct brcmu_iovar *iovars;	/* iovar table */
 	void *hdl;		/* handle passed when handler 'doiovar' is called */
-	watchdog_fn_t watchdog_fn;	/* watchdog handler */
-	iovar_fn_t iovar_fn;	/* iovar handler */
-	down_fn_t down_fn;	/* down handler. Note: the int returned
-				 * by the down function is a count of the
-				 * number of timers that could not be
-				 * freed.
-				 */
+	int (*watchdog_fn)(void *handle);	/* watchdog handler */
+
+	/* IOVar handler
+	 *
+	 * handle - a pointer value registered with the function
+	 * vi - iovar_info that was looked up
+	 * actionid - action ID, calculated by IOV_GVAL() and IOV_SVAL()
+	 *    based on varid.
+	 * name - the actual iovar name
+	 * params/plen - parameters and length for a get, input only.
+	 * arg/len - buffer and length for value to be set or retrieved,
+	 *      input or output.
+	 * vsize - value size, valid for integer type only.
+	 * wlcif - interface context (brcms_c_if pointer)
+	 *
+	 * All pointers may point into the same buffer.
+	 */
+	int (*iovar_fn)(void *handle, const struct brcmu_iovar *vi,
+			u32 actionid, const char *name, void *params,
+			uint plen, void *arg, int alen, int vsize,
+			struct brcms_c_if *wlcif);
+
+	int (*down_fn)(void *handle); /* down handler. Note: the int returned
+				       * by the down function is a count of the
+				       * number of timers that could not be
+				       * freed.
+				       */
+
 };
 
 /* dump control blocks */
 struct dumpcb_s {
 	const char *name;	/* dump name */
-	dump_fn_t dump_fn;	/* 'wl dump' handler */
+	/* 'wl dump' handler */
+	int (*dump_fn)(void *handle, struct brcmu_strbuf *b);
 	void *dump_fn_arg;
 	struct dumpcb_s *next;
 };
diff --git a/drivers/staging/brcm80211/brcmsmac/pub.h b/drivers/staging/brcm80211/brcmsmac/pub.h
index 01d7460..8ec398a 100644
--- a/drivers/staging/brcm80211/brcmsmac/pub.h
+++ b/drivers/staging/brcm80211/brcmsmac/pub.h
@@ -203,29 +203,6 @@ struct brcms_bss_info {
 #define IOVF_GET_BAND	(1<<13)	/* get requires fixed band */
 #define IOVF_OPEN_ALLOW	(1<<14)	/* set allowed iovar for opensrc */
 
-/* watchdog down and dump callback function proto's */
-typedef int (*watchdog_fn_t) (void *handle);
-typedef int (*down_fn_t) (void *handle);
-typedef int (*dump_fn_t) (void *handle, struct brcmu_strbuf *b);
-
-/* IOVar handler
- *
- * handle - a pointer value registered with the function
- * vi - iovar_info that was looked up
- * actionid - action ID, calculated by IOV_GVAL() and IOV_SVAL() based on varid.
- * name - the actual iovar name
- * params/plen - parameters and length for a get, input only.
- * arg/len - buffer and length for value to be set or retrieved, input or output.
- * vsize - value size, valid for integer type only.
- * wlcif - interface context (brcms_c_if pointer)
- *
- * All pointers may point into the same buffer.
- */
-typedef int (*iovar_fn_t) (void *handle, const struct brcmu_iovar *vi,
-			   u32 actionid, const char *name, void *params,
-			   uint plen, void *arg, int alen, int vsize,
-			   struct brcms_c_if *wlcif);
-
 #define MAC80211_PROMISC_BCNS	(1 << 0)
 #define MAC80211_SCAN		(1 << 1)
 
@@ -635,7 +612,9 @@ extern void brcms_c_mctrl(struct brcms_c_info *wlc, u32 mask, u32 val);
 
 extern int brcms_c_module_register(struct brcms_pub *pub,
 			       const char *name, void *hdl,
-			       watchdog_fn_t watchdog_fn, down_fn_t down_fn);
+			       int (*watchdog_fn)(void *handle),
+			       int (*down_fn)(void *handle));
+
 extern int brcms_c_module_unregister(struct brcms_pub *pub, const char *name,
 				 void *hdl);
 extern void brcms_c_suspend_mac_and_wait(struct brcms_c_info *wlc);
-- 
1.7.1



  parent reply	other threads:[~2011-07-14 21:29 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-14 21:28 [PATCH 00/35] staging: brcm80211: code cleanup and bugfix Franky Lin
2011-07-14 21:28 ` [PATCH 01/35] staging: brcm80211: bugfix for len==0 parameter in 3 fullmac functions Franky Lin
2011-07-14 21:28 ` [PATCH 02/35] staging: brcm80211: merged bmac.c into main.c Franky Lin
2011-07-14 21:28 ` [PATCH 03/35] staging: brcm80211: shuffled sections in main.c Franky Lin
2011-07-14 21:29 ` [PATCH 04/35] staging: brcm80211: removed function declaration typedefs from phy_int.h Franky Lin
2011-07-14 21:29 ` [PATCH 05/35] staging: brcm80211: removed function declaration typedefs from aiutils.h Franky Lin
2011-07-14 23:04   ` Julian Calaby
2011-07-15  9:41     ` Roland Vossen
2011-07-15 10:13       ` Julian Calaby
2011-07-14 21:29 ` [PATCH 06/35] staging: brcm80211: removed function declaration typedefs from dma.h part 1 Franky Lin
2011-07-14 21:29 ` [PATCH 07/35] staging: brcm80211: removed function declaration typedefs from dma.h part 2 Franky Lin
2011-07-14 21:29 ` [PATCH 08/35] staging: brcm80211: removed function declaration typedefs from dma.h part 3 Franky Lin
2011-07-14 21:29 ` [PATCH 09/35] staging: brcm80211: removed function declaration typedefs from dma.h part 4 Franky Lin
2011-07-14 21:29 ` [PATCH 10/35] staging: brcm80211: removed function declaration typedefs from otp.c Franky Lin
2011-07-14 21:29 ` Franky Lin [this message]
2011-07-14 21:29 ` [PATCH 12/35] staging: brcm80211: removed function declaration typedefs from brcmutil Franky Lin
2011-07-14 21:29 ` [PATCH 13/35] staging: brcm80211: replaced various typedefs Franky Lin
2011-07-14 21:29 ` [PATCH 14/35] staging: brcm80211: replaced typedef wlc_rateset_t Franky Lin
2011-07-14 21:29 ` [PATCH 15/35] staging: brcm80211: replaced typedef wl_rateset_t by struct brcm_rateset Franky Lin
2011-07-14 21:29 ` [PATCH 16/35] staging: brcm80211: replaced all volatile typedefs Franky Lin
2011-07-14 21:29 ` [PATCH 17/35] staging: brcm80211: modify the FOREACH_BSS macro Franky Lin
2011-07-14 21:29 ` [PATCH 18/35] staging: brcm80211: use mutex instead of semaphore in dhd_linux.c Franky Lin
2011-08-01 11:54   ` Dan Carpenter
2011-08-01 12:52     ` Arend van Spriel
2011-08-08 12:46     ` Arend van Spriel
2011-07-14 21:29 ` [PATCH 19/35] staging: brcm80211: remove duplicated code from brcmf_init_iscan Franky Lin
2011-07-14 21:29 ` [PATCH 20/35] staging: brcm80211: remove volatile keyword from driver sources Franky Lin
2011-07-14 21:29 ` [PATCH 21/35] staging: brcm80211: use native error code in brcmf_c_pattern_atoh() Franky Lin
2011-07-14 21:29 ` [PATCH 22/35] staging: brcm80211: fix for checkpatch 'avoid externs in c file' warning Franky Lin
2011-07-16  0:06   ` Dan Carpenter
2011-07-16  9:59     ` Arend van Spriel
2011-07-14 21:29 ` [PATCH 23/35] staging: brcm80211: power save issue fixed in brcmfmac driver Franky Lin
2011-07-14 21:29 ` [PATCH 24/35] staging: brcm80211: brcmfmac: Enabling FW roaming by default Franky Lin
2011-07-14 21:29 ` [PATCH 25/35] staging: brcm80211: brcmfmac: Connect request made robust Franky Lin
2011-07-14 21:29 ` [PATCH 26/35] staging: brcm80211: use mac_pton() instead of own implementation Franky Lin
2011-07-14 21:29 ` [PATCH 27/35] staging: brcm80211: fix for 'remove unnecessary braces' checkpatch warning Franky Lin
2011-07-14 21:29 ` [PATCH 28/35] staging: brcm80211: brcmfmac: Fixed issues with iscan Franky Lin
2011-07-14 21:29 ` [PATCH 29/35] staging: brcm80211: brcmfmac: Roamed channel info passed to cfg80211 Franky Lin
2011-07-14 21:29 ` [PATCH 30/35] staging: brcm80211: move sdio related variables to dhd_sdio.c Franky Lin
2011-07-14 21:29 ` [PATCH 31/35] staging: brcm80211: move ioctl response wait code " Franky Lin
2011-07-14 21:29 ` [PATCH 32/35] staging: brcm80211: replace semaphore by wait_queue for sysioc thread Franky Lin
2011-07-14 21:29 ` [PATCH 33/35] staging: brcm80211: use wait queues instead of semaphores in wl_cfg80211.c Franky Lin
2011-07-14 21:29 ` [PATCH 34/35] staging: brcm80211: remove volatile keyword used in struct rte_console Franky Lin
2011-07-14 21:29 ` [PATCH 35/35] staging: brcm80211: replace simple_strtoul usage in brcmfmac Franky Lin
2011-07-15 23:49   ` Dan Carpenter
2011-07-16 10:00     ` 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=1310678971-28952-12-git-send-email-frankyl@broadcom.com \
    --to=frankyl@broadcom.com \
    --cc=devel@linuxdriverproject.org \
    --cc=gregkh@suse.de \
    --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).