Skip to content

Commit

Permalink
mwifiex: remove unnecessary free_priv handler
Browse files Browse the repository at this point in the history
Cfg80211 stack allocates private area for driver use in
struct cfg80211_bss. It will be freed by stack in bss_release().
Driver don't need to worry about it.

In mwifiex driver, we use the private area just to store band
information(u8). We don't allocate memory explicitly and store
it's pointer in bss->priv. Hence we don't have any cleanup work
to do in free_priv handler. Currently we try to free the allocated
private area in free_priv handler which is not correct.

This patch removes unnecessary free_priv handler.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Amitkumar Karwar authored and John W. Linville committed Nov 11, 2011
1 parent 8ed1303 commit f72fa45
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions drivers/net/wireless/mwifiex/scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -1535,11 +1535,6 @@ mwifiex_update_curr_bss_params(struct mwifiex_private *priv, u8 *bssid,
return 0;
}

static void mwifiex_free_bss_priv(struct cfg80211_bss *bss)
{
kfree(bss->priv);
}

/*
* This function handles the command response of scan.
*
Expand Down Expand Up @@ -1765,7 +1760,6 @@ int mwifiex_ret_802_11_scan(struct mwifiex_private *priv,
cap_info_bitmap, beacon_period,
ie_buf, ie_len, rssi, GFP_KERNEL);
*(u8 *)bss->priv = band;
bss->free_priv = mwifiex_free_bss_priv;

if (priv->media_connected && !memcmp(bssid,
priv->curr_bss_params.bss_descriptor
Expand Down

0 comments on commit f72fa45

Please sign in to comment.