Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 215344
b: refs/heads/master
c: 7783454
h: refs/heads/master
v: v3
  • Loading branch information
Johannes Berg authored and Wey-Yi Guy committed Oct 14, 2010
1 parent e2f2188 commit f5fb26f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 15 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: 12e934dc602fafba946b33587c38077ebceb3698
refs/heads/master: 77834543a5278b55df6c2784cd5ed59970be3c44
25 changes: 11 additions & 14 deletions trunk/drivers/net/wireless/iwlwifi/iwl-agn.c
Original file line number Diff line number Diff line change
Expand Up @@ -314,9 +314,11 @@ static void iwl_free_frame(struct iwl_priv *priv, struct iwl_frame *frame)
}

static u32 iwl_fill_beacon_frame(struct iwl_priv *priv,
struct ieee80211_hdr *hdr,
int left)
struct ieee80211_hdr *hdr,
int left)
{
lockdep_assert_held(&priv->mutex);

if (!priv->beacon_skb)
return 0;

Expand All @@ -330,8 +332,8 @@ static u32 iwl_fill_beacon_frame(struct iwl_priv *priv,

/* Parse the beacon frame to find the TIM element and set tim_idx & tim_size */
static void iwl_set_beacon_tim(struct iwl_priv *priv,
struct iwl_tx_beacon_cmd *tx_beacon_cmd,
u8 *beacon, u32 frame_size)
struct iwl_tx_beacon_cmd *tx_beacon_cmd,
u8 *beacon, u32 frame_size)
{
u16 tim_idx;
struct ieee80211_mgmt *mgmt = (struct ieee80211_mgmt *)beacon;
Expand Down Expand Up @@ -393,7 +395,7 @@ static unsigned int iwl_hw_get_beacon_cmd(struct iwl_priv *priv,

/* Set up TX beacon command fields */
iwl_set_beacon_tim(priv, tx_beacon_cmd, (u8 *)tx_beacon_cmd->frame,
frame_size);
frame_size);

/* Set up packet rate and flags */
rate = iwl_rate_get_lowest_plcp(priv, priv->beacon_ctx);
Expand Down Expand Up @@ -648,13 +650,12 @@ static void iwl_bg_beacon_update(struct work_struct *work)
/* Pull updated AP beacon from mac80211. will fail if not in AP mode */
beacon = ieee80211_beacon_get(priv->hw, priv->beacon_ctx->vif);
if (!beacon) {
IWL_ERR(priv, "update beacon failed\n");
IWL_ERR(priv, "update beacon failed -- keeping old\n");
goto out;
}

/* new beacon skb is allocated every time; dispose previous.*/
if (priv->beacon_skb)
dev_kfree_skb(priv->beacon_skb);
dev_kfree_skb(priv->beacon_skb);

priv->beacon_skb = beacon;

Expand Down Expand Up @@ -2993,8 +2994,7 @@ static void __iwl_down(struct iwl_priv *priv)
exit:
memset(&priv->card_alive, 0, sizeof(struct iwl_alive_resp));

if (priv->beacon_skb)
dev_kfree_skb(priv->beacon_skb);
dev_kfree_skb(priv->beacon_skb);
priv->beacon_skb = NULL;

/* clear out any free frames */
Expand Down Expand Up @@ -4131,8 +4131,6 @@ static int iwl_init_drv(struct iwl_priv *priv)
{
int ret;

priv->beacon_skb = NULL;

spin_lock_init(&priv->sta_lock);
spin_lock_init(&priv->hcmd_lock);

Expand Down Expand Up @@ -4645,8 +4643,7 @@ static void __devexit iwl_pci_remove(struct pci_dev *pdev)

iwl_free_isr_ict(priv);

if (priv->beacon_skb)
dev_kfree_skb(priv->beacon_skb);
dev_kfree_skb(priv->beacon_skb);

ieee80211_free_hw(priv->hw);
}
Expand Down

0 comments on commit f5fb26f

Please sign in to comment.