};
 
 
-struct ieee80211_sta_bss {
+struct ieee80211_bss {
        struct list_head list;
-       struct ieee80211_sta_bss *hnext;
+       struct ieee80211_bss *hnext;
        size_t ssid_len;
 
        atomic_t users;
        u8 erp_value;
 };
 
-static inline u8 *bss_mesh_cfg(struct ieee80211_sta_bss *bss)
+static inline u8 *bss_mesh_cfg(struct ieee80211_bss *bss)
 {
 #ifdef CONFIG_MAC80211_MESH
        return bss->mesh_cfg;
        return NULL;
 }
 
-static inline u8 *bss_mesh_id(struct ieee80211_sta_bss *bss)
+static inline u8 *bss_mesh_id(struct ieee80211_bss *bss)
 {
 #ifdef CONFIG_MAC80211_MESH
        return bss->mesh_id;
        return NULL;
 }
 
-static inline u8 bss_mesh_id_len(struct ieee80211_sta_bss *bss)
+static inline u8 bss_mesh_id_len(struct ieee80211_bss *bss)
 {
 #ifdef CONFIG_MAC80211_MESH
        return bss->mesh_id_len;
        spinlock_t key_lock;
 
 
-       bool sta_sw_scanning;
-       bool sta_hw_scanning;
+       /* Scanning and BSS list */
+       bool sw_scanning, hw_scanning;
        int scan_channel_idx;
        enum ieee80211_band scan_band;
 
        struct ieee80211_channel *oper_channel, *scan_channel;
        u8 scan_ssid[IEEE80211_MAX_SSID_LEN];
        size_t scan_ssid_len;
-       struct list_head sta_bss_list;
-       struct ieee80211_sta_bss *sta_bss_hash[STA_HASH_SIZE];
-       spinlock_t sta_bss_lock;
+       struct list_head bss_list;
+       struct ieee80211_bss *bss_hash[STA_HASH_SIZE];
+       spinlock_t bss_lock;
 
        /* SNMP counters */
        /* dot11CountersTable */
 
 /* STA/IBSS code */
 void ieee80211_sta_setup_sdata(struct ieee80211_sub_if_data *sdata);
-void ieee80211_sta_scan_work(struct work_struct *work);
+void ieee80211_scan_work(struct work_struct *work);
 void ieee80211_sta_rx_mgmt(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb,
                           struct ieee80211_rx_status *rx_status);
 int ieee80211_sta_set_ssid(struct ieee80211_sub_if_data *sdata, char *ssid, size_t len);
                              u8 *ssid, size_t ssid_len);
 
 /* scan/BSS handling */
-int ieee80211_sta_req_scan(struct ieee80211_sub_if_data *sdata, u8 *ssid, size_t ssid_len);
-int ieee80211_sta_scan_results(struct ieee80211_local *local,
-                              struct iw_request_info *info,
-                              char *buf, size_t len);
-ieee80211_rx_result ieee80211_sta_rx_scan(
-       struct ieee80211_sub_if_data *sdata, struct sk_buff *skb,
-       struct ieee80211_rx_status *rx_status);
+int ieee80211_request_scan(struct ieee80211_sub_if_data *sdata,
+                          u8 *ssid, size_t ssid_len);
+int ieee80211_scan_results(struct ieee80211_local *local,
+                          struct iw_request_info *info,
+                          char *buf, size_t len);
+ieee80211_rx_result
+ieee80211_scan_rx(struct ieee80211_sub_if_data *sdata,
+                 struct sk_buff *skb,
+                 struct ieee80211_rx_status *rx_status);
 void ieee80211_rx_bss_list_init(struct ieee80211_local *local);
 void ieee80211_rx_bss_list_deinit(struct ieee80211_local *local);
-int ieee80211_sta_set_extra_ie(struct ieee80211_sub_if_data *sdata, char *ie, size_t len);
+int ieee80211_sta_set_extra_ie(struct ieee80211_sub_if_data *sdata,
+                              char *ie, size_t len);
 
 void ieee80211_mlme_notify_scan_completed(struct ieee80211_local *local);
-int ieee80211_sta_start_scan(struct ieee80211_sub_if_data *scan_sdata,
-                            u8 *ssid, size_t ssid_len);
-struct ieee80211_sta_bss *
+int ieee80211_start_scan(struct ieee80211_sub_if_data *scan_sdata,
+                        u8 *ssid, size_t ssid_len);
+struct ieee80211_bss *
 ieee80211_bss_info_update(struct ieee80211_local *local,
                          struct ieee80211_rx_status *rx_status,
                          struct ieee80211_mgmt *mgmt,
                          size_t len,
                          struct ieee802_11_elems *elems,
                          int freq, bool beacon);
-struct ieee80211_sta_bss *
+struct ieee80211_bss *
 ieee80211_rx_bss_add(struct ieee80211_local *local, u8 *bssid, int freq,
                     u8 *ssid, u8 ssid_len);
-struct ieee80211_sta_bss *
+struct ieee80211_bss *
 ieee80211_rx_bss_get(struct ieee80211_local *local, u8 *bssid, int freq,
                     u8 *ssid, u8 ssid_len);
 void ieee80211_rx_bss_put(struct ieee80211_local *local,
-                         struct ieee80211_sta_bss *bss);
+                         struct ieee80211_bss *bss);
 
 /* interface handling */
 void ieee80211_if_setup(struct net_device *dev);
 
                         * the scan_sdata is NULL already don't send out a
                         * scan event to userspace -- the scan is incomplete.
                         */
