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: Arend Van Spriel <arend@broadcom.com> Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Daniel (Deognyoun) Kim <dekim@broadcom.com> Signed-off-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
f783807308
commit
9ee66d1bb6
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue