提交 8ff5dc92 编写于 作者: A Arend van Spriel 提交者: John W. Linville

brcmfmac: store IEs per virtual interface

For AP feature the IEs are stored in global structure. For future
functionality like P2P-GO it needs to be stored per virtual interface
so better store it in the virtual interface structure.
Reviewed-by: NHante Meuleman <meuleman@broadcom.com>
Reviewed-by: NPieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: NArend van Spriel <arend@broadcom.com>
Signed-off-by: NFranky Lin <frankyl@broadcom.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 823e1c81
...@@ -3774,6 +3774,7 @@ brcmf_set_management_ie(struct brcmf_cfg80211_info *cfg, ...@@ -3774,6 +3774,7 @@ brcmf_set_management_ie(struct brcmf_cfg80211_info *cfg,
u8 *vndr_ie_buf, u32 vndr_ie_len) u8 *vndr_ie_buf, u32 vndr_ie_len)
{ {
struct brcmf_if *ifp = netdev_priv(ndev); struct brcmf_if *ifp = netdev_priv(ndev);
struct vif_saved_ie *saved_ie = &ifp->vif->saved_ie;
s32 err = 0; s32 err = 0;
u8 *iovar_ie_buf; u8 *iovar_ie_buf;
u8 *curr_ie_buf; u8 *curr_ie_buf;
...@@ -3796,18 +3797,17 @@ brcmf_set_management_ie(struct brcmf_cfg80211_info *cfg, ...@@ -3796,18 +3797,17 @@ brcmf_set_management_ie(struct brcmf_cfg80211_info *cfg,
if (!iovar_ie_buf) if (!iovar_ie_buf)
return -ENOMEM; return -ENOMEM;
curr_ie_buf = iovar_ie_buf; curr_ie_buf = iovar_ie_buf;
if (test_bit(BRCMF_VIF_STATUS_AP_CREATING, &ifp->vif->sme_state) || if (ifp->vif->mode == WL_MODE_AP) {
test_bit(BRCMF_VIF_STATUS_AP_CREATED, &ifp->vif->sme_state)) {
switch (pktflag) { switch (pktflag) {
case VNDR_IE_PRBRSP_FLAG: case VNDR_IE_PRBRSP_FLAG:
mgmt_ie_buf = cfg->ap_info->probe_res_ie; mgmt_ie_buf = saved_ie->probe_res_ie;
mgmt_ie_len = &cfg->ap_info->probe_res_ie_len; mgmt_ie_len = &saved_ie->probe_res_ie_len;
mgmt_ie_buf_len = sizeof(cfg->ap_info->probe_res_ie); mgmt_ie_buf_len = sizeof(saved_ie->probe_res_ie);
break; break;
case VNDR_IE_BEACON_FLAG: case VNDR_IE_BEACON_FLAG:
mgmt_ie_buf = cfg->ap_info->beacon_ie; mgmt_ie_buf = saved_ie->beacon_ie;
mgmt_ie_len = &cfg->ap_info->beacon_ie_len; mgmt_ie_len = &saved_ie->beacon_ie_len;
mgmt_ie_buf_len = sizeof(cfg->ap_info->beacon_ie); mgmt_ie_buf_len = sizeof(saved_ie->beacon_ie);
break; break;
default: default:
err = -EPERM; err = -EPERM;
......
...@@ -231,6 +231,21 @@ enum brcmf_vif_status { ...@@ -231,6 +231,21 @@ enum brcmf_vif_status {
BRCMF_VIF_STATUS_AP_CREATED BRCMF_VIF_STATUS_AP_CREATED
}; };
/**
* struct vif_saved_ie - holds saved IEs for a virtual interface.
*
* @probe_res_ie: IE info for probe response.
* @beacon_ie: IE info for beacon frame.
* @probe_res_ie_len: IE info length for probe response.
* @beacon_ie_len: IE info length for beacon frame.
*/
struct vif_saved_ie {
u8 probe_res_ie[IE_MAX_LEN];
u8 beacon_ie[IE_MAX_LEN];
u32 probe_res_ie_len;
u32 beacon_ie_len;
};
/** /**
* struct brcmf_cfg80211_vif - virtual interface specific information. * struct brcmf_cfg80211_vif - virtual interface specific information.
* *
...@@ -251,6 +266,7 @@ struct brcmf_cfg80211_vif { ...@@ -251,6 +266,7 @@ struct brcmf_cfg80211_vif {
s32 roam_off; s32 roam_off;
unsigned long sme_state; unsigned long sme_state;
bool pm_block; bool pm_block;
struct vif_saved_ie saved_ie;
struct list_head list; struct list_head list;
}; };
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册