-                       if (local->sta_sw_scanning)
+                       if (local->sw_scanning)
                                ieee80211_scan_completed(&local->hw);
                }
 
        struct ieee80211_channel *chan;
        int ret = 0;
 
-       if (local->sta_sw_scanning)
+       if (local->sw_scanning)
                chan = local->scan_channel;
        else
                chan = local->oper_channel;
 
        spin_lock_init(&local->key_lock);
 
-       INIT_DELAYED_WORK(&local->scan_work, ieee80211_sta_scan_work);
+       INIT_DELAYED_WORK(&local->scan_work, ieee80211_scan_work);
 
        sta_info_init(local);
 
 
        if (!netif_running(sdata->dev))
                return;
 
-       if (local->sta_sw_scanning || local->sta_hw_scanning)
+       if (local->sw_scanning || local->hw_scanning)
                return;
 
        while ((skb = skb_dequeue(&ifmsh->skb_queue)))
 
        return (1 << ecw) - 1;
 }
 
-static u8 *ieee80211_bss_get_ie(struct ieee80211_sta_bss *bss, u8 ie)
+static u8 *ieee80211_bss_get_ie(struct ieee80211_bss *bss, u8 ie)
 {
        u8 *end, *pos;
 
        return NULL;
 }
 
-static int ieee80211_compatible_rates(struct ieee80211_sta_bss *bss,
+static int ieee80211_compatible_rates(struct ieee80211_bss *bss,
                                      struct ieee80211_supported_band *sband,
                                      u64 *rates)
 {
        u8 *pos, *ies, *ht_add_ie;
        int i, len, count, rates_len, supp_rates_len;
        u16 capab;
-       struct ieee80211_sta_bss *bss;
+       struct ieee80211_bss *bss;
        int wmm = 0;
        struct ieee80211_supported_band *sband;
        u64 rates = 0;
 
 /* MLME */
 static void ieee80211_sta_def_wmm_params(struct ieee80211_sub_if_data *sdata,
-                                        struct ieee80211_sta_bss *bss)
+                                        struct ieee80211_bss *bss)
 {
        struct ieee80211_local *local = sdata->local;
        int i, have_higher_than_11mbit = 0;
 }
 
 static u32 ieee80211_handle_bss_capability(struct ieee80211_sub_if_data *sdata,
-                                          struct ieee80211_sta_bss *bss)
+                                          struct ieee80211_bss *bss)
 {
        u32 changed = 0;
 
        struct ieee80211_conf *conf = &local_to_hw(local)->conf;
        u32 changed = BSS_CHANGED_ASSOC;
 
-       struct ieee80211_sta_bss *bss;
+       struct ieee80211_bss *bss;
 
        ifsta->flags |= IEEE80211_STA_ASSOCIATED;
 
                                      struct ieee80211_if_sta *ifsta)
 {
        struct ieee80211_local *local = sdata->local;
-       struct ieee80211_sta_bss *bss;
+       struct ieee80211_bss *bss;
        int bss_privacy;
        int wep_privacy;
        int privacy_invoked;
        /* Add STA entry for the AP */
        sta = sta_info_get(local, ifsta->bssid);
        if (!sta) {
-               struct ieee80211_sta_bss *bss;
+               struct ieee80211_bss *bss;
                int err;
 
                sta = sta_info_alloc(sdata, ifsta->bssid, GFP_ATOMIC);
 
 static int ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata,
                                   struct ieee80211_if_sta *ifsta,
-                                  struct ieee80211_sta_bss *bss)
+                                  struct ieee80211_bss *bss)
 {
        struct ieee80211_local *local = sdata->local;
        int res, rates, i, j;
 {
        struct ieee80211_local *local = sdata->local;
        int freq;
-       struct ieee80211_sta_bss *bss;
+       struct ieee80211_bss *bss;
        struct sta_info *sta;
        struct ieee80211_channel *channel;
        u64 beacon_timestamp, rx_timestamp;
 
        printk(KERN_DEBUG "%s: No active IBSS STAs - trying to scan for other "
               "IBSS networks with same SSID (merge)\n", sdata->dev->name);
-       ieee80211_sta_req_scan(sdata, ifsta->ssid, ifsta->ssid_len);
+       ieee80211_request_scan(sdata, ifsta->ssid, ifsta->ssid_len);
 }
 
 
                                     struct ieee80211_if_sta *ifsta)
 {
        struct ieee80211_local *local = sdata->local;
-       struct ieee80211_sta_bss *bss;
+       struct ieee80211_bss *bss;
        struct ieee80211_supported_band *sband;
        u8 bssid[ETH_ALEN], *pos;
        int i;
                                   struct ieee80211_if_sta *ifsta)
 {
        struct ieee80211_local *local = sdata->local;
-       struct ieee80211_sta_bss *bss;
+       struct ieee80211_bss *bss;
        int found = 0;
        u8 bssid[ETH_ALEN];
        int active_ibss;
        printk(KERN_DEBUG "%s: sta_find_ibss (active_ibss=%d)\n",
               sdata->dev->name, active_ibss);
 #endif /* CONFIG_MAC80211_IBSS_DEBUG */
-       spin_lock_bh(&local->sta_bss_lock);
-       list_for_each_entry(bss, &local->sta_bss_list, list) {
+       spin_lock_bh(&local->bss_lock);
+       list_for_each_entry(bss, &local->bss_list, list) {
                if (ifsta->ssid_len != bss->ssid_len ||
                    memcmp(ifsta->ssid, bss->ssid, bss->ssid_len) != 0
                    || !(bss->capability & WLAN_CAPABILITY_IBSS))
                if (active_ibss || memcmp(bssid, ifsta->bssid, ETH_ALEN) != 0)
                        break;
        }
-       spin_unlock_bh(&local->sta_bss_lock);
+       spin_unlock_bh(&local->bss_lock);
 
 #ifdef CONFIG_MAC80211_IBSS_DEBUG
        if (found)
                              IEEE80211_SCAN_INTERVAL)) {
                printk(KERN_DEBUG "%s: Trigger new scan to find an IBSS to "
                       "join\n", sdata->dev->name);
-               return ieee80211_sta_req_scan(sdata, ifsta->ssid,
+               return ieee80211_request_scan(sdata, ifsta->ssid,
                                              ifsta->ssid_len);
        } else if (ifsta->state != IEEE80211_STA_MLME_IBSS_JOINED) {
                int interval = IEEE80211_SCAN_INTERVAL;
                                     struct ieee80211_if_sta *ifsta)
 {
        struct ieee80211_local *local = sdata->local;
-       struct ieee80211_sta_bss *bss, *selected = NULL;
+       struct ieee80211_bss *bss, *selected = NULL;
        int top_rssi = 0, freq;
 
-       spin_lock_bh(&local->sta_bss_lock);
+       spin_lock_bh(&local->bss_lock);
        freq = local->oper_channel->center_freq;
-       list_for_each_entry(bss, &local->sta_bss_list, list) {
+       list_for_each_entry(bss, &local->bss_list, list) {
                if (!(bss->capability & WLAN_CAPABILITY_ESS))
                        continue;
 
        }
        if (selected)
                atomic_inc(&selected->users);
-       spin_unlock_bh(&local->sta_bss_lock);
+       spin_unlock_bh(&local->bss_lock);
 
        if (selected) {
                ieee80211_set_freq(sdata, selected->freq);
                if (ifsta->assoc_scan_tries < IEEE80211_ASSOC_SCANS_MAX_TRIES) {
                        ifsta->assoc_scan_tries++;
                        if (ifsta->flags & IEEE80211_STA_AUTO_SSID_SEL)
-                               ieee80211_sta_start_scan(sdata, NULL, 0);
+                               ieee80211_start_scan(sdata, NULL, 0);
                        else
-                               ieee80211_sta_start_scan(sdata, ifsta->ssid,
+                               ieee80211_start_scan(sdata, ifsta->ssid,
                                                         ifsta->ssid_len);
                        ifsta->state = IEEE80211_STA_MLME_AUTHENTICATE;
                        set_bit(IEEE80211_STA_REQ_AUTH, &ifsta->request);
        if (!netif_running(sdata->dev))
                return;
 
-       if (local->sta_sw_scanning || local->sta_hw_scanning)
+       if (local->sw_scanning || local->hw_scanning)
                return;
 
        if (WARN_ON(sdata->vif.type != IEEE80211_IF_TYPE_STA &&
            ifsta->state != IEEE80211_STA_MLME_AUTHENTICATE &&
            ifsta->state != IEEE80211_STA_MLME_ASSOCIATE &&
            test_and_clear_bit(IEEE80211_STA_REQ_SCAN, &ifsta->request)) {
-               ieee80211_sta_start_scan(sdata, ifsta->scan_ssid, ifsta->scan_ssid_len);
+               ieee80211_start_scan(sdata, ifsta->scan_ssid,
+                                    ifsta->scan_ssid_len);
                return;
        }
 
 
        struct ieee80211_local *local = rx->local;
        struct sk_buff *skb = rx->skb;
 
-       if (unlikely(local->sta_hw_scanning))
-               return ieee80211_sta_rx_scan(rx->sdata, skb, rx->status);
+       if (unlikely(local->hw_scanning))
+               return ieee80211_scan_rx(rx->sdata, skb, rx->status);
 
-       if (unlikely(local->sta_sw_scanning)) {
+       if (unlikely(local->sw_scanning)) {
                /* drop all the other packets during a software scan anyway */
-               if (ieee80211_sta_rx_scan(rx->sdata, skb, rx->status)
+               if (ieee80211_scan_rx(rx->sdata, skb, rx->status)
                    != RX_QUEUED)
                        dev_kfree_skb(skb);
                return RX_QUEUED;
                return;
        }
 
-       if (unlikely(local->sta_sw_scanning || local->sta_hw_scanning))
+       if (unlikely(local->sw_scanning || local->hw_scanning))
                rx.flags |= IEEE80211_RX_IN_SCAN;
 
        ieee80211_parse_qos(&rx);
 
 
 void ieee80211_rx_bss_list_init(struct ieee80211_local *local)
 {
-       spin_lock_init(&local->sta_bss_lock);
-       INIT_LIST_HEAD(&local->sta_bss_list);
+       spin_lock_init(&local->bss_lock);
+       INIT_LIST_HEAD(&local->bss_list);
 }
 
 void ieee80211_rx_bss_list_deinit(struct ieee80211_local *local)
 {
-       struct ieee80211_sta_bss *bss, *tmp;
+       struct ieee80211_bss *bss, *tmp;
 
-       list_for_each_entry_safe(bss, tmp, &local->sta_bss_list, list)
+       list_for_each_entry_safe(bss, tmp, &local->bss_list, list)
                ieee80211_rx_bss_put(local, bss);
 }
 
-struct ieee80211_sta_bss *
+struct ieee80211_bss *
 ieee80211_rx_bss_get(struct ieee80211_local *local, u8 *bssid, int freq,
                     u8 *ssid, u8 ssid_len)
 {
-       struct ieee80211_sta_bss *bss;
+       struct ieee80211_bss *bss;
 
-       spin_lock_bh(&local->sta_bss_lock);
-       bss = local->sta_bss_hash[STA_HASH(bssid)];
+       spin_lock_bh(&local->bss_lock);
+       bss = local->bss_hash[STA_HASH(bssid)];
        while (bss) {
                if (!bss_mesh_cfg(bss) &&
                    !memcmp(bss->bssid, bssid, ETH_ALEN) &&
                }
                bss = bss->hnext;
        }
-       spin_unlock_bh(&local->sta_bss_lock);
+       spin_unlock_bh(&local->bss_lock);
        return bss;
 }
 
-/* Caller must hold local->sta_bss_lock */
+/* Caller must hold local->bss_lock */
 static void __ieee80211_rx_bss_hash_add(struct ieee80211_local *local,
-                                       struct ieee80211_sta_bss *bss)
+                                       struct ieee80211_bss *bss)
 {
        u8 hash_idx;
 
        else
                hash_idx = STA_HASH(bss->bssid);
 
-       bss->hnext = local->sta_bss_hash[hash_idx];
-       local->sta_bss_hash[hash_idx] = bss;
+       bss->hnext = local->bss_hash[hash_idx];
+       local->bss_hash[hash_idx] = bss;
 }
 
-/* Caller must hold local->sta_bss_lock */
+/* Caller must hold local->bss_lock */
 static void __ieee80211_rx_bss_hash_del(struct ieee80211_local *local,
-                                       struct ieee80211_sta_bss *bss)
+                                       struct ieee80211_bss *bss)
 {
-       struct ieee80211_sta_bss *b, *prev = NULL;
-       b = local->sta_bss_hash[STA_HASH(bss->bssid)];
+       struct ieee80211_bss *b, *prev = NULL;
+       b = local->bss_hash[STA_HASH(bss->bssid)];
        while (b) {
                if (b == bss) {
                        if (!prev)
-                               local->sta_bss_hash[STA_HASH(bss->bssid)] =
+                               local->bss_hash[STA_HASH(bss->bssid)] =
                                        bss->hnext;
                        else
                                prev->hnext = bss->hnext;
        }
 }
 
-struct ieee80211_sta_bss *
+struct ieee80211_bss *
 ieee80211_rx_bss_add(struct ieee80211_local *local, u8 *bssid, int freq,
                     u8 *ssid, u8 ssid_len)
 {
-       struct ieee80211_sta_bss *bss;
+       struct ieee80211_bss *bss;
 
        bss = kzalloc(sizeof(*bss), GFP_ATOMIC);
        if (!bss)
                bss->ssid_len = ssid_len;
        }
 
-       spin_lock_bh(&local->sta_bss_lock);
+       spin_lock_bh(&local->bss_lock);
        /* TODO: order by RSSI? */
-       list_add_tail(&bss->list, &local->sta_bss_list);
+       list_add_tail(&bss->list, &local->bss_list);
        __ieee80211_rx_bss_hash_add(local, bss);
-       spin_unlock_bh(&local->sta_bss_lock);
+       spin_unlock_bh(&local->bss_lock);
        return bss;
 }
 
 #ifdef CONFIG_MAC80211_MESH
-static struct ieee80211_sta_bss *
+static struct ieee80211_bss *
 ieee80211_rx_mesh_bss_get(struct ieee80211_local *local, u8 *mesh_id, int mesh_id_len,
                          u8 *mesh_cfg, int freq)
 {
-       struct ieee80211_sta_bss *bss;
+       struct ieee80211_bss *bss;
 
-       spin_lock_bh(&local->sta_bss_lock);
-       bss = local->sta_bss_hash[mesh_id_hash(mesh_id, mesh_id_len)];
+       spin_lock_bh(&local->bss_lock);
+       bss = local->bss_hash[mesh_id_hash(mesh_id, mesh_id_len)];
        while (bss) {
                if (bss_mesh_cfg(bss) &&
                    !memcmp(bss_mesh_cfg(bss), mesh_cfg, MESH_CFG_CMP_LEN) &&
                }
                bss = bss->hnext;
        }
-       spin_unlock_bh(&local->sta_bss_lock);
+       spin_unlock_bh(&local->bss_lock);
        return bss;
 }
 
-static struct ieee80211_sta_bss *
+static struct ieee80211_bss *
 ieee80211_rx_mesh_bss_add(struct ieee80211_local *local, u8 *mesh_id, int mesh_id_len,
                          u8 *mesh_cfg, int mesh_config_len, int freq)
 {
-       struct ieee80211_sta_bss *bss;
+       struct ieee80211_bss *bss;
 
        if (mesh_config_len != MESH_CFG_LEN)
                return NULL;
        memcpy(bss->mesh_cfg, mesh_cfg, MESH_CFG_CMP_LEN);
        bss->mesh_id_len = mesh_id_len;
        bss->freq = freq;
-       spin_lock_bh(&local->sta_bss_lock);
+       spin_lock_bh(&local->bss_lock);
        /* TODO: order by RSSI? */
-       list_add_tail(&bss->list, &local->sta_bss_list);
+       list_add_tail(&bss->list, &local->bss_list);
        __ieee80211_rx_bss_hash_add(local, bss);
-       spin_unlock_bh(&local->sta_bss_lock);
+       spin_unlock_bh(&local->bss_lock);
        return bss;
 }
 #endif
 
-static void ieee80211_rx_bss_free(struct ieee80211_sta_bss *bss)
+static void ieee80211_rx_bss_free(struct ieee80211_bss *bss)
 {
        kfree(bss->ies);
        kfree(bss_mesh_id(bss));
 }
 
 void ieee80211_rx_bss_put(struct ieee80211_local *local,
-                         struct ieee80211_sta_bss *bss)
+                         struct ieee80211_bss *bss)
 {
        local_bh_disable();
-       if (!atomic_dec_and_lock(&bss->users, &local->sta_bss_lock)) {
+       if (!atomic_dec_and_lock(&bss->users, &local->bss_lock)) {
                local_bh_enable();
                return;
        }
 
        __ieee80211_rx_bss_hash_del(local, bss);
        list_del(&bss->list);
-       spin_unlock_bh(&local->sta_bss_lock);
+       spin_unlock_bh(&local->bss_lock);
        ieee80211_rx_bss_free(bss);
 }
 
-struct ieee80211_sta_bss *
+struct ieee80211_bss *
 ieee80211_bss_info_update(struct ieee80211_local *local,
                          struct ieee80211_rx_status *rx_status,
                          struct ieee80211_mgmt *mgmt,
                          struct ieee802_11_elems *elems,
                          int freq, bool beacon)
 {
-       struct ieee80211_sta_bss *bss;
+       struct ieee80211_bss *bss;
        int clen;
 
 #ifdef CONFIG_MAC80211_MESH
        } else {
 #if 0
                /* TODO: order by RSSI? */
-               spin_lock_bh(&local->sta_bss_lock);
-               list_move_tail(&bss->list, &local->sta_bss_list);
-               spin_unlock_bh(&local->sta_bss_lock);
+               spin_lock_bh(&local->bss_lock);
+               list_move_tail(&bss->list, &local->bss_list);
+               spin_unlock_bh(&local->bss_lock);
 #endif
        }
 
 }
 
 ieee80211_rx_result
-ieee80211_sta_rx_scan(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb,
-                     struct ieee80211_rx_status *rx_status)
+ieee80211_scan_rx(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb,
+                 struct ieee80211_rx_status *rx_status)
 {
        struct ieee80211_mgmt *mgmt;
-       struct ieee80211_sta_bss *bss;
+       struct ieee80211_bss *bss;
        u8 *elements;
        struct ieee80211_channel *channel;
        size_t baselen;
        struct ieee80211_sub_if_data *sdata;
        union iwreq_data wrqu;
 
-       if (WARN_ON(!local->sta_hw_scanning && !local->sta_sw_scanning))
+       if (WARN_ON(!local->hw_scanning && !local->sw_scanning))
                return;
 
        local->last_scan_completed = jiffies;
        if (sdata)
                wireless_send_event(sdata->dev, SIOCGIWSCAN, &wrqu, NULL);
 
-       if (local->sta_hw_scanning) {
-               local->sta_hw_scanning = 0;
+       if (local->hw_scanning) {
+               local->hw_scanning = false;
                if (ieee80211_hw_config(local))
                        printk(KERN_DEBUG "%s: failed to restore operational "
                               "channel after scan\n", wiphy_name(local->hw.wiphy));
                goto done;
        }
 
-       local->sta_sw_scanning = 0;
+       local->sw_scanning = false;
        if (ieee80211_hw_config(local))
                printk(KERN_DEBUG "%s: failed to restore operational "
                       "channel after scan\n", wiphy_name(local->hw.wiphy));
 EXPORT_SYMBOL(ieee80211_scan_completed);
 
 
-void ieee80211_sta_scan_work(struct work_struct *work)
+void ieee80211_scan_work(struct work_struct *work)
 {
        struct ieee80211_local *local =
                container_of(work, struct ieee80211_local, scan_work.work);
 }
 
 
-int ieee80211_sta_start_scan(struct ieee80211_sub_if_data *scan_sdata,
-                            u8 *ssid, size_t ssid_len)
+int ieee80211_start_scan(struct ieee80211_sub_if_data *scan_sdata,
+                        u8 *ssid, size_t ssid_len)
 {
        struct ieee80211_local *local = scan_sdata->local;
        struct ieee80211_sub_if_data *sdata;
          * ResultCode: SUCCESS, INVALID_PARAMETERS
         */
 
-       if (local->sta_sw_scanning || local->sta_hw_scanning) {
+       if (local->sw_scanning || local->hw_scanning) {
                if (local->scan_sdata == scan_sdata)
                        return 0;
                return -EBUSY;
        if (local->ops->hw_scan) {
                int rc;
 
-               local->sta_hw_scanning = 1;
+               local->hw_scanning = true;
                rc = local->ops->hw_scan(local_to_hw(local), ssid, ssid_len);
                if (rc) {
-                       local->sta_hw_scanning = 0;
+                       local->hw_scanning = false;
                        return rc;
                }
                local->scan_sdata = scan_sdata;
                return 0;
        }
 
-       local->sta_sw_scanning = 1;
+       local->sw_scanning = true;
 
        rcu_read_lock();
        list_for_each_entry_rcu(sdata, &local->interfaces, list) {
 }
 
 
-int ieee80211_sta_req_scan(struct ieee80211_sub_if_data *sdata, u8 *ssid, size_t ssid_len)
+int ieee80211_request_scan(struct ieee80211_sub_if_data *sdata,
+                          u8 *ssid, size_t ssid_len)
 {
        struct ieee80211_local *local = sdata->local;
        struct ieee80211_if_sta *ifsta;
 
        if (sdata->vif.type != IEEE80211_IF_TYPE_STA)
-               return ieee80211_sta_start_scan(sdata, ssid, ssid_len);
+               return ieee80211_start_scan(sdata, ssid, ssid_len);
 
        /*
         * STA has a state machine that might need to defer scanning
         * queue it up to the state machine in that case.
         */
 
-       if (local->sta_sw_scanning || local->sta_hw_scanning) {
+       if (local->sw_scanning || local->hw_scanning) {
                if (local->scan_sdata == sdata)
                        return 0;
                return -EBUSY;
 }
 
 
-static void ieee80211_sta_add_scan_ies(struct iw_request_info *info,
-                                      struct ieee80211_sta_bss *bss,
-                                      char **current_ev, char *end_buf)
+static void ieee80211_scan_add_ies(struct iw_request_info *info,
+                                  struct ieee80211_bss *bss,
+                                  char **current_ev, char *end_buf)
 {
        u8 *pos, *end, *next;
        struct iw_event iwe;
 
 
 static char *
-ieee80211_sta_scan_result(struct ieee80211_local *local,
-                         struct iw_request_info *info,
-                         struct ieee80211_sta_bss *bss,
-                         char *current_ev, char *end_buf)
+ieee80211_scan_result(struct ieee80211_local *local,
+                     struct iw_request_info *info,
+                     struct ieee80211_bss *bss,
+                     char *current_ev, char *end_buf)
 {
        struct iw_event iwe;
        char *buf;
        current_ev = iwe_stream_add_point(info, current_ev, end_buf,
                                          &iwe, "");
 
-       ieee80211_sta_add_scan_ies(info, bss, ¤t_ev, end_buf);
+       ieee80211_scan_add_ies(info, bss, ¤t_ev, end_buf);
 
        if (bss->supp_rates_len > 0) {
                /* display all supported rates in readable format */
 }
 
 
-int ieee80211_sta_scan_results(struct ieee80211_local *local,
-                              struct iw_request_info *info,
-                              char *buf, size_t len)
+int ieee80211_scan_results(struct ieee80211_local *local,
+                          struct iw_request_info *info,
+                          char *buf, size_t len)
 {
        char *current_ev = buf;
        char *end_buf = buf + len;
-       struct ieee80211_sta_bss *bss;
+       struct ieee80211_bss *bss;
 
-       spin_lock_bh(&local->sta_bss_lock);
-       list_for_each_entry(bss, &local->sta_bss_list, list) {
+       spin_lock_bh(&local->bss_lock);
+       list_for_each_entry(bss, &local->bss_list, list) {
                if (buf + len - current_ev <= IW_EV_ADDR_LEN) {
-                       spin_unlock_bh(&local->sta_bss_lock);
+                       spin_unlock_bh(&local->bss_lock);
                        return -E2BIG;
                }
-               current_ev = ieee80211_sta_scan_result(local, info, bss,
+               current_ev = ieee80211_scan_result(local, info, bss,
                                                       current_ev, end_buf);
        }
-       spin_unlock_bh(&local->sta_bss_lock);
+       spin_unlock_bh(&local->bss_lock);
        return current_ev - buf;
 }
 
        if (unlikely(info->flags & IEEE80211_TX_CTL_INJECTED))
                return TX_CONTINUE;
 
-       if (unlikely(tx->local->sta_sw_scanning) &&
+       if (unlikely(tx->local->sw_scanning) &&
            !ieee80211_is_probe_req(hdr->frame_control))
                return TX_DROP;
 
 
                }
                local->oper_channel = chan;
 
-               if (local->sta_sw_scanning || local->sta_hw_scanning)
+               if (local->sw_scanning || local->hw_scanning)
                        ret = 0;
                else
                        ret = ieee80211_hw_config(local);
 
                ssid_len = req->essid_len;
        }
 
-       return ieee80211_sta_req_scan(sdata, ssid, ssid_len);
+       return ieee80211_request_scan(sdata, ssid, ssid_len);
 }
 
 
 
        sdata = IEEE80211_DEV_TO_SUB_IF(dev);
 
-       if (local->sta_sw_scanning || local->sta_hw_scanning)
+       if (local->sw_scanning || local->hw_scanning)
                return -EAGAIN;
 
-       res = ieee80211_sta_scan_results(local, info, extra, data->length);
+       res = ieee80211_scan_results(local, info, extra, data->length);
        if (res >= 0) {
                data->length = res;
                return 0;