Commit e734223c authored by Leo Kim's avatar Leo Kim Committed by Greg Kroah-Hartman

staging: wilc1000: rename u8NumRates of struct add_sta_param

This patch renames u8NumRates of struct add_sta_param to rates_len
to avoid CamelCase naming convention.
Signed-off-by: default avatarLeo Kim <leo.kim@atmel.com>
Signed-off-by: default avatarGlen Lee <glen.lee@atmel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 4101eb8a
...@@ -2314,10 +2314,11 @@ static u32 WILC_HostIf_PackStaParam(u8 *pu8Buffer, ...@@ -2314,10 +2314,11 @@ static u32 WILC_HostIf_PackStaParam(u8 *pu8Buffer,
*pu8CurrByte++ = pstrStationParam->aid & 0xFF; *pu8CurrByte++ = pstrStationParam->aid & 0xFF;
*pu8CurrByte++ = (pstrStationParam->aid >> 8) & 0xFF; *pu8CurrByte++ = (pstrStationParam->aid >> 8) & 0xFF;
*pu8CurrByte++ = pstrStationParam->u8NumRates; *pu8CurrByte++ = pstrStationParam->rates_len;
if (pstrStationParam->u8NumRates > 0) if (pstrStationParam->rates_len > 0)
memcpy(pu8CurrByte, pstrStationParam->pu8Rates, pstrStationParam->u8NumRates); memcpy(pu8CurrByte, pstrStationParam->pu8Rates,
pu8CurrByte += pstrStationParam->u8NumRates; pstrStationParam->rates_len);
pu8CurrByte += pstrStationParam->rates_len;
*pu8CurrByte++ = pstrStationParam->bIsHTSupported; *pu8CurrByte++ = pstrStationParam->bIsHTSupported;
*pu8CurrByte++ = pstrStationParam->u16HTCapInfo & 0xFF; *pu8CurrByte++ = pstrStationParam->u16HTCapInfo & 0xFF;
...@@ -2356,7 +2357,7 @@ static void Handle_AddStation(struct host_if_drv *hif_drv, ...@@ -2356,7 +2357,7 @@ static void Handle_AddStation(struct host_if_drv *hif_drv,
PRINT_D(HOSTINF_DBG, "Handling add station\n"); PRINT_D(HOSTINF_DBG, "Handling add station\n");
wid.id = (u16)WID_ADD_STA; wid.id = (u16)WID_ADD_STA;
wid.type = WID_BIN; wid.type = WID_BIN;
wid.size = WILC_ADD_STA_LENGTH + pstrStationParam->u8NumRates; wid.size = WILC_ADD_STA_LENGTH + pstrStationParam->rates_len;
wid.val = kmalloc(wid.size, GFP_KERNEL); wid.val = kmalloc(wid.size, GFP_KERNEL);
if (!wid.val) if (!wid.val)
...@@ -2457,7 +2458,7 @@ static void Handle_EditStation(struct host_if_drv *hif_drv, ...@@ -2457,7 +2458,7 @@ static void Handle_EditStation(struct host_if_drv *hif_drv,
wid.id = (u16)WID_EDIT_STA; wid.id = (u16)WID_EDIT_STA;
wid.type = WID_BIN; wid.type = WID_BIN;
wid.size = WILC_ADD_STA_LENGTH + pstrStationParam->u8NumRates; wid.size = WILC_ADD_STA_LENGTH + pstrStationParam->rates_len;
PRINT_D(HOSTINF_DBG, "Handling edit station\n"); PRINT_D(HOSTINF_DBG, "Handling edit station\n");
wid.val = kmalloc(wid.size, GFP_KERNEL); wid.val = kmalloc(wid.size, GFP_KERNEL);
...@@ -4545,13 +4546,14 @@ s32 host_int_add_station(struct host_if_drv *hif_drv, ...@@ -4545,13 +4546,14 @@ s32 host_int_add_station(struct host_if_drv *hif_drv,
msg.drv = hif_drv; msg.drv = hif_drv;
memcpy(pstrAddStationMsg, pstrStaParams, sizeof(struct add_sta_param)); memcpy(pstrAddStationMsg, pstrStaParams, sizeof(struct add_sta_param));
if (pstrAddStationMsg->u8NumRates > 0) { if (pstrAddStationMsg->rates_len > 0) {
u8 *rates = kmalloc(pstrAddStationMsg->u8NumRates, GFP_KERNEL); u8 *rates = kmalloc(pstrAddStationMsg->rates_len, GFP_KERNEL);
if (!rates) if (!rates)
return -ENOMEM; return -ENOMEM;
memcpy(rates, pstrStaParams->pu8Rates, pstrAddStationMsg->u8NumRates); memcpy(rates, pstrStaParams->pu8Rates,
pstrAddStationMsg->rates_len);
pstrAddStationMsg->pu8Rates = rates; pstrAddStationMsg->pu8Rates = rates;
} }
...@@ -4661,13 +4663,14 @@ s32 host_int_edit_station(struct host_if_drv *hif_drv, ...@@ -4661,13 +4663,14 @@ s32 host_int_edit_station(struct host_if_drv *hif_drv,
msg.drv = hif_drv; msg.drv = hif_drv;
memcpy(pstrAddStationMsg, pstrStaParams, sizeof(struct add_sta_param)); memcpy(pstrAddStationMsg, pstrStaParams, sizeof(struct add_sta_param));
if (pstrAddStationMsg->u8NumRates > 0) { if (pstrAddStationMsg->rates_len > 0) {
u8 *rates = kmalloc(pstrAddStationMsg->u8NumRates, GFP_KERNEL); u8 *rates = kmalloc(pstrAddStationMsg->rates_len, GFP_KERNEL);
if (!rates) if (!rates)
return -ENOMEM; return -ENOMEM;
memcpy(rates, pstrStaParams->pu8Rates, pstrAddStationMsg->u8NumRates); memcpy(rates, pstrStaParams->pu8Rates,
pstrAddStationMsg->rates_len);
pstrAddStationMsg->pu8Rates = rates; pstrAddStationMsg->pu8Rates = rates;
} }
......
...@@ -290,7 +290,7 @@ struct host_if_drv { ...@@ -290,7 +290,7 @@ struct host_if_drv {
struct add_sta_param { struct add_sta_param {
u8 bssid[ETH_ALEN]; u8 bssid[ETH_ALEN];
u16 aid; u16 aid;
u8 u8NumRates; u8 rates_len;
const u8 *pu8Rates; const u8 *pu8Rates;
bool bIsHTSupported; bool bIsHTSupported;
u16 u16HTCapInfo; u16 u16HTCapInfo;
......
...@@ -2998,7 +2998,7 @@ static int add_station(struct wiphy *wiphy, struct net_device *dev, ...@@ -2998,7 +2998,7 @@ static int add_station(struct wiphy *wiphy, struct net_device *dev,
memcpy(strStaParams.bssid, mac, ETH_ALEN); memcpy(strStaParams.bssid, mac, ETH_ALEN);
memcpy(priv->assoc_stainfo.au8Sta_AssociatedBss[params->aid], mac, ETH_ALEN); memcpy(priv->assoc_stainfo.au8Sta_AssociatedBss[params->aid], mac, ETH_ALEN);
strStaParams.aid = params->aid; strStaParams.aid = params->aid;
strStaParams.u8NumRates = params->supported_rates_len; strStaParams.rates_len = params->supported_rates_len;
strStaParams.pu8Rates = params->supported_rates; strStaParams.pu8Rates = params->supported_rates;
PRINT_D(CFG80211_DBG, "Adding station parameters %d\n", params->aid); PRINT_D(CFG80211_DBG, "Adding station parameters %d\n", params->aid);
...@@ -3006,7 +3006,8 @@ static int add_station(struct wiphy *wiphy, struct net_device *dev, ...@@ -3006,7 +3006,8 @@ static int add_station(struct wiphy *wiphy, struct net_device *dev,
PRINT_D(CFG80211_DBG, "BSSID = %x%x%x%x%x%x\n", priv->assoc_stainfo.au8Sta_AssociatedBss[params->aid][0], priv->assoc_stainfo.au8Sta_AssociatedBss[params->aid][1], priv->assoc_stainfo.au8Sta_AssociatedBss[params->aid][2], priv->assoc_stainfo.au8Sta_AssociatedBss[params->aid][3], priv->assoc_stainfo.au8Sta_AssociatedBss[params->aid][4], PRINT_D(CFG80211_DBG, "BSSID = %x%x%x%x%x%x\n", priv->assoc_stainfo.au8Sta_AssociatedBss[params->aid][0], priv->assoc_stainfo.au8Sta_AssociatedBss[params->aid][1], priv->assoc_stainfo.au8Sta_AssociatedBss[params->aid][2], priv->assoc_stainfo.au8Sta_AssociatedBss[params->aid][3], priv->assoc_stainfo.au8Sta_AssociatedBss[params->aid][4],
priv->assoc_stainfo.au8Sta_AssociatedBss[params->aid][5]); priv->assoc_stainfo.au8Sta_AssociatedBss[params->aid][5]);
PRINT_D(HOSTAPD_DBG, "ASSOC ID = %d\n", strStaParams.aid); PRINT_D(HOSTAPD_DBG, "ASSOC ID = %d\n", strStaParams.aid);
PRINT_D(HOSTAPD_DBG, "Number of supported rates = %d\n", strStaParams.u8NumRates); PRINT_D(HOSTAPD_DBG, "Number of supported rates = %d\n",
strStaParams.rates_len);
if (params->ht_capa == NULL) { if (params->ht_capa == NULL) {
strStaParams.bIsHTSupported = false; strStaParams.bIsHTSupported = false;
...@@ -3111,7 +3112,7 @@ static int change_station(struct wiphy *wiphy, struct net_device *dev, ...@@ -3111,7 +3112,7 @@ static int change_station(struct wiphy *wiphy, struct net_device *dev,
if (nic->iftype == AP_MODE || nic->iftype == GO_MODE) { if (nic->iftype == AP_MODE || nic->iftype == GO_MODE) {
memcpy(strStaParams.bssid, mac, ETH_ALEN); memcpy(strStaParams.bssid, mac, ETH_ALEN);
strStaParams.aid = params->aid; strStaParams.aid = params->aid;
strStaParams.u8NumRates = params->supported_rates_len; strStaParams.rates_len = params->supported_rates_len;
strStaParams.pu8Rates = params->supported_rates; strStaParams.pu8Rates = params->supported_rates;
PRINT_D(HOSTAPD_DBG, "BSSID = %x%x%x%x%x%x\n", PRINT_D(HOSTAPD_DBG, "BSSID = %x%x%x%x%x%x\n",
...@@ -3119,7 +3120,8 @@ static int change_station(struct wiphy *wiphy, struct net_device *dev, ...@@ -3119,7 +3120,8 @@ static int change_station(struct wiphy *wiphy, struct net_device *dev,
strStaParams.bssid[2], strStaParams.bssid[3], strStaParams.bssid[2], strStaParams.bssid[3],
strStaParams.bssid[4], strStaParams.bssid[5]); strStaParams.bssid[4], strStaParams.bssid[5]);
PRINT_D(HOSTAPD_DBG, "ASSOC ID = %d\n", strStaParams.aid); PRINT_D(HOSTAPD_DBG, "ASSOC ID = %d\n", strStaParams.aid);
PRINT_D(HOSTAPD_DBG, "Number of supported rates = %d\n", strStaParams.u8NumRates); PRINT_D(HOSTAPD_DBG, "Number of supported rates = %d\n",
strStaParams.rates_len);
if (params->ht_capa == NULL) { if (params->ht_capa == NULL) {
strStaParams.bIsHTSupported = false; strStaParams.bIsHTSupported = false;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment