* to FW.
*/
int mwifiex_set_mgmt_ies(struct mwifiex_private *priv,
- struct cfg80211_ap_settings *params)
+ struct cfg80211_beacon_data *data)
{
struct mwifiex_ie *beacon_ie = NULL, *pr_ie = NULL;
struct mwifiex_ie *ar_ie = NULL, *gen_ie = NULL;
const u8 *vendor_ie;
int ret = 0;
- if (params->beacon.tail && params->beacon.tail_len) {
+ if (data->tail && data->tail_len) {
gen_ie = kzalloc(sizeof(struct mwifiex_ie), GFP_KERNEL);
if (!gen_ie)
return -ENOMEM;
gen_ie->mgmt_subtype_mask = cpu_to_le16(mask);
rsn_ie = (void *)cfg80211_find_ie(WLAN_EID_RSN,
- params->beacon.tail,
- params->beacon.tail_len);
+ data->tail, data->tail_len);
if (rsn_ie) {
memcpy(gen_ie->ie_buffer, rsn_ie, rsn_ie->len + 2);
ie_len = rsn_ie->len + 2;
vendor_ie = cfg80211_find_vendor_ie(WLAN_OUI_MICROSOFT,
WLAN_OUI_TYPE_MICROSOFT_WPA,
- params->beacon.tail,
- params->beacon.tail_len);
+ data->tail, data->tail_len);
if (vendor_ie) {
wpa_ie = (struct ieee_types_header *)vendor_ie;
memcpy(gen_ie->ie_buffer + ie_len,
}
}
- if (params->beacon.beacon_ies && params->beacon.beacon_ies_len) {
+ if (data->beacon_ies && data->beacon_ies_len) {
beacon_ie = kmalloc(sizeof(struct mwifiex_ie), GFP_KERNEL);
if (!beacon_ie) {
ret = -ENOMEM;
beacon_ie->ie_index = cpu_to_le16(beacon_idx);
beacon_ie->mgmt_subtype_mask = cpu_to_le16(MGMT_MASK_BEACON);
- beacon_ie->ie_length =
- cpu_to_le16(params->beacon.beacon_ies_len);
- memcpy(beacon_ie->ie_buffer, params->beacon.beacon_ies,
- params->beacon.beacon_ies_len);
+ beacon_ie->ie_length = cpu_to_le16(data->beacon_ies_len);
+ memcpy(beacon_ie->ie_buffer, data->beacon_ies,
+ data->beacon_ies_len);
}
- if (params->beacon.proberesp_ies && params->beacon.proberesp_ies_len) {
+ if (data->proberesp_ies && data->proberesp_ies_len) {
pr_ie = kmalloc(sizeof(struct mwifiex_ie), GFP_KERNEL);
if (!pr_ie) {
ret = -ENOMEM;
pr_ie->ie_index = cpu_to_le16(pr_idx);
pr_ie->mgmt_subtype_mask = cpu_to_le16(MGMT_MASK_PROBE_RESP);
- pr_ie->ie_length =
- cpu_to_le16(params->beacon.proberesp_ies_len);
- memcpy(pr_ie->ie_buffer, params->beacon.proberesp_ies,
- params->beacon.proberesp_ies_len);
+ pr_ie->ie_length = cpu_to_le16(data->proberesp_ies_len);
+ memcpy(pr_ie->ie_buffer, data->proberesp_ies,
+ data->proberesp_ies_len);
}
- if (params->beacon.assocresp_ies && params->beacon.assocresp_ies_len) {
+ if (data->assocresp_ies && data->assocresp_ies_len) {
ar_ie = kmalloc(sizeof(struct mwifiex_ie), GFP_KERNEL);
if (!ar_ie) {
ret = -ENOMEM;
ar_ie->ie_index = cpu_to_le16(ar_idx);
mask = MGMT_MASK_ASSOC_RESP | MGMT_MASK_REASSOC_RESP;
ar_ie->mgmt_subtype_mask = cpu_to_le16(mask);
- ar_ie->ie_length =
- cpu_to_le16(params->beacon.assocresp_ies_len);
- memcpy(ar_ie->ie_buffer, params->beacon.assocresp_ies,
- params->beacon.assocresp_ies_len);
+ ar_ie->ie_length = cpu_to_le16(data->assocresp_ies_len);
+ memcpy(ar_ie->ie_buffer, data->assocresp_ies,
+ data->assocresp_ies_len);
}
if (beacon_ie || pr_ie || ar_ie) {