~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise-security

« back to all changes in this revision

Viewing changes to net/mac80211/main.c

  • Committer: Package Import Robot
  • Author(s): Paolo Pisati, Paolo Pisati
  • Date: 2011-12-06 15:56:07 UTC
  • Revision ID: package-import@ubuntu.com-20111206155607-pcf44kv5fmhk564f
Tags: 3.2.0-1401.1
[ Paolo Pisati ]

* Rebased on top of Ubuntu-3.2.0-3.8
* Tilt-tracking @ ef2487af4bb15bdd0689631774b5a5e3a59f74e2
* Delete debian.ti-omap4/control, it shoudln't be tracked
* Fix architecture spelling (s/armel/armhf/)
* [Config] Update configs following 3.2 import
* [Config] Fix compilation: disable CODA and ARCH_OMAP3
* [Config] Fix compilation: disable Ethernet Faraday
* Update series to precise

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
#include <linux/if_arp.h>
20
20
#include <linux/rtnetlink.h>
21
21
#include <linux/bitmap.h>
22
 
#include <linux/pm_qos_params.h>
 
22
#include <linux/pm_qos.h>
23
23
#include <linux/inetdevice.h>
24
24
#include <net/net_namespace.h>
25
25
#include <net/cfg80211.h>
325
325
static void ieee80211_tasklet_handler(unsigned long data)
326
326
{
327
327
        struct ieee80211_local *local = (struct ieee80211_local *) data;
 
328
        struct sta_info *sta, *tmp;
 
329
        struct skb_eosp_msg_data *eosp_data;
328
330
        struct sk_buff *skb;
329
331
 
330
332
        while ((skb = skb_dequeue(&local->skb_queue)) ||
340
342
                        skb->pkt_type = 0;
341
343
                        ieee80211_tx_status(local_to_hw(local), skb);
342
344
                        break;
 
345
                case IEEE80211_EOSP_MSG:
 
346
                        eosp_data = (void *)skb->cb;
 
347
                        for_each_sta_info(local, eosp_data->sta, sta, tmp) {
 
348
                                /* skip wrong virtual interface */
 
349
                                if (memcmp(eosp_data->iface,
 
350
                                           sta->sdata->vif.addr, ETH_ALEN))
 
351
                                        continue;
 
352
                                clear_sta_flag(sta, WLAN_STA_SP);
 
353
                                break;
 
354
                        }
 
355
                        dev_kfree_skb(skb);
 
356
                        break;
343
357
                default:
344
358
                        WARN(1, "mac80211: Packet is of unknown type %d\n",
345
359
                             skb->pkt_type);
608
622
        local->hw.max_rates = 1;
609
623
        local->hw.max_report_rates = 0;
610
624
        local->hw.max_rx_aggregation_subframes = IEEE80211_MAX_AMPDU_BUF;
 
625
        local->hw.max_tx_aggregation_subframes = IEEE80211_MAX_AMPDU_BUF;
611
626
        local->hw.conf.long_frame_max_tx_count = wiphy->retry_long;
612
627
        local->hw.conf.short_frame_max_tx_count = wiphy->retry_short;
613
628
        local->user_power_level = -1;
862
877
        if (local->ops->sched_scan_start)
863
878
                local->hw.wiphy->flags |= WIPHY_FLAG_SUPPORTS_SCHED_SCAN;
864
879
 
 
880
        /* mac80211 based drivers don't support internal TDLS setup */
 
881
        if (local->hw.wiphy->flags & WIPHY_FLAG_SUPPORTS_TDLS)
 
882
                local->hw.wiphy->flags |= WIPHY_FLAG_TDLS_EXTERNAL_SETUP;
 
883
 
865
884
        result = wiphy_register(local->hw.wiphy);
866
885
        if (result < 0)
867
886
                goto fail_wiphy_register;
885
904
         * and we need some headroom for passing the frame to monitor
886
905
         * interfaces, but never both at the same time.
887
906
         */
888
 
#ifndef __CHECKER__
889
 
        BUILD_BUG_ON(IEEE80211_TX_STATUS_HEADROOM !=
890
 
                        sizeof(struct ieee80211_tx_status_rtap_hdr));
891
 
#endif
892
907
        local->tx_headroom = max_t(unsigned int , local->hw.extra_tx_headroom,
893
 
                                   sizeof(struct ieee80211_tx_status_rtap_hdr));
 
908
                                   IEEE80211_TX_STATUS_HEADROOM);
894
909
 
895
910
        debugfs_hw_add(local);
896
911
 
1012
1027
        cancel_work_sync(&local->reconfig_filter);
1013
1028
 
1014
1029
        ieee80211_clear_tx_pending(local);
1015
 
        sta_info_stop(local);
1016
1030
        rate_control_deinitialize(local);
1017
1031
 
1018
1032
        if (skb_queue_len(&local->skb_queue) ||
1024
1038
 
1025
1039
        destroy_workqueue(local->workqueue);
1026
1040
        wiphy_unregister(local->hw.wiphy);
 
1041
        sta_info_stop(local);
1027
1042
        ieee80211_wep_free(local);
1028
1043
        ieee80211_led_exit(local);
1029
1044
        kfree(local->int_scan_req);