Commit 9ee66d1b authored by Hante Meuleman's avatar Hante Meuleman Committed by John W. Linville

brcmfmac: expand sta info to report dtim and beacon period.

Expand the get_station command to also report dtim period and
beacon interval when the device is connected.
Reviewed-by: default avatarArend Van Spriel <arend@broadcom.com>
Reviewed-by: default avatarFranky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: default avatarPieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: default avatarDaniel (Deognyoun) Kim <dekim@broadcom.com>
Signed-off-by: default avatarHante Meuleman <meuleman@broadcom.com>
Signed-off-by: default avatarArend van Spriel <arend@broadcom.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent f7838073
......@@ -2163,6 +2163,8 @@ brcmf_cfg80211_get_station(struct wiphy *wiphy, struct net_device *ndev,
s32 err = 0;
u8 *bssid = profile->bssid;
struct brcmf_sta_info_le sta_info_le;
u32 beacon_period;
u32 dtim_period;
brcmf_dbg(TRACE, "Enter, MAC %pM\n", mac);
if (!check_vif_up(ifp->vif))
......@@ -2217,6 +2219,30 @@ brcmf_cfg80211_get_station(struct wiphy *wiphy, struct net_device *ndev,
sinfo->signal = rssi;
brcmf_dbg(CONN, "RSSI %d dBm\n", rssi);
}
err = brcmf_fil_cmd_int_get(ifp, BRCMF_C_GET_BCNPRD,
&beacon_period);
if (err) {
brcmf_err("Could not get beacon period (%d)\n",
err);
goto done;
} else {
sinfo->bss_param.beacon_interval =
beacon_period;
brcmf_dbg(CONN, "Beacon peroid %d\n",
beacon_period);
}
err = brcmf_fil_cmd_int_get(ifp, BRCMF_C_GET_DTIMPRD,
&dtim_period);
if (err) {
brcmf_err("Could not get DTIM period (%d)\n",
err);
goto done;
} else {
sinfo->bss_param.dtim_period = dtim_period;
brcmf_dbg(CONN, "DTIM peroid %d\n",
dtim_period);
}
sinfo->filled |= STATION_INFO_BSS_PARAM;
}
} else
err = -EPERM;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment