diff options
author | Brett Rudley <brudley@broadcom.com> | 2010-11-19 17:30:54 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-11-19 20:09:04 -0500 |
commit | 501c09346ce74ec688113d5c6b8a321514935228 (patch) | |
tree | 66e4282538d161ccd3c786dda832e2954902ad75 | |
parent | 02db6b4769e2465b872a6cd87465a3e20d4573ce (diff) |
staging: brcm80211: unifdef -DWLC_LOW
Part of BMAC removal.
Signed-off-by: Brett Rudley <brudley@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/staging/brcm80211/include/bcm_rpc_tp.h | 4 | ||||
-rw-r--r-- | drivers/staging/brcm80211/include/siutils.h | 10 | ||||
-rw-r--r-- | drivers/staging/brcm80211/phy/wlc_phy_hal.h | 2 | ||||
-rw-r--r-- | drivers/staging/brcm80211/sys/wl_mac80211.c | 22 | ||||
-rw-r--r-- | drivers/staging/brcm80211/sys/wl_mac80211.h | 2 | ||||
-rw-r--r-- | drivers/staging/brcm80211/sys/wlc_alloc.c | 4 | ||||
-rw-r--r-- | drivers/staging/brcm80211/sys/wlc_ampdu.c | 13 | ||||
-rw-r--r-- | drivers/staging/brcm80211/sys/wlc_bmac.c | 3 | ||||
-rw-r--r-- | drivers/staging/brcm80211/sys/wlc_bmac.h | 2 | ||||
-rw-r--r-- | drivers/staging/brcm80211/sys/wlc_cfg.h | 6 | ||||
-rw-r--r-- | drivers/staging/brcm80211/sys/wlc_mac80211.c | 18 | ||||
-rw-r--r-- | drivers/staging/brcm80211/sys/wlc_mac80211.h | 12 | ||||
-rw-r--r-- | drivers/staging/brcm80211/sys/wlc_rpc.h | 4 | ||||
-rw-r--r-- | drivers/staging/brcm80211/sys/wlc_types.h | 5 |
14 files changed, 0 insertions, 107 deletions
diff --git a/drivers/staging/brcm80211/include/bcm_rpc_tp.h b/drivers/staging/brcm80211/include/bcm_rpc_tp.h index 0136118284f..6102a495f3b 100644 --- a/drivers/staging/brcm80211/include/bcm_rpc_tp.h +++ b/drivers/staging/brcm80211/include/bcm_rpc_tp.h | |||
@@ -53,9 +53,7 @@ typedef struct rpc_transport_info rpc_tp_info_t; | |||
53 | typedef void (*rpc_tx_complete_fn_t) (void *, rpc_buf_t *, int status); | 53 | typedef void (*rpc_tx_complete_fn_t) (void *, rpc_buf_t *, int status); |
54 | typedef void (*rpc_rx_fn_t) (void *, rpc_buf_t *); | 54 | typedef void (*rpc_rx_fn_t) (void *, rpc_buf_t *); |
55 | 55 | ||
56 | #ifdef WLC_LOW | ||
57 | typedef void (*rpc_txflowctl_cb_t) (void *ctx, bool on); | 56 | typedef void (*rpc_txflowctl_cb_t) (void *ctx, bool on); |
58 | #endif | ||
59 | 57 | ||
60 | extern rpc_tp_info_t *bcm_rpc_tp_attach(struct osl_info *osh, void *bus); | 58 | extern rpc_tp_info_t *bcm_rpc_tp_attach(struct osl_info *osh, void *bus); |
61 | extern void bcm_rpc_tp_detach(rpc_tp_info_t *rpcb); | 59 | extern void bcm_rpc_tp_detach(rpc_tp_info_t *rpcb); |
@@ -94,7 +92,6 @@ extern int bcm_rpc_tp_get_device_speed(rpc_tp_info_t *rpc_th); | |||
94 | extern int bcm_rpc_tp_dump(rpc_tp_info_t *rpcb, struct bcmstrbuf *b); | 92 | extern int bcm_rpc_tp_dump(rpc_tp_info_t *rpcb, struct bcmstrbuf *b); |
95 | #endif | 93 | #endif |
96 | 94 | ||
97 | #ifdef WLC_LOW | ||
98 | /* intercept USB pkt to parse RPC header: USB driver rx-> wl_send -> this -> wl driver */ | 95 | /* intercept USB pkt to parse RPC header: USB driver rx-> wl_send -> this -> wl driver */ |
99 | extern void bcm_rpc_tp_rx_from_dnglbus(rpc_tp_info_t *rpc_th, struct lbuf *lb); | 96 | extern void bcm_rpc_tp_rx_from_dnglbus(rpc_tp_info_t *rpc_th, struct lbuf *lb); |
100 | 97 | ||
@@ -110,7 +107,6 @@ extern void bcm_rpc_tp_txq_wm_set(rpc_tp_info_t *rpc_th, u8 hiwm, | |||
110 | u8 lowm); | 107 | u8 lowm); |
111 | extern void bcm_rpc_tp_txq_wm_get(rpc_tp_info_t *rpc_th, u8 *hiwm, | 108 | extern void bcm_rpc_tp_txq_wm_get(rpc_tp_info_t *rpc_th, u8 *hiwm, |
112 | u8 *lowm); | 109 | u8 *lowm); |
113 | #endif /* WLC_LOW */ | ||
114 | 110 | ||
115 | extern void bcm_rpc_tp_agg_set(rpc_tp_info_t *rpcb, u32 reason, bool set); | 111 | extern void bcm_rpc_tp_agg_set(rpc_tp_info_t *rpcb, u32 reason, bool set); |
116 | extern void bcm_rpc_tp_agg_limit_set(rpc_tp_info_t *rpc_th, u8 sf, | 112 | extern void bcm_rpc_tp_agg_limit_set(rpc_tp_info_t *rpc_th, u8 sf, |
diff --git a/drivers/staging/brcm80211/include/siutils.h b/drivers/staging/brcm80211/include/siutils.h index 6f83e7e5b31..6a074ab9f34 100644 --- a/drivers/staging/brcm80211/include/siutils.h +++ b/drivers/staging/brcm80211/include/siutils.h | |||
@@ -19,9 +19,6 @@ | |||
19 | 19 | ||
20 | #include <hndsoc.h> | 20 | #include <hndsoc.h> |
21 | 21 | ||
22 | #if !defined(WLC_LOW) | ||
23 | #include "bcm_rpc.h" | ||
24 | #endif | ||
25 | /* | 22 | /* |
26 | * Data structure to export all chip specific common variables | 23 | * Data structure to export all chip specific common variables |
27 | * public (read-only) portion of siutils handle returned by si_attach() | 24 | * public (read-only) portion of siutils handle returned by si_attach() |
@@ -50,19 +47,12 @@ struct si_pub { | |||
50 | uint socirev; /* SOC interconnect rev */ | 47 | uint socirev; /* SOC interconnect rev */ |
51 | bool pci_pr32414; | 48 | bool pci_pr32414; |
52 | 49 | ||
53 | #if !defined(WLC_LOW) | ||
54 | rpc_info_t *rpc; | ||
55 | #endif | ||
56 | }; | 50 | }; |
57 | 51 | ||
58 | /* for HIGH_ONLY driver, the si_t must be writable to allow states sync from BMAC to HIGH driver | 52 | /* for HIGH_ONLY driver, the si_t must be writable to allow states sync from BMAC to HIGH driver |
59 | * for monolithic driver, it is readonly to prevent accident change | 53 | * for monolithic driver, it is readonly to prevent accident change |
60 | */ | 54 | */ |
61 | #if !defined(WLC_LOW) | ||
62 | typedef struct si_pub si_t; | ||
63 | #else | ||
64 | typedef const struct si_pub si_t; | 55 | typedef const struct si_pub si_t; |
65 | #endif | ||
66 | 56 | ||
67 | /* | 57 | /* |
68 | * Many of the routines below take an 'sih' handle as their first arg. | 58 | * Many of the routines below take an 'sih' handle as their first arg. |
diff --git a/drivers/staging/brcm80211/phy/wlc_phy_hal.h b/drivers/staging/brcm80211/phy/wlc_phy_hal.h index c462387d20b..514e15e0028 100644 --- a/drivers/staging/brcm80211/phy/wlc_phy_hal.h +++ b/drivers/staging/brcm80211/phy/wlc_phy_hal.h | |||
@@ -146,7 +146,6 @@ typedef struct shared_phy_params { | |||
146 | u32 boardflags2; | 146 | u32 boardflags2; |
147 | } shared_phy_params_t; | 147 | } shared_phy_params_t; |
148 | 148 | ||
149 | #ifdef WLC_LOW | ||
150 | 149 | ||
151 | extern shared_phy_t *wlc_phy_shared_attach(shared_phy_params_t *shp); | 150 | extern shared_phy_t *wlc_phy_shared_attach(shared_phy_params_t *shp); |
152 | extern void wlc_phy_shared_detach(shared_phy_t *phy_sh); | 151 | extern void wlc_phy_shared_detach(shared_phy_t *phy_sh); |
@@ -185,7 +184,6 @@ extern void wlc_phy_set_deaf(wlc_phy_t *ppi, bool user_flag); | |||
185 | extern void wlc_phy_switch_radio(wlc_phy_t *ppi, bool on); | 184 | extern void wlc_phy_switch_radio(wlc_phy_t *ppi, bool on); |
186 | extern void wlc_phy_anacore(wlc_phy_t *ppi, bool on); | 185 | extern void wlc_phy_anacore(wlc_phy_t *ppi, bool on); |
187 | 186 | ||
188 | #endif /* WLC_LOW */ | ||
189 | 187 | ||
190 | extern void wlc_phy_BSSinit(wlc_phy_t *ppi, bool bonlyap, int rssi); | 188 | extern void wlc_phy_BSSinit(wlc_phy_t *ppi, bool bonlyap, int rssi); |
191 | 189 | ||
diff --git a/drivers/staging/brcm80211/sys/wl_mac80211.c b/drivers/staging/brcm80211/sys/wl_mac80211.c index e336fef111e..37e6ced84db 100644 --- a/drivers/staging/brcm80211/sys/wl_mac80211.c +++ b/drivers/staging/brcm80211/sys/wl_mac80211.c | |||
@@ -759,14 +759,12 @@ static wl_info_t *wl_attach(u16 vendor, u16 device, unsigned long regs, | |||
759 | wlc_iovar_setint(wl->wlc, "sd_drivestrength", sd_drivestrength); | 759 | wlc_iovar_setint(wl->wlc, "sd_drivestrength", sd_drivestrength); |
760 | #endif | 760 | #endif |
761 | 761 | ||
762 | #ifdef WLC_LOW | ||
763 | /* register our interrupt handler */ | 762 | /* register our interrupt handler */ |
764 | if (request_irq(irq, wl_isr, IRQF_SHARED, KBUILD_MODNAME, wl)) { | 763 | if (request_irq(irq, wl_isr, IRQF_SHARED, KBUILD_MODNAME, wl)) { |
765 | WL_ERROR(("wl%d: request_irq() failed\n", unit)); | 764 | WL_ERROR(("wl%d: request_irq() failed\n", unit)); |
766 | goto fail; | 765 | goto fail; |
767 | } | 766 | } |
768 | wl->irq = irq; | 767 | wl->irq = irq; |
769 | #endif /* WLC_LOW */ | ||
770 | 768 | ||
771 | /* register module */ | 769 | /* register module */ |
772 | wlc_module_register(wl->pub, NULL, "linux", wl, NULL, wl_linux_watchdog, | 770 | wlc_module_register(wl->pub, NULL, "linux", wl, NULL, wl_linux_watchdog, |
@@ -1349,7 +1347,6 @@ void wl_free(wl_info_t *wl) | |||
1349 | osl_detach(osh); | 1347 | osl_detach(osh); |
1350 | } | 1348 | } |
1351 | 1349 | ||
1352 | #ifdef WLC_LOW | ||
1353 | /* transmit a packet */ | 1350 | /* transmit a packet */ |
1354 | static int BCMFASTPATH wl_start(struct sk_buff *skb, wl_info_t *wl) | 1351 | static int BCMFASTPATH wl_start(struct sk_buff *skb, wl_info_t *wl) |
1355 | { | 1352 | { |
@@ -1358,7 +1355,6 @@ static int BCMFASTPATH wl_start(struct sk_buff *skb, wl_info_t *wl) | |||
1358 | 1355 | ||
1359 | return wl_start_int(wl, WL_TO_HW(wl), skb); | 1356 | return wl_start_int(wl, WL_TO_HW(wl), skb); |
1360 | } | 1357 | } |
1361 | #endif /* WLC_LOW */ | ||
1362 | 1358 | ||
1363 | static int BCMFASTPATH | 1359 | static int BCMFASTPATH |
1364 | wl_start_int(wl_info_t *wl, struct ieee80211_hw *hw, struct sk_buff *skb) | 1360 | wl_start_int(wl_info_t *wl, struct ieee80211_hw *hw, struct sk_buff *skb) |
@@ -1400,13 +1396,11 @@ uint wl_reset(wl_info_t *wl) | |||
1400 | */ | 1396 | */ |
1401 | void BCMFASTPATH wl_intrson(wl_info_t *wl) | 1397 | void BCMFASTPATH wl_intrson(wl_info_t *wl) |
1402 | { | 1398 | { |
1403 | #if defined(WLC_LOW) | ||
1404 | unsigned long flags; | 1399 | unsigned long flags; |
1405 | 1400 | ||
1406 | INT_LOCK(wl, flags); | 1401 | INT_LOCK(wl, flags); |
1407 | wlc_intrson(wl->wlc); | 1402 | wlc_intrson(wl->wlc); |
1408 | INT_UNLOCK(wl, flags); | 1403 | INT_UNLOCK(wl, flags); |
1409 | #endif /* WLC_LOW */ | ||
1410 | } | 1404 | } |
1411 | 1405 | ||
1412 | bool wl_alloc_dma_resources(wl_info_t *wl, uint addrwidth) | 1406 | bool wl_alloc_dma_resources(wl_info_t *wl, uint addrwidth) |
@@ -1416,7 +1410,6 @@ bool wl_alloc_dma_resources(wl_info_t *wl, uint addrwidth) | |||
1416 | 1410 | ||
1417 | u32 BCMFASTPATH wl_intrsoff(wl_info_t *wl) | 1411 | u32 BCMFASTPATH wl_intrsoff(wl_info_t *wl) |
1418 | { | 1412 | { |
1419 | #if defined(WLC_LOW) | ||
1420 | unsigned long flags; | 1413 | unsigned long flags; |
1421 | u32 status; | 1414 | u32 status; |
1422 | 1415 | ||
@@ -1424,20 +1417,15 @@ u32 BCMFASTPATH wl_intrsoff(wl_info_t *wl) | |||
1424 | status = wlc_intrsoff(wl->wlc); | 1417 | status = wlc_intrsoff(wl->wlc); |
1425 | INT_UNLOCK(wl, flags); | 1418 | INT_UNLOCK(wl, flags); |
1426 | return status; | 1419 | return status; |
1427 | #else | ||
1428 | return 0; | ||
1429 | #endif /* WLC_LOW */ | ||
1430 | } | 1420 | } |
1431 | 1421 | ||
1432 | void wl_intrsrestore(wl_info_t *wl, u32 macintmask) | 1422 | void wl_intrsrestore(wl_info_t *wl, u32 macintmask) |
1433 | { | 1423 | { |
1434 | #if defined(WLC_LOW) | ||
1435 | unsigned long flags; | 1424 | unsigned long flags; |
1436 | 1425 | ||
1437 | INT_LOCK(wl, flags); | 1426 | INT_LOCK(wl, flags); |
1438 | wlc_intrsrestore(wl->wlc, macintmask); | 1427 | wlc_intrsrestore(wl->wlc, macintmask); |
1439 | INT_UNLOCK(wl, flags); | 1428 | INT_UNLOCK(wl, flags); |
1440 | #endif /* WLC_LOW */ | ||
1441 | } | 1429 | } |
1442 | 1430 | ||
1443 | int wl_up(wl_info_t *wl) | 1431 | int wl_up(wl_info_t *wl) |
@@ -1473,7 +1461,6 @@ void wl_down(wl_info_t *wl) | |||
1473 | 1461 | ||
1474 | irqreturn_t BCMFASTPATH wl_isr(int irq, void *dev_id) | 1462 | irqreturn_t BCMFASTPATH wl_isr(int irq, void *dev_id) |
1475 | { | 1463 | { |
1476 | #if defined(WLC_LOW) | ||
1477 | wl_info_t *wl; | 1464 | wl_info_t *wl; |
1478 | bool ours, wantdpc; | 1465 | bool ours, wantdpc; |
1479 | unsigned long flags; | 1466 | unsigned long flags; |
@@ -1498,14 +1485,10 @@ irqreturn_t BCMFASTPATH wl_isr(int irq, void *dev_id) | |||
1498 | WL_ISRUNLOCK(wl, flags); | 1485 | WL_ISRUNLOCK(wl, flags); |
1499 | 1486 | ||
1500 | return IRQ_RETVAL(ours); | 1487 | return IRQ_RETVAL(ours); |
1501 | #else | ||
1502 | return IRQ_RETVAL(0); | ||
1503 | #endif /* WLC_LOW */ | ||
1504 | } | 1488 | } |
1505 | 1489 | ||
1506 | static void BCMFASTPATH wl_dpc(unsigned long data) | 1490 | static void BCMFASTPATH wl_dpc(unsigned long data) |
1507 | { | 1491 | { |
1508 | #ifdef WLC_LOW | ||
1509 | wl_info_t *wl; | 1492 | wl_info_t *wl; |
1510 | 1493 | ||
1511 | wl = (wl_info_t *) data; | 1494 | wl = (wl_info_t *) data; |
@@ -1539,7 +1522,6 @@ static void BCMFASTPATH wl_dpc(unsigned long data) | |||
1539 | 1522 | ||
1540 | done: | 1523 | done: |
1541 | WL_UNLOCK(wl); | 1524 | WL_UNLOCK(wl); |
1542 | #endif /* WLC_LOW */ | ||
1543 | } | 1525 | } |
1544 | 1526 | ||
1545 | static void wl_link_up(wl_info_t *wl, char *ifname) | 1527 | static void wl_link_up(wl_info_t *wl, char *ifname) |
@@ -1743,7 +1725,6 @@ char *wl_firmwares[WL_MAX_FW] = { | |||
1743 | NULL | 1725 | NULL |
1744 | }; | 1726 | }; |
1745 | 1727 | ||
1746 | #ifdef WLC_LOW | ||
1747 | int wl_ucode_init_buf(wl_info_t *wl, void **pbuf, u32 idx) | 1728 | int wl_ucode_init_buf(wl_info_t *wl, void **pbuf, u32 idx) |
1748 | { | 1729 | { |
1749 | int i, entry; | 1730 | int i, entry; |
@@ -1790,7 +1771,6 @@ int wl_ucode_init_uint(wl_info_t *wl, u32 *data, u32 idx) | |||
1790 | printf("ERROR: ucode tag:%d can not be found!\n", idx); | 1771 | printf("ERROR: ucode tag:%d can not be found!\n", idx); |
1791 | return -1; | 1772 | return -1; |
1792 | } | 1773 | } |
1793 | #endif /* WLC_LOW */ | ||
1794 | 1774 | ||
1795 | static int wl_request_fw(wl_info_t *wl, struct pci_dev *pdev) | 1775 | static int wl_request_fw(wl_info_t *wl, struct pci_dev *pdev) |
1796 | { | 1776 | { |
@@ -1833,12 +1813,10 @@ static int wl_request_fw(wl_info_t *wl, struct pci_dev *pdev) | |||
1833 | return 0; | 1813 | return 0; |
1834 | } | 1814 | } |
1835 | 1815 | ||
1836 | #ifdef WLC_LOW | ||
1837 | void wl_ucode_free_buf(void *p) | 1816 | void wl_ucode_free_buf(void *p) |
1838 | { | 1817 | { |
1839 | kfree(p); | 1818 | kfree(p); |
1840 | } | 1819 | } |
1841 | #endif /* WLC_LOW */ | ||
1842 | 1820 | ||
1843 | static void wl_release_fw(wl_info_t *wl) | 1821 | static void wl_release_fw(wl_info_t *wl) |
1844 | { | 1822 | { |
diff --git a/drivers/staging/brcm80211/sys/wl_mac80211.h b/drivers/staging/brcm80211/sys/wl_mac80211.h index ba9d48cd019..220d570710c 100644 --- a/drivers/staging/brcm80211/sys/wl_mac80211.h +++ b/drivers/staging/brcm80211/sys/wl_mac80211.h | |||
@@ -122,10 +122,8 @@ extern void wl_free(wl_info_t *wl); | |||
122 | extern int wl_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd); | 122 | extern int wl_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd); |
123 | extern int wl_ucode_data_init(wl_info_t *wl); | 123 | extern int wl_ucode_data_init(wl_info_t *wl); |
124 | extern void wl_ucode_data_free(void); | 124 | extern void wl_ucode_data_free(void); |
125 | #ifdef WLC_LOW | ||
126 | extern void wl_ucode_free_buf(void *); | 125 | extern void wl_ucode_free_buf(void *); |
127 | extern int wl_ucode_init_buf(wl_info_t *wl, void **pbuf, u32 idx); | 126 | extern int wl_ucode_init_buf(wl_info_t *wl, void **pbuf, u32 idx); |
128 | extern int wl_ucode_init_uint(wl_info_t *wl, u32 *data, u32 idx); | 127 | extern int wl_ucode_init_uint(wl_info_t *wl, u32 *data, u32 idx); |
129 | #endif /* WLC_LOW */ | ||
130 | 128 | ||
131 | #endif /* _wl_mac80211_h_ */ | 129 | #endif /* _wl_mac80211_h_ */ |
diff --git a/drivers/staging/brcm80211/sys/wlc_alloc.c b/drivers/staging/brcm80211/sys/wlc_alloc.c index e863a81e045..659ebd0ee2d 100644 --- a/drivers/staging/brcm80211/sys/wlc_alloc.c +++ b/drivers/staging/brcm80211/sys/wlc_alloc.c | |||
@@ -196,7 +196,6 @@ wlc_info_t *wlc_attach_malloc(struct osl_info *osh, uint unit, uint *err, | |||
196 | } | 196 | } |
197 | wlc->hw->wlc = wlc; | 197 | wlc->hw->wlc = wlc; |
198 | 198 | ||
199 | #ifdef WLC_LOW | ||
200 | wlc->hw->bandstate[0] = (wlc_hwband_t *)wlc_calloc(osh, unit, | 199 | wlc->hw->bandstate[0] = (wlc_hwband_t *)wlc_calloc(osh, unit, |
201 | (sizeof(wlc_hwband_t) * MAXBANDS)); | 200 | (sizeof(wlc_hwband_t) * MAXBANDS)); |
202 | if (wlc->hw->bandstate[0] == NULL) { | 201 | if (wlc->hw->bandstate[0] == NULL) { |
@@ -211,7 +210,6 @@ wlc_info_t *wlc_attach_malloc(struct osl_info *osh, uint unit, uint *err, | |||
211 | (sizeof(wlc_hwband_t) * i)); | 210 | (sizeof(wlc_hwband_t) * i)); |
212 | } | 211 | } |
213 | } | 212 | } |
214 | #endif /* WLC_LOW */ | ||
215 | 213 | ||
216 | wlc->modulecb = (modulecb_t *)wlc_calloc(osh, unit, | 214 | wlc->modulecb = (modulecb_t *)wlc_calloc(osh, unit, |
217 | sizeof(modulecb_t) * WLC_MAXMODULES); | 215 | sizeof(modulecb_t) * WLC_MAXMODULES); |
@@ -357,12 +355,10 @@ void wlc_detach_mfree(wlc_info_t *wlc, struct osl_info *osh) | |||
357 | } | 355 | } |
358 | 356 | ||
359 | if (wlc->hw) { | 357 | if (wlc->hw) { |
360 | #ifdef WLC_LOW | ||
361 | if (wlc->hw->bandstate[0]) { | 358 | if (wlc->hw->bandstate[0]) { |
362 | kfree(wlc->hw->bandstate[0]); | 359 | kfree(wlc->hw->bandstate[0]); |
363 | wlc->hw->bandstate[0] = NULL; | 360 | wlc->hw->bandstate[0] = NULL; |
364 | } | 361 | } |
365 | #endif | ||
366 | 362 | ||
367 | /* free hw struct */ | 363 | /* free hw struct */ |
368 | kfree(wlc->hw); | 364 | kfree(wlc->hw); |
diff --git a/drivers/staging/brcm80211/sys/wlc_ampdu.c b/drivers/staging/brcm80211/sys/wlc_ampdu.c index ab883ba76de..1fa56cefeed 100644 --- a/drivers/staging/brcm80211/sys/wlc_ampdu.c +++ b/drivers/staging/brcm80211/sys/wlc_ampdu.c | |||
@@ -908,7 +908,6 @@ wlc_ampdu_dotxstatus(ampdu_info_t *ampdu, struct scb *scb, void *p, | |||
908 | * call the first one | 908 | * call the first one |
909 | */ | 909 | */ |
910 | if (txs->status & TX_STATUS_ACK_RCV) { | 910 | if (txs->status & TX_STATUS_ACK_RCV) { |
911 | #ifdef WLC_LOW | ||
912 | u8 status_delay = 0; | 911 | u8 status_delay = 0; |
913 | 912 | ||
914 | /* wait till the next 8 bytes of txstatus is available */ | 913 | /* wait till the next 8 bytes of txstatus is available */ |
@@ -926,18 +925,6 @@ wlc_ampdu_dotxstatus(ampdu_info_t *ampdu, struct scb *scb, void *p, | |||
926 | ASSERT(!(s1 & TX_STATUS_INTERMEDIATE)); | 925 | ASSERT(!(s1 & TX_STATUS_INTERMEDIATE)); |
927 | ASSERT(s1 & TX_STATUS_AMPDU); | 926 | ASSERT(s1 & TX_STATUS_AMPDU); |
928 | s2 = R_REG(wlc->osh, &wlc->regs->frmtxstatus2); | 927 | s2 = R_REG(wlc->osh, &wlc->regs->frmtxstatus2); |
929 | #else /* WLC_LOW */ | ||
930 | |||
931 | /* Store the relevant information in ampdu structure */ | ||
932 | WL_AMPDU_TX(("wl%d: wlc_ampdu_dotxstatus: High Recvd\n", | ||
933 | wlc->pub->unit)); | ||
934 | |||
935 | ASSERT(!ampdu->p); | ||
936 | ampdu->p = p; | ||
937 | bcopy(txs, &du->txs, sizeof(tx_status_t)); | ||
938 | ampdu->waiting_status = true; | ||
939 | return; | ||
940 | #endif /* WLC_LOW */ | ||
941 | } | 928 | } |
942 | 929 | ||
943 | wlc_ampdu_dotxstatus_complete(ampdu, scb, p, txs, s1, s2); | 930 | wlc_ampdu_dotxstatus_complete(ampdu, scb, p, txs, s1, s2); |
diff --git a/drivers/staging/brcm80211/sys/wlc_bmac.c b/drivers/staging/brcm80211/sys/wlc_bmac.c index 214b5d82ab2..110710ad6e7 100644 --- a/drivers/staging/brcm80211/sys/wlc_bmac.c +++ b/drivers/staging/brcm80211/sys/wlc_bmac.c | |||
@@ -14,9 +14,6 @@ | |||
14 | * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | 14 | * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
15 | */ | 15 | */ |
16 | 16 | ||
17 | #ifndef WLC_LOW | ||
18 | #error "This file needs WLC_LOW" | ||
19 | #endif | ||
20 | 17 | ||
21 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
22 | #include <wlc_cfg.h> | 19 | #include <wlc_cfg.h> |
diff --git a/drivers/staging/brcm80211/sys/wlc_bmac.h b/drivers/staging/brcm80211/sys/wlc_bmac.h index c3d251a6417..c705f667469 100644 --- a/drivers/staging/brcm80211/sys/wlc_bmac.h +++ b/drivers/staging/brcm80211/sys/wlc_bmac.h | |||
@@ -138,9 +138,7 @@ extern void wlc_bmac_watchdog(void *arg); | |||
138 | extern void wlc_bmac_info_init(wlc_hw_info_t *wlc_hw); | 138 | extern void wlc_bmac_info_init(wlc_hw_info_t *wlc_hw); |
139 | 139 | ||
140 | /* up/down, reset, clk */ | 140 | /* up/down, reset, clk */ |
141 | #ifdef WLC_LOW | ||
142 | extern void wlc_bmac_xtal(wlc_hw_info_t *wlc_hw, bool want); | 141 | extern void wlc_bmac_xtal(wlc_hw_info_t *wlc_hw, bool want); |
143 | #endif | ||
144 | 142 | ||
145 | extern void wlc_bmac_copyto_objmem(wlc_hw_info_t *wlc_hw, | 143 | extern void wlc_bmac_copyto_objmem(wlc_hw_info_t *wlc_hw, |
146 | uint offset, const void *buf, int len, | 144 | uint offset, const void *buf, int len, |
diff --git a/drivers/staging/brcm80211/sys/wlc_cfg.h b/drivers/staging/brcm80211/sys/wlc_cfg.h index a415e1fd2c0..e36d209c72f 100644 --- a/drivers/staging/brcm80211/sys/wlc_cfg.h +++ b/drivers/staging/brcm80211/sys/wlc_cfg.h | |||
@@ -24,12 +24,6 @@ | |||
24 | #define IS_SINGLEBAND_5G(device) 0 | 24 | #define IS_SINGLEBAND_5G(device) 0 |
25 | 25 | ||
26 | /* Keep WLC_HIGH_ONLY, WLC_SPLIT for USB extension later on */ | 26 | /* Keep WLC_HIGH_ONLY, WLC_SPLIT for USB extension later on */ |
27 | #if !defined(WLC_LOW) | ||
28 | #define WLC_HIGH_ONLY | ||
29 | #endif | ||
30 | #if !defined(WLC_LOW) | ||
31 | #define WLC_SPLIT | ||
32 | #endif | ||
33 | 27 | ||
34 | /* **** Core type/rev defaults **** */ | 28 | /* **** Core type/rev defaults **** */ |
35 | #define D11_DEFAULT 0x0fffffb0 /* Supported D11 revs: 4, 5, 7-27 | 29 | #define D11_DEFAULT 0x0fffffb0 /* Supported D11 revs: 4, 5, 7-27 |
diff --git a/drivers/staging/brcm80211/sys/wlc_mac80211.c b/drivers/staging/brcm80211/sys/wlc_mac80211.c index c270d3f4072..c6f64c2e461 100644 --- a/drivers/staging/brcm80211/sys/wlc_mac80211.c +++ b/drivers/staging/brcm80211/sys/wlc_mac80211.c | |||
@@ -626,21 +626,11 @@ bool wlc_ps_check(wlc_info_t *wlc) | |||
626 | 626 | ||
627 | res = false; | 627 | res = false; |
628 | } | 628 | } |
629 | #ifdef WLC_LOW | ||
630 | /* For a monolithic build the wake check can be exact since it looks at wake | 629 | /* For a monolithic build the wake check can be exact since it looks at wake |
631 | * override bits. The MCTL_WAKE bit should match the 'wake' value. | 630 | * override bits. The MCTL_WAKE bit should match the 'wake' value. |
632 | */ | 631 | */ |
633 | wake = STAY_AWAKE(wlc) || wlc->hw->wake_override; | 632 | wake = STAY_AWAKE(wlc) || wlc->hw->wake_override; |
634 | wake_ok = (wake == ((tmp & MCTL_WAKE) != 0)); | 633 | wake_ok = (wake == ((tmp & MCTL_WAKE) != 0)); |
635 | #else | ||
636 | /* For a split build we will not have access to any wake overrides from the low | ||
637 | * level. The check can only make sure the MCTL_WAKE bit is on if the high | ||
638 | * level 'wake' value is true. If the high level 'wake' is false, the MCTL_WAKE | ||
639 | * may be either true or false due to the low level override. | ||
640 | */ | ||
641 | wake = STAY_AWAKE(wlc); | ||
642 | wake_ok = ((tmp & MCTL_WAKE) != 0) || !wake; | ||
643 | #endif | ||
644 | if (hps && !wake_ok) { | 634 | if (hps && !wake_ok) { |
645 | WL_ERROR(("wl%d: wake not sync, sw %d maccontrol 0x%x\n", wlc->pub->unit, wake, tmp)); | 635 | WL_ERROR(("wl%d: wake not sync, sw %d maccontrol 0x%x\n", wlc->pub->unit, wake, tmp)); |
646 | res = false; | 636 | res = false; |
@@ -1842,14 +1832,12 @@ void *wlc_attach(void *wl, u16 vendor, u16 device, uint unit, bool piomode, | |||
1842 | wlc_phy_stf_chain_init(wlc->band->pi, wlc->stf->hw_txchain, | 1832 | wlc_phy_stf_chain_init(wlc->band->pi, wlc->stf->hw_txchain, |
1843 | wlc->stf->hw_rxchain); | 1833 | wlc->stf->hw_rxchain); |
1844 | 1834 | ||
1845 | #ifdef WLC_LOW | ||
1846 | /* pull up some info resulting from the low attach */ | 1835 | /* pull up some info resulting from the low attach */ |
1847 | { | 1836 | { |
1848 | int i; | 1837 | int i; |
1849 | for (i = 0; i < NFIFO; i++) | 1838 | for (i = 0; i < NFIFO; i++) |
1850 | wlc->core->txavail[i] = wlc->hw->txavail[i]; | 1839 | wlc->core->txavail[i] = wlc->hw->txavail[i]; |
1851 | } | 1840 | } |
1852 | #endif /* WLC_LOW */ | ||
1853 | 1841 | ||
1854 | wlc_bmac_hw_etheraddr(wlc->hw, &wlc->perm_etheraddr); | 1842 | wlc_bmac_hw_etheraddr(wlc->hw, &wlc->perm_etheraddr); |
1855 | 1843 | ||
@@ -2500,9 +2488,7 @@ static void wlc_watchdog(void *arg) | |||
2500 | if (wlc->pub->radio_disabled) | 2488 | if (wlc->pub->radio_disabled) |
2501 | return; | 2489 | return; |
2502 | 2490 | ||
2503 | #ifdef WLC_LOW | ||
2504 | wlc_bmac_watchdog(wlc); | 2491 | wlc_bmac_watchdog(wlc); |
2505 | #endif | ||
2506 | 2492 | ||
2507 | /* occasionally sample mac stat counters to detect 16-bit counter wrap */ | 2493 | /* occasionally sample mac stat counters to detect 16-bit counter wrap */ |
2508 | if ((WLC_UPDATE_STATS(wlc)) | 2494 | if ((WLC_UPDATE_STATS(wlc)) |
@@ -2531,10 +2517,8 @@ static void wlc_watchdog(void *arg) | |||
2531 | wlc->tempsense_lasttime = wlc->pub->now; | 2517 | wlc->tempsense_lasttime = wlc->pub->now; |
2532 | wlc_tempsense_upd(wlc); | 2518 | wlc_tempsense_upd(wlc); |
2533 | } | 2519 | } |
2534 | #ifdef WLC_LOW | ||
2535 | /* BMAC_NOTE: for HIGH_ONLY driver, this seems being called after RPC bus failed */ | 2520 | /* BMAC_NOTE: for HIGH_ONLY driver, this seems being called after RPC bus failed */ |
2536 | ASSERT(wlc_bmac_taclear(wlc->hw, true)); | 2521 | ASSERT(wlc_bmac_taclear(wlc->hw, true)); |
2537 | #endif | ||
2538 | 2522 | ||
2539 | /* Verify that tx_prec_map and fifos are in sync to avoid lock ups */ | 2523 | /* Verify that tx_prec_map and fifos are in sync to avoid lock ups */ |
2540 | ASSERT(wlc_tx_prec_map_verify(wlc)); | 2524 | ASSERT(wlc_tx_prec_map_verify(wlc)); |
@@ -4228,14 +4212,12 @@ _wlc_ioctl(wlc_info_t *wlc, int cmd, void *arg, int len, struct wlc_if *wlcif) | |||
4228 | } | 4212 | } |
4229 | 4213 | ||
4230 | } | 4214 | } |
4231 | #ifdef WLC_LOW | ||
4232 | /* BMAC_NOTE: for HIGH_ONLY driver, this seems being called after RPC bus failed */ | 4215 | /* BMAC_NOTE: for HIGH_ONLY driver, this seems being called after RPC bus failed */ |
4233 | /* In hw_off condition, IOCTLs that reach here are deemed safe but taclear would | 4216 | /* In hw_off condition, IOCTLs that reach here are deemed safe but taclear would |
4234 | * certainly result in getting -1 for register reads. So skip ta_clear altogether | 4217 | * certainly result in getting -1 for register reads. So skip ta_clear altogether |
4235 | */ | 4218 | */ |
4236 | if (!(wlc->pub->hw_off)) | 4219 | if (!(wlc->pub->hw_off)) |
4237 | ASSERT(wlc_bmac_taclear(wlc->hw, ta_ok) || !ta_ok); | 4220 | ASSERT(wlc_bmac_taclear(wlc->hw, ta_ok) || !ta_ok); |
4238 | #endif | ||
4239 | 4221 | ||
4240 | return bcmerror; | 4222 | return bcmerror; |
4241 | } | 4223 | } |
diff --git a/drivers/staging/brcm80211/sys/wlc_mac80211.h b/drivers/staging/brcm80211/sys/wlc_mac80211.h index 9d0d8f336dd..04615881311 100644 --- a/drivers/staging/brcm80211/sys/wlc_mac80211.h +++ b/drivers/staging/brcm80211/sys/wlc_mac80211.h | |||
@@ -306,13 +306,11 @@ typedef struct wlc_stf { | |||
306 | * core state (mac) | 306 | * core state (mac) |
307 | */ | 307 | */ |
308 | typedef struct wlccore { | 308 | typedef struct wlccore { |
309 | #ifdef WLC_LOW | ||
310 | uint coreidx; /* # sb enumerated core */ | 309 | uint coreidx; /* # sb enumerated core */ |
311 | 310 | ||
312 | /* fifo */ | 311 | /* fifo */ |
313 | uint *txavail[NFIFO]; /* # tx descriptors available */ | 312 | uint *txavail[NFIFO]; /* # tx descriptors available */ |
314 | s16 txpktpend[NFIFO]; /* tx admission control */ | 313 | s16 txpktpend[NFIFO]; /* tx admission control */ |
315 | #endif /* WLC_LOW */ | ||
316 | 314 | ||
317 | macstat_t *macstat_snapshot; /* mac hw prev read values */ | 315 | macstat_t *macstat_snapshot; /* mac hw prev read values */ |
318 | } wlccore_t; | 316 | } wlccore_t; |
@@ -406,7 +404,6 @@ struct wlc_if { | |||
406 | /* flags for the interface */ | 404 | /* flags for the interface */ |
407 | #define WLC_IF_LINKED 0x02 /* this interface is linked to a wl_if */ | 405 | #define WLC_IF_LINKED 0x02 /* this interface is linked to a wl_if */ |
408 | 406 | ||
409 | #ifdef WLC_LOW | ||
410 | typedef struct wlc_hwband { | 407 | typedef struct wlc_hwband { |
411 | int bandtype; /* WLC_BAND_2G, WLC_BAND_5G */ | 408 | int bandtype; /* WLC_BAND_2G, WLC_BAND_5G */ |
412 | uint bandunit; /* bandstate[] index */ | 409 | uint bandunit; /* bandstate[] index */ |
@@ -423,7 +420,6 @@ typedef struct wlc_hwband { | |||
423 | wlc_phy_t *pi; /* pointer to phy specific information */ | 420 | wlc_phy_t *pi; /* pointer to phy specific information */ |
424 | bool abgphy_encore; | 421 | bool abgphy_encore; |
425 | } wlc_hwband_t; | 422 | } wlc_hwband_t; |
426 | #endif /* WLC_LOW */ | ||
427 | 423 | ||
428 | struct wlc_hw_info { | 424 | struct wlc_hw_info { |
429 | #ifdef WLC_SPLIT | 425 | #ifdef WLC_SPLIT |
@@ -436,7 +432,6 @@ struct wlc_hw_info { | |||
436 | /* fifo */ | 432 | /* fifo */ |
437 | hnddma_t *di[NFIFO]; /* hnddma handles, per fifo */ | 433 | hnddma_t *di[NFIFO]; /* hnddma handles, per fifo */ |
438 | 434 | ||
439 | #ifdef WLC_LOW | ||
440 | uint unit; /* device instance number */ | 435 | uint unit; /* device instance number */ |
441 | 436 | ||
442 | /* version info */ | 437 | /* version info */ |
@@ -502,7 +497,6 @@ struct wlc_hw_info { | |||
502 | * 0 = N/A, 1 = 2x4 board, 2 = 2x3 CB2 board | 497 | * 0 = N/A, 1 = 2x4 board, 2 = 2x3 CB2 board |
503 | */ | 498 | */ |
504 | u32 antsel_avail; /* put antsel_info_t here if more info is needed */ | 499 | u32 antsel_avail; /* put antsel_info_t here if more info is needed */ |
505 | #endif /* WLC_LOW */ | ||
506 | }; | 500 | }; |
507 | 501 | ||
508 | /* TX Queue information | 502 | /* TX Queue information |
@@ -817,11 +811,7 @@ struct antsel_info { | |||
817 | #define IS_MBAND_UNLOCKED(wlc) \ | 811 | #define IS_MBAND_UNLOCKED(wlc) \ |
818 | ((NBANDS(wlc) > 1) && !(wlc)->bandlocked) | 812 | ((NBANDS(wlc) > 1) && !(wlc)->bandlocked) |
819 | 813 | ||
820 | #ifdef WLC_LOW | ||
821 | #define WLC_BAND_PI_RADIO_CHANSPEC wlc_phy_chanspec_get(wlc->band->pi) | 814 | #define WLC_BAND_PI_RADIO_CHANSPEC wlc_phy_chanspec_get(wlc->band->pi) |
822 | #else | ||
823 | #define WLC_BAND_PI_RADIO_CHANSPEC (wlc->chanspec) | ||
824 | #endif | ||
825 | 815 | ||
826 | /* sum the individual fifo tx pending packet counts */ | 816 | /* sum the individual fifo tx pending packet counts */ |
827 | #define TXPKTPENDTOT(wlc) ((wlc)->core->txpktpend[0] + (wlc)->core->txpktpend[1] + \ | 817 | #define TXPKTPENDTOT(wlc) ((wlc)->core->txpktpend[0] + (wlc)->core->txpktpend[1] + \ |
@@ -881,10 +871,8 @@ extern void wlc_print_txdesc(d11txh_t *txh); | |||
881 | extern void wlc_print_dot11_mac_hdr(u8 *buf, int len); | 871 | extern void wlc_print_dot11_mac_hdr(u8 *buf, int len); |
882 | #endif | 872 | #endif |
883 | 873 | ||
884 | #ifdef WLC_LOW | ||
885 | extern void wlc_setxband(wlc_hw_info_t *wlc_hw, uint bandunit); | 874 | extern void wlc_setxband(wlc_hw_info_t *wlc_hw, uint bandunit); |
886 | extern void wlc_coredisable(wlc_hw_info_t *wlc_hw); | 875 | extern void wlc_coredisable(wlc_hw_info_t *wlc_hw); |
887 | #endif | ||
888 | 876 | ||
889 | extern bool wlc_valid_rate(wlc_info_t *wlc, ratespec_t rate, int band, | 877 | extern bool wlc_valid_rate(wlc_info_t *wlc, ratespec_t rate, int band, |
890 | bool verbose); | 878 | bool verbose); |
diff --git a/drivers/staging/brcm80211/sys/wlc_rpc.h b/drivers/staging/brcm80211/sys/wlc_rpc.h index db39645ccbd..e3f31d42dd8 100644 --- a/drivers/staging/brcm80211/sys/wlc_rpc.h +++ b/drivers/staging/brcm80211/sys/wlc_rpc.h | |||
@@ -480,13 +480,9 @@ static __inline int _wlc_rpc_call(struct rpc_info *rpc, rpc_buf_t *send) | |||
480 | #include <sbhndpio.h> | 480 | #include <sbhndpio.h> |
481 | #include <d11.h> | 481 | #include <d11.h> |
482 | 482 | ||
483 | #ifdef WLC_LOW | ||
484 | extern void wlc_rpc_bmac_dispatch(wlc_rpc_ctx_t *rpc_ctx, struct rpc_buf *buf); | 483 | extern void wlc_rpc_bmac_dispatch(wlc_rpc_ctx_t *rpc_ctx, struct rpc_buf *buf); |
485 | extern void wlc_rpc_bmac_dump_txfifohist(wlc_hw_info_t *wlc_hw, | 484 | extern void wlc_rpc_bmac_dump_txfifohist(wlc_hw_info_t *wlc_hw, |
486 | bool dump_clear); | 485 | bool dump_clear); |
487 | #else | ||
488 | extern void wlc_rpc_high_dispatch(wlc_rpc_ctx_t *ctx, struct rpc_buf *buf); | ||
489 | #endif | ||
490 | 486 | ||
491 | /* Packed structure for ease of transport across RPC bus along u32 boundary */ | 487 | /* Packed structure for ease of transport across RPC bus along u32 boundary */ |
492 | typedef struct wlc_rpc_txstatus { | 488 | typedef struct wlc_rpc_txstatus { |
diff --git a/drivers/staging/brcm80211/sys/wlc_types.h b/drivers/staging/brcm80211/sys/wlc_types.h index 33047ebab97..dffba3e8b62 100644 --- a/drivers/staging/brcm80211/sys/wlc_types.h +++ b/drivers/staging/brcm80211/sys/wlc_types.h | |||
@@ -35,12 +35,7 @@ typedef struct wlc_auth_info wlc_auth_info_t; | |||
35 | typedef struct supplicant supplicant_t; | 35 | typedef struct supplicant supplicant_t; |
36 | typedef struct authenticator authenticator_t; | 36 | typedef struct authenticator authenticator_t; |
37 | typedef struct antsel_info antsel_info_t; | 37 | typedef struct antsel_info antsel_info_t; |
38 | #if !defined(WLC_LOW) | ||
39 | typedef struct rpctx_info rpctx_info_t; | ||
40 | #endif | ||
41 | #ifdef WLC_LOW | ||
42 | typedef struct bmac_pmq bmac_pmq_t; | 38 | typedef struct bmac_pmq bmac_pmq_t; |
43 | #endif | ||
44 | 39 | ||
45 | struct d11init; | 40 | struct d11init; |
46 | 41 | ||