Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 352619
b: refs/heads/master
c: 426d0a5
h: refs/heads/master
i:
  352617: 21d5448
  352615: 4cac897
v: v3
  • Loading branch information
Hante Meuleman authored and John W. Linville committed Feb 8, 2013
1 parent 7e3cc08 commit 4f187fb
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 38 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: 2fde59d93f8ac5525213996b5e98efb8f4d8c88c
refs/heads/master: 426d0a562945f9e0391bf685940dfad01e1200dc
51 changes: 14 additions & 37 deletions trunk/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -3655,7 +3655,6 @@ static s32
brcmf_cfg80211_start_ap(struct wiphy *wiphy, struct net_device *ndev,
struct cfg80211_ap_settings *settings)
{
struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy);
s32 ie_offset;
struct brcmf_if *ifp = netdev_priv(ndev);
struct brcmf_tlv *ssid_ie;
Expand All @@ -3675,22 +3674,7 @@ brcmf_cfg80211_start_ap(struct wiphy *wiphy, struct net_device *ndev,
settings->ssid, settings->ssid_len, settings->auth_type,
settings->inactivity_timeout);

if (ifp->vif == cfg->p2p.bss_idx[P2PAPI_BSSCFG_PRIMARY].vif) {
brcmf_dbg(TRACE, "Role = AP\n");
dev_role = NL80211_IFTYPE_AP;
if (!test_bit(BRCMF_VIF_STATUS_AP_CREATING,
&ifp->vif->sme_state)) {
brcmf_err("Not in AP creation mode\n");
return -EPERM;
}
} else {
brcmf_dbg(TRACE, "Role = P2P GO\n");
dev_role = NL80211_IFTYPE_P2P_GO;
if (ifp->vif == cfg->p2p.bss_idx[P2PAPI_BSSCFG_DEVICE].vif) {
ifp = cfg->p2p.bss_idx[P2PAPI_BSSCFG_PRIMARY].vif->ifp;
ndev = ifp->ndev;
}
}
dev_role = ifp->vif->wdev.iftype;

memset(&ssid_le, 0, sizeof(ssid_le));
if (settings->ssid == NULL || settings->ssid_len == 0) {
Expand Down Expand Up @@ -3826,10 +3810,11 @@ static int brcmf_cfg80211_stop_ap(struct wiphy *wiphy, struct net_device *ndev)
{
struct brcmf_if *ifp = netdev_priv(ndev);
s32 err = -EPERM;
struct brcmf_fil_bss_enable_le bss_enable;

brcmf_dbg(TRACE, "Enter\n");

if (ifp->vif->mode == WL_MODE_AP) {
if (ifp->vif->wdev.iftype == NL80211_IFTYPE_AP) {
/* Due to most likely deauths outstanding we sleep */
/* first to make sure they get processed by fw. */
msleep(400);
Expand All @@ -3843,10 +3828,18 @@ static int brcmf_cfg80211_stop_ap(struct wiphy *wiphy, struct net_device *ndev)
brcmf_err("BRCMF_C_UP error %d\n", err);
goto exit;
}
brcmf_set_mpc(ndev, 1);
clear_bit(BRCMF_VIF_STATUS_AP_CREATING, &ifp->vif->sme_state);
clear_bit(BRCMF_VIF_STATUS_AP_CREATED, &ifp->vif->sme_state);
} else {
bss_enable.bsscfg_idx = cpu_to_le32(ifp->bssidx);
bss_enable.enable = cpu_to_le32(0);
err = brcmf_fil_iovar_data_set(ifp, "bss", &bss_enable,
sizeof(bss_enable));
if (err < 0)
brcmf_err("bss_enable config failed %d\n", err);
}
brcmf_set_mpc(ndev, 1);
set_bit(BRCMF_VIF_STATUS_AP_CREATING, &ifp->vif->sme_state);
clear_bit(BRCMF_VIF_STATUS_AP_CREATED, &ifp->vif->sme_state);

exit:
return err;
}
Expand All @@ -3855,27 +3848,11 @@ static s32
brcmf_cfg80211_change_beacon(struct wiphy *wiphy, struct net_device *ndev,
struct cfg80211_beacon_data *info)
{
struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy);
struct brcmf_if *ifp = netdev_priv(ndev);
s32 err;

brcmf_dbg(TRACE, "Enter\n");

if (ifp->vif == cfg->p2p.bss_idx[P2PAPI_BSSCFG_PRIMARY].vif) {
brcmf_dbg(TRACE, "Role = AP\n");
if (!test_bit(BRCMF_VIF_STATUS_AP_CREATED,
&ifp->vif->sme_state)) {
brcmf_err("AP was not yet created\n");
return -EPERM;
}
} else {
brcmf_dbg(TRACE, "Role = P2P GO\n");
if (ifp->vif == cfg->p2p.bss_idx[P2PAPI_BSSCFG_DEVICE].vif) {
ifp = cfg->p2p.bss_idx[P2PAPI_BSSCFG_PRIMARY].vif->ifp;
ndev = ifp->ndev;
}
}

err = brcmf_config_ap_mgmt_ie(ifp->vif, info);

return err;
Expand Down

0 comments on commit 4f187fb

Please sign in to comment.