diff options
author | Dan Williams <dcbw@redhat.com> | 2009-05-22 20:03:09 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-06-03 14:05:09 -0400 |
commit | 75b6a61a47353fd404277ae3f2dda03af96a8c1a (patch) | |
tree | 83cbebe5ec669f8c6386dcd3dec7bd0e50487e9a /drivers/net/wireless/libertas/scan.c | |
parent | 5fd164e96cb9dc111f75468378de38c67b0fd161 (diff) |
libertas: restyle Marvell & IEEE TLV structure names
Easier to read and more conformant with kernel style.
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/libertas/scan.c')
-rw-r--r-- | drivers/net/wireless/libertas/scan.c | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/drivers/net/wireless/libertas/scan.c b/drivers/net/wireless/libertas/scan.c index 38b056066e1..e5e30b24cf0 100644 --- a/drivers/net/wireless/libertas/scan.c +++ b/drivers/net/wireless/libertas/scan.c | |||
@@ -27,12 +27,12 @@ | |||
27 | + 40) /* 40 for WPAIE */ | 27 | + 40) /* 40 for WPAIE */ |
28 | 28 | ||
29 | //! Memory needed to store a max sized channel List TLV for a firmware scan | 29 | //! Memory needed to store a max sized channel List TLV for a firmware scan |
30 | #define CHAN_TLV_MAX_SIZE (sizeof(struct mrvlietypesheader) \ | 30 | #define CHAN_TLV_MAX_SIZE (sizeof(struct mrvl_ie_header) \ |
31 | + (MRVDRV_MAX_CHANNELS_PER_SCAN \ | 31 | + (MRVDRV_MAX_CHANNELS_PER_SCAN \ |
32 | * sizeof(struct chanscanparamset))) | 32 | * sizeof(struct chanscanparamset))) |
33 | 33 | ||
34 | //! Memory needed to store a max number/size SSID TLV for a firmware scan | 34 | //! Memory needed to store a max number/size SSID TLV for a firmware scan |
35 | #define SSID_TLV_MAX_SIZE (1 * sizeof(struct mrvlietypes_ssidparamset)) | 35 | #define SSID_TLV_MAX_SIZE (1 * sizeof(struct mrvl_ie_ssid_param_set)) |
36 | 36 | ||
37 | //! Maximum memory needed for a cmd_ds_802_11_scan with all TLVs at max | 37 | //! Maximum memory needed for a cmd_ds_802_11_scan with all TLVs at max |
38 | #define MAX_SCAN_CFG_ALLOC (sizeof(struct cmd_ds_802_11_scan) \ | 38 | #define MAX_SCAN_CFG_ALLOC (sizeof(struct cmd_ds_802_11_scan) \ |
@@ -211,7 +211,7 @@ static int lbs_scan_create_channel_list(struct lbs_private *priv, | |||
211 | */ | 211 | */ |
212 | static int lbs_scan_add_ssid_tlv(struct lbs_private *priv, u8 *tlv) | 212 | static int lbs_scan_add_ssid_tlv(struct lbs_private *priv, u8 *tlv) |
213 | { | 213 | { |
214 | struct mrvlietypes_ssidparamset *ssid_tlv = (void *)tlv; | 214 | struct mrvl_ie_ssid_param_set *ssid_tlv = (void *)tlv; |
215 | 215 | ||
216 | ssid_tlv->header.type = cpu_to_le16(TLV_TYPE_SSID); | 216 | ssid_tlv->header.type = cpu_to_le16(TLV_TYPE_SSID); |
217 | ssid_tlv->header.len = cpu_to_le16(priv->scan_ssid_len); | 217 | ssid_tlv->header.len = cpu_to_le16(priv->scan_ssid_len); |
@@ -249,7 +249,7 @@ static int lbs_scan_add_chanlist_tlv(uint8_t *tlv, | |||
249 | int chan_count) | 249 | int chan_count) |
250 | { | 250 | { |
251 | size_t size = sizeof(struct chanscanparamset) *chan_count; | 251 | size_t size = sizeof(struct chanscanparamset) *chan_count; |
252 | struct mrvlietypes_chanlistparamset *chan_tlv = (void *)tlv; | 252 | struct mrvl_ie_chanlist_param_set *chan_tlv = (void *)tlv; |
253 | 253 | ||
254 | chan_tlv->header.type = cpu_to_le16(TLV_TYPE_CHANLIST); | 254 | chan_tlv->header.type = cpu_to_le16(TLV_TYPE_CHANLIST); |
255 | memcpy(chan_tlv->chanscanparam, chan_list, size); | 255 | memcpy(chan_tlv->chanscanparam, chan_list, size); |
@@ -270,7 +270,7 @@ static int lbs_scan_add_chanlist_tlv(uint8_t *tlv, | |||
270 | static int lbs_scan_add_rates_tlv(uint8_t *tlv) | 270 | static int lbs_scan_add_rates_tlv(uint8_t *tlv) |
271 | { | 271 | { |
272 | int i; | 272 | int i; |
273 | struct mrvlietypes_ratesparamset *rate_tlv = (void *)tlv; | 273 | struct mrvl_ie_rates_param_set *rate_tlv = (void *)tlv; |
274 | 274 | ||
275 | rate_tlv->header.type = cpu_to_le16(TLV_TYPE_RATES); | 275 | rate_tlv->header.type = cpu_to_le16(TLV_TYPE_RATES); |
276 | tlv += sizeof(rate_tlv->header); | 276 | tlv += sizeof(rate_tlv->header); |
@@ -518,7 +518,7 @@ static int lbs_process_bss(struct bss_descriptor *bss, | |||
518 | struct ieee_ie_cf_param_set *cf; | 518 | struct ieee_ie_cf_param_set *cf; |
519 | struct ieee_ie_ibss_param_set *ibss; | 519 | struct ieee_ie_ibss_param_set *ibss; |
520 | DECLARE_SSID_BUF(ssid); | 520 | DECLARE_SSID_BUF(ssid); |
521 | struct ieeetypes_countryinfoset *pcountryinfo; | 521 | struct ieee_ie_country_info_set *pcountryinfo; |
522 | uint8_t *pos, *end, *p; | 522 | uint8_t *pos, *end, *p; |
523 | uint8_t n_ex_rates = 0, got_basic_rates = 0, n_basic_rates = 0; | 523 | uint8_t n_ex_rates = 0, got_basic_rates = 0, n_basic_rates = 0; |
524 | uint16_t beaconsize = 0; | 524 | uint16_t beaconsize = 0; |
@@ -642,20 +642,23 @@ static int lbs_process_bss(struct bss_descriptor *bss, | |||
642 | break; | 642 | break; |
643 | 643 | ||
644 | case WLAN_EID_COUNTRY: | 644 | case WLAN_EID_COUNTRY: |
645 | pcountryinfo = (struct ieeetypes_countryinfoset *) pos; | 645 | pcountryinfo = (struct ieee_ie_country_info_set *) pos; |
646 | lbs_deb_scan("got COUNTRY IE\n"); | 646 | lbs_deb_scan("got COUNTRY IE\n"); |
647 | if (pcountryinfo->len < sizeof(pcountryinfo->countrycode) | 647 | if (pcountryinfo->header.len < sizeof(pcountryinfo->countrycode) |
648 | || pcountryinfo->len > 254) { | 648 | || pcountryinfo->header.len > 254) { |
649 | lbs_deb_scan("process_bss: 11D- Err CountryInfo len %d, min %zd, max 254\n", | 649 | lbs_deb_scan("%s: 11D- Err CountryInfo len %d, min %zd, max 254\n", |
650 | pcountryinfo->len, sizeof(pcountryinfo->countrycode)); | 650 | __func__, |
651 | pcountryinfo->header.len, | ||
652 | sizeof(pcountryinfo->countrycode)); | ||
651 | ret = -1; | 653 | ret = -1; |
652 | goto done; | 654 | goto done; |
653 | } | 655 | } |
654 | 656 | ||
655 | memcpy(&bss->countryinfo, pcountryinfo, pcountryinfo->len + 2); | 657 | memcpy(&bss->countryinfo, pcountryinfo, |
658 | pcountryinfo->header.len + 2); | ||
656 | lbs_deb_hex(LBS_DEB_SCAN, "process_bss: 11d countryinfo", | 659 | lbs_deb_hex(LBS_DEB_SCAN, "process_bss: 11d countryinfo", |
657 | (uint8_t *) pcountryinfo, | 660 | (uint8_t *) pcountryinfo, |
658 | (int) (pcountryinfo->len + 2)); | 661 | (int) (pcountryinfo->header.len + 2)); |
659 | break; | 662 | break; |
660 | 663 | ||
661 | case WLAN_EID_EXT_SUPP_RATES: | 664 | case WLAN_EID_EXT_SUPP_RATES: |