Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 247231
b: refs/heads/master
c: 030fe79
h: refs/heads/master
i:
  247229: 0c5374b
  247227: 5dc5576
  247223: 2078295
  247215: db4b9a7
  247199: e4025e5
  247167: cd7fa91
v: v3
  • Loading branch information
Amitkumar Karwar authored and John W. Linville committed Apr 28, 2011
1 parent c1f0e6a commit c228e3f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 17 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: a46b7b5c13b9ecfe2b4e045e06aaec644dcf55d8
refs/heads/master: 030fe7974f48bd86bb706ec05188ebab0cb7af80
28 changes: 12 additions & 16 deletions trunk/drivers/net/wireless/mwifiex/scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -2990,32 +2990,28 @@ mwifiex_save_curr_bcn(struct mwifiex_private *priv)
struct mwifiex_bssdescriptor *curr_bss =
&priv->curr_bss_params.bss_descriptor;

/* save the beacon buffer if it is not saved or updated */
if ((priv->curr_bcn_buf == NULL) ||
(priv->curr_bcn_size != curr_bss->beacon_buf_size) ||
(memcmp(priv->curr_bcn_buf, curr_bss->beacon_buf,
curr_bss->beacon_buf_size))) {

kfree(priv->curr_bcn_buf);
priv->curr_bcn_buf = NULL;
if (!curr_bss->beacon_buf_size)
return;

/* allocate beacon buffer at 1st time; or if it's size has changed */
if (!priv->curr_bcn_buf ||
priv->curr_bcn_size != curr_bss->beacon_buf_size) {
priv->curr_bcn_size = curr_bss->beacon_buf_size;
if (!priv->curr_bcn_size)
return;

kfree(priv->curr_bcn_buf);
priv->curr_bcn_buf = kzalloc(curr_bss->beacon_buf_size,
GFP_KERNEL);
if (!priv->curr_bcn_buf) {
dev_err(priv->adapter->dev,
"failed to alloc curr_bcn_buf\n");
} else {
memcpy(priv->curr_bcn_buf, curr_bss->beacon_buf,
curr_bss->beacon_buf_size);
dev_dbg(priv->adapter->dev,
"info: current beacon saved %d\n",
priv->curr_bcn_size);
return;
}
}

memcpy(priv->curr_bcn_buf, curr_bss->beacon_buf,
curr_bss->beacon_buf_size);
dev_dbg(priv->adapter->dev, "info: current beacon saved %d\n",
priv->curr_bcn_size);
}

/*
Expand Down

0 comments on commit c228e3f

Please sign in to comment.