libertas: restyle Marvell & IEEE TLV structure names
[safe/jmp/linux-2.6] / drivers / net / wireless / libertas / scan.c
index 38b0560..e5e30b2 100644 (file)
                              + 40)     /* 40 for WPAIE */
 
 //! Memory needed to store a max sized channel List TLV for a firmware scan
-#define CHAN_TLV_MAX_SIZE  (sizeof(struct mrvlietypesheader)    \
+#define CHAN_TLV_MAX_SIZE  (sizeof(struct mrvl_ie_header)    \
                             + (MRVDRV_MAX_CHANNELS_PER_SCAN     \
                                * sizeof(struct chanscanparamset)))
 
 //! Memory needed to store a max number/size SSID TLV for a firmware scan
-#define SSID_TLV_MAX_SIZE  (1 * sizeof(struct mrvlietypes_ssidparamset))
+#define SSID_TLV_MAX_SIZE  (1 * sizeof(struct mrvl_ie_ssid_param_set))
 
 //! Maximum memory needed for a cmd_ds_802_11_scan with all TLVs at max
 #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,
  */
 static int lbs_scan_add_ssid_tlv(struct lbs_private *priv, u8 *tlv)
 {
-       struct mrvlietypes_ssidparamset *ssid_tlv = (void *)tlv;
+       struct mrvl_ie_ssid_param_set *ssid_tlv = (void *)tlv;
 
        ssid_tlv->header.type = cpu_to_le16(TLV_TYPE_SSID);
        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,
                                     int chan_count)
 {
        size_t size = sizeof(struct chanscanparamset) *chan_count;
-       struct mrvlietypes_chanlistparamset *chan_tlv = (void *)tlv;
+       struct mrvl_ie_chanlist_param_set *chan_tlv = (void *)tlv;
 
        chan_tlv->header.type = cpu_to_le16(TLV_TYPE_CHANLIST);
        memcpy(chan_tlv->chanscanparam, chan_list, size);
@@ -270,7 +270,7 @@ static int lbs_scan_add_chanlist_tlv(uint8_t *tlv,
 static int lbs_scan_add_rates_tlv(uint8_t *tlv)
 {
        int i;
-       struct mrvlietypes_ratesparamset *rate_tlv = (void *)tlv;
+       struct mrvl_ie_rates_param_set *rate_tlv = (void *)tlv;
 
        rate_tlv->header.type = cpu_to_le16(TLV_TYPE_RATES);
        tlv += sizeof(rate_tlv->header);
@@ -518,7 +518,7 @@ static int lbs_process_bss(struct bss_descriptor *bss,
        struct ieee_ie_cf_param_set *cf;
        struct ieee_ie_ibss_param_set *ibss;
        DECLARE_SSID_BUF(ssid);
-       struct ieeetypes_countryinfoset *pcountryinfo;
+       struct ieee_ie_country_info_set *pcountryinfo;
        uint8_t *pos, *end, *p;
        uint8_t n_ex_rates = 0, got_basic_rates = 0, n_basic_rates = 0;
        uint16_t beaconsize = 0;
@@ -642,20 +642,23 @@ static int lbs_process_bss(struct bss_descriptor *bss,
                        break;
 
                case WLAN_EID_COUNTRY:
-                       pcountryinfo = (struct ieeetypes_countryinfoset *) pos;
+                       pcountryinfo = (struct ieee_ie_country_info_set *) pos;
                        lbs_deb_scan("got COUNTRY IE\n");
-                       if (pcountryinfo->len < sizeof(pcountryinfo->countrycode)
-                           || pcountryinfo->len > 254) {
-                               lbs_deb_scan("process_bss: 11D- Err CountryInfo len %d, min %zd, max 254\n",
-                                            pcountryinfo->len, sizeof(pcountryinfo->countrycode));
+                       if (pcountryinfo->header.len < sizeof(pcountryinfo->countrycode)
+                           || pcountryinfo->header.len > 254) {
+                               lbs_deb_scan("%s: 11D- Err CountryInfo len %d, min %zd, max 254\n",
+                                            __func__,
+                                            pcountryinfo->header.len,
+                                            sizeof(pcountryinfo->countrycode));
                                ret = -1;
                                goto done;
                        }
 
-                       memcpy(&bss->countryinfo, pcountryinfo, pcountryinfo->len + 2);
+                       memcpy(&bss->countryinfo, pcountryinfo,
+                               pcountryinfo->header.len + 2);
                        lbs_deb_hex(LBS_DEB_SCAN, "process_bss: 11d countryinfo",
                                    (uint8_t *) pcountryinfo,
-                                   (int) (pcountryinfo->len + 2));
+                                   (int) (pcountryinfo->header.len + 2));
                        break;
 
                case WLAN_EID_EXT_SUPP_RATES: