Commit 1070137d authored by Brett Rudley's avatar Brett Rudley Committed by Greg Kroah-Hartman

staging: brcm80211: expose osl contents and start combining osl and pub_osl.

Signed-off-by: default avatarBrett Rudley <brudley@broadcom.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 2e316139
...@@ -54,19 +54,6 @@ extern void osl_pci_write_config(osl_t *osh, uint offset, uint size, uint val); ...@@ -54,19 +54,6 @@ extern void osl_pci_write_config(osl_t *osh, uint offset, uint size, uint val);
extern uint osl_pci_bus(osl_t *osh); extern uint osl_pci_bus(osl_t *osh);
extern uint osl_pci_slot(osl_t *osh); extern uint osl_pci_slot(osl_t *osh);
/* Pkttag flag should be part of public information */
typedef struct {
uint pktalloced; /* Number of allocated packet buffers */
bool mmbus; /* Bus supports memory-mapped register accesses */
pktfree_cb_fn_t tx_fn; /* Callback function for PKTFREE */
void *tx_ctx; /* Context to the callback function */
#if defined(BCMSDIO) && !defined(BRCM_FULLMAC)
osl_rreg_fn_t rreg_fn; /* Read Register function */
osl_wreg_fn_t wreg_fn; /* Write Register function */
void *reg_ctx; /* Context to the reg callback functions */
#endif
} osl_pubinfo_t;
#define PKTFREESETCB(osh, _tx_fn, _tx_ctx) \ #define PKTFREESETCB(osh, _tx_fn, _tx_ctx) \
do { \ do { \
((osl_pubinfo_t *)osh)->tx_fn = _tx_fn; \ ((osl_pubinfo_t *)osh)->tx_fn = _tx_fn; \
......
...@@ -17,12 +17,34 @@ ...@@ -17,12 +17,34 @@
#ifndef _osl_h_ #ifndef _osl_h_
#define _osl_h_ #define _osl_h_
/* Drivers use PKTFREESETCB to register a callback function
when a packet is freed by OSL */
typedef void (*pktfree_cb_fn_t) (void *ctx, void *pkt, unsigned int status);
struct osl_pubinfo {
uint pktalloced; /* Number of allocated packet buffers */
bool mmbus; /* Bus supports memory-mapped registers */
pktfree_cb_fn_t tx_fn; /* Callback function for PKTFREE */
void *tx_ctx; /* Context to the callback function */
#if defined(BCMSDIO) && !defined(BRCM_FULLMAC)
osl_rreg_fn_t rreg_fn; /* Read Register function */
osl_wreg_fn_t wreg_fn; /* Write Register function */
void *reg_ctx; /* Context to the reg callback functions */
#endif
};
/* osl handle type forward declaration */ /* osl handle type forward declaration */
struct osl_info {
struct osl_pubinfo pub;
uint magic;
void *pdev;
uint bustype;
};
typedef struct osl_info osl_t; typedef struct osl_info osl_t;
typedef struct osl_pubinfo osl_pubinfo_t;
typedef struct osl_dmainfo osldma_t; typedef struct osl_dmainfo osldma_t;
/* Drivers use PKTFREESETCB to register a callback function when a packet is freed by OSL */
typedef void (*pktfree_cb_fn_t) (void *ctx, void *pkt, unsigned int status);
#ifdef BCMSDIO #ifdef BCMSDIO
/* Drivers use REGOPSSET() to register register read/write funcitons */ /* Drivers use REGOPSSET() to register register read/write funcitons */
......
...@@ -33,13 +33,6 @@ ...@@ -33,13 +33,6 @@
#define OS_HANDLE_MAGIC 0x1234abcd /* Magic # to recognise osh */ #define OS_HANDLE_MAGIC 0x1234abcd /* Magic # to recognise osh */
#define BCM_MEM_FILENAME_LEN 24 /* Mem. filename length */ #define BCM_MEM_FILENAME_LEN 24 /* Mem. filename length */
struct osl_info {
osl_pubinfo_t pub;
uint magic;
void *pdev;
uint bustype;
};
/* Global ASSERT type flag */ /* Global ASSERT type flag */
u32 g_assert_type; u32 g_assert_type;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment