Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 268694
b: refs/heads/master
c: 019f45f
h: refs/heads/master
v: v3
  • Loading branch information
Franky Lin authored and Greg Kroah-Hartman committed Oct 5, 2011
1 parent 74e9cf1 commit 8a7e5d6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 23 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: c18692e701647e6b204dcec42eb66f325048f537
refs/heads/master: 019f45f27464e91cd1936a22600a05779bbe5573
3 changes: 3 additions & 0 deletions trunk/drivers/staging/brcm80211/brcmfmac/dhd_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#include <linux/mutex.h>
#include <linux/wait.h>
#include <net/cfg80211.h>
#include <net/rtnetlink.h>
#include <defs.h>
#include <brcmu_utils.h>
#include <brcmu_wifi.h>
Expand Down Expand Up @@ -1240,7 +1241,9 @@ void brcmf_detach(struct brcmf_pub *drvr)

ifp = drvr_priv->iflist[0];
if (ifp->ndev->netdev_ops == &brcmf_netdev_ops_pri) {
rtnl_lock();
brcmf_netdev_stop(ifp->ndev);
rtnl_unlock();
unregister_netdev(ifp->ndev);
}

Expand Down
24 changes: 2 additions & 22 deletions trunk/drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
#include <linux/ieee80211.h>
#include <linux/uaccess.h>
#include <net/cfg80211.h>
#include <net/rtnetlink.h>

#include <brcmu_utils.h>
#include <defs.h>
Expand Down Expand Up @@ -2223,10 +2222,8 @@ static s32 brcmf_iscan_done(struct brcmf_cfg80211_priv *cfg_priv)
s32 err = 0;

iscan->state = WL_ISCAN_STATE_IDLE;
rtnl_lock();
brcmf_inform_bss(cfg_priv);
brcmf_notify_iscan_complete(iscan, false);
rtnl_unlock();

return err;
}
Expand All @@ -2248,10 +2245,8 @@ static s32 brcmf_iscan_inprogress(struct brcmf_cfg80211_priv *cfg_priv)
struct brcmf_cfg80211_iscan_ctrl *iscan = cfg_priv->iscan;
s32 err = 0;

rtnl_lock();
brcmf_inform_bss(cfg_priv);
brcmf_run_iscan(iscan, NULL, BRCMF_SCAN_ACTION_CONTINUE);
rtnl_unlock();
/* Reschedule the timer */
mod_timer(&iscan->timer, jiffies + iscan->timer_ms * HZ / 1000);
iscan->timer_on = 1;
Expand All @@ -2265,9 +2260,7 @@ static s32 brcmf_iscan_aborted(struct brcmf_cfg80211_priv *cfg_priv)
s32 err = 0;

iscan->state = WL_ISCAN_STATE_IDLE;
rtnl_lock();
brcmf_notify_iscan_complete(iscan, true);
rtnl_unlock();

return err;
}
Expand All @@ -2286,12 +2279,10 @@ static void brcmf_cfg80211_iscan_handler(struct work_struct *work)
iscan->timer_on = 0;
}

rtnl_lock();
if (brcmf_get_iscan_results(iscan, &status, &cfg_priv->bss_list)) {
status = BRCMF_SCAN_RESULTS_ABORTED;
WL_ERR("Abort iscan\n");
}
rtnl_unlock();

el->handler[status](cfg_priv);
}
Expand Down Expand Up @@ -2408,9 +2399,7 @@ static s32 brcmf_cfg80211_suspend(struct wiphy *wiphy,
* generated due to DISASSOC call to the fw to keep
* the state fw and WPA_Supplicant state consistent
*/
rtnl_unlock();
brcmf_delay(500);
rtnl_lock();
}

set_bit(WL_STATUS_SCAN_ABORTING, &cfg_priv->status);
Expand Down Expand Up @@ -2978,15 +2967,13 @@ brcmf_notify_mic_status(struct brcmf_cfg80211_priv *cfg_priv,
u16 flags = be16_to_cpu(e->flags);
enum nl80211_key_type key_type;

rtnl_lock();
if (flags & BRCMF_EVENT_MSG_GROUP)
key_type = NL80211_KEYTYPE_GROUP;
else
key_type = NL80211_KEYTYPE_PAIRWISE;

cfg80211_michael_mic_failure(ndev, (u8 *)&e->addr, key_type, -1,
NULL, GFP_KERNEL);
rtnl_unlock();

return 0;
}
Expand Down Expand Up @@ -3563,8 +3550,7 @@ static s32 brcmf_dongle_probecap(struct brcmf_cfg80211_priv *cfg_priv)
return wl_update_wiphybands(cfg_priv);
}

static s32 brcmf_config_dongle(struct brcmf_cfg80211_priv *cfg_priv,
bool need_lock)
static s32 brcmf_config_dongle(struct brcmf_cfg80211_priv *cfg_priv)
{
struct net_device *ndev;
struct wireless_dev *wdev;
Expand All @@ -3576,8 +3562,6 @@ static s32 brcmf_config_dongle(struct brcmf_cfg80211_priv *cfg_priv,

ndev = cfg_to_ndev(cfg_priv);
wdev = ndev->ieee80211_ptr;
if (need_lock)
rtnl_lock();

brcmf_dongle_scantime(ndev, WL_SCAN_CHANNEL_TIME,
WL_SCAN_UNASSOC_TIME, WL_SCAN_PASSIVE_TIME);
Expand Down Expand Up @@ -3607,8 +3591,6 @@ static s32 brcmf_config_dongle(struct brcmf_cfg80211_priv *cfg_priv,
/* -EINPROGRESS: Call commit handler */

default_conf_out:
if (need_lock)
rtnl_unlock();

cfg_priv->dongle_up = true;

Expand Down Expand Up @@ -3658,7 +3640,7 @@ static s32 __brcmf_cfg80211_up(struct brcmf_cfg80211_priv *cfg_priv)

brcmf_debugfs_add_netdev_params(cfg_priv);

err = brcmf_config_dongle(cfg_priv, false);
err = brcmf_config_dongle(cfg_priv);
if (err)
return err;

Expand All @@ -3683,9 +3665,7 @@ static s32 __brcmf_cfg80211_down(struct brcmf_cfg80211_priv *cfg_priv)
generated due to DISASSOC call to the fw to keep
the state fw and WPA_Supplicant state consistent
*/
rtnl_unlock();
brcmf_delay(500);
rtnl_lock();
}

set_bit(WL_STATUS_SCAN_ABORTING, &cfg_priv->status);
Expand Down

0 comments on commit 8a7e5d6

Please sign in to comment.