diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index c3a8af081880..c8e3229a2809 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -2052,23 +2052,9 @@ static u32 WILC_HostIf_PackStaParam(u8 *pu8Buffer, pu8CurrByte += pstrStationParam->rates_len; *pu8CurrByte++ = pstrStationParam->ht_supported; - *pu8CurrByte++ = pstrStationParam->ht_capa_info & 0xFF; - *pu8CurrByte++ = (pstrStationParam->ht_capa_info >> 8) & 0xFF; - - *pu8CurrByte++ = pstrStationParam->ht_ampdu_params; - memcpy(pu8CurrByte, pstrStationParam->ht_supp_mcs_set, - WILC_SUPP_MCS_SET_SIZE); - pu8CurrByte += WILC_SUPP_MCS_SET_SIZE; - - *pu8CurrByte++ = pstrStationParam->ht_ext_params & 0xFF; - *pu8CurrByte++ = (pstrStationParam->ht_ext_params >> 8) & 0xFF; - - *pu8CurrByte++ = pstrStationParam->ht_tx_bf_cap & 0xFF; - *pu8CurrByte++ = (pstrStationParam->ht_tx_bf_cap >> 8) & 0xFF; - *pu8CurrByte++ = (pstrStationParam->ht_tx_bf_cap >> 16) & 0xFF; - *pu8CurrByte++ = (pstrStationParam->ht_tx_bf_cap >> 24) & 0xFF; - - *pu8CurrByte++ = pstrStationParam->ht_ante_sel; + memcpy(pu8CurrByte, &pstrStationParam->ht_capa, + sizeof(struct ieee80211_ht_cap)); + pu8CurrByte += sizeof(struct ieee80211_ht_cap); *pu8CurrByte++ = pstrStationParam->flags_mask & 0xFF; *pu8CurrByte++ = (pstrStationParam->flags_mask >> 8) & 0xFF; diff --git a/drivers/staging/wilc1000/host_interface.h b/drivers/staging/wilc1000/host_interface.h index f36d3b5a0370..0e72b9193734 100644 --- a/drivers/staging/wilc1000/host_interface.h +++ b/drivers/staging/wilc1000/host_interface.h @@ -1,6 +1,6 @@ #ifndef HOST_INT_H #define HOST_INT_H - +#include #include "coreconfigurator.h" #define IP_ALEN 4 @@ -47,7 +47,6 @@ #define ETH_ALEN 6 #define PMKID_LEN 16 #define WILC_MAX_NUM_PMKIDS 16 -#define WILC_SUPP_MCS_SET_SIZE 16 #define WILC_ADD_STA_LENGTH 40 #define SCAN_EVENT_DONE_ABORTED #define NUM_CONCURRENT_IFC 2 @@ -289,12 +288,7 @@ struct add_sta_param { u8 rates_len; const u8 *rates; bool ht_supported; - u16 ht_capa_info; - u8 ht_ampdu_params; - u8 ht_supp_mcs_set[16]; - u16 ht_ext_params; - u32 ht_tx_bf_cap; - u8 ht_ante_sel; + struct ieee80211_ht_cap ht_capa; u16 flags_mask; u16 flags_set; }; diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c index 44a12bdd6a46..807aada308e3 100644 --- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c @@ -2003,14 +2003,7 @@ static int add_station(struct wiphy *wiphy, struct net_device *dev, strStaParams.ht_supported = false; } else { strStaParams.ht_supported = true; - strStaParams.ht_capa_info = params->ht_capa->cap_info; - strStaParams.ht_ampdu_params = params->ht_capa->ampdu_params_info; - memcpy(strStaParams.ht_supp_mcs_set, - ¶ms->ht_capa->mcs, - WILC_SUPP_MCS_SET_SIZE); - strStaParams.ht_ext_params = params->ht_capa->extended_ht_cap_info; - strStaParams.ht_tx_bf_cap = params->ht_capa->tx_BF_cap_info; - strStaParams.ht_ante_sel = params->ht_capa->antenna_selection_info; + strStaParams.ht_capa = *params->ht_capa; } strStaParams.flags_mask = params->sta_flags_mask; @@ -2075,14 +2068,7 @@ static int change_station(struct wiphy *wiphy, struct net_device *dev, strStaParams.ht_supported = false; } else { strStaParams.ht_supported = true; - strStaParams.ht_capa_info = params->ht_capa->cap_info; - strStaParams.ht_ampdu_params = params->ht_capa->ampdu_params_info; - memcpy(strStaParams.ht_supp_mcs_set, - ¶ms->ht_capa->mcs, - WILC_SUPP_MCS_SET_SIZE); - strStaParams.ht_ext_params = params->ht_capa->extended_ht_cap_info; - strStaParams.ht_tx_bf_cap = params->ht_capa->tx_BF_cap_info; - strStaParams.ht_ante_sel = params->ht_capa->antenna_selection_info; + strStaParams.ht_capa = *params->ht_capa; } strStaParams.flags_mask = params->sta_flags_mask;