提交 9ee66d1b 编写于 作者: H Hante Meuleman 提交者: 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: NArend Van Spriel <arend@broadcom.com>
Reviewed-by: NFranky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: NPieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: NDaniel (Deognyoun) Kim <dekim@broadcom.com>
Signed-off-by: NHante Meuleman <meuleman@broadcom.com>
Signed-off-by: NArend van Spriel <arend@broadcom.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
反馈
建议
客服 返回
顶部