Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 259752
b: refs/heads/master
c: 47a6d2c
h: refs/heads/master
v: v3
  • Loading branch information
Arend van Spriel authored and Greg Kroah-Hartman committed Jul 5, 2011
1 parent 85d80f3 commit 34c1ac0
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 52 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f10c5b0b419116015bd2bfc2b054a81f7a690ca8
refs/heads/master: 47a6d2cdc703d16b29114a551218e34d43007ae4
50 changes: 50 additions & 0 deletions trunk/drivers/staging/brcm80211/brcmfmac/dhd_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@
#define EPI_VERSION_STR "4.218.248.5"
#define ETH_P_BRCM 0x886c

/* Global ASSERT type flag */
u32 g_assert_type;

#if defined(CUSTOMER_HW2) && defined(CONFIG_WIFI_CONTROL_FUNC)
#include <linux/wifi_tiwlan.h>

Expand Down Expand Up @@ -2766,3 +2769,50 @@ int write_to_file(dhd_pub_t *dhd, u8 *buf, int size)
return ret;
}
#endif /* DHD_DEBUG */

#if defined(BCMDBG)
void osl_assert(char *exp, char *file, int line)
{
char tempbuf[256];
char *basename;

basename = strrchr(file, '/');
/* skip the '/' */
if (basename)
basename++;

if (!basename)
basename = file;

snprintf(tempbuf, 256,
"assertion \"%s\" failed: file \"%s\", line %d\n", exp,
basename, line);

/*
* Print assert message and give it time to
* be written to /var/log/messages
*/
if (!in_interrupt()) {
const int delay = 3;
printk(KERN_ERR "%s", tempbuf);
printk(KERN_ERR "panic in %d seconds\n", delay);
set_current_state(TASK_INTERRUPTIBLE);
schedule_timeout(delay * HZ);
}

switch (g_assert_type) {
case 0:
panic(KERN_ERR "%s", tempbuf);
break;
case 1:
printk(KERN_ERR "%s", tempbuf);
BUG();
break;
case 2:
printk(KERN_ERR "%s", tempbuf);
break;
default:
break;
}
}
#endif /* defined(BCMDBG) */
51 changes: 0 additions & 51 deletions trunk/drivers/staging/brcm80211/brcmfmac/wl_iw.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,6 @@ typedef enum sup_auth_status {

static const u8 ether_bcast[ETH_ALEN] = {255, 255, 255, 255, 255, 255};

/* Global ASSERT type flag */
u32 g_assert_type;

static void wl_iw_timerfunc(unsigned long data);
static void wl_iw_set_event_mask(struct net_device *dev);
static int wl_iw_iscan(iscan_info_t *iscan, wlc_ssid_t *ssid, u16 action);
Expand Down Expand Up @@ -3659,53 +3656,5 @@ void wl_iw_detach(void)
#endif /* WL_IW_USE_ISCAN */

kfree(g_scan);

g_scan = NULL;
}

#if defined(BCMDBG)
void osl_assert(char *exp, char *file, int line)
{
char tempbuf[256];
char *basename;

basename = strrchr(file, '/');
/* skip the '/' */
if (basename)
basename++;

if (!basename)
basename = file;

snprintf(tempbuf, 256,
"assertion \"%s\" failed: file \"%s\", line %d\n", exp,
basename, line);

/*
* Print assert message and give it time to
* be written to /var/log/messages
*/
if (!in_interrupt()) {
const int delay = 3;
printk(KERN_ERR "%s", tempbuf);
printk(KERN_ERR "panic in %d seconds\n", delay);
set_current_state(TASK_INTERRUPTIBLE);
schedule_timeout(delay * HZ);
}

switch (g_assert_type) {
case 0:
panic(KERN_ERR "%s", tempbuf);
break;
case 1:
printk(KERN_ERR "%s", tempbuf);
BUG();
break;
case 2:
printk(KERN_ERR "%s", tempbuf);
break;
default:
break;
}
}
#endif /* defined(BCMDBG) */

0 comments on commit 34c1ac0

Please sign in to comment.