~ubuntu-branches/ubuntu/trusty/linux-linaro-omap/trusty

« back to all changes in this revision

Viewing changes to net/mac80211/mlme.c

  • Committer: Package Import Robot
  • Author(s): John Rigby, John Rigby
  • Date: 2011-09-26 10:44:23 UTC
  • Revision ID: package-import@ubuntu.com-20110926104423-57i0gl3v99b3lkfg
Tags: 3.0.0-1007.9
[ John Rigby ]

Enable crypto modules and remove crypto-modules from
exclude-module files
LP: #826021

Show diffs side-by-side

added added

removed removed

Lines of Context:
90
90
        /* no action required */
91
91
        RX_MGMT_NONE,
92
92
 
93
 
        /* caller must call cfg80211_send_rx_auth() */
94
 
        RX_MGMT_CFG80211_AUTH,
95
 
 
96
 
        /* caller must call cfg80211_send_rx_assoc() */
97
 
        RX_MGMT_CFG80211_ASSOC,
98
 
 
99
93
        /* caller must call cfg80211_send_deauth() */
100
94
        RX_MGMT_CFG80211_DEAUTH,
101
95
 
102
96
        /* caller must call cfg80211_send_disassoc() */
103
97
        RX_MGMT_CFG80211_DISASSOC,
104
 
 
105
 
        /* caller must tell cfg80211 about internal error */
106
 
        RX_MGMT_CFG80211_ASSOC_ERROR,
107
98
};
108
99
 
109
100
/* utils */
759
750
                             dynamic_ps_enable_work);
760
751
        struct ieee80211_sub_if_data *sdata = local->ps_sdata;
761
752
        struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
 
753
        unsigned long flags;
 
754
        int q;
762
755
 
763
756
        /* can only happen when PS was just disabled anyway */
764
757
        if (!sdata)
767
760
        if (local->hw.conf.flags & IEEE80211_CONF_PS)
768
761
                return;
769
762
 
 
763
        /*
 
764
         * transmission can be stopped by others which leads to
 
765
         * dynamic_ps_timer expiry. Postpond the ps timer if it
 
766
         * is not the actual idle state.
 
767
         */
 
768
        spin_lock_irqsave(&local->queue_stop_reason_lock, flags);
 
769
        for (q = 0; q < local->hw.queues; q++) {
 
770
                if (local->queue_stop_reasons[q]) {
 
771
                        spin_unlock_irqrestore(&local->queue_stop_reason_lock,
 
772
                                               flags);
 
773
                        mod_timer(&local->dynamic_ps_timer, jiffies +
 
774
                                  msecs_to_jiffies(
 
775
                                  local->hw.conf.dynamic_ps_timeout));
 
776
                        return;
 
777
                }
 
778
        }
 
779
        spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags);
 
780
 
770
781
        if ((local->hw.flags & IEEE80211_HW_PS_NULLFUNC_STACK) &&
771
782
            (!(ifmgd->flags & IEEE80211_STA_NULLFUNC_ACKED))) {
772
783
                netif_tx_stop_all_queues(sdata->dev);
773
 
                /*
774
 
                 * Flush all the frames queued in the driver before
775
 
                 * going to power save
776
 
                 */
777
 
                drv_flush(local, false);
778
 
                ieee80211_send_nullfunc(local, sdata, 1);
779
784
 
780
 
                /* Flush once again to get the tx status of nullfunc frame */
781
 
                drv_flush(local, false);
 
785
                if (drv_tx_frames_pending(local))
 
786
                        mod_timer(&local->dynamic_ps_timer, jiffies +
 
787
                                  msecs_to_jiffies(
 
788
                                  local->hw.conf.dynamic_ps_timeout));
 
789
                else {
 
790
                        ieee80211_send_nullfunc(local, sdata, 1);
 
791
                        /* Flush to get the tx status of nullfunc frame */
 
792
                        drv_flush(local, false);
 
793
                }
782
794
        }
783
795
 
784
796
        if (!((local->hw.flags & IEEE80211_HW_REPORTS_TX_ACK_STATUS) &&
1077
1089
                local->hw.conf.flags &= ~IEEE80211_CONF_PS;
1078
1090
                config_changed |= IEEE80211_CONF_CHANGE_PS;
1079
1091
        }
 
1092
        local->ps_sdata = NULL;
1080
1093
 
1081
1094
        ieee80211_hw_config(local, config_changed);
1082
1095
 
2187
2200
{
2188
2201
        struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
2189
2202
 
 
2203
        if (!ifmgd->associated)
 
2204
                return;
 
2205
 
2190
2206
        if (test_and_clear_bit(TMR_RUNNING_TIMER, &ifmgd->timers_running))
2191
2207
                add_timer(&ifmgd->timer);
2192
2208
        if (test_and_clear_bit(TMR_RUNNING_CHANSW, &ifmgd->timers_running))