* [PATCH 01/10] staging: brcm80211: cleanup unnecessary functions from wlc_ampdu.c
@ 2011-05-09 14:33 Arend van Spriel
2011-05-09 14:33 ` [PATCH 02/10] staging: brcm80211: local used function made static Arend van Spriel
` (9 more replies)
0 siblings, 10 replies; 14+ messages in thread
From: Arend van Spriel @ 2011-05-09 14:33 UTC (permalink / raw)
To: gregkh; +Cc: Arend van Spriel, devel, linux-wireless
Couple of functions are not used or empty and have been removed.
Cc: devel@linuxdriverproject.org
Cc: linux-wireless@vger.kernel.org
Reviewed-by: Roland Vossen <rvossen@broadcoom.com>
Reviewed-by: Henry Ptasinski <henryp@broadcom.com>
Reviewed-by: Brett Rudley <brudley@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
---
drivers/staging/brcm80211/brcmsmac/wlc_ampdu.c | 85 ++---------------------
drivers/staging/brcm80211/brcmsmac/wlc_ampdu.h | 3 -
drivers/staging/brcm80211/brcmsmac/wlc_main.c | 1 -
3 files changed, 8 insertions(+), 81 deletions(-)
diff --git a/drivers/staging/brcm80211/brcmsmac/wlc_ampdu.c b/drivers/staging/brcm80211/brcmsmac/wlc_ampdu.c
index e9f62dd..54ed03e 100644
--- a/drivers/staging/brcm80211/brcmsmac/wlc_ampdu.c
+++ b/drivers/staging/brcm80211/brcmsmac/wlc_ampdu.c
@@ -120,6 +120,12 @@ struct ampdu_info {
};
+/* used for plushing ampdu packets */
+struct cb_del_ampdu_pars {
+ struct ieee80211_sta *sta;
+ u16 tid;
+};
+
#define AMPDU_CLEANUPFLAG_RX (0x1)
#define AMPDU_CLEANUPFLAG_TX (0x2)
@@ -133,9 +139,6 @@ static void wlc_ffpld_calc_mcs2ampdu_table(struct ampdu_info *ampdu, int f);
static scb_ampdu_tid_ini_t *wlc_ampdu_init_tid_ini(struct ampdu_info *ampdu,
scb_ampdu_t *scb_ampdu,
u8 tid, bool override);
-static void ampdu_cleanup_tid_ini(struct ampdu_info *ampdu,
- scb_ampdu_t *scb_ampdu,
- u8 tid, bool force);
static void ampdu_update_max_txlen(struct ampdu_info *ampdu, u8 dur);
static void scb_ampdu_update_config(struct ampdu_info *ampdu, struct scb *scb);
static void scb_ampdu_update_config_all(struct ampdu_info *ampdu);
@@ -220,24 +223,6 @@ void wlc_ampdu_detach(struct ampdu_info *ampdu)
kfree(ampdu);
}
-void scb_ampdu_cleanup(struct ampdu_info *ampdu, struct scb *scb)
-{
- scb_ampdu_t *scb_ampdu = SCB_AMPDU_CUBBY(ampdu, scb);
- u8 tid;
-
- BCMMSG(ampdu->wlc->wiphy, "enter\n");
- for (tid = 0; tid < AMPDU_MAX_SCB_TID; tid++) {
- ampdu_cleanup_tid_ini(ampdu, scb_ampdu, tid, false);
- }
-}
-
-/* reset the ampdu state machine so that it can gracefully handle packets that were
- * freed from the dma and tx queues during reinit
- */
-void wlc_ampdu_reset(struct ampdu_info *ampdu)
-{
-}
-
static void scb_ampdu_update_config(struct ampdu_info *ampdu, struct scb *scb)
{
scb_ampdu_t *scb_ampdu = SCB_AMPDU_CUBBY(ampdu, scb);
@@ -266,7 +251,7 @@ static void scb_ampdu_update_config(struct ampdu_info *ampdu, struct scb *scb)
mcs2ampdu_table[FFPLD_MAX_MCS]);
}
-void scb_ampdu_update_config_all(struct ampdu_info *ampdu)
+static void scb_ampdu_update_config_all(struct ampdu_info *ampdu)
{
scb_ampdu_update_config(ampdu, ampdu->wlc->pub->global_scb);
}
@@ -911,7 +896,7 @@ wlc_ampdu_dotxstatus(struct ampdu_info *ampdu, struct scb *scb,
wlc_ampdu_txflowcontrol(wlc, scb_ampdu, ini);
}
-void
+static void
rate_status(struct wlc_info *wlc, struct ieee80211_tx_info *tx_info,
tx_status_t *txs, u8 mcs)
{
@@ -1131,26 +1116,6 @@ wlc_ampdu_dotxstatus_complete(struct ampdu_info *ampdu, struct scb *scb,
wlc_txfifo_complete(wlc, queue, ampdu->txpkt_weight);
}
-static void
-ampdu_cleanup_tid_ini(struct ampdu_info *ampdu, scb_ampdu_t *scb_ampdu, u8 tid,
- bool force)
-{
- scb_ampdu_tid_ini_t *ini;
- ini = SCB_AMPDU_INI(scb_ampdu, tid);
- if (!ini)
- return;
-
- BCMMSG(ampdu->wlc->wiphy, "wl%d: tid %d\n", ampdu->wlc->pub->unit, tid);
-
- if (ini->tx_in_transit && !force)
- return;
-
- scb_ampdu = SCB_AMPDU_CUBBY(ampdu, ini->scb);
-
- /* free all buffered tx packets */
- bcm_pktq_pflush(&scb_ampdu->txq, ini->tid, true, NULL, 0);
-}
-
/* initialize the initiator code for tid */
static scb_ampdu_tid_ini_t *wlc_ampdu_init_tid_ini(struct ampdu_info *ampdu,
scb_ampdu_t *scb_ampdu,
@@ -1226,35 +1191,6 @@ static void ampdu_update_max_txlen(struct ampdu_info *ampdu, u8 dur)
}
}
-u8 BCMFASTPATH
-wlc_ampdu_null_delim_cnt(struct ampdu_info *ampdu, struct scb *scb,
- ratespec_t rspec, int phylen)
-{
- scb_ampdu_t *scb_ampdu;
- int bytes, cnt, tmp;
- u8 tx_density;
-
- scb_ampdu = SCB_AMPDU_CUBBY(ampdu, scb);
- if (scb_ampdu->mpdu_density == 0)
- return 0;
-
- /* RSPEC2RATE is in kbps units ==> ~RSPEC2RATE/2^13 is in bytes/usec
- density x is in 2^(x-4) usec
- ==> # of bytes needed for req density = rate/2^(17-x)
- ==> # of null delimiters = ceil(ceil(rate/2^(17-x)) - phylen)/4)
- */
-
- tx_density = scb_ampdu->mpdu_density;
- tmp = 1 << (17 - tx_density);
- bytes = CEIL(RSPEC2RATE(rspec), tmp);
-
- if (bytes > phylen) {
- cnt = CEIL(bytes - phylen, AMPDU_DELIMITER_LEN);
- return (u8) cnt;
- } else
- return 0;
-}
-
void wlc_ampdu_macaddr_upd(struct wlc_info *wlc)
{
char template[T_RAM_ACCESS_SZ * 2];
@@ -1286,11 +1222,6 @@ void wlc_ampdu_shm_upd(struct ampdu_info *ampdu)
}
}
-struct cb_del_ampdu_pars {
- struct ieee80211_sta *sta;
- u16 tid;
-};
-
/*
* callback function that helps flushing ampdu packets from a priority queue
*/
diff --git a/drivers/staging/brcm80211/brcmsmac/wlc_ampdu.h b/drivers/staging/brcm80211/brcmsmac/wlc_ampdu.h
index 17e9ebc..63d403b 100644
--- a/drivers/staging/brcm80211/brcmsmac/wlc_ampdu.h
+++ b/drivers/staging/brcm80211/brcmsmac/wlc_ampdu.h
@@ -23,10 +23,7 @@ extern int wlc_sendampdu(struct ampdu_info *ampdu, struct wlc_txq_info *qi,
struct sk_buff **aggp, int prec);
extern void wlc_ampdu_dotxstatus(struct ampdu_info *ampdu, struct scb *scb,
struct sk_buff *p, tx_status_t *txs);
-extern void wlc_ampdu_reset(struct ampdu_info *ampdu);
extern void wlc_ampdu_macaddr_upd(struct wlc_info *wlc);
extern void wlc_ampdu_shm_upd(struct ampdu_info *ampdu);
-extern u8 wlc_ampdu_null_delim_cnt(struct ampdu_info *ampdu, struct scb *scb,
- ratespec_t rspec, int phylen);
#endif /* _wlc_ampdu_h_ */
diff --git a/drivers/staging/brcm80211/brcmsmac/wlc_main.c b/drivers/staging/brcm80211/brcmsmac/wlc_main.c
index 0e244d9..9697e12 100644
--- a/drivers/staging/brcm80211/brcmsmac/wlc_main.c
+++ b/drivers/staging/brcm80211/brcmsmac/wlc_main.c
@@ -398,7 +398,6 @@ void wlc_reset(struct wlc_info *wlc)
sizeof(macstat_t));
wlc_bmac_reset(wlc->hw);
- wlc_ampdu_reset(wlc->ampdu);
wlc->txretried = 0;
}
--
1.7.4.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 02/10] staging: brcm80211: local used function made static
2011-05-09 14:33 [PATCH 01/10] staging: brcm80211: cleanup unnecessary functions from wlc_ampdu.c Arend van Spriel
@ 2011-05-09 14:33 ` Arend van Spriel
2011-05-09 14:33 ` [PATCH 03/10] staging: brcm80211: wlc_aggregatable function prototype moved Arend van Spriel
` (8 subsequent siblings)
9 siblings, 0 replies; 14+ messages in thread
From: Arend van Spriel @ 2011-05-09 14:33 UTC (permalink / raw)
To: gregkh; +Cc: Arend van Spriel, devel, linux-wireless
In wlc_alloc.c function for setting ID field in struct wlc_bsscfg
was only used locally. It has been made static and removed from
header file.
Cc: devel@linuxdriverproject.org
Cc: linux-wireless@vger.kernel.org
Reviewed-by: Roland Vossen <rvossen@broadcoom.com>
Reviewed-by: Henry Ptasinski <henryp@broadcom.com>
Reviewed-by: Brett Rudley <brudley@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
---
drivers/staging/brcm80211/brcmsmac/wlc_alloc.c | 4 ++--
drivers/staging/brcm80211/brcmsmac/wlc_bsscfg.h | 3 ---
2 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/brcm80211/brcmsmac/wlc_alloc.c b/drivers/staging/brcm80211/brcmsmac/wlc_alloc.c
index d02364b..f9fc644 100644
--- a/drivers/staging/brcm80211/brcmsmac/wlc_alloc.c
+++ b/drivers/staging/brcm80211/brcmsmac/wlc_alloc.c
@@ -43,7 +43,7 @@ static struct wlc_pub *wlc_pub_malloc(uint unit,
static void wlc_pub_mfree(struct wlc_pub *pub);
static void wlc_tunables_init(wlc_tunables_t *tunables, uint devid);
-void wlc_tunables_init(wlc_tunables_t *tunables, uint devid)
+static void wlc_tunables_init(wlc_tunables_t *tunables, uint devid)
{
tunables->ntxd = NTXD;
tunables->nrxd = NRXD;
@@ -137,7 +137,7 @@ static void wlc_bsscfg_mfree(struct wlc_bsscfg *cfg)
kfree(cfg);
}
-void wlc_bsscfg_ID_assign(struct wlc_info *wlc, struct wlc_bsscfg *bsscfg)
+static void wlc_bsscfg_ID_assign(struct wlc_info *wlc, struct wlc_bsscfg *bsscfg)
{
bsscfg->ID = wlc->next_bsscfg_ID;
wlc->next_bsscfg_ID++;
diff --git a/drivers/staging/brcm80211/brcmsmac/wlc_bsscfg.h b/drivers/staging/brcm80211/brcmsmac/wlc_bsscfg.h
index bbcff4f..2572541 100644
--- a/drivers/staging/brcm80211/brcmsmac/wlc_bsscfg.h
+++ b/drivers/staging/brcm80211/brcmsmac/wlc_bsscfg.h
@@ -122,9 +122,6 @@ struct wlc_bsscfg {
#define HWBCN_ENAB(cfg) (((cfg)->flags & WLC_BSSCFG_HW_BCN) != 0)
#define HWPRB_ENAB(cfg) (((cfg)->flags & WLC_BSSCFG_HW_PRB) != 0)
-extern void wlc_bsscfg_ID_assign(struct wlc_info *wlc,
- struct wlc_bsscfg *bsscfg);
-
/* Extend N_ENAB to per-BSS */
#define BSS_N_ENAB(wlc, cfg) \
(N_ENAB((wlc)->pub) && !((cfg)->flags & WLC_BSSCFG_11N_DISABLE))
--
1.7.4.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 03/10] staging: brcm80211: wlc_aggregatable function prototype moved
2011-05-09 14:33 [PATCH 01/10] staging: brcm80211: cleanup unnecessary functions from wlc_ampdu.c Arend van Spriel
2011-05-09 14:33 ` [PATCH 02/10] staging: brcm80211: local used function made static Arend van Spriel
@ 2011-05-09 14:33 ` Arend van Spriel
2011-05-09 14:33 ` [PATCH 04/10] staging: brcm80211: remove definition of BCMFASTPATH macro Arend van Spriel
` (7 subsequent siblings)
9 siblings, 0 replies; 14+ messages in thread
From: Arend van Spriel @ 2011-05-09 14:33 UTC (permalink / raw)
To: gregkh; +Cc: Arend van Spriel, devel, linux-wireless
The function wlc_aggregatable is used by wl_mac80211.c. The prototype
of the function was placed in include file wlc_scb.h but the interface
for wl_mac80211.c to other driver functions is to be placed in wlc_pub.h.
Cc: devel@linuxdriverproject.org
Cc: linux-wireless@vger.kernel.org
Reviewed-by: Roland Vossen <rvossen@broadcoom.com>
Reviewed-by: Henry Ptasinski <henryp@broadcom.com>
Reviewed-by: Brett Rudley <brudley@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
---
drivers/staging/brcm80211/brcmsmac/wlc_pub.h | 2 ++
drivers/staging/brcm80211/brcmsmac/wlc_scb.h | 2 --
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/brcm80211/brcmsmac/wlc_pub.h b/drivers/staging/brcm80211/brcmsmac/wlc_pub.h
index 3dc5b1d..44f6153 100644
--- a/drivers/staging/brcm80211/brcmsmac/wlc_pub.h
+++ b/drivers/staging/brcm80211/brcmsmac/wlc_pub.h
@@ -514,6 +514,8 @@ extern int wlc_iovar_op(struct wlc_info *wlc, const char *name, void *params,
struct wlc_if *wlcif);
extern int wlc_ioctl(struct wlc_info *wlc, int cmd, void *arg, int len,
struct wlc_if *wlcif);
+extern bool wlc_aggregatable(struct wlc_info *wlc, u8 tid);
+
/* helper functions */
extern void wlc_statsupd(struct wlc_info *wlc);
extern void wlc_protection_upd(struct wlc_info *wlc, uint idx, int val);
diff --git a/drivers/staging/brcm80211/brcmsmac/wlc_scb.h b/drivers/staging/brcm80211/brcmsmac/wlc_scb.h
index 7326006..f07a891 100644
--- a/drivers/staging/brcm80211/brcmsmac/wlc_scb.h
+++ b/drivers/staging/brcm80211/brcmsmac/wlc_scb.h
@@ -17,8 +17,6 @@
#ifndef _wlc_scb_h_
#define _wlc_scb_h_
-extern bool wlc_aggregatable(struct wlc_info *wlc, u8 tid);
-
#define AMPDU_TX_BA_MAX_WSIZE 64 /* max Tx ba window size (in pdu) */
/* structure to store per-tid state for the ampdu initiator */
typedef struct scb_ampdu_tid_ini {
--
1.7.4.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 04/10] staging: brcm80211: remove definition of BCMFASTPATH macro
2011-05-09 14:33 [PATCH 01/10] staging: brcm80211: cleanup unnecessary functions from wlc_ampdu.c Arend van Spriel
2011-05-09 14:33 ` [PATCH 02/10] staging: brcm80211: local used function made static Arend van Spriel
2011-05-09 14:33 ` [PATCH 03/10] staging: brcm80211: wlc_aggregatable function prototype moved Arend van Spriel
@ 2011-05-09 14:33 ` Arend van Spriel
2011-05-09 14:33 ` [PATCH 05/10] staging: brcm80211: remove unused function from wlc_phy_cmn.c Arend van Spriel
` (6 subsequent siblings)
9 siblings, 0 replies; 14+ messages in thread
From: Arend van Spriel @ 2011-05-09 14:33 UTC (permalink / raw)
To: gregkh; +Cc: Arend van Spriel, devel, linux-wireless
The macro was used to assure function flagged with this macro were
placed in a named section. However, in the linux build enviroment
there is no such section specified in the linker scripts so it makes
no sense to keep it in.
Cc: devel@linuxdriverproject.org
Cc: linux-wireless@vger.kernel.org
Reviewed-by: Roland Vossen <rvossen@broadcoom.com>
Reviewed-by: Henry Ptasinski <henryp@broadcom.com>
Reviewed-by: Brett Rudley <brudley@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
---
drivers/staging/brcm80211/brcmsmac/hnddma.c | 14 +++---
.../staging/brcm80211/brcmsmac/phy/wlc_phy_cmn.c | 2 +-
drivers/staging/brcm80211/brcmsmac/phy/wlc_phy_n.c | 2 +-
drivers/staging/brcm80211/brcmsmac/wl_mac80211.c | 8 ++--
drivers/staging/brcm80211/brcmsmac/wlc_ampdu.c | 10 ++--
drivers/staging/brcm80211/brcmsmac/wlc_antsel.c | 2 +-
drivers/staging/brcm80211/brcmsmac/wlc_bmac.c | 12 +++---
drivers/staging/brcm80211/brcmsmac/wlc_main.c | 40 ++++++++++----------
drivers/staging/brcm80211/brcmsmac/wlc_rate.c | 4 +-
drivers/staging/brcm80211/include/bcmdefs.h | 6 ---
drivers/staging/brcm80211/util/bcmutils.c | 16 ++++----
11 files changed, 55 insertions(+), 61 deletions(-)
diff --git a/drivers/staging/brcm80211/brcmsmac/hnddma.c b/drivers/staging/brcm80211/brcmsmac/hnddma.c
index 8a42147..962010f 100644
--- a/drivers/staging/brcm80211/brcmsmac/hnddma.c
+++ b/drivers/staging/brcm80211/brcmsmac/hnddma.c
@@ -714,7 +714,7 @@ _dma_rx_param_get(dma_info_t *di, u16 *rxoffset, u16 *rxbufsize)
* After it reaches the max size of buffer, the data continues in next DMA descriptor
* buffer WITHOUT DMA header
*/
-static void *BCMFASTPATH _dma_rx(dma_info_t *di)
+static void *_dma_rx(dma_info_t *di)
{
struct sk_buff *p, *head, *tail;
uint len;
@@ -786,7 +786,7 @@ static void *BCMFASTPATH _dma_rx(dma_info_t *di)
* this will stall the rx dma and user might want to call rxfill again asap
* This unlikely happens on memory-rich NIC, but often on memory-constrained dongle
*/
-static bool BCMFASTPATH _dma_rxfill(dma_info_t *di)
+static bool _dma_rxfill(dma_info_t *di)
{
struct sk_buff *p;
u16 rxin, rxout;
@@ -921,7 +921,7 @@ static void _dma_rxreclaim(dma_info_t *di)
bcm_pkt_buf_free_skb(p);
}
-static void *BCMFASTPATH _dma_getnextrxp(dma_info_t *di, bool forceall)
+static void *_dma_getnextrxp(dma_info_t *di, bool forceall)
{
if (di->nrxd == 0)
return NULL;
@@ -1136,7 +1136,7 @@ static bool dma64_txsuspended(dma_info_t *di)
D64_XC_SE);
}
-static void BCMFASTPATH dma64_txreclaim(dma_info_t *di, txd_range_t range)
+static void dma64_txreclaim(dma_info_t *di, txd_range_t range)
{
void *p;
@@ -1383,7 +1383,7 @@ static int dma64_txunframed(dma_info_t *di, void *buf, uint len, bool commit)
* WARNING: call must check the return value for error.
* the error(toss frames) could be fatal and cause many subsequent hard to debug problems
*/
-static int BCMFASTPATH dma64_txfast(dma_info_t *di, struct sk_buff *p0,
+static int dma64_txfast(dma_info_t *di, struct sk_buff *p0,
bool commit)
{
struct sk_buff *p, *next;
@@ -1505,7 +1505,7 @@ static int BCMFASTPATH dma64_txfast(dma_info_t *di, struct sk_buff *p0,
* If range is HNDDMA_RANGE_ALL, reclaim all txd(s) posted to the ring and
* return associated packet regardless of the value of hardware pointers.
*/
-static void *BCMFASTPATH dma64_getnexttxp(dma_info_t *di, txd_range_t range)
+static void *dma64_getnexttxp(dma_info_t *di, txd_range_t range)
{
u16 start, end, i;
u16 active_desc;
@@ -1597,7 +1597,7 @@ static void *BCMFASTPATH dma64_getnexttxp(dma_info_t *di, txd_range_t range)
return NULL;
}
-static void *BCMFASTPATH dma64_getnextrxp(dma_info_t *di, bool forceall)
+static void *dma64_getnextrxp(dma_info_t *di, bool forceall)
{
uint i, curr;
void *rxp;
diff --git a/drivers/staging/brcm80211/brcmsmac/phy/wlc_phy_cmn.c b/drivers/staging/brcm80211/brcmsmac/phy/wlc_phy_cmn.c
index ff8bd4e..e9f3972 100644
--- a/drivers/staging/brcm80211/brcmsmac/phy/wlc_phy_cmn.c
+++ b/drivers/staging/brcm80211/brcmsmac/phy/wlc_phy_cmn.c
@@ -2764,7 +2764,7 @@ void wlc_phy_compute_dB(u32 *cmplx_pwr, s8 *p_cmplx_pwr_dB, u8 core)
}
}
-void BCMFASTPATH wlc_phy_rssi_compute(wlc_phy_t *pih, void *ctx)
+void wlc_phy_rssi_compute(wlc_phy_t *pih, void *ctx)
{
wlc_d11rxhdr_t *wlc_rxhdr = (wlc_d11rxhdr_t *) ctx;
d11rxhdr_t *rxh = &wlc_rxhdr->rxhdr;
diff --git a/drivers/staging/brcm80211/brcmsmac/phy/wlc_phy_n.c b/drivers/staging/brcm80211/brcmsmac/phy/wlc_phy_n.c
index 56e0ba1..a099f7f 100644
--- a/drivers/staging/brcm80211/brcmsmac/phy/wlc_phy_n.c
+++ b/drivers/staging/brcm80211/brcmsmac/phy/wlc_phy_n.c
@@ -21438,7 +21438,7 @@ static void wlc_phy_rssi_cal_nphy_rev2(phy_info_t *pi, u8 rssi_type)
wlc_phy_resetcca_nphy(pi);
}
-int BCMFASTPATH
+int
wlc_phy_rssi_compute_nphy(phy_info_t *pi, wlc_d11rxhdr_t *wlc_rxh)
{
d11rxhdr_t *rxh = &wlc_rxh->rxhdr;
diff --git a/drivers/staging/brcm80211/brcmsmac/wl_mac80211.c b/drivers/staging/brcm80211/brcmsmac/wl_mac80211.c
index 419ed80..5c988cd 100644
--- a/drivers/staging/brcm80211/brcmsmac/wl_mac80211.c
+++ b/drivers/staging/brcm80211/brcmsmac/wl_mac80211.c
@@ -1443,7 +1443,7 @@ uint wl_reset(struct wl_info *wl)
* These are interrupt on/off entry points. Disable interrupts
* during interrupt state transition.
*/
-void BCMFASTPATH wl_intrson(struct wl_info *wl)
+void wl_intrson(struct wl_info *wl)
{
unsigned long flags;
@@ -1460,7 +1460,7 @@ bool wl_alloc_dma_resources(struct wl_info *wl, uint addrwidth)
return true;
}
-u32 BCMFASTPATH wl_intrsoff(struct wl_info *wl)
+u32 wl_intrsoff(struct wl_info *wl)
{
unsigned long flags;
u32 status;
@@ -1517,7 +1517,7 @@ void wl_down(struct wl_info *wl)
WL_LOCK(wl);
}
-static irqreturn_t BCMFASTPATH wl_isr(int irq, void *dev_id)
+static irqreturn_t wl_isr(int irq, void *dev_id)
{
struct wl_info *wl;
bool ours, wantdpc;
@@ -1544,7 +1544,7 @@ static irqreturn_t BCMFASTPATH wl_isr(int irq, void *dev_id)
return IRQ_RETVAL(ours);
}
-static void BCMFASTPATH wl_dpc(unsigned long data)
+static void wl_dpc(unsigned long data)
{
struct wl_info *wl;
diff --git a/drivers/staging/brcm80211/brcmsmac/wlc_ampdu.c b/drivers/staging/brcm80211/brcmsmac/wlc_ampdu.c
index 54ed03e..5b041a6 100644
--- a/drivers/staging/brcm80211/brcmsmac/wlc_ampdu.c
+++ b/drivers/staging/brcm80211/brcmsmac/wlc_ampdu.c
@@ -120,7 +120,7 @@ struct ampdu_info {
};
-/* used for plushing ampdu packets */
+/* used for flushing ampdu packets */
struct cb_del_ampdu_pars {
struct ieee80211_sta *sta;
u16 tid;
@@ -431,7 +431,7 @@ static void wlc_ffpld_calc_mcs2ampdu_table(struct ampdu_info *ampdu, int f)
}
}
-static void BCMFASTPATH
+static void
wlc_ampdu_agg(struct ampdu_info *ampdu, struct scb *scb, struct sk_buff *p,
uint prec)
{
@@ -449,7 +449,7 @@ wlc_ampdu_agg(struct ampdu_info *ampdu, struct scb *scb, struct sk_buff *p,
return;
}
-int BCMFASTPATH
+int
wlc_sendampdu(struct ampdu_info *ampdu, struct wlc_txq_info *qi,
struct sk_buff **pdu, int prec)
{
@@ -840,7 +840,7 @@ wlc_sendampdu(struct ampdu_info *ampdu, struct wlc_txq_info *qi,
return err;
}
-void BCMFASTPATH
+void
wlc_ampdu_dotxstatus(struct ampdu_info *ampdu, struct scb *scb,
struct sk_buff *p, tx_status_t *txs)
{
@@ -912,7 +912,7 @@ rate_status(struct wlc_info *wlc, struct ieee80211_tx_info *tx_info,
#define SHORTNAME "AMPDU status"
-static void BCMFASTPATH
+static void
wlc_ampdu_dotxstatus_complete(struct ampdu_info *ampdu, struct scb *scb,
struct sk_buff *p, tx_status_t *txs,
u32 s1, u32 s2)
diff --git a/drivers/staging/brcm80211/brcmsmac/wlc_antsel.c b/drivers/staging/brcm80211/brcmsmac/wlc_antsel.c
index 3d9485a..111ef32 100644
--- a/drivers/staging/brcm80211/brcmsmac/wlc_antsel.c
+++ b/drivers/staging/brcm80211/brcmsmac/wlc_antsel.c
@@ -201,7 +201,7 @@ wlc_antsel_init_cfg(struct antsel_info *asi, wlc_antselcfg_t *antsel,
}
}
-void BCMFASTPATH
+void
wlc_antsel_antcfg_get(struct antsel_info *asi, bool usedef, bool sel,
u8 antselid, u8 fbantselid, u8 *antcfg,
u8 *fbantcfg)
diff --git a/drivers/staging/brcm80211/brcmsmac/wlc_bmac.c b/drivers/staging/brcm80211/brcmsmac/wlc_bmac.c
index cf0d2bf..4448845 100644
--- a/drivers/staging/brcm80211/brcmsmac/wlc_bmac.c
+++ b/drivers/staging/brcm80211/brcmsmac/wlc_bmac.c
@@ -258,7 +258,7 @@ static u32 WLBANDINITFN(wlc_setband_inact) (struct wlc_info *wlc, uint bandunit)
* Return true if more frames need to be processed. false otherwise.
* Param 'bound' indicates max. # frames to process before break out.
*/
-static bool BCMFASTPATH
+static bool
wlc_bmac_recv(struct wlc_hw_info *wlc_hw, uint fifo, bool bound)
{
struct sk_buff *p;
@@ -307,7 +307,7 @@ wlc_bmac_recv(struct wlc_hw_info *wlc_hw, uint fifo, bool bound)
* Return true if another dpc needs to be re-scheduled. false otherwise.
* Param 'bounded' indicates if applicable loops should be bounded.
*/
-bool BCMFASTPATH wlc_dpc(struct wlc_info *wlc, bool bounded)
+bool wlc_dpc(struct wlc_info *wlc, bool bounded)
{
u32 macintstatus;
struct wlc_hw_info *wlc_hw = wlc->hw;
@@ -2985,7 +2985,7 @@ bool wlc_intrsupd(struct wlc_info *wlc)
* *wantdpc will be set to true if further wlc_dpc() processing is required,
* false otherwise.
*/
-bool BCMFASTPATH wlc_isr(struct wlc_info *wlc, bool *wantdpc)
+bool wlc_isr(struct wlc_info *wlc, bool *wantdpc)
{
struct wlc_hw_info *wlc_hw = wlc->hw;
u32 macintstatus;
@@ -3015,7 +3015,7 @@ bool BCMFASTPATH wlc_isr(struct wlc_info *wlc, bool *wantdpc)
}
-static bool BCMFASTPATH
+static bool
wlc_bmac_dotxstatus(struct wlc_hw_info *wlc_hw, tx_status_t *txs, u32 s2)
{
/* discard intermediate indications for ucode with one legitimate case:
@@ -3034,7 +3034,7 @@ wlc_bmac_dotxstatus(struct wlc_hw_info *wlc_hw, tx_status_t *txs, u32 s2)
/* process tx completion events in BMAC
* Return true if more tx status need to be processed. false otherwise.
*/
-static bool BCMFASTPATH
+static bool
wlc_bmac_txstatus(struct wlc_hw_info *wlc_hw, bool bound, bool *fatal)
{
bool morepending = false;
@@ -3268,7 +3268,7 @@ void wlc_bmac_band_stf_ss_set(struct wlc_hw_info *wlc_hw, u8 stf_mode)
wlc_upd_ofdm_pctl1_table(wlc_hw);
}
-void BCMFASTPATH
+void
wlc_bmac_read_tsf(struct wlc_hw_info *wlc_hw, u32 *tsf_l_ptr,
u32 *tsf_h_ptr)
{
diff --git a/drivers/staging/brcm80211/brcmsmac/wlc_main.c b/drivers/staging/brcm80211/brcmsmac/wlc_main.c
index 9697e12..c1bd24f 100644
--- a/drivers/staging/brcm80211/brcmsmac/wlc_main.c
+++ b/drivers/staging/brcm80211/brcmsmac/wlc_main.c
@@ -246,7 +246,7 @@ static const u8 acbitmap2maxprio[] = {
#define WLC_REPLAY_CNTRS_VALUE WPA_CAP_16_REPLAY_CNTRS
/* local prototypes */
-static u16 BCMFASTPATH wlc_d11hdrs_mac80211(struct wlc_info *wlc,
+static u16 wlc_d11hdrs_mac80211(struct wlc_info *wlc,
struct ieee80211_hw *hw,
struct sk_buff *p,
struct scb *scb, uint frag,
@@ -4812,13 +4812,13 @@ static u16 wlc_rate_shm_offset(struct wlc_info *wlc, u8 rate)
*
* Returns true if packet consumed (queued), false if not.
*/
-bool BCMFASTPATH
+bool
wlc_prec_enq(struct wlc_info *wlc, struct pktq *q, void *pkt, int prec)
{
return wlc_prec_enq_head(wlc, q, pkt, prec, false);
}
-bool BCMFASTPATH
+bool
wlc_prec_enq_head(struct wlc_info *wlc, struct pktq *q, struct sk_buff *pkt,
int prec, bool head)
{
@@ -4874,7 +4874,7 @@ wlc_prec_enq_head(struct wlc_info *wlc, struct pktq *q, struct sk_buff *pkt,
return true;
}
-void BCMFASTPATH wlc_txq_enq(void *ctx, struct scb *scb, struct sk_buff *sdu,
+void wlc_txq_enq(void *ctx, struct scb *scb, struct sk_buff *sdu,
uint prec)
{
struct wlc_info *wlc = (struct wlc_info *) ctx;
@@ -4915,7 +4915,7 @@ void BCMFASTPATH wlc_txq_enq(void *ctx, struct scb *scb, struct sk_buff *sdu,
}
}
-bool BCMFASTPATH
+bool
wlc_sendpkt_mac80211(struct wlc_info *wlc, struct sk_buff *sdu,
struct ieee80211_hw *hw)
{
@@ -4940,7 +4940,7 @@ wlc_sendpkt_mac80211(struct wlc_info *wlc, struct sk_buff *sdu,
return 0;
}
-void BCMFASTPATH wlc_send_q(struct wlc_info *wlc)
+void wlc_send_q(struct wlc_info *wlc)
{
struct sk_buff *pkt[DOT11_MAXNUMFRAGS];
int prec;
@@ -5027,7 +5027,7 @@ bcmc_fid_generate(struct wlc_info *wlc, struct wlc_bsscfg *bsscfg,
return frameid;
}
-void BCMFASTPATH
+void
wlc_txfifo(struct wlc_info *wlc, uint fifo, struct sk_buff *p, bool commit,
s8 txpktpend)
{
@@ -5111,7 +5111,7 @@ wlc_compute_airtime(struct wlc_info *wlc, ratespec_t rspec, uint length)
return usec;
}
-void BCMFASTPATH
+void
wlc_compute_plcp(struct wlc_info *wlc, ratespec_t rspec, uint length, u8 *plcp)
{
if (IS_MCS(rspec)) {
@@ -5139,7 +5139,7 @@ static void wlc_compute_mimo_plcp(ratespec_t rspec, uint length, u8 *plcp)
}
/* Rate: 802.11 rate code, length: PSDU length in octets */
-static void BCMFASTPATH
+static void
wlc_compute_ofdm_plcp(ratespec_t rspec, u32 length, u8 *plcp)
{
u8 rate_signal;
@@ -5231,7 +5231,7 @@ static void wlc_compute_cck_plcp(struct wlc_info *wlc, ratespec_t rspec,
* next_frag_len next MPDU length in bytes
* preamble_type use short/GF or long/MM PLCP header
*/
-static u16 BCMFASTPATH
+static u16
wlc_compute_frame_dur(struct wlc_info *wlc, ratespec_t rate, u8 preamble_type,
uint next_frag_len)
{
@@ -5265,7 +5265,7 @@ wlc_compute_frame_dur(struct wlc_info *wlc, ratespec_t rate, u8 preamble_type,
* rate next MPDU rate in unit of 500kbps
* frame_len next MPDU frame length in bytes
*/
-u16 BCMFASTPATH
+u16
wlc_compute_rtscts_dur(struct wlc_info *wlc, bool cts_only, ratespec_t rts_rate,
ratespec_t frame_rate, u8 rts_preamble_type,
u8 frame_preamble_type, uint frame_len, bool ba)
@@ -5297,7 +5297,7 @@ wlc_compute_rtscts_dur(struct wlc_info *wlc, bool cts_only, ratespec_t rts_rate,
return dur;
}
-u16 BCMFASTPATH wlc_phytxctl1_calc(struct wlc_info *wlc, ratespec_t rspec)
+u16 wlc_phytxctl1_calc(struct wlc_info *wlc, ratespec_t rspec)
{
u16 phyctl1 = 0;
u16 bw;
@@ -5344,7 +5344,7 @@ u16 BCMFASTPATH wlc_phytxctl1_calc(struct wlc_info *wlc, ratespec_t rspec)
return phyctl1;
}
-ratespec_t BCMFASTPATH
+ratespec_t
wlc_rspec_to_rts_rspec(struct wlc_info *wlc, ratespec_t rspec, bool use_rspec,
u16 mimo_ctlchbw)
{
@@ -5400,7 +5400,7 @@ wlc_rspec_to_rts_rspec(struct wlc_info *wlc, ratespec_t rspec, bool use_rspec,
* headroom == D11_PHY_HDR_LEN + D11_TXH_LEN (D11_TXH_LEN is now 104 bytes)
*
*/
-static u16 BCMFASTPATH
+static u16
wlc_d11hdrs_mac80211(struct wlc_info *wlc, struct ieee80211_hw *hw,
struct sk_buff *p, struct scb *scb, uint frag,
uint nfrags, uint queue, uint next_frag_len,
@@ -6199,7 +6199,7 @@ static void wlc_war16165(struct wlc_info *wlc, bool tx)
/* process an individual tx_status_t */
/* WLC_HIGH_API */
-bool BCMFASTPATH
+bool
wlc_dotxstatus(struct wlc_info *wlc, tx_status_t *txs, u32 frm_tx2)
{
struct sk_buff *p;
@@ -6359,7 +6359,7 @@ wlc_dotxstatus(struct wlc_info *wlc, tx_status_t *txs, u32 frm_tx2)
}
-void BCMFASTPATH
+void
wlc_txfifo_complete(struct wlc_info *wlc, uint fifo, s8 txpktpend)
{
TXPKTPENDDEC(wlc, fifo, txpktpend);
@@ -6667,7 +6667,7 @@ void wlc_bss_list_free(struct wlc_info *wlc, struct wlc_bss_list *bss_list)
* Param 'bound' indicates max. # frames to process before break out.
*/
/* WLC_HIGH_API */
-void BCMFASTPATH wlc_recv(struct wlc_info *wlc, struct sk_buff *p)
+void wlc_recv(struct wlc_info *wlc, struct sk_buff *p)
{
d11rxhdr_t *rxh;
struct ieee80211_hdr *h;
@@ -6767,7 +6767,7 @@ void BCMFASTPATH wlc_recv(struct wlc_info *wlc, struct sk_buff *p)
* Formula given by HT PHY Spec v 1.13
* len = 3(nsyms + nstream + 3) - 3
*/
-u16 BCMFASTPATH
+u16
wlc_calc_lsig_len(struct wlc_info *wlc, ratespec_t ratespec, uint mac_len)
{
uint nsyms, len = 0, kNdps;
@@ -6807,7 +6807,7 @@ wlc_calc_lsig_len(struct wlc_info *wlc, ratespec_t ratespec, uint mac_len)
}
/* calculate frame duration of a given rate and length, return time in usec unit */
-uint BCMFASTPATH
+uint
wlc_calc_frame_time(struct wlc_info *wlc, ratespec_t ratespec, u8 preamble_type,
uint mac_len)
{
@@ -6937,7 +6937,7 @@ wlc_calc_ba_time(struct wlc_info *wlc, ratespec_t rspec, u8 preamble_type)
FCS_LEN));
}
-static uint BCMFASTPATH
+static uint
wlc_calc_ack_time(struct wlc_info *wlc, ratespec_t rspec, u8 preamble_type)
{
uint dur = 0;
diff --git a/drivers/staging/brcm80211/brcmsmac/wlc_rate.c b/drivers/staging/brcm80211/brcmsmac/wlc_rate.c
index 87a2f62..87b252d 100644
--- a/drivers/staging/brcm80211/brcmsmac/wlc_rate.c
+++ b/drivers/staging/brcm80211/brcmsmac/wlc_rate.c
@@ -332,7 +332,7 @@ wlc_rate_hwrs_filter_sort_validate(wlc_rateset_t *rs,
}
/* calculate the rate of a rx'd frame and return it as a ratespec */
-ratespec_t BCMFASTPATH wlc_compute_rspec(d11rxhdr_t *rxh, u8 *plcp)
+ratespec_t wlc_compute_rspec(d11rxhdr_t *rxh, u8 *plcp)
{
int phy_type;
ratespec_t rspec = PHY_TXC1_BW_20MHZ << RSPEC_BW_SHIFT;
@@ -466,7 +466,7 @@ wlc_rateset_default(wlc_rateset_t *rs_tgt, const wlc_rateset_t *rs_hw,
mcsallow ? txstreams : 1);
}
-s16 BCMFASTPATH wlc_rate_legacy_phyctl(uint rate)
+s16 wlc_rate_legacy_phyctl(uint rate)
{
uint i;
for (i = 0; i < LEGACY_PHYCFG_TABLE_SIZE; i++)
diff --git a/drivers/staging/brcm80211/include/bcmdefs.h b/drivers/staging/brcm80211/include/bcmdefs.h
index 0d7d97b..55631f3 100644
--- a/drivers/staging/brcm80211/include/bcmdefs.h
+++ b/drivers/staging/brcm80211/include/bcmdefs.h
@@ -36,12 +36,6 @@
#define AUTO (-1) /* Auto = -1 */
-#ifdef mips
-#define BCMFASTPATH __attribute__ ((__section__(".text.fastpath")))
-#else
-#define BCMFASTPATH
-#endif
-
/* Bus types */
#define SI_BUS 0 /* SOC Interconnect */
#define PCI_BUS 1 /* PCI target */
diff --git a/drivers/staging/brcm80211/util/bcmutils.c b/drivers/staging/brcm80211/util/bcmutils.c
index 607d331..cca5b7d 100644
--- a/drivers/staging/brcm80211/util/bcmutils.c
+++ b/drivers/staging/brcm80211/util/bcmutils.c
@@ -33,7 +33,7 @@ MODULE_DESCRIPTION("Broadcom 802.11n wireless LAN driver utilities.");
MODULE_SUPPORTED_DEVICE("Broadcom 802.11n WLAN cards");
MODULE_LICENSE("Dual BSD/GPL");
-struct sk_buff *BCMFASTPATH bcm_pkt_buf_get_skb(uint len)
+struct sk_buff *bcm_pkt_buf_get_skb(uint len)
{
struct sk_buff *skb;
@@ -48,7 +48,7 @@ struct sk_buff *BCMFASTPATH bcm_pkt_buf_get_skb(uint len)
EXPORT_SYMBOL(bcm_pkt_buf_get_skb);
/* Free the driver packet. Free the tag if present */
-void BCMFASTPATH bcm_pkt_buf_free_skb(struct sk_buff *skb)
+void bcm_pkt_buf_free_skb(struct sk_buff *skb)
{
struct sk_buff *nskb;
int nest = 0;
@@ -107,7 +107,7 @@ uint bcm_pktfrombuf(struct sk_buff *p, uint offset, int len,
EXPORT_SYMBOL(bcm_pktfrombuf);
/* return total length of buffer chain */
-uint BCMFASTPATH bcm_pkttotlen(struct sk_buff *p)
+uint bcm_pkttotlen(struct sk_buff *p)
{
uint total;
@@ -122,7 +122,7 @@ EXPORT_SYMBOL(bcm_pkttotlen);
* osl multiple-precedence packet queue
* hi_prec is always >= the number of the highest non-empty precedence
*/
-struct sk_buff *BCMFASTPATH bcm_pktq_penq(struct pktq *pq, int prec,
+struct sk_buff *bcm_pktq_penq(struct pktq *pq, int prec,
struct sk_buff *p)
{
struct pktq_prec *q;
@@ -149,7 +149,7 @@ struct sk_buff *BCMFASTPATH bcm_pktq_penq(struct pktq *pq, int prec,
}
EXPORT_SYMBOL(bcm_pktq_penq);
-struct sk_buff *BCMFASTPATH bcm_pktq_penq_head(struct pktq *pq, int prec,
+struct sk_buff *bcm_pktq_penq_head(struct pktq *pq, int prec,
struct sk_buff *p)
{
struct pktq_prec *q;
@@ -175,7 +175,7 @@ struct sk_buff *BCMFASTPATH bcm_pktq_penq_head(struct pktq *pq, int prec,
}
EXPORT_SYMBOL(bcm_pktq_penq_head);
-struct sk_buff *BCMFASTPATH bcm_pktq_pdeq(struct pktq *pq, int prec)
+struct sk_buff *bcm_pktq_pdeq(struct pktq *pq, int prec)
{
struct pktq_prec *q;
struct sk_buff *p;
@@ -200,7 +200,7 @@ struct sk_buff *BCMFASTPATH bcm_pktq_pdeq(struct pktq *pq, int prec)
}
EXPORT_SYMBOL(bcm_pktq_pdeq);
-struct sk_buff *BCMFASTPATH bcm_pktq_pdeq_tail(struct pktq *pq, int prec)
+struct sk_buff *bcm_pktq_pdeq_tail(struct pktq *pq, int prec)
{
struct pktq_prec *q;
struct sk_buff *p, *prev;
@@ -321,7 +321,7 @@ int bcm_pktq_mlen(struct pktq *pq, uint prec_bmp)
EXPORT_SYMBOL(bcm_pktq_mlen);
/* Priority dequeue from a specific set of precedences */
-struct sk_buff *BCMFASTPATH bcm_pktq_mdeq(struct pktq *pq, uint prec_bmp,
+struct sk_buff *bcm_pktq_mdeq(struct pktq *pq, uint prec_bmp,
int *prec_out)
{
struct pktq_prec *q;
--
1.7.4.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 05/10] staging: brcm80211: remove unused function from wlc_phy_cmn.c
2011-05-09 14:33 [PATCH 01/10] staging: brcm80211: cleanup unnecessary functions from wlc_ampdu.c Arend van Spriel
` (2 preceding siblings ...)
2011-05-09 14:33 ` [PATCH 04/10] staging: brcm80211: remove definition of BCMFASTPATH macro Arend van Spriel
@ 2011-05-09 14:33 ` Arend van Spriel
2011-05-09 14:33 ` [PATCH 06/10] staging: brcm80211: use int_sqrt kernel function iso driver implementation Arend van Spriel
` (5 subsequent siblings)
9 siblings, 0 replies; 14+ messages in thread
From: Arend van Spriel @ 2011-05-09 14:33 UTC (permalink / raw)
To: gregkh; +Cc: Arend van Spriel, devel, linux-wireless
The function wlc_phy_qdiv_roundup() was not used and has been
removed.
Cc: devel@linuxdriverproject.org
Cc: linux-wireless@vger.kernel.org
Reviewed-by: Roland Vossen <rvossen@broadcoom.com>
Reviewed-by: Henry Ptasinski <henryp@broadcom.com>
Reviewed-by: Brett Rudley <brudley@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
---
.../staging/brcm80211/brcmsmac/phy/wlc_phy_cmn.c | 25 --------------------
.../staging/brcm80211/brcmsmac/phy/wlc_phy_int.h | 2 -
2 files changed, 0 insertions(+), 27 deletions(-)
diff --git a/drivers/staging/brcm80211/brcmsmac/phy/wlc_phy_cmn.c b/drivers/staging/brcm80211/brcmsmac/phy/wlc_phy_cmn.c
index e9f3972..f35a18c 100644
--- a/drivers/staging/brcm80211/brcmsmac/phy/wlc_phy_cmn.c
+++ b/drivers/staging/brcm80211/brcmsmac/phy/wlc_phy_cmn.c
@@ -3312,31 +3312,6 @@ wlc_phy_get_pwrdet_offsets(phy_info_t *pi, s8 *cckoffset, s8 *ofdmoffset)
*ofdmoffset = 0;
}
-u32 wlc_phy_qdiv_roundup(u32 dividend, u32 divisor, u8 precision)
-{
- u32 quotient, remainder, roundup, rbit;
-
- quotient = dividend / divisor;
- remainder = dividend % divisor;
- rbit = divisor & 1;
- roundup = (divisor >> 1) + rbit;
-
- while (precision--) {
- quotient <<= 1;
- if (remainder >= roundup) {
- quotient++;
- remainder = ((remainder - roundup) << 1) + rbit;
- } else {
- remainder <<= 1;
- }
- }
-
- if (remainder >= roundup)
- quotient++;
-
- return quotient;
-}
-
s8 wlc_phy_upd_rssi_offset(phy_info_t *pi, s8 rssi, chanspec_t chanspec)
{
diff --git a/drivers/staging/brcm80211/brcmsmac/phy/wlc_phy_int.h b/drivers/staging/brcm80211/brcmsmac/phy/wlc_phy_int.h
index 3d1cd34..77c6106 100644
--- a/drivers/staging/brcm80211/brcmsmac/phy/wlc_phy_int.h
+++ b/drivers/staging/brcm80211/brcmsmac/phy/wlc_phy_int.h
@@ -1094,8 +1094,6 @@ extern void wlc_lcnphy_epa_switch(phy_info_t *pi, bool mode);
extern void wlc_2064_vco_cal(phy_info_t *pi);
extern void wlc_phy_txpower_recalc_target(phy_info_t *pi);
-extern u32 wlc_phy_qdiv_roundup(u32 dividend, u32 divisor,
- u8 precision);
#define LCNPHY_TBL_ID_PAPDCOMPDELTATBL 0x18
#define LCNPHY_TX_POWER_TABLE_SIZE 128
--
1.7.4.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 06/10] staging: brcm80211: use int_sqrt kernel function iso driver implementation
2011-05-09 14:33 [PATCH 01/10] staging: brcm80211: cleanup unnecessary functions from wlc_ampdu.c Arend van Spriel
` (3 preceding siblings ...)
2011-05-09 14:33 ` [PATCH 05/10] staging: brcm80211: remove unused function from wlc_phy_cmn.c Arend van Spriel
@ 2011-05-09 14:33 ` Arend van Spriel
2011-05-09 14:33 ` [PATCH 07/10] staging: brcm80211: use print_hex_dump_bytes kernel function Arend van Spriel
` (4 subsequent siblings)
9 siblings, 0 replies; 14+ messages in thread
From: Arend van Spriel @ 2011-05-09 14:33 UTC (permalink / raw)
To: gregkh; +Cc: Arend van Spriel, devel, linux-wireless
The driver code had its own implementation for fixed point square root
calculation, but such a function is already available in the linux
kernel so the driver implementation has been removed using the kernel
function.
Cc: devel@linuxdriverproject.org
Cc: linux-wireless@vger.kernel.org
Reviewed-by: Roland Vossen <rvossen@broadcoom.com>
Reviewed-by: Henry Ptasinski <henryp@broadcom.com>
Reviewed-by: Brett Rudley <brudley@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
---
.../staging/brcm80211/brcmsmac/phy/wlc_phy_cmn.c | 19 -------------------
.../staging/brcm80211/brcmsmac/phy/wlc_phy_int.h | 1 -
.../staging/brcm80211/brcmsmac/phy/wlc_phy_lcn.c | 2 +-
drivers/staging/brcm80211/brcmsmac/phy/wlc_phy_n.c | 2 +-
4 files changed, 2 insertions(+), 22 deletions(-)
diff --git a/drivers/staging/brcm80211/brcmsmac/phy/wlc_phy_cmn.c b/drivers/staging/brcm80211/brcmsmac/phy/wlc_phy_cmn.c
index f35a18c..446dc84 100644
--- a/drivers/staging/brcm80211/brcmsmac/phy/wlc_phy_cmn.c
+++ b/drivers/staging/brcm80211/brcmsmac/phy/wlc_phy_cmn.c
@@ -3117,25 +3117,6 @@ u8 wlc_phy_nbits(s32 value)
return nbits;
}
-u32 wlc_phy_sqrt_int(u32 value)
-{
- u32 root = 0, shift = 0;
-
- for (shift = 0; shift < 32; shift += 2) {
- if (((0x40000000 >> shift) + root) <= value) {
- value -= ((0x40000000 >> shift) + root);
- root = (root >> 1) | (0x40000000 >> shift);
- } else {
- root = root >> 1;
- }
- }
-
- if (root < value)
- ++root;
-
- return root;
-}
-
void wlc_phy_stf_chain_init(wlc_phy_t *pih, u8 txchain, u8 rxchain)
{
phy_info_t *pi = (phy_info_t *) pih;
diff --git a/drivers/staging/brcm80211/brcmsmac/phy/wlc_phy_int.h b/drivers/staging/brcm80211/brcmsmac/phy/wlc_phy_int.h
index 77c6106..10cbf52 100644
--- a/drivers/staging/brcm80211/brcmsmac/phy/wlc_phy_int.h
+++ b/drivers/staging/brcm80211/brcmsmac/phy/wlc_phy_int.h
@@ -1025,7 +1025,6 @@ extern void wlc_phy_txpower_update_shm(phy_info_t *pi);
extern void wlc_phy_cordic(fixed theta, cs32 *val);
extern u8 wlc_phy_nbits(s32 value);
-extern u32 wlc_phy_sqrt_int(u32 value);
extern void wlc_phy_compute_dB(u32 *cmplx_pwr, s8 *p_dB, u8 core);
extern uint wlc_phy_init_radio_regs_allbands(phy_info_t *pi,
diff --git a/drivers/staging/brcm80211/brcmsmac/phy/wlc_phy_lcn.c b/drivers/staging/brcm80211/brcmsmac/phy/wlc_phy_lcn.c
index a28633c..b8864c5 100644
--- a/drivers/staging/brcm80211/brcmsmac/phy/wlc_phy_lcn.c
+++ b/drivers/staging/brcm80211/brcmsmac/phy/wlc_phy_lcn.c
@@ -3244,7 +3244,7 @@ static bool wlc_lcnphy_calc_rx_iq_comp(phy_info_t *pi, u16 num_samps)
}
b /= temp;
b -= a * a;
- b = (s32) wlc_phy_sqrt_int((u32) b);
+ b = (s32) int_sqrt((unsigned long) b);
b -= (1 << 10);
a0_new = (u16) (a & 0x3ff);
b0_new = (u16) (b & 0x3ff);
diff --git a/drivers/staging/brcm80211/brcmsmac/phy/wlc_phy_n.c b/drivers/staging/brcm80211/brcmsmac/phy/wlc_phy_n.c
index a099f7f..7127509 100644
--- a/drivers/staging/brcm80211/brcmsmac/phy/wlc_phy_n.c
+++ b/drivers/staging/brcm80211/brcmsmac/phy/wlc_phy_n.c
@@ -24608,7 +24608,7 @@ static void wlc_phy_calc_rx_iq_comp_nphy(phy_info_t *pi, u8 core_mask)
}
b /= temp;
b -= a * a;
- b = (s32) wlc_phy_sqrt_int((u32) b);
+ b = (s32) int_sqrt((unsigned long) b);
b -= (1 << 10);
if ((curr_core == PHY_CORE_0) && (core_mask & 0x1)) {
--
1.7.4.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 07/10] staging: brcm80211: use print_hex_dump_bytes kernel function
2011-05-09 14:33 [PATCH 01/10] staging: brcm80211: cleanup unnecessary functions from wlc_ampdu.c Arend van Spriel
` (4 preceding siblings ...)
2011-05-09 14:33 ` [PATCH 06/10] staging: brcm80211: use int_sqrt kernel function iso driver implementation Arend van Spriel
@ 2011-05-09 14:33 ` Arend van Spriel
2011-05-09 14:33 ` [PATCH 08/10] staging: brcm80211: make use of fls bit operation in wlc_phy_compute_dB Arend van Spriel
` (3 subsequent siblings)
9 siblings, 0 replies; 14+ messages in thread
From: Arend van Spriel @ 2011-05-09 14:33 UTC (permalink / raw)
To: gregkh; +Cc: Arend van Spriel, devel, linux-wireless
The drivers had own implementation to dump buffer contents using
printk. This has been replaced by kernel function.
Cc: devel@linuxdriverproject.org
Cc: linux-wireless@vger.kernel.org
Reviewed-by: Roland Vossen <rvossen@broadcoom.com>
Reviewed-by: Henry Ptasinski <henryp@broadcom.com>
Reviewed-by: Brett Rudley <brudley@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
---
drivers/staging/brcm80211/brcmfmac/dhd_sdio.c | 91 +++++++++++++++++--------
drivers/staging/brcm80211/brcmsmac/wlc_main.c | 8 ++-
drivers/staging/brcm80211/include/bcmutils.h | 1 -
drivers/staging/brcm80211/util/bcmutils.c | 40 +----------
4 files changed, 70 insertions(+), 70 deletions(-)
diff --git a/drivers/staging/brcm80211/brcmfmac/dhd_sdio.c b/drivers/staging/brcm80211/brcmfmac/dhd_sdio.c
index 49e73b2..9167ebc 100644
--- a/drivers/staging/brcm80211/brcmfmac/dhd_sdio.c
+++ b/drivers/staging/brcm80211/brcmfmac/dhd_sdio.c
@@ -15,9 +15,11 @@
*/
#include <linux/types.h>
+#include <linux/kernel.h>
+#include <linux/printk.h>
#include <linux/pci_ids.h>
-#include <bcmdefs.h>
#include <linux/netdevice.h>
+#include <bcmdefs.h>
#include <bcmsdh.h>
#ifdef BCMEMBEDIMAGE
@@ -1003,9 +1005,12 @@ static int dhdsdio_txpkt(dhd_bus_t *bus, struct sk_buff *pkt, uint chan,
if (DHD_BYTES_ON() &&
(((DHD_CTL_ON() && (chan == SDPCM_CONTROL_CHANNEL)) ||
(DHD_DATA_ON() && (chan != SDPCM_CONTROL_CHANNEL))))) {
- bcm_prhex("Tx Frame", frame, len);
+ printk(KERN_DEBUG "Tx Frame:\n");
+ print_hex_dump_bytes("", DUMP_PREFIX_OFFSET, frame, len);
} else if (DHD_HDRS_ON()) {
- bcm_prhex("TxHdr", frame, min_t(u16, len, 16));
+ printk(KERN_DEBUG "TxHdr:\n");
+ print_hex_dump_bytes("", DUMP_PREFIX_OFFSET,
+ frame, min_t(u16, len, 16));
}
#endif
@@ -1333,10 +1338,15 @@ int dhd_bus_txctl(struct dhd_bus *bus, unsigned char *msg, uint msglen)
if (ret == -1) {
#ifdef DHD_DEBUG
- if (DHD_BYTES_ON() && DHD_CTL_ON())
- bcm_prhex("Tx Frame", frame, len);
- else if (DHD_HDRS_ON())
- bcm_prhex("TxHdr", frame, min_t(u16, len, 16));
+ if (DHD_BYTES_ON() && DHD_CTL_ON()) {
+ printk(KERN_DEBUG "Tx Frame:\n");
+ print_hex_dump_bytes("", DUMP_PREFIX_OFFSET,
+ frame, len);
+ } else if (DHD_HDRS_ON()) {
+ printk(KERN_DEBUG "TxHdr:\n");
+ print_hex_dump_bytes("", DUMP_PREFIX_OFFSET,
+ frame, min_t(u16, len, 16));
+ }
#endif
do {
@@ -3117,8 +3127,10 @@ dhdsdio_read_control(dhd_bus_t *bus, u8 *hdr, uint len, uint doff)
gotpkt:
#ifdef DHD_DEBUG
- if (DHD_BYTES_ON() && DHD_CTL_ON())
- bcm_prhex("RxCtrl", bus->rxctl, len);
+ if (DHD_BYTES_ON() && DHD_CTL_ON()) {
+ printk(KERN_DEBUG "RxCtrl:\n");
+ print_hex_dump_bytes("", DUMP_PREFIX_OFFSET, bus->rxctl, len);
+ }
#endif
/* Point to valid data and indicate its length */
@@ -3309,8 +3321,9 @@ static u8 dhdsdio_rxglom(dhd_bus_t *bus, u8 rxseq)
}
#ifdef DHD_DEBUG
if (DHD_GLOM_ON()) {
- bcm_prhex("SUPERFRAME", pfirst->data,
- min_t(int, pfirst->len, 48));
+ printk(KERN_DEBUG "SUPERFRAME:\n");
+ print_hex_dump_bytes("", DUMP_PREFIX_OFFSET,
+ pfirst->data, min_t(int, pfirst->len, 48));
}
#endif
@@ -3391,8 +3404,11 @@ static u8 dhdsdio_rxglom(dhd_bus_t *bus, u8 rxseq)
chan = SDPCM_PACKET_CHANNEL(&dptr[SDPCM_FRAMETAG_LEN]);
doff = SDPCM_DOFFSET_VALUE(&dptr[SDPCM_FRAMETAG_LEN]);
#ifdef DHD_DEBUG
- if (DHD_GLOM_ON())
- bcm_prhex("subframe", dptr, 32);
+ if (DHD_GLOM_ON()) {
+ printk(KERN_DEBUG "subframe:\n");
+ print_hex_dump_bytes("", DUMP_PREFIX_OFFSET,
+ dptr, 32);
+ }
#endif
if ((u16)~(sublen ^ check)) {
@@ -3469,8 +3485,11 @@ static u8 dhdsdio_rxglom(dhd_bus_t *bus, u8 rxseq)
rxseq = seq;
}
#ifdef DHD_DEBUG
- if (DHD_BYTES_ON() && DHD_DATA_ON())
- bcm_prhex("Rx Subframe Data", dptr, dlen);
+ if (DHD_BYTES_ON() && DHD_DATA_ON()) {
+ printk(KERN_DEBUG "Rx Subframe Data:\n");
+ print_hex_dump_bytes("", DUMP_PREFIX_OFFSET,
+ dptr, dlen);
+ }
#endif
__skb_trim(pfirst, sublen);
@@ -3513,8 +3532,9 @@ static u8 dhdsdio_rxglom(dhd_bus_t *bus, u8 rxseq)
__func__, num, pfirst, pfirst->data,
pfirst->len, pfirst->next,
pfirst->prev));
- bcm_prhex("", (u8 *) pfirst->data,
- min_t(int, pfirst->len, 32));
+ print_hex_dump_bytes("", DUMP_PREFIX_OFFSET,
+ pfirst->data,
+ min_t(int, pfirst->len, 32));
}
#endif /* DHD_DEBUG */
}
@@ -3816,10 +3836,15 @@ static uint dhdsdio_readframes(dhd_bus_t *bus, uint maxframes, bool *finished)
bus->tx_max = txmax;
#ifdef DHD_DEBUG
- if (DHD_BYTES_ON() && DHD_DATA_ON())
- bcm_prhex("Rx Data", rxbuf, len);
- else if (DHD_HDRS_ON())
- bcm_prhex("RxHdr", bus->rxhdr, SDPCM_HDRLEN);
+ if (DHD_BYTES_ON() && DHD_DATA_ON()) {
+ printk(KERN_DEBUG "Rx Data:\n");
+ print_hex_dump_bytes("", DUMP_PREFIX_OFFSET,
+ rxbuf, len);
+ } else if (DHD_HDRS_ON()) {
+ printk(KERN_DEBUG "RxHdr:\n");
+ print_hex_dump_bytes("", DUMP_PREFIX_OFFSET,
+ bus->rxhdr, SDPCM_HDRLEN);
+ }
#endif
if (chan == SDPCM_CONTROL_CHANNEL) {
@@ -3874,8 +3899,11 @@ static uint dhdsdio_readframes(dhd_bus_t *bus, uint maxframes, bool *finished)
continue;
}
#ifdef DHD_DEBUG
- if (DHD_BYTES_ON() || DHD_HDRS_ON())
- bcm_prhex("RxHdr", bus->rxhdr, SDPCM_HDRLEN);
+ if (DHD_BYTES_ON() || DHD_HDRS_ON()) {
+ printk(KERN_DEBUG "RxHdr:\n");
+ print_hex_dump_bytes("", DUMP_PREFIX_OFFSET,
+ bus->rxhdr, SDPCM_HDRLEN);
+ }
#endif
/* Extract hardware header fields */
@@ -4048,8 +4076,11 @@ static uint dhdsdio_readframes(dhd_bus_t *bus, uint maxframes, bool *finished)
memcpy(pkt->data, bus->rxhdr, firstread);
#ifdef DHD_DEBUG
- if (DHD_BYTES_ON() && DHD_DATA_ON())
- bcm_prhex("Rx Data", pkt->data, len);
+ if (DHD_BYTES_ON() && DHD_DATA_ON()) {
+ printk(KERN_DEBUG "Rx Data:\n");
+ print_hex_dump_bytes("", DUMP_PREFIX_OFFSET,
+ pkt->data, len);
+ }
#endif
deliver:
@@ -4060,7 +4091,10 @@ deliver:
__func__, len));
#ifdef DHD_DEBUG
if (DHD_GLOM_ON()) {
- bcm_prhex("Glom Data", pkt->data, len);
+ printk(KERN_DEBUG "Glom Data:\n");
+ print_hex_dump_bytes("",
+ DUMP_PREFIX_OFFSET,
+ pkt->data, len);
}
#endif
__skb_trim(pkt, len);
@@ -4621,8 +4655,9 @@ static void dhdsdio_pktgen(dhd_bus_t *bus)
#ifdef DHD_DEBUG
if (DHD_BYTES_ON() && DHD_DATA_ON()) {
data = (u8 *) (pkt->data) + SDPCM_HDRLEN;
- bcm_prhex("dhdsdio_pktgen: Tx Data", data,
- pkt->len - SDPCM_HDRLEN);
+ printk(KERN_DEBUG "dhdsdio_pktgen: Tx Data:\n");
+ print_hex_dump_bytes("", DUMP_PREFIX_OFFSET, data,
+ pkt->len - SDPCM_HDRLEN);
}
#endif
diff --git a/drivers/staging/brcm80211/brcmsmac/wlc_main.c b/drivers/staging/brcm80211/brcmsmac/wlc_main.c
index c1bd24f..2fed0eb 100644
--- a/drivers/staging/brcm80211/brcmsmac/wlc_main.c
+++ b/drivers/staging/brcm80211/brcmsmac/wlc_main.c
@@ -4681,8 +4681,9 @@ void wlc_print_txdesc(d11txh_t *txh)
char hexbuf[256];
/* add plcp header along with txh descriptor */
- bcm_prhex("Raw TxDesc + plcp header", (unsigned char *) txh,
- sizeof(d11txh_t) + 48);
+ printk(KERN_DEBUG "Raw TxDesc + plcp header:\n");
+ print_hex_dump_bytes("", DUMP_PREFIX_OFFSET,
+ txh, sizeof(d11txh_t) + 48);
printk(KERN_DEBUG "TxCtlLow: %04x ", mtcl);
printk(KERN_DEBUG "TxCtlHigh: %04x ", mtch);
@@ -4753,7 +4754,8 @@ void wlc_print_rxh(d11rxhdr_t *rxh)
{0, NULL}
};
- bcm_prhex("Raw RxDesc", (unsigned char *) rxh, sizeof(d11rxhdr_t));
+ printk(KERN_DEBUG "Raw RxDesc:\n");
+ print_hex_dump_bytes("", DUMP_PREFIX_OFFSET, rxh, sizeof(d11rxhdr_t));
bcm_format_flags(macstat_flags, macstatus1, flagstr, 64);
diff --git a/drivers/staging/brcm80211/include/bcmutils.h b/drivers/staging/brcm80211/include/bcmutils.h
index 2a00741..aa00e83 100644
--- a/drivers/staging/brcm80211/include/bcmutils.h
+++ b/drivers/staging/brcm80211/include/bcmutils.h
@@ -476,7 +476,6 @@ extern u8 bcm_crc8(u8 *p, uint nbytes, u8 crc);
extern int bcm_format_hex(char *str, const void *bytes, int len);
#endif
extern char *bcm_chipname(uint chipid, char *buf, uint len);
- extern void bcm_prhex(const char *msg, unsigned char *buf, uint len);
extern bcm_tlv_t *bcm_parse_tlvs(void *buf, int buflen,
uint key);
diff --git a/drivers/staging/brcm80211/util/bcmutils.c b/drivers/staging/brcm80211/util/bcmutils.c
index cca5b7d..e185e28 100644
--- a/drivers/staging/brcm80211/util/bcmutils.c
+++ b/drivers/staging/brcm80211/util/bcmutils.c
@@ -21,6 +21,7 @@
#include <linux/pci.h>
#include <linux/netdevice.h>
#include <linux/sched.h>
+#include <linux/printk.h>
#include <bcmdefs.h>
#include <stdarg.h>
#include <bcmutils.h>
@@ -386,7 +387,7 @@ void bcm_prpkt(const char *msg, struct sk_buff *p0)
printk(KERN_DEBUG "%s:\n", msg);
for (p = p0; p; p = p->next)
- bcm_prhex(NULL, p->data, p->len);
+ print_hex_dump_bytes("", DUMP_PREFIX_OFFSET, p->data, p->len);
}
EXPORT_SYMBOL(bcm_prpkt);
#endif /* defined(BCMDBG) */
@@ -629,43 +630,6 @@ int bcm_format_hex(char *str, const void *bytes, int len)
EXPORT_SYMBOL(bcm_format_hex);
#endif /* defined(BCMDBG) */
-/* pretty hex print a contiguous buffer */
-void bcm_prhex(const char *msg, unsigned char *buf, uint nbytes)
-{
- char line[128], *p;
- int len = sizeof(line);
- int nchar;
- uint i;
-
- if (msg && (msg[0] != '\0'))
- printk(KERN_DEBUG "%s:\n", msg);
-
- p = line;
- for (i = 0; i < nbytes; i++) {
- if (i % 16 == 0) {
- nchar = snprintf(p, len, " %04d: ", i); /* line prefix */
- p += nchar;
- len -= nchar;
- }
- if (len > 0) {
- nchar = snprintf(p, len, "%02x ", buf[i]);
- p += nchar;
- len -= nchar;
- }
-
- if (i % 16 == 15) {
- printk(KERN_DEBUG "%s\n", line); /* flush line */
- p = line;
- len = sizeof(line);
- }
- }
-
- /* flush last partial line */
- if (p != line)
- printk(KERN_DEBUG "%s\n", line);
-}
-EXPORT_SYMBOL(bcm_prhex);
-
char *bcm_chipname(uint chipid, char *buf, uint len)
{
const char *fmt;
--
1.7.4.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 08/10] staging: brcm80211: make use of fls bit operation in wlc_phy_compute_dB
2011-05-09 14:33 [PATCH 01/10] staging: brcm80211: cleanup unnecessary functions from wlc_ampdu.c Arend van Spriel
` (5 preceding siblings ...)
2011-05-09 14:33 ` [PATCH 07/10] staging: brcm80211: use print_hex_dump_bytes kernel function Arend van Spriel
@ 2011-05-09 14:33 ` Arend van Spriel
2011-05-09 14:33 ` [PATCH 09/10] staging: brcm80211: fix checkpatch issue introduced in dhd_sdio.c Arend van Spriel
` (2 subsequent siblings)
9 siblings, 0 replies; 14+ messages in thread
From: Arend van Spriel @ 2011-05-09 14:33 UTC (permalink / raw)
To: gregkh; +Cc: Arend van Spriel, devel, linux-wireless
wlc_phy_compute_dB converts absolute power value to dB implementing
a fixed point calculation for 10*log10(x). It does this by determining
the most significant bit for value x. This can be done using the fls()
bit operation, which has arch specific and possibly more efficient
implementation.
Cc: devel@linuxdriverproject.org
Cc: linux-wireless@vger.kernel.org
Reviewed-by: Roland Vossen <rvossen@broadcoom.com>
Reviewed-by: Henry Ptasinski <henryp@broadcom.com>
Reviewed-by: Brett Rudley <brudley@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
---
.../staging/brcm80211/brcmsmac/phy/wlc_phy_cmn.c | 19 ++++++++-----------
1 files changed, 8 insertions(+), 11 deletions(-)
diff --git a/drivers/staging/brcm80211/brcmsmac/phy/wlc_phy_cmn.c b/drivers/staging/brcm80211/brcmsmac/phy/wlc_phy_cmn.c
index 446dc84..6cba4df 100644
--- a/drivers/staging/brcm80211/brcmsmac/phy/wlc_phy_cmn.c
+++ b/drivers/staging/brcm80211/brcmsmac/phy/wlc_phy_cmn.c
@@ -18,10 +18,12 @@
#include <linux/kernel.h>
#include <linux/string.h>
-#include <bcmdefs.h>
+#include <linux/bitops.h>
#include <linux/delay.h>
#include <linux/module.h>
#include <linux/pci.h>
+
+#include <bcmdefs.h>
#include <bcmnvram.h>
#include <sbchipc.h>
#include <bcmdevs.h>
@@ -2746,20 +2748,15 @@ s8 lcnphy_gain_index_offset_for_pkt_rssi[] = {
void wlc_phy_compute_dB(u32 *cmplx_pwr, s8 *p_cmplx_pwr_dB, u8 core)
{
- u8 shift_ct, lsb, msb, secondmsb, i;
+ u8 msb, secondmsb, i;
u32 tmp;
for (i = 0; i < core; i++) {
+ secondmsb = 0;
tmp = cmplx_pwr[i];
- shift_ct = msb = secondmsb = 0;
- while (tmp != 0) {
- tmp = tmp >> 1;
- shift_ct++;
- lsb = (u8) (tmp & 1);
- if (lsb == 1)
- msb = shift_ct;
- }
- secondmsb = (u8) ((cmplx_pwr[i] >> (msb - 1)) & 1);
+ msb = fls(tmp);
+ if (msb)
+ secondmsb = (u8) ((tmp >> (--msb - 1)) & 1);
p_cmplx_pwr_dB[i] = (s8) (3 * msb + 2 * secondmsb);
}
}
--
1.7.4.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 09/10] staging: brcm80211: fix checkpatch issue introduced in dhd_sdio.c
2011-05-09 14:33 [PATCH 01/10] staging: brcm80211: cleanup unnecessary functions from wlc_ampdu.c Arend van Spriel
` (6 preceding siblings ...)
2011-05-09 14:33 ` [PATCH 08/10] staging: brcm80211: make use of fls bit operation in wlc_phy_compute_dB Arend van Spriel
@ 2011-05-09 14:33 ` Arend van Spriel
2011-05-09 14:33 ` [PATCH 10/10] staging: brcm80211: fix checkpatch issue introduced in wlc_alloc.c Arend van Spriel
2011-05-10 18:12 ` [PATCH 01/10] staging: brcm80211: cleanup unnecessary functions from wlc_ampdu.c Greg KH
9 siblings, 0 replies; 14+ messages in thread
From: Arend van Spriel @ 2011-05-09 14:33 UTC (permalink / raw)
To: gregkh; +Cc: Arend van Spriel, devel, linux-wireless
Patch "[2349e278] move utility functions into new module" introduced
a checkpatch warning which is resolved with this patch.
Cc: devel@linuxdriverproject.org
Cc: linux-wireless@vger.kernel.org
Reviewed-by: Roland Vossen <rvossen@broadcoom.com>
Reviewed-by: Henry Ptasinski <henryp@broadcom.com>
Reviewed-by: Brett Rudley <brudley@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
---
drivers/staging/brcm80211/brcmfmac/dhd_sdio.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/brcm80211/brcmfmac/dhd_sdio.c b/drivers/staging/brcm80211/brcmfmac/dhd_sdio.c
index 9167ebc..8683eeb 100644
--- a/drivers/staging/brcm80211/brcmfmac/dhd_sdio.c
+++ b/drivers/staging/brcm80211/brcmfmac/dhd_sdio.c
@@ -3690,8 +3690,11 @@ static uint dhdsdio_readframes(dhd_bus_t *bus, uint maxframes, bool *finished)
} else {
/* Give up on data,
request rtx of events */
- DHD_ERROR(("%s (nextlen): bcm_pkt_buf_get_skb failed: len %d rdlen %d " "expected rxseq %d\n",
- __func__, len, rdlen, rxseq));
+ DHD_ERROR(("%s (nextlen): "
+ "bcm_pkt_buf_get_skb failed:"
+ " len %d rdlen %d expected"
+ " rxseq %d\n", __func__,
+ len, rdlen, rxseq));
/* Just go try again w/normal
header read */
dhd_os_sdunlock_rxq(bus->dhd);
--
1.7.4.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 10/10] staging: brcm80211: fix checkpatch issue introduced in wlc_alloc.c
2011-05-09 14:33 [PATCH 01/10] staging: brcm80211: cleanup unnecessary functions from wlc_ampdu.c Arend van Spriel
` (7 preceding siblings ...)
2011-05-09 14:33 ` [PATCH 09/10] staging: brcm80211: fix checkpatch issue introduced in dhd_sdio.c Arend van Spriel
@ 2011-05-09 14:33 ` Arend van Spriel
2011-05-10 18:12 ` [PATCH 01/10] staging: brcm80211: cleanup unnecessary functions from wlc_ampdu.c Greg KH
9 siblings, 0 replies; 14+ messages in thread
From: Arend van Spriel @ 2011-05-09 14:33 UTC (permalink / raw)
To: gregkh; +Cc: Arend van Spriel, devel, linux-wireless
Patch "[59807ce] local used function made static" introduced a new
checkpatch warning which is fixed with this patch.
Cc: devel@linuxdriverproject.org
Cc: linux-wireless@vger.kernel.org
Reviewed-by: Roland Vossen <rvossen@broadcoom.com>
Reviewed-by: Henry Ptasinski <henryp@broadcom.com>
Reviewed-by: Brett Rudley <brudley@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
---
drivers/staging/brcm80211/brcmsmac/wlc_alloc.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/staging/brcm80211/brcmsmac/wlc_alloc.c b/drivers/staging/brcm80211/brcmsmac/wlc_alloc.c
index f9fc644..d91cf5a 100644
--- a/drivers/staging/brcm80211/brcmsmac/wlc_alloc.c
+++ b/drivers/staging/brcm80211/brcmsmac/wlc_alloc.c
@@ -137,7 +137,8 @@ static void wlc_bsscfg_mfree(struct wlc_bsscfg *cfg)
kfree(cfg);
}
-static void wlc_bsscfg_ID_assign(struct wlc_info *wlc, struct wlc_bsscfg *bsscfg)
+static void wlc_bsscfg_ID_assign(struct wlc_info *wlc,
+ struct wlc_bsscfg *bsscfg)
{
bsscfg->ID = wlc->next_bsscfg_ID;
wlc->next_bsscfg_ID++;
--
1.7.4.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH 01/10] staging: brcm80211: cleanup unnecessary functions from wlc_ampdu.c
2011-05-09 14:33 [PATCH 01/10] staging: brcm80211: cleanup unnecessary functions from wlc_ampdu.c Arend van Spriel
` (8 preceding siblings ...)
2011-05-09 14:33 ` [PATCH 10/10] staging: brcm80211: fix checkpatch issue introduced in wlc_alloc.c Arend van Spriel
@ 2011-05-10 18:12 ` Greg KH
2011-05-10 19:07 ` Arend van Spriel
9 siblings, 1 reply; 14+ messages in thread
From: Greg KH @ 2011-05-10 18:12 UTC (permalink / raw)
To: Arend van Spriel; +Cc: gregkh, devel, linux-wireless
On Mon, May 09, 2011 at 04:33:20PM +0200, Arend van Spriel wrote:
> Couple of functions are not used or empty and have been removed.
This patch doesn't apply on top of all of the other brcm80211 patches
sent me. Care to redo this series and resend after syncing up with the
next linux-next tree?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 01/10] staging: brcm80211: cleanup unnecessary functions from wlc_ampdu.c
2011-05-10 18:12 ` [PATCH 01/10] staging: brcm80211: cleanup unnecessary functions from wlc_ampdu.c Greg KH
@ 2011-05-10 19:07 ` Arend van Spriel
2011-05-10 19:26 ` Greg KH
0 siblings, 1 reply; 14+ messages in thread
From: Arend van Spriel @ 2011-05-10 19:07 UTC (permalink / raw)
To: Greg KH
Cc: gregkh@suse.de, devel@linuxdriverproject.org,
linux-wireless@vger.kernel.org
On 05/10/2011 08:12 PM, Greg KH wrote:
> On Mon, May 09, 2011 at 04:33:20PM +0200, Arend van Spriel wrote:
>> Couple of functions are not used or empty and have been removed.
> This patch doesn't apply on top of all of the other brcm80211 patches
> sent me. Care to redo this series and resend after syncing up with the
> next linux-next tree?
According to the email messages 'patch "staging: brcm80211: ..." added
to staging tree' you dropped four patches in this series. Do you want me
to resend those or the entire series. I prefer only resending the
dropped ones, but it is your call.
Gr. AvS
--
Almost nobody dances sober, unless they happen to be insane.
-- H.P. Lovecraft --
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 01/10] staging: brcm80211: cleanup unnecessary functions from wlc_ampdu.c
2011-05-10 19:07 ` Arend van Spriel
@ 2011-05-10 19:26 ` Greg KH
2011-05-10 19:35 ` Arend van Spriel
0 siblings, 1 reply; 14+ messages in thread
From: Greg KH @ 2011-05-10 19:26 UTC (permalink / raw)
To: Arend van Spriel
Cc: gregkh@suse.de, devel@linuxdriverproject.org,
linux-wireless@vger.kernel.org
On Tue, May 10, 2011 at 09:07:30PM +0200, Arend van Spriel wrote:
> On 05/10/2011 08:12 PM, Greg KH wrote:
> >On Mon, May 09, 2011 at 04:33:20PM +0200, Arend van Spriel wrote:
> >>Couple of functions are not used or empty and have been removed.
> >This patch doesn't apply on top of all of the other brcm80211 patches
> >sent me. Care to redo this series and resend after syncing up with the
> >next linux-next tree?
> According to the email messages 'patch "staging: brcm80211: ..."
> added to staging tree' you dropped four patches in this series. Do
> you want me to resend those or the entire series. I prefer only
> resending the dropped ones, but it is your call.
Please resend only the dropped ones, as I can't do anything with ones
I've already applied :)
thanks,
greg k-h
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 01/10] staging: brcm80211: cleanup unnecessary functions from wlc_ampdu.c
2011-05-10 19:26 ` Greg KH
@ 2011-05-10 19:35 ` Arend van Spriel
0 siblings, 0 replies; 14+ messages in thread
From: Arend van Spriel @ 2011-05-10 19:35 UTC (permalink / raw)
To: Greg KH
Cc: gregkh@suse.de, devel@linuxdriverproject.org,
linux-wireless@vger.kernel.org
On 05/10/2011 09:26 PM, Greg KH wrote:
> Please resend only the dropped ones, as I can't do anything with ones
> I've already applied :)
There is 'git revert' but I am glad you did not ;-)
Gr. AvS
--
Almost nobody dances sober, unless they happen to be insane.
-- H.P. Lovecraft --
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2011-05-10 19:36 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-09 14:33 [PATCH 01/10] staging: brcm80211: cleanup unnecessary functions from wlc_ampdu.c Arend van Spriel
2011-05-09 14:33 ` [PATCH 02/10] staging: brcm80211: local used function made static Arend van Spriel
2011-05-09 14:33 ` [PATCH 03/10] staging: brcm80211: wlc_aggregatable function prototype moved Arend van Spriel
2011-05-09 14:33 ` [PATCH 04/10] staging: brcm80211: remove definition of BCMFASTPATH macro Arend van Spriel
2011-05-09 14:33 ` [PATCH 05/10] staging: brcm80211: remove unused function from wlc_phy_cmn.c Arend van Spriel
2011-05-09 14:33 ` [PATCH 06/10] staging: brcm80211: use int_sqrt kernel function iso driver implementation Arend van Spriel
2011-05-09 14:33 ` [PATCH 07/10] staging: brcm80211: use print_hex_dump_bytes kernel function Arend van Spriel
2011-05-09 14:33 ` [PATCH 08/10] staging: brcm80211: make use of fls bit operation in wlc_phy_compute_dB Arend van Spriel
2011-05-09 14:33 ` [PATCH 09/10] staging: brcm80211: fix checkpatch issue introduced in dhd_sdio.c Arend van Spriel
2011-05-09 14:33 ` [PATCH 10/10] staging: brcm80211: fix checkpatch issue introduced in wlc_alloc.c Arend van Spriel
2011-05-10 18:12 ` [PATCH 01/10] staging: brcm80211: cleanup unnecessary functions from wlc_ampdu.c Greg KH
2011-05-10 19:07 ` Arend van Spriel
2011-05-10 19:26 ` Greg KH
2011-05-10 19:35 ` Arend van Spriel
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).