linux/net/mac80211/util.c
<<
>>
Prefs
   1/*
   2 * Copyright 2002-2005, Instant802 Networks, Inc.
   3 * Copyright 2005-2006, Devicescape Software, Inc.
   4 * Copyright 2006-2007  Jiri Benc <jbenc@suse.cz>
   5 * Copyright 2007       Johannes Berg <johannes@sipsolutions.net>
   6 *
   7 * This program is free software; you can redistribute it and/or modify
   8 * it under the terms of the GNU General Public License version 2 as
   9 * published by the Free Software Foundation.
  10 *
  11 * utilities for mac80211
  12 */
  13
  14#include <net/mac80211.h>
  15#include <linux/netdevice.h>
  16#include <linux/export.h>
  17#include <linux/types.h>
  18#include <linux/slab.h>
  19#include <linux/skbuff.h>
  20#include <linux/etherdevice.h>
  21#include <linux/if_arp.h>
  22#include <linux/bitmap.h>
  23#include <linux/crc32.h>
  24#include <net/net_namespace.h>
  25#include <net/cfg80211.h>
  26#include <net/rtnetlink.h>
  27
  28#include "ieee80211_i.h"
  29#include "driver-ops.h"
  30#include "rate.h"
  31#include "mesh.h"
  32#include "wme.h"
  33#include "led.h"
  34#include "wep.h"
  35
  36/* privid for wiphys to determine whether they belong to us or not */
  37void *mac80211_wiphy_privid = &mac80211_wiphy_privid;
  38
  39struct ieee80211_hw *wiphy_to_ieee80211_hw(struct wiphy *wiphy)
  40{
  41        struct ieee80211_local *local;
  42        BUG_ON(!wiphy);
  43
  44        local = wiphy_priv(wiphy);
  45        return &local->hw;
  46}
  47EXPORT_SYMBOL(wiphy_to_ieee80211_hw);
  48
  49u8 *ieee80211_get_bssid(struct ieee80211_hdr *hdr, size_t len,
  50                        enum nl80211_iftype type)
  51{
  52        __le16 fc = hdr->frame_control;
  53
  54         /* drop ACK/CTS frames and incorrect hdr len (ctrl) */
  55        if (len < 16)
  56                return NULL;
  57
  58        if (ieee80211_is_data(fc)) {
  59                if (len < 24) /* drop incorrect hdr len (data) */
  60                        return NULL;
  61
  62                if (ieee80211_has_a4(fc))
  63                        return NULL;
  64                if (ieee80211_has_tods(fc))
  65                        return hdr->addr1;
  66                if (ieee80211_has_fromds(fc))
  67                        return hdr->addr2;
  68
  69                return hdr->addr3;
  70        }
  71
  72        if (ieee80211_is_mgmt(fc)) {
  73                if (len < 24) /* drop incorrect hdr len (mgmt) */
  74                        return NULL;
  75                return hdr->addr3;
  76        }
  77
  78        if (ieee80211_is_ctl(fc)) {
  79                if(ieee80211_is_pspoll(fc))
  80                        return hdr->addr1;
  81
  82                if (ieee80211_is_back_req(fc)) {
  83                        switch (type) {
  84                        case NL80211_IFTYPE_STATION:
  85                                return hdr->addr2;
  86                        case NL80211_IFTYPE_AP:
  87                        case NL80211_IFTYPE_AP_VLAN:
  88                                return hdr->addr1;
  89                        default:
  90                                break; /* fall through to the return */
  91                        }
  92                }
  93        }
  94
  95        return NULL;
  96}
  97
  98void ieee80211_tx_set_protected(struct ieee80211_tx_data *tx)
  99{
 100        struct sk_buff *skb;
 101        struct ieee80211_hdr *hdr;
 102
 103        skb_queue_walk(&tx->skbs, skb) {
 104                hdr = (struct ieee80211_hdr *) skb->data;
 105                hdr->frame_control |= cpu_to_le16(IEEE80211_FCTL_PROTECTED);
 106        }
 107}
 108
 109int ieee80211_frame_duration(enum ieee80211_band band, size_t len,
 110                             int rate, int erp, int short_preamble)
 111{
 112        int dur;
 113
 114        /* calculate duration (in microseconds, rounded up to next higher
 115         * integer if it includes a fractional microsecond) to send frame of
 116         * len bytes (does not include FCS) at the given rate. Duration will
 117         * also include SIFS.
 118         *
 119         * rate is in 100 kbps, so divident is multiplied by 10 in the
 120         * DIV_ROUND_UP() operations.
 121         */
 122
 123        if (band == IEEE80211_BAND_5GHZ || erp) {
 124                /*
 125                 * OFDM:
 126                 *
 127                 * N_DBPS = DATARATE x 4
 128                 * N_SYM = Ceiling((16+8xLENGTH+6) / N_DBPS)
 129                 *      (16 = SIGNAL time, 6 = tail bits)
 130                 * TXTIME = T_PREAMBLE + T_SIGNAL + T_SYM x N_SYM + Signal Ext
 131                 *
 132                 * T_SYM = 4 usec
 133                 * 802.11a - 17.5.2: aSIFSTime = 16 usec
 134                 * 802.11g - 19.8.4: aSIFSTime = 10 usec +
 135                 *      signal ext = 6 usec
 136                 */
 137                dur = 16; /* SIFS + signal ext */
 138                dur += 16; /* 17.3.2.3: T_PREAMBLE = 16 usec */
 139                dur += 4; /* 17.3.2.3: T_SIGNAL = 4 usec */
 140                dur += 4 * DIV_ROUND_UP((16 + 8 * (len + 4) + 6) * 10,
 141                                        4 * rate); /* T_SYM x N_SYM */
 142        } else {
 143                /*
 144                 * 802.11b or 802.11g with 802.11b compatibility:
 145                 * 18.3.4: TXTIME = PreambleLength + PLCPHeaderTime +
 146                 * Ceiling(((LENGTH+PBCC)x8)/DATARATE). PBCC=0.
 147                 *
 148                 * 802.11 (DS): 15.3.3, 802.11b: 18.3.4
 149                 * aSIFSTime = 10 usec
 150                 * aPreambleLength = 144 usec or 72 usec with short preamble
 151                 * aPLCPHeaderLength = 48 usec or 24 usec with short preamble
 152                 */
 153                dur = 10; /* aSIFSTime = 10 usec */
 154                dur += short_preamble ? (72 + 24) : (144 + 48);
 155
 156                dur += DIV_ROUND_UP(8 * (len + 4) * 10, rate);
 157        }
 158
 159        return dur;
 160}
 161
 162/* Exported duration function for driver use */
 163__le16 ieee80211_generic_frame_duration(struct ieee80211_hw *hw,
 164                                        struct ieee80211_vif *vif,
 165                                        enum ieee80211_band band,
 166                                        size_t frame_len,
 167                                        struct ieee80211_rate *rate)
 168{
 169        struct ieee80211_sub_if_data *sdata;
 170        u16 dur;
 171        int erp;
 172        bool short_preamble = false;
 173
 174        erp = 0;
 175        if (vif) {
 176                sdata = vif_to_sdata(vif);
 177                short_preamble = sdata->vif.bss_conf.use_short_preamble;
 178                if (sdata->flags & IEEE80211_SDATA_OPERATING_GMODE)
 179                        erp = rate->flags & IEEE80211_RATE_ERP_G;
 180        }
 181
 182        dur = ieee80211_frame_duration(band, frame_len, rate->bitrate, erp,
 183                                       short_preamble);
 184
 185        return cpu_to_le16(dur);
 186}
 187EXPORT_SYMBOL(ieee80211_generic_frame_duration);
 188
 189__le16 ieee80211_rts_duration(struct ieee80211_hw *hw,
 190                              struct ieee80211_vif *vif, size_t frame_len,
 191                              const struct ieee80211_tx_info *frame_txctl)
 192{
 193        struct ieee80211_local *local = hw_to_local(hw);
 194        struct ieee80211_rate *rate;
 195        struct ieee80211_sub_if_data *sdata;
 196        bool short_preamble;
 197        int erp;
 198        u16 dur;
 199        struct ieee80211_supported_band *sband;
 200
 201        sband = local->hw.wiphy->bands[frame_txctl->band];
 202
 203        short_preamble = false;
 204
 205        rate = &sband->bitrates[frame_txctl->control.rts_cts_rate_idx];
 206
 207        erp = 0;
 208        if (vif) {
 209                sdata = vif_to_sdata(vif);
 210                short_preamble = sdata->vif.bss_conf.use_short_preamble;
 211                if (sdata->flags & IEEE80211_SDATA_OPERATING_GMODE)
 212                        erp = rate->flags & IEEE80211_RATE_ERP_G;
 213        }
 214
 215        /* CTS duration */
 216        dur = ieee80211_frame_duration(sband->band, 10, rate->bitrate,
 217                                       erp, short_preamble);
 218        /* Data frame duration */
 219        dur += ieee80211_frame_duration(sband->band, frame_len, rate->bitrate,
 220                                        erp, short_preamble);
 221        /* ACK duration */
 222        dur += ieee80211_frame_duration(sband->band, 10, rate->bitrate,
 223                                        erp, short_preamble);
 224
 225        return cpu_to_le16(dur);
 226}
 227EXPORT_SYMBOL(ieee80211_rts_duration);
 228
 229__le16 ieee80211_ctstoself_duration(struct ieee80211_hw *hw,
 230                                    struct ieee80211_vif *vif,
 231                                    size_t frame_len,
 232                                    const struct ieee80211_tx_info *frame_txctl)
 233{
 234        struct ieee80211_local *local = hw_to_local(hw);
 235        struct ieee80211_rate *rate;
 236        struct ieee80211_sub_if_data *sdata;
 237        bool short_preamble;
 238        int erp;
 239        u16 dur;
 240        struct ieee80211_supported_band *sband;
 241
 242        sband = local->hw.wiphy->bands[frame_txctl->band];
 243
 244        short_preamble = false;
 245
 246        rate = &sband->bitrates[frame_txctl->control.rts_cts_rate_idx];
 247        erp = 0;
 248        if (vif) {
 249                sdata = vif_to_sdata(vif);
 250                short_preamble = sdata->vif.bss_conf.use_short_preamble;
 251                if (sdata->flags & IEEE80211_SDATA_OPERATING_GMODE)
 252                        erp = rate->flags & IEEE80211_RATE_ERP_G;
 253        }
 254
 255        /* Data frame duration */
 256        dur = ieee80211_frame_duration(sband->band, frame_len, rate->bitrate,
 257                                       erp, short_preamble);
 258        if (!(frame_txctl->flags & IEEE80211_TX_CTL_NO_ACK)) {
 259                /* ACK duration */
 260                dur += ieee80211_frame_duration(sband->band, 10, rate->bitrate,
 261                                                erp, short_preamble);
 262        }
 263
 264        return cpu_to_le16(dur);
 265}
 266EXPORT_SYMBOL(ieee80211_ctstoself_duration);
 267
 268void ieee80211_propagate_queue_wake(struct ieee80211_local *local, int queue)
 269{
 270        struct ieee80211_sub_if_data *sdata;
 271        int n_acs = IEEE80211_NUM_ACS;
 272
 273        if (local->hw.queues < IEEE80211_NUM_ACS)
 274                n_acs = 1;
 275
 276        list_for_each_entry_rcu(sdata, &local->interfaces, list) {
 277                int ac;
 278
 279                if (!sdata->dev)
 280                        continue;
 281
 282                if (test_bit(SDATA_STATE_OFFCHANNEL, &sdata->state))
 283                        continue;
 284
 285                if (sdata->vif.cab_queue != IEEE80211_INVAL_HW_QUEUE &&
 286                    local->queue_stop_reasons[sdata->vif.cab_queue] != 0)
 287                        continue;
 288
 289                for (ac = 0; ac < n_acs; ac++) {
 290                        int ac_queue = sdata->vif.hw_queue[ac];
 291
 292                        if (ac_queue == queue ||
 293                            (sdata->vif.cab_queue == queue &&
 294                             local->queue_stop_reasons[ac_queue] == 0 &&
 295                             skb_queue_empty(&local->pending[ac_queue])))
 296                                netif_wake_subqueue(sdata->dev, ac);
 297                }
 298        }
 299}
 300
 301static void __ieee80211_wake_queue(struct ieee80211_hw *hw, int queue,
 302                                   enum queue_stop_reason reason)
 303{
 304        struct ieee80211_local *local = hw_to_local(hw);
 305
 306        trace_wake_queue(local, queue, reason);
 307
 308        if (WARN_ON(queue >= hw->queues))
 309                return;
 310
 311        if (!test_bit(reason, &local->queue_stop_reasons[queue]))
 312                return;
 313
 314        __clear_bit(reason, &local->queue_stop_reasons[queue]);
 315
 316        if (local->queue_stop_reasons[queue] != 0)
 317                /* someone still has this queue stopped */
 318                return;
 319
 320        if (skb_queue_empty(&local->pending[queue])) {
 321                rcu_read_lock();
 322                ieee80211_propagate_queue_wake(local, queue);
 323                rcu_read_unlock();
 324        } else
 325                tasklet_schedule(&local->tx_pending_tasklet);
 326}
 327
 328void ieee80211_wake_queue_by_reason(struct ieee80211_hw *hw, int queue,
 329                                    enum queue_stop_reason reason)
 330{
 331        struct ieee80211_local *local = hw_to_local(hw);
 332        unsigned long flags;
 333
 334        spin_lock_irqsave(&local->queue_stop_reason_lock, flags);
 335        __ieee80211_wake_queue(hw, queue, reason);
 336        spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags);
 337}
 338
 339void ieee80211_wake_queue(struct ieee80211_hw *hw, int queue)
 340{
 341        ieee80211_wake_queue_by_reason(hw, queue,
 342                                       IEEE80211_QUEUE_STOP_REASON_DRIVER);
 343}
 344EXPORT_SYMBOL(ieee80211_wake_queue);
 345
 346static void __ieee80211_stop_queue(struct ieee80211_hw *hw, int queue,
 347                                   enum queue_stop_reason reason)
 348{
 349        struct ieee80211_local *local = hw_to_local(hw);
 350        struct ieee80211_sub_if_data *sdata;
 351        int n_acs = IEEE80211_NUM_ACS;
 352
 353        trace_stop_queue(local, queue, reason);
 354
 355        if (WARN_ON(queue >= hw->queues))
 356                return;
 357
 358        if (test_bit(reason, &local->queue_stop_reasons[queue]))
 359                return;
 360
 361        __set_bit(reason, &local->queue_stop_reasons[queue]);
 362
 363        if (local->hw.queues < IEEE80211_NUM_ACS)
 364                n_acs = 1;
 365
 366        rcu_read_lock();
 367        list_for_each_entry_rcu(sdata, &local->interfaces, list) {
 368                int ac;
 369
 370                if (!sdata->dev)
 371                        continue;
 372
 373                for (ac = 0; ac < n_acs; ac++) {
 374                        if (sdata->vif.hw_queue[ac] == queue ||
 375                            sdata->vif.cab_queue == queue)
 376                                netif_stop_subqueue(sdata->dev, ac);
 377                }
 378        }
 379        rcu_read_unlock();
 380}
 381
 382void ieee80211_stop_queue_by_reason(struct ieee80211_hw *hw, int queue,
 383                                    enum queue_stop_reason reason)
 384{
 385        struct ieee80211_local *local = hw_to_local(hw);
 386        unsigned long flags;
 387
 388        spin_lock_irqsave(&local->queue_stop_reason_lock, flags);
 389        __ieee80211_stop_queue(hw, queue, reason);
 390        spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags);
 391}
 392
 393void ieee80211_stop_queue(struct ieee80211_hw *hw, int queue)
 394{
 395        ieee80211_stop_queue_by_reason(hw, queue,
 396                                       IEEE80211_QUEUE_STOP_REASON_DRIVER);
 397}
 398EXPORT_SYMBOL(ieee80211_stop_queue);
 399
 400void ieee80211_add_pending_skb(struct ieee80211_local *local,
 401                               struct sk_buff *skb)
 402{
 403        struct ieee80211_hw *hw = &local->hw;
 404        unsigned long flags;
 405        struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
 406        int queue = info->hw_queue;
 407
 408        if (WARN_ON(!info->control.vif)) {
 409                ieee80211_free_txskb(&local->hw, skb);
 410                return;
 411        }
 412
 413        spin_lock_irqsave(&local->queue_stop_reason_lock, flags);
 414        __ieee80211_stop_queue(hw, queue, IEEE80211_QUEUE_STOP_REASON_SKB_ADD);
 415        __skb_queue_tail(&local->pending[queue], skb);
 416        __ieee80211_wake_queue(hw, queue, IEEE80211_QUEUE_STOP_REASON_SKB_ADD);
 417        spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags);
 418}
 419
 420void ieee80211_add_pending_skbs_fn(struct ieee80211_local *local,
 421                                   struct sk_buff_head *skbs,
 422                                   void (*fn)(void *data), void *data)
 423{
 424        struct ieee80211_hw *hw = &local->hw;
 425        struct sk_buff *skb;
 426        unsigned long flags;
 427        int queue, i;
 428
 429        spin_lock_irqsave(&local->queue_stop_reason_lock, flags);
 430        while ((skb = skb_dequeue(skbs))) {
 431                struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
 432
 433                if (WARN_ON(!info->control.vif)) {
 434                        ieee80211_free_txskb(&local->hw, skb);
 435                        continue;
 436                }
 437
 438                queue = info->hw_queue;
 439
 440                __ieee80211_stop_queue(hw, queue,
 441                                IEEE80211_QUEUE_STOP_REASON_SKB_ADD);
 442
 443                __skb_queue_tail(&local->pending[queue], skb);
 444        }
 445
 446        if (fn)
 447                fn(data);
 448
 449        for (i = 0; i < hw->queues; i++)
 450                __ieee80211_wake_queue(hw, i,
 451                        IEEE80211_QUEUE_STOP_REASON_SKB_ADD);
 452        spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags);
 453}
 454
 455void ieee80211_stop_queues_by_reason(struct ieee80211_hw *hw,
 456                                    enum queue_stop_reason reason)
 457{
 458        struct ieee80211_local *local = hw_to_local(hw);
 459        unsigned long flags;
 460        int i;
 461
 462        spin_lock_irqsave(&local->queue_stop_reason_lock, flags);
 463
 464        for (i = 0; i < hw->queues; i++)
 465                __ieee80211_stop_queue(hw, i, reason);
 466
 467        spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags);
 468}
 469
 470void ieee80211_stop_queues(struct ieee80211_hw *hw)
 471{
 472        ieee80211_stop_queues_by_reason(hw,
 473                                        IEEE80211_QUEUE_STOP_REASON_DRIVER);
 474}
 475EXPORT_SYMBOL(ieee80211_stop_queues);
 476
 477int ieee80211_queue_stopped(struct ieee80211_hw *hw, int queue)
 478{
 479        struct ieee80211_local *local = hw_to_local(hw);
 480        unsigned long flags;
 481        int ret;
 482
 483        if (WARN_ON(queue >= hw->queues))
 484                return true;
 485
 486        spin_lock_irqsave(&local->queue_stop_reason_lock, flags);
 487        ret = !!local->queue_stop_reasons[queue];
 488        spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags);
 489        return ret;
 490}
 491EXPORT_SYMBOL(ieee80211_queue_stopped);
 492
 493void ieee80211_wake_queues_by_reason(struct ieee80211_hw *hw,
 494                                     enum queue_stop_reason reason)
 495{
 496        struct ieee80211_local *local = hw_to_local(hw);
 497        unsigned long flags;
 498        int i;
 499
 500        spin_lock_irqsave(&local->queue_stop_reason_lock, flags);
 501
 502        for (i = 0; i < hw->queues; i++)
 503                __ieee80211_wake_queue(hw, i, reason);
 504
 505        spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags);
 506}
 507
 508void ieee80211_wake_queues(struct ieee80211_hw *hw)
 509{
 510        ieee80211_wake_queues_by_reason(hw, IEEE80211_QUEUE_STOP_REASON_DRIVER);
 511}
 512EXPORT_SYMBOL(ieee80211_wake_queues);
 513
 514void ieee80211_iterate_active_interfaces(
 515        struct ieee80211_hw *hw,
 516        void (*iterator)(void *data, u8 *mac,
 517                         struct ieee80211_vif *vif),
 518        void *data)
 519{
 520        struct ieee80211_local *local = hw_to_local(hw);
 521        struct ieee80211_sub_if_data *sdata;
 522
 523        mutex_lock(&local->iflist_mtx);
 524
 525        list_for_each_entry(sdata, &local->interfaces, list) {
 526                switch (sdata->vif.type) {
 527                case NL80211_IFTYPE_MONITOR:
 528                case NL80211_IFTYPE_AP_VLAN:
 529                        continue;
 530                default:
 531                        break;
 532                }
 533                if (ieee80211_sdata_running(sdata))
 534                        iterator(data, sdata->vif.addr,
 535                                 &sdata->vif);
 536        }
 537
 538        sdata = rcu_dereference_protected(local->monitor_sdata,
 539                                          lockdep_is_held(&local->iflist_mtx));
 540        if (sdata)
 541                iterator(data, sdata->vif.addr, &sdata->vif);
 542
 543        mutex_unlock(&local->iflist_mtx);
 544}
 545EXPORT_SYMBOL_GPL(ieee80211_iterate_active_interfaces);
 546
 547void ieee80211_iterate_active_interfaces_atomic(
 548        struct ieee80211_hw *hw,
 549        void (*iterator)(void *data, u8 *mac,
 550                         struct ieee80211_vif *vif),
 551        void *data)
 552{
 553        struct ieee80211_local *local = hw_to_local(hw);
 554        struct ieee80211_sub_if_data *sdata;
 555
 556        rcu_read_lock();
 557
 558        list_for_each_entry_rcu(sdata, &local->interfaces, list) {
 559                switch (sdata->vif.type) {
 560                case NL80211_IFTYPE_MONITOR:
 561                case NL80211_IFTYPE_AP_VLAN:
 562                        continue;
 563                default:
 564                        break;
 565                }
 566                if (ieee80211_sdata_running(sdata))
 567                        iterator(data, sdata->vif.addr,
 568                                 &sdata->vif);
 569        }
 570
 571        sdata = rcu_dereference(local->monitor_sdata);
 572        if (sdata)
 573                iterator(data, sdata->vif.addr, &sdata->vif);
 574
 575        rcu_read_unlock();
 576}
 577EXPORT_SYMBOL_GPL(ieee80211_iterate_active_interfaces_atomic);
 578
 579/*
 580 * Nothing should have been stuffed into the workqueue during
 581 * the suspend->resume cycle. If this WARN is seen then there
 582 * is a bug with either the driver suspend or something in
 583 * mac80211 stuffing into the workqueue which we haven't yet
 584 * cleared during mac80211's suspend cycle.
 585 */
 586static bool ieee80211_can_queue_work(struct ieee80211_local *local)
 587{
 588        if (WARN(local->suspended && !local->resuming,
 589                 "queueing ieee80211 work while going to suspend\n"))
 590                return false;
 591
 592        return true;
 593}
 594
 595void ieee80211_queue_work(struct ieee80211_hw *hw, struct work_struct *work)
 596{
 597        struct ieee80211_local *local = hw_to_local(hw);
 598
 599        if (!ieee80211_can_queue_work(local))
 600                return;
 601
 602        queue_work(local->workqueue, work);
 603}
 604EXPORT_SYMBOL(ieee80211_queue_work);
 605
 606void ieee80211_queue_delayed_work(struct ieee80211_hw *hw,
 607                                  struct delayed_work *dwork,
 608                                  unsigned long delay)
 609{
 610        struct ieee80211_local *local = hw_to_local(hw);
 611
 612        if (!ieee80211_can_queue_work(local))
 613                return;
 614
 615        queue_delayed_work(local->workqueue, dwork, delay);
 616}
 617EXPORT_SYMBOL(ieee80211_queue_delayed_work);
 618
 619u32 ieee802_11_parse_elems_crc(u8 *start, size_t len,
 620                               struct ieee802_11_elems *elems,
 621                               u64 filter, u32 crc)
 622{
 623        size_t left = len;
 624        u8 *pos = start;
 625        bool calc_crc = filter != 0;
 626        DECLARE_BITMAP(seen_elems, 256);
 627
 628        bitmap_zero(seen_elems, 256);
 629        memset(elems, 0, sizeof(*elems));
 630        elems->ie_start = start;
 631        elems->total_len = len;
 632
 633        while (left >= 2) {
 634                u8 id, elen;
 635                bool elem_parse_failed;
 636
 637                id = *pos++;
 638                elen = *pos++;
 639                left -= 2;
 640
 641                if (elen > left) {
 642                        elems->parse_error = true;
 643                        break;
 644                }
 645
 646                switch (id) {
 647                case WLAN_EID_SSID:
 648                case WLAN_EID_SUPP_RATES:
 649                case WLAN_EID_FH_PARAMS:
 650                case WLAN_EID_DS_PARAMS:
 651                case WLAN_EID_CF_PARAMS:
 652                case WLAN_EID_TIM:
 653                case WLAN_EID_IBSS_PARAMS:
 654                case WLAN_EID_CHALLENGE:
 655                case WLAN_EID_RSN:
 656                case WLAN_EID_ERP_INFO:
 657                case WLAN_EID_EXT_SUPP_RATES:
 658                case WLAN_EID_HT_CAPABILITY:
 659                case WLAN_EID_HT_OPERATION:
 660                case WLAN_EID_VHT_CAPABILITY:
 661                case WLAN_EID_VHT_OPERATION:
 662                case WLAN_EID_MESH_ID:
 663                case WLAN_EID_MESH_CONFIG:
 664                case WLAN_EID_PEER_MGMT:
 665                case WLAN_EID_PREQ:
 666                case WLAN_EID_PREP:
 667                case WLAN_EID_PERR:
 668                case WLAN_EID_RANN:
 669                case WLAN_EID_CHANNEL_SWITCH:
 670                case WLAN_EID_EXT_CHANSWITCH_ANN:
 671                case WLAN_EID_COUNTRY:
 672                case WLAN_EID_PWR_CONSTRAINT:
 673                case WLAN_EID_TIMEOUT_INTERVAL:
 674                        if (test_bit(id, seen_elems)) {
 675                                elems->parse_error = true;
 676                                left -= elen;
 677                                pos += elen;
 678                                continue;
 679                        }
 680                        break;
 681                }
 682
 683                if (calc_crc && id < 64 && (filter & (1ULL << id)))
 684                        crc = crc32_be(crc, pos - 2, elen + 2);
 685
 686                elem_parse_failed = false;
 687
 688                switch (id) {
 689                case WLAN_EID_SSID:
 690                        elems->ssid = pos;
 691                        elems->ssid_len = elen;
 692                        break;
 693                case WLAN_EID_SUPP_RATES:
 694                        elems->supp_rates = pos;
 695                        elems->supp_rates_len = elen;
 696                        break;
 697                case WLAN_EID_FH_PARAMS:
 698                        elems->fh_params = pos;
 699                        elems->fh_params_len = elen;
 700                        break;
 701                case WLAN_EID_DS_PARAMS:
 702                        elems->ds_params = pos;
 703                        elems->ds_params_len = elen;
 704                        break;
 705                case WLAN_EID_CF_PARAMS:
 706                        elems->cf_params = pos;
 707                        elems->cf_params_len = elen;
 708                        break;
 709                case WLAN_EID_TIM:
 710                        if (elen >= sizeof(struct ieee80211_tim_ie)) {
 711                                elems->tim = (void *)pos;
 712                                elems->tim_len = elen;
 713                        } else
 714                                elem_parse_failed = true;
 715                        break;
 716                case WLAN_EID_IBSS_PARAMS:
 717                        elems->ibss_params = pos;
 718                        elems->ibss_params_len = elen;
 719                        break;
 720                case WLAN_EID_CHALLENGE:
 721                        elems->challenge = pos;
 722                        elems->challenge_len = elen;
 723                        break;
 724                case WLAN_EID_VENDOR_SPECIFIC:
 725                        if (elen >= 4 && pos[0] == 0x00 && pos[1] == 0x50 &&
 726                            pos[2] == 0xf2) {
 727                                /* Microsoft OUI (00:50:F2) */
 728
 729                                if (calc_crc)
 730                                        crc = crc32_be(crc, pos - 2, elen + 2);
 731
 732                                if (pos[3] == 1) {
 733                                        /* OUI Type 1 - WPA IE */
 734                                        elems->wpa = pos;
 735                                        elems->wpa_len = elen;
 736                                } else if (elen >= 5 && pos[3] == 2) {
 737                                        /* OUI Type 2 - WMM IE */
 738                                        if (pos[4] == 0) {
 739                                                elems->wmm_info = pos;
 740                                                elems->wmm_info_len = elen;
 741                                        } else if (pos[4] == 1) {
 742                                                elems->wmm_param = pos;
 743                                                elems->wmm_param_len = elen;
 744                                        }
 745                                }
 746                        }
 747                        break;
 748                case WLAN_EID_RSN:
 749                        elems->rsn = pos;
 750                        elems->rsn_len = elen;
 751                        break;
 752                case WLAN_EID_ERP_INFO:
 753                        elems->erp_info = pos;
 754                        elems->erp_info_len = elen;
 755                        break;
 756                case WLAN_EID_EXT_SUPP_RATES:
 757                        elems->ext_supp_rates = pos;
 758                        elems->ext_supp_rates_len = elen;
 759                        break;
 760                case WLAN_EID_HT_CAPABILITY:
 761                        if (elen >= sizeof(struct ieee80211_ht_cap))
 762                                elems->ht_cap_elem = (void *)pos;
 763                        else
 764                                elem_parse_failed = true;
 765                        break;
 766                case WLAN_EID_HT_OPERATION:
 767                        if (elen >= sizeof(struct ieee80211_ht_operation))
 768                                elems->ht_operation = (void *)pos;
 769                        else
 770                                elem_parse_failed = true;
 771                        break;
 772                case WLAN_EID_MESH_ID:
 773                        elems->mesh_id = pos;
 774                        elems->mesh_id_len = elen;
 775                        break;
 776                case WLAN_EID_MESH_CONFIG:
 777                        if (elen >= sizeof(struct ieee80211_meshconf_ie))
 778                                elems->mesh_config = (void *)pos;
 779                        else
 780                                elem_parse_failed = true;
 781                        break;
 782                case WLAN_EID_PEER_MGMT:
 783                        elems->peering = pos;
 784                        elems->peering_len = elen;
 785                        break;
 786                case WLAN_EID_PREQ:
 787                        elems->preq = pos;
 788                        elems->preq_len = elen;
 789                        break;
 790                case WLAN_EID_PREP:
 791                        elems->prep = pos;
 792                        elems->prep_len = elen;
 793                        break;
 794                case WLAN_EID_PERR:
 795                        elems->perr = pos;
 796                        elems->perr_len = elen;
 797                        break;
 798                case WLAN_EID_RANN:
 799                        if (elen >= sizeof(struct ieee80211_rann_ie))
 800                                elems->rann = (void *)pos;
 801                        else
 802                                elem_parse_failed = true;
 803                        break;
 804                case WLAN_EID_CHANNEL_SWITCH:
 805                        if (elen != sizeof(struct ieee80211_channel_sw_ie)) {
 806                                elem_parse_failed = true;
 807                                break;
 808                        }
 809                        elems->ch_switch_ie = (void *)pos;
 810                        break;
 811                case WLAN_EID_QUIET:
 812                        if (!elems->quiet_elem) {
 813                                elems->quiet_elem = pos;
 814                                elems->quiet_elem_len = elen;
 815                        }
 816                        elems->num_of_quiet_elem++;
 817                        break;
 818                case WLAN_EID_COUNTRY:
 819                        elems->country_elem = pos;
 820                        elems->country_elem_len = elen;
 821                        break;
 822                case WLAN_EID_PWR_CONSTRAINT:
 823                        if (elen != 1) {
 824                                elem_parse_failed = true;
 825                                break;
 826                        }
 827                        elems->pwr_constr_elem = pos;
 828                        break;
 829                case WLAN_EID_TIMEOUT_INTERVAL:
 830                        elems->timeout_int = pos;
 831                        elems->timeout_int_len = elen;
 832                        break;
 833                default:
 834                        break;
 835                }
 836
 837                if (elem_parse_failed)
 838                        elems->parse_error = true;
 839                else
 840                        set_bit(id, seen_elems);
 841
 842                left -= elen;
 843                pos += elen;
 844        }
 845
 846        if (left != 0)
 847                elems->parse_error = true;
 848
 849        return crc;
 850}
 851
 852void ieee802_11_parse_elems(u8 *start, size_t len,
 853                            struct ieee802_11_elems */* OUI Type 2 - WMM IE */<        845
 755     id start, lenelems<, 0, 0/a>);
 756}

 758void sf">w   defa_ie" class="sref">ieee802f">sf">w   defaems 759                     a>     id ibnotifywpa" class="sreb>ibnotify="sref"45DE               75L843"="sr#L760" id8"L760" class="line" name8"L7608> 760 845
 761     of(struct  762     of(struct  763     inruct  764     id  765     inruct 
 767        if (! 768                ret/a>;
 769;
 770        if ( 771                ret/a>;
 772;
 773     p;  774<>);
     id  776              !/a>(
 778        
 779<   
 780<    .11e. New APs will provi+c proper queue mm_paeters, */
 781<    782<        p; );
 785     for   (! 786                Set    defas according to2"> .11-2007 Table 7-37 *E */
 787                 788                if ( 789                     ct  790                else
 791                        ;
 793                if ( 794                     ch_swi   (! 795                        case  796                                 797                                 798                                 799                                 800                                break;
 801                        never happens but let's not leave un   ="ld *E */
 802                        default:
 803                        case  804                                 805                                 806                                 807                                 808                                break;
 809                        case  810                                 811                                 812                                if ( 813                                         814                                else
 815                                         816                                 817                                break;
 818                        case  819                                 820                                 821                                if ( 822                                         823                                else
 824                                         825                                 826                                break;
 827                     /a>}
 828             }    e 1) {
 829                        Ch_coure old "> .11b/g medium access rules. *E */
 830                         831                         832                         833                         834             /a>}

                
 838              =  839              =  840     /a>}
 841
 842        if ( 843         f (             f (ibsh_crep" class="sreb>ibsh_c>u8<.a>                 if (ibnotifywpa" class="sreb>ibnotify="sref"45DE               75L843"="s9#L846" id9"L846" class="line" name9"L84694 816                         847                                                       (!     /a>}
 849}
 850}
 851void wss_params" class="srefe=ieee802fta_defsf">wss_par839< of(struct                                wr_coa>, size_t  853                               wr_coa>, u8 */* OUI Type 2 - WMM I9 */< 9      845
 755     of(struct       nruct 
         .11 9. .12 *E */
 759     for   (!                i  (!                        ;
 763     i  if (                          =         else
                
     ct sf">w   defa_ie" class="sref">ieee802f">sf">w   defaems, true);
}

 772<>,                            enum     845
     of(struct  776     of(struct      ct  778     enum          nruct }
     ct         if (                retu1a>);
);
 785        if ( 786              t  787        else
 788              t ;
 790     > *     ct      for   (! 793                if ( 794                     ct  795        return }

void ieee802f"nd_auth839< of(struct  799                      ct 10#L799                      ct u8 *size_t u8 *>,
10# 821                      wr_coa>, u8 *u8 *u8 *u8 *10#2    845
10# 793     of(struct 10#4793     of(struct 10# 755     of(struct ieee802mgma>u8 *10# 846      nruct 10# 687
10# 778       *10# 819                         != sizea> *10"L785        if (!10" 771                ret/a>;
10" 772;
10" 773     p; 10" 774<>);
10" 755     id ieee802mgma>u810"6755     id 10"7759     ct 10" 808                                       id 10" 759     ct 10"L759     ct 10"1759     ct 10"2759     ct 10" 773     p; 10" 764     id );
10" 785        if (10" 786              t 10" 687
10"8785        if (10" 839              = 10"L839              = ieee802wep_encrypa_ie" class="sref">ieee802wep_encrypaems, 10" 771              = 10"2759     /a>}
10"3687
10" 764     id 10" 755     id ieee802tx_dkb=u8" class="sref">ieee802tx_dkbems, 10" 756}
10" 687
10" 758void 10" 819                                 wr_coa>, u8 * 840     /a>}
10L84>10L8              wr_coa>, uotrol>u8 =  841
 842        if10L84>10L"net/mac80211eee802localwpa" class="srede=ieee802local>u8 * 843         f10L84>10Lhref="+code=ieee802localwpa" class=ufc>u8 *          10L84>10Lhref="+cosk_bufcrep" class="sresk_bsref">ieee802mgma>u8 * href=bu           10L84>10L0211/util.9#L836" id9"L836" class="l10Lne" name10L84694 816          10L84>10Lcom>elea_ie" c. IEEE "> .11 9. .12 *E build  href/mac80211/util.9#L849" id9"L759" class="l10Lne" name10L8479> 847          10L84>10Lcomgma_ie" class="sremgma>u8->     /a>}
10L84>10Lcodkb=u8" class="sredkb>u8-> .11 9. .12 *E initialize only/mac80211/util.9#L849" id9"L759" class="l10Lne" name10L8499> 849}
10Lcom>ecpywpa" class="srem>ecpy/a>-> .11 9. .12 *E initialize only/mac80211/util.9#L849" id9"L759" class="l105ne" name10L8509> 850}
 851void 10Lcom>ecpywpa" class="srem>ecpyems          10L85>10Lcomgma_ie" class="sremgma>u8 853          10L85>10Lcomgma_ie" cla. IEEE "> .11 9. .12 *E u.uct );
 755     of(st10L75>10L0211/util.9#L836" id9"L836" class="l105ne" name10L75695 846      nruc10L75>10Lf="+coerrror" " class="sresdat=>u(str href>, 
        10L                     id u8="li1/util.1022800" id10"L822" class="l5ne" name10L7599> 759     for  10L75>10L               wr_coa" class="sredkb>u8          10L76>10L7                    id           10L76>10L0211/util.9#L772" id9"L772" class="l10Lne" name10L76296 772;
,  763     i  if10L76>10L0211/util.1034800" id10"L834" class="l6ne" name10L76496 834          10L76>10L href="+coddat=wpa" clsrext_s_ratesint_>u8,opynit="+coflag=pos" class="sreflag=770          10L76>10L href="+coddat=wpa" class="sresdat=>yemsu8);
u8="li1nutil.10"3800" id10"L833" class="l6ne" name10L76696 846        el10L76>10L      u8->u8);
u8="li1/util.1014800" id10"L2" class="l10Lne" name10L76796 787          10L76>10L0211/util.1038800" id10"L838" class="l6ne" name10L76896 848
     ct 10L               wr_coa>, u8->}
10L7                    id 
 772<>,           10L77>10L (ieee802tx_dkbems,      of(st10L77>10L50211/util.10"7800" id10"L837" class="l7ne" name10L7769> 776     of(st10L77>10L6211/util.10"3800" id10"L813" class="l7ne" name10L777977759     ct 10L0211/lass="sred>u8);
u8 * 778     enum 10L77>10L                     id u8 *u8<="linutil.10"3800" id10"L833" class="l7ne" name10L77997 759      nruc10L77>10L               wr_coa>, u8 t }
u8 *     ct 10L href/util.10"9800" id10"L829" class="l8ne" name10L78298 842        if10L78>10L"net/mac80211eee802localwpa" class="srede=ieesrefe=ieee802xt_sorted2bane>u8 *          10L78>10Lcomgma_ie" class="sremgma>u8 *);
u8noffs 785        if10L78>10Lf="+coexfea=u8ass="sred>u8);
srext_s_ratesint_>u8,
 786          10L78>10Lcom>elea_ie" class="srem>ele * 787        el10L78>10L7="+coexfea=u8ass="sred>u8);
802tory_rates839);
 788          10L78>10L8="+coexfea=u8ass="sred>u8);
extt_s_ratesint_>u8,
;
 790     > *10L7omgma_ie" class="sremgma>u8z8 =      ct 10L             ION" class="sreWARN_AT839<39u8<)= 0)
     for  10L79>10L             wr_coa>,atory_r1/util.9#L772" id9"L792" class="l10Lne" name10L7939> 793          10L79>10L0211/util.1034800" id10"L834" class="l9ne" name10L7949> 794          10L79>10Lcomgma_ie" class="sremgma>u8p=crc;
 795        re10L79>10L0211/util.9#L836" id9"L836" class="l109ne" name10L79699 756}
10Lcom>elea_ie" class="srem>ele802tory_rates839);

u80amp; void 10L                     a" cs="sred>u80a>,  799          10L79>10L               wr_coa>,  .11 9. .12 *E skip  +colag=pos" class="sreflag=77010#L799          1     1     ct ele *10# 821          1     1     wr_coa>, /util.10"7800" id10"L837" class="1ine" name11#L7>10#2   10# 793     of(st1uct <10codkb_reservtrue" class="sredrext_s_ratesint_>u8,
u8n02tory_rates839);
 794          11uct <100211/util.10"5800" id10"L815" class="1ine" name11#L7>10# 755     of(st1uct <1 href="+code=iclass="srebssde>p=crc;
10# 846      nruc1 
u8ory_rates839);
void  799          11     100211/util.9#L790" id9"L790" class="l11ine" name11"L8>10"L785        if1(! .11 9. .12 *E insert "request inclamatio_" a" iEEEustom IEslag=pos" class="sreflag=77010" 771          1     11             ION" class="sreWARNi> a> u8<="li41/util.10"9800" id10"L829" class="1ine" name11"L8>10" 772;
u8 *u80211s]de=/util.10"9800" id10"L829" class="1ine" name11"L8>10" 773     p; 10" 774<>);
10" 755     id 10"6755     id 10"7759     ct splerclass="sred>u8);
> a> u8<="linutil.10"3800" id10"L833" class="1ine" name11"L8>10" 808          1     1                      id u80211nutil.10"3800" id10"L833" class="1i9e" name11"L8>10" 759     ct , u8);neclae_
u8);
10"L759     ct , 10"1759     ct u8i> a> u8noffsoffs10"2759     ct , class="srefkb_p=crc;
10" 773     p; u8noffs10" 764     id 10" 785        if1(10" 786          1   t 12com>elea_ie" class="srem>eleextt_s_ratesint_>u8,
u8n02tory_rates839);
srext_s_ratesint_>u810" 687
10"8785        if1(10" 839          1   = 1a href="+comgma_ie" clclass="srebssde>p=crc;
10"L839          1   = 1a href="+coerrror" class="sreerr>u8;
u8ory_rates839);
u8,
10" 771          1   = 1a href="+coWARN_ATION" class="sreWARNp=crc;
10"2759     /a>}
1a hre1="net/mac80211/util.10"3800" id10"L833" class="1ine" name11"L8>10"3687
10" 764     id 10" 755     id 10" 756}
p=crc;
10" 687
10" 758void 10" 819          1     130211/util.9#L790" id9"L790" class="l114ne" name11L8409> 840     /a>}
11L84>114ef="+codkb=u8=. IEEE "> .11 9. .12 *E insert Eustom IEslthat go neclae HTlag=pos" class="sreflag=770 841
u8<="li41/util.10"9800" id10"L829" class="14ne" name11L8429> 842        if11L84>114             wr_coa>,ef="ic+" class="sref">u8 * 843         f11L84>114 (          11L84>114   ct           11L84>114 href="+coddat=wpa" ceatory_rateslen" class=0 &amEID_REQUES           11L84>114      0 &amEID_EXT_SUPP 847          11L84>114 href="+coddat=wpa" cieee802class="srelocal>0 &amEID_DS_PARAMSYPE_P2P_DEVICEr_ &amEID_DS_PARAMStoinnutil.10"3800" id10"L833" class="1Lne" name11L848948840     /a>}
11L84>114                     id  849}
114 href="+comgma_ie" cl}sutil.9#L772" id9"L792" class="l115ne" name11L8509> 850}
splerclass="sred>u8);
> a> u8<="linutil.10"3800" id10"L833" class="15ne" name11L8519> 851void 115              if (u8);neclae_h/id           11L85>115             wr_coa>,href="+coupar11bcoerrror" class="sreerr>u8 853          11L85>115 (u8i> a> u8noffsoffs 755     of(st11L75>115 href="+coddat=wpa" class="sresdat=>offsu8noffs      nruc11L75>11Lf="+coerrror"/util.10"3800" id10"L833" class="15ne" name11L75795 687
        115f="+coauth_alglen" class="sreautu8->-> 759     for  11L75>11L               wr_coa class="srefkb_p=crc;
          11L76>11L7                    id           11L76>11L0211/util.9#L772" id9"L772" class="l11Lne" name11L76296 772;
 .11 9. .12 *E=pos" class="sreflag=770 763     i  if11L76>11L0211/=. IEEE "> .11 9. .12 rror" cla* If adding mlae here, adjust lag= iEEmain.c=pos" class="sreflag=770          11L76>11L href=. IEEE "> .11 9. .12 rror" cla* that calculs_ra +cohweslenscan_i2m>u8<.=pos" class="sreflag=770          11L76>11L href=. IEEE "> .11 9. .12 rror" cla*g=pos" class="sreflag=770        el11L76>1166211/util.10"3800" id10"L813" class="1Lne" name11L76796 787          11L76>1167            =. IEEE "> .11 9. .12 *E add any remaining Eustom IEslag=pos" class="sreflag=770
u8<="li41/util.10"9800" id10"L829" class="16ne" name11L76996 759     ct 11L               wr_coass="sreerr>u8u8}
11L7                    x_dkb=u8" classu8i> a> u8noffsoffs
;
 772<>,           11L77>1170211/util.1034800" id10"L834" class="17ne" name11L77497    ->     of(st11L77>117 href="+coddat=wpa" class="sresdat=>p=crc;
 776     of(st11L77>117      u8->     ct 1170211/util.1038800" id10"L838" class="17ne" name11L7789> 778     enum 11L77>11L             atory_rlass="sresdat=>p=crc;
      nruc11L77>11L     /util.10"3800" id10"L833" class="18ne" name11L78098 850}
     ct 11L hrefeee802localwpa" class=ufc>u8 *        if11L78>118             wr_coa>,href="+coupar11bcoerrror" s="sref">u8 *u8 t           11L78>118 ();
u8 * 785        if11L78>118 href="+coddat=wpa" ceatory_rrrrrrrrrrrrrrrrrrr" class="sref">u8 *u8<="linutil.10"3800" id10"L833" class="1Lne" name11L7869> 786          11L78>118      uotrol>u8 =  787        el11L78>11L7="+c/util.10"9800" id10"L829" class="1Lne" name11L7889> 788          11L78>11L8="+coexfea=ueee802localwpa" class="srede=ieee802local>u8 *;
u8 * 790     > *11L7omgma_ie" clufcrep" class="sresk_bsref">ieee802mgma>u8 *     ct 119com>ecpywpa" class="srem>ecpze_t u8<0211/util.10#5800" id10#L795" class="19ne" name11L79299 842     for  11L79>119comgma_ie" class="sremgma>u8 * 793          11L79>119comgma_ie" class="sremgma>u8 * 794          11L79>1190211/util.10"5800" id10"L815" class="1Lne" name11L7959> 795        re11L79>119cof">ieee802tx. IEEE "> .11 9. .12 *E FIXME:r" me up with a proper valuolag=pos" class="sreflag=770}
11Lcom>elea_ie" class="srem>eleuuf/mp; u8<="linen" class="sreexGFP_KERNEL/mp; 
void 11L                     atory_rlass="sresdat=>NULL/mp;  799          11L79>1190211/util.9#L790" id9"L790" class="l12ine" name12#L8>10#L799          2     20ef="+codkb=u8=. IEEE "> .11 9. .12 *E=pos" class="sreflag=77010# 821          2     2     w=. IEEE "> .11 9. .12 rror" cla* Do not d(st DS C11_cha pa+cofter clasdirec+co probe requests=pos" class="sreflag=770     for  12"L845200211/=. IEEE "> .11 9. .12 rror" cla* in order to maximize the ="+cce that we get a resp cle.  Soef6"os" class="sreflag=770 793          12uct <200211/=. IEEE "> .11 9. .12 rror" cla* badly-behavco APs don't resp cd when this pa+cofter is included.=pos" class="sreflag=770 794          12uct <20 href=. IEEE "> .11 9. .12 rror" cla*g=pos" class="sreflag=77010# 755     of(st2uct <2 href="+code=i8" class="sreexfea>direc+co>->10# 846      nruc2 c11__non>u8->
void ieeefrequencyf="nc11_chan>u8-> 799          12     200211/util.9#L790" id9"L790" class="l12ine" name12"L8>10"L785        if2(!u8<0211021 class="sresk_bsref">ieeenuild_preq_i2maneatory_rates839< of(strnuild_preq_i2mode=ilass="srelocal>u8);
uuf/mp; u8i> a> u8<="lin lass="sresdat=>c11_n>u8->10" 771          2     21              if (c11__non>u8->10" 772;
10" 773     p; 10" 774<>);
10" 755     id u8kb=>u810"6755     id 10"7759     ct 10" 808          2     2      util.10#5800" id10#L795" class="2i9e" name12"L8>10" 759     ct 10"L759     ct ieee802mgma>u8 *10"1759     ct u8ds/id u8ETH_A>u8);
u802111/util.1036800" id10"L836" class="2ine" name12"L8>10"2759     ct , class="srefkb_u8ETH_A>u8);
u802111/util.1036800" id10"L836" class="2ine" name12"L8>10" 773     p; 10" 764     id 10" 785        if2(ieee802tx="sref">u8="sreIEEEeee802SKB_CBems, u8="sreIEEEeclass="sreIEEEeee802TX_INTFL_DONT_ENCRYPA>u8);
10" 786          2   t 226211/util.10"3800" id10"L813" class="2ine" name12"L8>10" 687
10"8785        if2(" class="sredkb>u8<)uuf/mp; 10" 839          2   = 220211/util.9#L790" id9"L790" class="l12ine" name12"L8>10"L839          2   = 2a href="+coerratory_rlass="sresdat=>>);
10" 771          2   = 2a href/util.10"3800" id10"L833" class="2ine" name12"L8>10"2759     /a>}
2a hre230211/util.10"3800" id10"L813" class="2ine" name12"L8>10"3687
u8 *10" 764     id u8 *10" 755     id u8 *u8<="linutil.10"3800" id10"L833" class="2ine" name12"L8>10" 756}
uotrol>u8 = 10" 687
10" 758void 10" 819          2     239="+coexfea=ueee802localwpa" class=ufc>u8 * 840     /a>}
12L84>1247    util.10"3800" id10"L833" class="24ne" name12L8419> 841
u8ds/id u8"+comask800" id10"L835" +comask="lin lass="sresdat=>c11_chan>u8-> 842        if12L84>124             wr_coa>,ef="+cofe=      wr_coa>, class="srefkb_8 843         f12L84>124 (, class="srefkb_i> a> u8<="lin lass="sresdat=>direc+co>->          12L84>124   ct           12L84>124 href="+coddat=wpa" c8" class="sreexfea>no_cck800" id10"L835"no_cck="li43"="s1011800" id10"L811" class="2Lne" name12L84694 816          12L84>124      ="sreIEEEeee802SKB_CBems,  847          12L84>124 href="+coddat=wpa" cieee802cieee802class="srelocal>="sreIEEEeTX_CTL_NO_CCKu8);CTL_NO_CCK     /a>}
12L84>124                     kb=u8" class="s39< of(strtx_/a>->u8/a>-> 849}
124 href="+comgm/util.10"3800" id10"L833" class="25ne" name12L8509> 850}
 851void 1250211/util.9#L772" id9"L772" class="l125ne" name12L85295 822          12L85>125      class="srefkb_ t  *);
 * 853          12L85>125 (uasictory_rates839);
 755     of(st12L75>125 href/util.10"9800" id10"L829" class="25ne" name12L75695 846      nruc12L75>12Lf="+coerrror"eee802sub_if_dat=wpa" class="sredeef="+corn= 0)

uates>u8);
        125codkb=u8" class="sredkb>u8  759     for  12L75>12L              class="srefkb_ t            12L76>12L7            in2sub_if_dat=wpa" c);
);
          12L76>126com>ecpywpa" class="srem>ecpz8->u8<].a> <= 0)
;
 763     i  if12L76>126 (          12L76>126   ct           12L76>1260211/util.9#L836" id9"L836" class="l126ne" name12L76696 846        el12L76>126com>elea_ie" class="srem>eleuates>u8);
          12L76>126comgma_ie" class="sremgma>u8n02tory_rates839);
u80211/util.9#L845" id9"L845" class="l12Lne" name12L76896 848
      ct 12L             clasn" class="sreauti);
);
);
}
12L7                    " class="sredkb>u8);
);

 772<>, );
          12L77>127 (u8 = );
     of(st12L77>127 href="+coddat=wpa" cobt_ratex_dkb=u8" class/mac);
);
u8<].a> i);
 776     of(st12L77>127           ct 127 href="+coddat=wpa" cieee802class="srelocal>/mac);
);
 778     enum 12L77>127                     id u8<].a> i);
      nruc12L77>127               wr_coass="sreerr>u8);
/mac);
}
u8is_uasic);
/mac);
     ct 1280211/util.9#L772" id9"L772" class="l128ne" name12L78298 842        if12L78>128             wr_coa>,glen" class="sreautis_uasic);
/mac);
);
          12L78>128 ();
 785        if12L78>128 href="+coddat=wpa" cclasn" class="sreautj);
);
);
);
 786          12L78>128      );
 787        el12L78>128 href="+coddat=wpa" cieee802cieee802class="srelocal>zref="net/a> u8BITX_INTFL_DONT_ENBITze_t"lass="sresdat=>j);
 788          12L78>128                     id ;
uasictory_rates839);
u8BITX_INTFL_DONT_ENBITze_t"lass="sresdat=>j);
 790     > *1297                    id      ct 129              if (     for  12L79>129"net/mac80211/util.10"3800" id10"L833" class="29ne" name12L7939> 793          12L79>129comgma_ie" clatory_rlass="sresdat=>>ref="net/a>  794          12L79>1290211//util.10"3800" id10"L833" class="29ne" name12L7959> 795        re12L79>1290211/util.9#L836" id9"L836" class="l129ne" name12L79699 756}
12Lcom>evoidsub_if_dat=wpa" class="sredtop_devicc);

void 129codkb=u8" class="sredkb>u8u8-> 799          12L79>129              class="srefkb_href="+comgod_tptoled=trign>u8->u8PT_LEDTRIG_FL_RADIOtoinp/util.10#5800" id10#L795" class="3ine" name13#L8>10#L799          3     307    util.10"3800" id10"L833" class="3ine" name13#L7>10# 821          3     30com>ecpywpa" class="srem>ecpc+ccel_work_sync);
     for  13"L845300211/util.10"3800" id10"L813" class="3i3e" name13#7939> 793          13uct <30comgma_ie" class="sremgma>u8flush_workqueuc);
 794          13uct <304omgma_ie" class="sremgma>u8drvedtop);
 795        re13uct <3 href=/util.10"3800" id10"L833" class="3ine" name13#L7>10# 846      nruc3 
void  799          13     309="+coexfea=ueee802localwpa" class= href="+co 10"L785        if3(!ieeede=ieee802sub_if_dat=>u8 *10" 771          3     31             eee802localwpa" class=uta_infon>u8->10" 772;
 u8i);
10" 773     p; 10" 774<>);
u8CONFIG_PM);
10" 755     id 10"6755     id u8->);
10"7759     ct 10" 808          3     31f="+coauth_alglen" class="sreautu8);
u8<.a>wowl1_n>u8->10" 759     ct );
10"L759     ct );
10"1759     ct 10"2759     ct ,="+cofe=lass="sresdat=>u8->);
10" 773     p; 10" 764     id 10" 785        if3(10" 786          3   t 32      wake_up);
10" 687
10"8785        if3( .11 9. .12 *E=pos" class="sreflag=77010" 839          3   = 320211/=. IEEE "> .11 9. .12 rror" claaaaaaaaa* res is 1, which means the driver requestco=wos" class="sreflag=77010"L839          3   = 3a href=. IEEE "> .11 9. .12 rror" claaaaaaaaa* to go through a regular reset on wakeup.=pos" class="sreflag=77010" 771          3   = 33    w=. IEEE "> .11 9. .12 rror" claaaaaaaaa*g=pos" class="sreflag=77010"2759     /a>}
3a hre33"net/mac80211/util.10"3800" id10"L833" class="3ine" name13"L8>10"3687
10" 764     id  .11 9. .12 *E everything elseuhappens onlyc8" HW was up actio_running *g=pos" class="sreflag=77010" 755     id u8->10" 756}
wake_up);
10" 687
10" 758void  .11 9. .12 *E=pos" class="sreflag=77010" 819          3     330211/=. IEEE "> .11 9. .12 rror" cla* Upon resumcuhardware cIEEsometimes be=goofy due to=pos" class="sreflag=770 840     /a>}
13L84>134 href=. IEEE "> .11 9. .12 rror" cla* various platform / driver / bus issues,Eso restartingoros" class="sreflag=770 841
 .11 9. .12 rror" cla* the devicc may at times not work i9. diately. Propagmac02os" class="sreflag=770 842        if13L84>1340211/=. IEEE "> .11 9. .12 rror" cla* the error.=pos" class="sreflag=770 843         f13L84>1340211/=. IEEE "> .11 9. .12 rror" cla*g=pos" class="sreflag=770          13L84>1344omgma_ie" class="sremgma>u8rt/a> );
          13L84>134 href="+coddaglen" class="sreautrt/a>           13L84>134      WARN);
u8);
u8<.a>suspendco>-> .1stringn>"Hardware became unavailable "=pos" class="sreflag=770 847          13L84>134 href="+coddat=wpa" cieee8x. IEEE "> .1stringn>"upon resumc. This could be=aEsoftware issue "=pos" class="sreflag=770     /a>}
13L84>134                     ieee8x. IEEE "> .1stringn>"prior to suspend or auhardware issue.\n"=pos" cp/util.10#5800" id10#L795" class="349e" name13L8499> 849}
134               wr_coaatory_rlass="sresdat=>rt/a>  850}
 851void 1350211/util.9#L772" id9"L772" class="l135ne" name13L85295 822          13L85>1352  ct  .11 9. .12 *E setup frag. .1ation thre8hold *g=pos" class="sreflag=770 853          13L85>135comgma_ie" class="sremgma>u8drvedet_frag_thre8hold);
 755     of(st13L75>135cof">ieee802tx. IEEE "> .11 9. .12 *E setup RTS thre8hold *g=pos" class="sreflag=770      nruc13L75>135com>elea_ie" class="srem>eledrvedet_rts_thre8hold);

        1358  ct  .11 9. .12 *E reset coverageEE ">  *g=pos" class="sreflag=770 759     for  13L75>13L              class="srefkb_drvedet_coverage_9> 75);
 75ze_tp/util.10#5800" id10#L795" class="36ne" name13L76096 830          13L76>1367    util.10"3800" id10"L833" class="36ne" name13L76196 831          13L76>136com>ecpywpa" class="srem>ecp href="+coled="ndion>u8->;
u8-> 763     i  if13L76>136 (u8PT_LEDTRIG_FL_RADIOtoin, 0p/util.10#5800" id10#L795" class="3Lne" name13L76496 834          13L76>1360211/util.10"5800" id10"L815" class="3Lne" name13L76596 825          13L76>136cof">ieee802tx. IEEE "> .11 9. .12 *E add1in2erface  *g=pos" class="sreflag=770        el13L76>136com>elea_ie" class="srem>eleu8,
);
          13L76>1367="+coexfea=u8" cclass="srem>eleu8,

);
     ct 136               wr_coa8" class="sreexfea>WARN_O8);
}
13L7                    " cla   kb=u8" class="srcu_ 85ign_poin2era> 
 772<>, " class="sredkb>u8<)u8,
          13L77>137 (     of(st13L77>1370211/util.9#L836" id9"L836" class="l137ne" name13L7769> 776     of(st13L77>137com>elea_ie" class="srem>elelist_for_each_ .1r/id listid      ct 137 href="+coddat=wpa" c8" cclass="srem>eleu8,
u8);
u8 778     enum 13L77>137                     id eleu8,
u8);
u8      nruc13L77>137               wr_coaid elea> *u8->}
elert/a> );
     ct 1381  ct         if13L78>1380211/util.10"3800" id10"L813" class="3Lne" name13L78398 853          13L78>138 ( .11 9. .12 *E add1STAs back *g=pos" class="sreflag=770);
 785        if13L78>138 href="+coddaclass="srem>elelist_for_each_ .1r/id  786          13L78>138      u8<.a>/taac);
 787        el13L78>1380211/util.1038800" id10"L838" class="38ne" name13L7889> 788          13L78>138                      " cass="sredkb>u8,
u8<.a>uploadco>->;
 790     > *1397    util.10"3800" id10"L833" class="39ne" name13L791991759     ct 139              if ( .11 9. .12 *E AP-m<.a s1ations will be=addco laacr *g=pos" class="sreflag=770     for  13L79>139             wr_coa>,glen" class="sreautf/a>,
u8<.a>u8,
u8);
u8 793          13L79>139 ( 794          13L79>1390211/util.10"5800" id10"L815" class="39ne" name13L7959> 795        re13L79>139 href="+coddat=wpa" cclasn" class="sreaut/taac);
}
139      ,
u8<.a>uta_/taac);
);

void 139                     id  799          13L79>139 href="+comgm/util.10"3800" id10"L833" class="4ine" name14#L8>10#L799          4     408            ass="sremgma>u8mutexounlock800" id10"L835"mutexounlockze_t"actio" class="sreautu8);
u8<.a>uta_mtx>,
10# 821          4     400211/util.9#L772" id9"L772" class="l14i2e" name14#79299 842     for  14"L845402  ct  .11 9. .12 *E /econfigure txaconf *g=pos" class="sreflag=770 793          14uct <40comgma_ie" clglen" class="sreaut  794          14uct <40   ct elelist_for_each_ .1r/id listid  795        re14uct <40 href="+coddat=wpa" cobt_rate8" cclass="srem>eleu8,
u8);
u8}
u8);
u8
void  799          14     409="+cutil.10#5800" id10#L795" class="4ine" name14"L8>10"L785        if4(!);
);
10" 771          4     41              if (u8i);
10" 772;
10" 773     p; 10" 774<>);
10" 755     id 10"6755     id  .11 9. .12 *E /econfigure hardware *g=pos" class="sreflag=77010"7759     ct u8->10" 808          4     41f="+cutil.10#5800" id10#L795" class="4i9e" name14"L8>10" 759     ct 10"L759     ct 10"1759     ct  .11 9. .12 *E Finally also reconfigure all the BSS information *g=pos" class="sreflag=77010"2759     ct listid 10" 773     p; u8<.a>ut ->10" 764     id 10" 785        if4(10" 786          4   t 42      10" 687
10"8785        if4( .11 9. .12 *E 1 9.on changc flags10" 839          4   = 42               wr_coass="sreerr>u8->10"L839          4   = 438              wr_coa_coaid u810" 771          4   = 43              if (10"2759     /a>}
4a hre43             wr_coa>,lea_ie"   ss="sreerr>u810"3687
10" 764     id 10" 755     id 10" 756}
u8);
10" 687
10" 758void u810" 819          4     439="+cutil.10#5800" id10#L795" class="44ne" name14L8409> 840     /a>}
14L84>1448              wr_coaswitch cclass="srem>eleu8,
 841
u8);
u8 842        if14L84>144             wr_coa>,lea_ie" class="srem>elechangco>->u8BSS_CHANGED_ASSOCX_INTFL_DONT_ENBSS_CHANGED_ASSOC0211r|lass="sreflag=770 843         f14L84>144 (          14L84>144   ct           14L84>144 href="+coddat=wpa" cobt_rateass="sremgma>u8mutexolock800" id10"L835"mutexolockze_t"actio" class="sreautu8,
          14L84>144      u8 href="+cobss_info_changc_notif/id  847          14L84>144 href="+coddat=wpa" cieee8ateass="sremgma>u8mutexounlock800" id10"L835"mutexounlockze_t"actio" class="sreautu8,
     /a>}
14L84>144                     ieee8888break/util.10#5800" id10#L795" class="4L9e" name14L8499> 849}
144               wr_coacaseBAND_2GHZTES" clNLA>u8u8 850}
elechangco>->u8BSS_CHANGED_IBSSX_INTFL_DONT_ENBSS_CHANGED_IBSS    /util.10#5800" id10#L795" class="45ne" name14L8519> 851void 145              if ( .11 9. .12 *E fall through *g=pos" class="sreflag=770          14L85>145             wr_coa>,caseBAND_2GHZTES" clNLA>u8);
u8 853          14L85>145 (u8BSS_CHANGED_SSIDX_INTFL_DONT_ENBSS_CHANGED_SSID0211/util.10#5800" id10#L795" class="454e" name14*/< 9      755     of(st14L75>145 href="+coddat=wpa" cobt_rate8" cclass="srem>eleu8,
u8);
u8      nruc14L75>145      elechangco>->u8BSS_CHANGED_AP_PROBE_RESP);

        145                     ieee8888c. IEEE "> .11 9. .12 *E fall through *g=pos" class="sreflag=770 759     for  14L75>145               wr_coacaseBAND_2GHZTES" clNLA>u8u8          14L76>1468              wr_coa_coaid elechangco>->u8BSS_CHANGED_BEACONX_INTFL_DONT_ENBSS_CHANGED_BEACON0211r|lass="sreflag=770          14L76>146              if (;
 763     i  if14L76>146 (          14L76>146   ct u8u8          14L76>146 href="+coddat=wpa" cobt_ratebreak/util.10#5800" id10#L795" class="4Lne" name14L76696 846        el14L76>146      u8);
u8          14L76>146 href="+coddat=wpa" ccaseBAND_2GHZTES" clNLA>u8);
u8
 .11 9. .12 *E ignore virtual *g=pos" class="sreflag=770     ct 146               wr_coaobt_ratebreak/util.10#5800" id10#L795" class="47ne" name14L77097 850}
14L7                    caseBAND_2GHZTES" clNLA>u8u8
 772<>,           14L77>147 (u8u8u8u8     of(st14L77>147 href="+coddat=wpa" ccaseBAND_2GHZTES" clNLA>u8u8 776     of(st14L77>147      u8     ct 147 href="+coddat=wpa" clea_ie" class="srem>eleWARN_O8);
 778     enum 14L77>147                     id       nruc14L77>147               wr_coa/util.10"3800" id10"L833" class="48ne" name14L78098 850}
     ct 1480211/util.9#L772" id9"L772" class="l148ne" name14L78298 842        if14L78>148comgma_ie" class="sremgma>u8href="+comrecalc_p n>u8->          14L78>1480211/util.1034800" id10"L834" class="48ne" name14L78498 774<>);
 .11 9. .12 *E=pos" class="sreflag=770 785        if14L78>148 href=. IEEE "> .11 9. .12 rror" cla* Tha s1a might be=in psm against the ap (e.g. becausc02os" class="sreflag=770 786          14L78>148     =. IEEE "> .11 9. .12 rror" cla* this was tha s1ate before ss=w restart),Eso wc02os" class="sreflag=770 787        el14L78>1480211/=. IEEE "> .11 9. .12 rror" cla* explicitly send a null packet=in order to maka surc02os" class="sreflag=770 788          14L78>148     =. IEEE "> .11 9. .12 rror" cla* it'll uync against the ap (and get out of psm).=pos" class="sreflag=770;
 .11 9. .12 rror" cla*g=pos" class="sreflag=770 790     > *1490net/mac802118" ca"lass="sresdat=>u8);
u8<.a>      ct 149              if (listid      for  14L79>149             wr_coa>,mac802118" cclass="srem>eleu8,
u8);
u8 793          14L79>149 ( 794          14L79>149   ct  795        re14L79>149 href="+coddat=wpa" c=u8" claaaaaaaaacontinue/util.10#5800" id10#L795" class="49ne" name14L79699 756}
149     util.10#5800" id10#L795" class="497e" name14L79799 687
u8->void 149                     /util.10"3800" id10"L833" class="49ne" name14L7999> 799          14L79>149 href="+comgm/util.10"3800" id10"L833" class="5ine" name15#L8>10#L799          5     507    util.10"3800" id10"L833" class="5ine" name15#L7>10# 821          5     50 href="+coWARx. IEEE "> .11 9. .12 *E APs are now beaconing, add1back s1ations *g=pos" class="sreflag=770     for  15"L84550comgma_ie" class="sremgma>u8mutexolock800" id10"L835"mutexolockze_t"actio" class="sreautu8);
u8<.a>uta_mtx>,
 793          15uct <50comgma_ie" clxass="sresdat=>uist_for_each_ .1r/id  794          15uct <50   ct u8<.a>/taac);
 795        re15uct <500211/util.9#L836" id9"L836" class="l15i6e" name15#79699 756}

void  799          15     50               wr_coa8" class="sreexfea>f/a>,
u8<.a>u8,
u8);
u810"L785        if5(!10" 771          5     510211/util.9#L772" id9"L772" class="l15i2e" name15"L8>10" 772;
10" 773     p; ,
u8<.a>uta_/taac);
);
10" 774<>);
10" 755     id 10"6755     id 10"7759     ct 10" 808          5     51f="+cutil.10#5800" id10#L795" class="5i9e" name15"L8>10" 759     ct  .11 9. .12 *E add1back keys *g=pos" class="sreflag=77010"L759     ct listid 10"1759     ct 10"2759     ct ,lea_ie" class="srem>ele href="+coenable_keysn>u8->10" 773     p; 10" 764     id 10" 785        if5();
10" 786          5   t 52com>elea_ie" class="srem>elebarrie = 10" 687
10"8785        if5( .11 9. .12 *E=pos" class="sreflag=77010" 839          5   = 520211/=. IEEE "> .11 9. .12 rror" cla* Clear the WLANadTA_BLOCK_BA flagEso new aggregation=pos" class="sreflag=77010"L839          5   = 538    =. IEEE "> .11 9. .12 rror" cla* sessions cIEEbe established afacr a resume.=pos" class="sreflag=77010" 771          5   = 53     =. IEEE "> .11 9. .12 rror" cla*=pos" class="sreflag=77010"2759     /a>}
5a hre53     =. IEEE "> .11 9. .12 rror" cla* Also tear down aggregation sessions since reconfiguring" os" class="sreflag=77010"3687
 .11 9. .12 rror" cla* them=in a hardware restart scenario is not easily donc02os" class="sreflag=77010" 764     id  .11 9. .12 rror" cla* right now, and the hardware will have lost information02os" class="sreflag=77010" 755     id  .11 9. .12 rror" cla* about tha sessions, but we and the AP still think they02os" class="sreflag=77010" 756}
 .11 9. .12 rror" cla* are active. This is really a workaround though.=pos" class="sreflag=77010" 687
 .11 9. .12 rror" cla*g=pos" class="sreflag=77010" 758void 10" 819          5     53               wr_coass="sreerr>u8 840     /a>}
15L84>1547    util.10"3800" id10"L833" class="54ne" name15L8419> 841
uist_for_each_ .1r/id  842        if15L84>154             wr_coa>,lea_ie" class="srem>eleclass="sre/ta_tear_down_BA_sessions);
 843         f15L84>154 (          15L84>154   ct           15L84>1540211/util.9#L836" id9"L836" class="l15Lne" name15L84694 816          15L84>154      u8mutexounlock800" id10"L835"mutexounlockze_t"actio" class="sreautu8);
u8<.a>uta_mtx>,
 847          15L84>154 href="+codda/util.10"3800" id10"L833" class="54ne" name15L848948840     /a>}
15L84>154f="+cutil.10#5800" id10#L795" class="5L9e" name15L8499> 849}
154              class="srefkb_href="+comwake_queuc/_by_reason);
 850}
eleCRYPA>u8u8 851void 1550211/util.9#L772" id9"L772" class="l155ne" name15L85295 822          15L85>1552  ct  .11 9. .12 *E=pos" class="sreflag=770 853          15L85>155 ( .11 9. .12 rror" cla* If this is .11 9. .12 rror" cla* We may want to changc that laacr, however.=pos" class="sreflag=770 755     of(st15L75>155 href=. IEEE "> .11 9. .12 rror" cla*g=pos" class="sreflag=770      nruc15L75>155      
        155f="+cutil.10#5800" id10#L795" class="559e" name15L7599> 759     for  15L75>155     #ifdefeleCONFIG_PM);
          15L76>1568            c. IEEE "> .11 9. .12 *E first set suspendco falsc, then resuminga*g=pos" class="sreflag=770          15L76>156             ss="sredkb>u8);
u8<.a>uuspendco>->);
;
 763     i  if15L76>156comgma_ie" clxass="sresdat=>u8);
u8<.a>resuming);
);
          15L76>1560211/util.10"5800" id10"L815" class="56ne" name15L76596 825          15L76>156 href="+codda" class="sreautuist_for_each_ .1r/id listid         el15L76>156      eleu8,
          15L76>156 href="+coddat=wpa" ccaseBAND_2GHZTES" clNLA>u8);
u8
);
     ct 156               wr_coaobt_ratebreak/util.10#5800" id10#L795" class="57ne" name15L77097 850}
15L7                    caseBAND_2GHZTES" clNLA>u8u8
);
 772<>,           15L77>157 (u8u8);
     of(st15L77>157 href="+coddat=wpa" clea_ie" break/util.10#5800" id10#L795" class="57ne" name15L7769> 776     of(st15L77>157           ct 157 href="+coddat=wpa" clea_ie" break/util.10#5800" id10#L795" class="57ne" name15L7789> 778     enum 15L77>157                     /util.10"3800" id10"L833" class="579e" name15L77997 759      nruc15L77>157 href="+comgm/util.10"3800" id10"L833" class="58ne" name15L78098 850}
     ct 158             ss="sredkb>u8        if15L78>158comgmutil.10#5800" id10#L795" class="58ne" name15L78398 853          15L78>158comgma_ie" clxass="sresdat=>mutexolock800" id10"L835"mutexolockze_t"actio" class="sreautu8);
u8<.a>uta_mtx>,
);
 785        if15L78>158 href="+coddat=wpa" cxass="sresdat=>mesh_p/a>k_restart);
 786          15L78>158com>elea_ie" class="srem>elemutexounlock800" id10"L835"mutexounlockze_t"actio" class="sreautu8);
u8<.a>uta_mtx>,
 787        el15L78>1580211/#elseutil.10#5800" id10#L795" class="5Lne" name15L7889> 788          15L78>1588om>elea_ie" class="srem>eleWARN_O8);
;
 790     > *1590net/mac80211return 0/util.10#5800" id10#L795" class="59ne" name15L791991759     ct 159     /util.10"3800" id10"L833" class="59ne" name15L79299 842     for  15L79>159comgmutil.10#5800" id10#L795" class="59ne" name15L7939> 793          15L79>159 ();
  net/m*ss="srevif>u8<.a>  794          15L79>159   ct/util.10"9800" id10"L829" class="59ne" name15L7959> 795        re15L79>159 href="+coddastructlass="sremgma>u8href="+comsub_if_8,
}
1596href="+coddastructlass="sremgma>u8href="+comu8);
net/m*ss="srevif>u8<.u8);

void 159f="+cutil.10#5800" id10#L795" class="59ne" name15L7999> 799          15L79>159 href="+comgmglen" class="sreautWARN_O8);
10#L799          6     607                    return/util.10#5800" id10#L795" class="6ine" name16#L7>10# 821          6     600211/util.9#L772" id9"L772" class="l16i2e" name16#79299 842     for  16"L84560comgma_ie" class="sremgma>u8u8,
,
 793          16uct <60comgma_ie" clxass="sresdat=>u8);
,
 794          16uct <600211/util.10"5800" id10"L815" class="6i5e" name16#7959> 795        re16uct <605href="+comgmglen" class="sreautWARN_O8);
}

void u8);
u8 799          16     60               wr_coareturn/util.10#5800" id10#L795" class="6ine" name16"L8>10"L785        if6(!10" 771          6     61             ss="sredkb>u8,
u8CRYPA>u8);
10" 772;
10" 773     p; 10" 774<>);
10" 755     id u8KEY_FLAG_TAINTEDX_INTFL_DONT_ENKEY_FLAG_TAINTED0211/util.10#5800" id10#L795" class="6i6e" name16"L8>10"6755     id elea_ie" class="srem>elemutexounlock800" id10"L835"mutexounlockze_t"actio" class="sreautu8);
u8<.a>key_mtx>,
10"7759     ct 10" 808          6     61f="+cs="srehw>u8<.a>EXPORT_SYMBOL_GPL>,
);
10" 759     ct 10"L759     ct ->10"1759     ct ,
u8<.ump _ms=">,
10"2759     ct 10" 773     p; 10" 764     id u8<.ump _ms=">,
->u8<.a>ap_smp n>u8->10" 785        if6(10" 786          6   t 62      ,
u8CRYPA>u8u810" 687
,
10"8785        if6(u8<.ump _ms=">,
u8u810" 839          6   = 62               wr_coaobt_rateelseutil.10#5800" id10#L795" class="6ine" name16"L8>10"L839          6   = 638              wr_coa_coaid <="+coman*ss="srevif>u8<.ump _ms=">,
u8u810" 771          6   = 63              if (10"2759     /a>}
6a hre63comgmutil.10#5800" id10#L795" class="6i3e" name16"L8>10"3687
10" 764     id 10" 755     id 10" 756}
10" 687
10" 758void 10" 819          6     63     voidlass="sremgma>u8href="+comrecalc_smp n>u8->);
net/m*ss="srevif>u8<.u8);
 840     /a>}
16L84>1647    /util.10"9800" id10"L829" class="64ne" name16L8419> 841
u8href="+comsub_if_8,
 842        if16L84>164             enumdkb=u8" class="s39< of(str/mp _ms=">,
u8<.ump _ms=">,
u8u8 843         f16L84>164 (u8count);
          16L84>1640211/util.10"5800" id10"L815" class="64ne" name16L84594 825          16L84>164 href="+codda" class="sreautmutexolock800" id10"L835"mutexolockze_t"actio" class="sreautu8);
u8<.a>iflist_mtx>,
          16L84>164     util.10#5800" id10#L795" class="6L7e" name16L8479> 847          16L84>164 href="+coddax. IEEE "> .11 9. .12 *E=pos" class="sreflag=770     /a>}
16L84>164     =. IEEE "> .11 9. .12 rror" cla* This function could be=improved to handle multiplc02os" class="sreflag=770 849}
1640211/=. IEEE "> .11 9. .12 rror" cla*  n2erface  betacr, but right now it makas any02os" class="sreflag=770 850}
 .11 9. .12 rror" cla* non-s1ation  n2erface  force SM PS to be=turneo  os" class="sreflag=770 851void 165     =. IEEE "> .11 9. .12 rror" cla* off. If there are multiplc s1ation  n2erface  it  os" class="sreflag=770          16L85>165     =. IEEE "> .11 9. .12 rror" cla* could also use the best possible m<.a, e.g. rue"os" class="sreflag=770 853          16L85>165 ( .11 9. .12 rror" cla* one is .11 9. .12 rror" cla* dy   ic is 755     of(st16L75>165 href=. IEEE "> .11 9. .12 rror" cla*g=pos" class="sreflag=770      nruc16L75>165     util.10#5800" id10#L795" class="657e" name16L75795 687
listid         165                      " cass="sredkb>u8 *u8-> 759     for  16L75>165               wr_coaobt_ratecontinue/util.10#5800" id10#L795" class="66ne" name16L76096 830          16L76>1668              wr_coa8" cclass="srem>eleu8,
u8NLA>u8);
          16L76>166              if (;
u8);
u8 763     i  if16L76>166 (          16L76>1660211/util.10"5800" id10"L815" class="66ne" name16L76596 825          16L76>166 href="+coddat=wpa" css="sredkb>u8<)count);
u8->,
        el16L76>166     util.10#5800" id10#L795" class="6L7e" name16L76796 787          16L76>166 href="+coddat=wpa" c8" cclass="srem>elecount);

,
u8u8     ct 166               wr_coaobt_ratebreak/util.10#5800" id10#L795" class="67ne" name16L77097 850}
16L7                    /util.10"3800" id10"L833" class="67ne" name16L77197 841
 772<>,           16L77>167comgma_ie" cl8" class="sreexfea>ump _ms=">,
u8u8);
u8<.a>ump _ms=">,
     of(st16L77>1670211/util.9#L836" id9"L836" class="l167ne" name16L7769> 776     of(st16L77>167      class="srem>eleuetid      ct 167comgma_ie" class="sremgma>u8u8);
u8<.a>ump _ms=">,
 778     enum 16L77>1678  ct  .11 9. .12 *E changcd flagEis auto-detectcd for this *g=pos" class="sreflag=770      nruc16L77>167              class="srefkb_href="+comhw_confign>u8->}
eleunlock800" id10"L835"unlockze_t:util.10"9800" id10"L829" class="68ne" name16L781981759     ct 168             ss="sredkb>u8        if16L78>168comgm/util.10"3800" id10"L833" class="68ne" name16L78398 853          16L78>1680211/util.1034800" id10"L834" class="68ne" name16L78498 774<>);
u8<.a>boo>);
elehref="+comrd_in_listid u8n_id n>u8-> 785        if16L78>168 href/util.10"9800" id10"L829" class="68ne" name16L7869> 786          16L78>168com>elea_ie" intlass="sremgma>u8in>u8-> 787        el16L78>1680211/util.1038800" id10"L838" class="6Lne" name16L7889> 788          16L78>1688om>elea_ie" clasn" class="sreautin>u8->u8->;
u8in>u8->u8idn>u8-> 790     > *1698              wr_coa_coaid      ct 169             return lass="sreflag=7falsc);
     for  16L79>169comgm/util.10"3800" id10"L833" class="69ne" name16L7939> 793          16L79>1690211/util.1034800" id10"L834" class="69ne" name16L7949> 794          16L79>169   ct=. IEEE "> .11 9. .12 /*E=pos" class="sreflag=770 795        re16L79>169 href=. IEEE "> .11 9. .12 r* href="+comre_split - split IEEIE buffcr accordingato ordering" os" class="sreflag=770}
169     =. IEEE "> .11 9. .12 rE=pos" class="sreflag=770
 .11 9. .12 r* @ies: the IE buffcr=pos" class="sreflag=770void 169     =. IEEE "> .11 9. .12 r* @ielen: the length of the IE buffcr=pos" class="sreflag=770 799          16L79>1690211/=. IEEE "> .11 9. .12 r* @ids: IEEarray with ele. .1 IDs that are allowed beclac02os" class="sreflag=77010#L799          7     708    =. IEEE "> .11 9. .12 r*      tha split02os" class="sreflag=770     ct  .11 9. .12 r* @n_id : the size of the ele. .1 IDEarray02os" class="sreflag=770     for  17"L84570     =. IEEE "> .11 9. .12 r* @offset: offset where to start splittingain the buffcr=pos" class="sreflag=770 793          17uct <70 ( .11 9. .12 rE=pos" class="sreflag=770 794          17uct <70   ct=. IEEE "> .11 9. .12 r* This function splits IEEIE buffcr by updatingathe @offset=pos" class="sreflag=770 795        re17uct <70 href=. IEEE "> .11 9. .12 r* variable to point to the lmaction where the buffcr should be=pos" class="sreflag=770}
 .11 9. .12 rE split.=pos" class="sreflag=770
 .11 9. .12 r*=pos" class="sreflag=770void  .11 9. .12 r* It assumes that the giveEEIE buffcr is well-formed, this=pos" class="sreflag=770 799          17     700211/=. IEEE "> .11 9. .12 r* has to be=guaranteed by the caller!=pos" class="sreflag=77010"L785        if7(! .11 9. .12 r*=pos" class="sreflag=77010" 771          7     71     =. IEEE "> .11 9. .12 r* It also assumes that the IEsain the buffcr are ordereo  os" class="sreflag=77010" 772;
 .11 9. .12 r* correctly,a8" not the result of usingathis function will not  os" class="sreflag=77010" 773     p;  .11 9. .12 rE be=ordereo correctly either,a8.e. it does no reordering.=pos" class="sreflag=77010" 774<>);
 .11 9. .12 r*=pos" class="sreflag=77010" 755     id  .11 9. .12 r* The function returns the offset where the next part of the=pos" class="sreflag=77010"6755     id  .11 9. .12 rE buffcr starts, which may be=@ielena8" the entire (remainder)=pos" class="sreflag=77010"7759     ct  .11 9. .12 r* of the buffcr should be used.=pos" class="sreflag=77010" 808          7     71     =. IEEE "> .11 9. .12 r*g=pos" class="sreflag=77010" 759     ct elehref="+comre_splitid uize_tid elehrlenn>u8->10"L759     ct u8u8800" id10"L835"u8net/m*ss="srevif>u8<.id n>u8->uize_tid eleoffsetid 10"1759     ct 10"2759     ct 10" 773     p; 10" 764     id u8->u8n_id n>u8->u8po n>u8->10" 785        if7(ie n>u8->10" 786          7   t 72     util.10#5800" id10#L795" class="7i7e" name17"L8>10" 687
10"8785        if7(10" 839          7   = 729="+cutil.10#5800" id10#L795" class="7ine" name17"L8>10"L839          7   = 738    ub_if_dat=wpa" uize_tid elehref="+comre_split_veEdo = uize_tid elehrlenn>u8->10" 771          7   = 73     /util.10"9800" id10"L829" class="7ine" name17"L8>10"2759     /a>}
7a hre73comgma_ie" class="sremgma>u8uize_tid elepo n>u8->10"3687
10" 764     id u8->u8po n>u8->10" 755     id ie n>u8->10" 756}
10" 687
10" 758void 10" 819          7     739="+cutil.10#5800" id10#L795" class="74ne" name17L8409> 840     /a>}
17L84>1748    s1atic voidlass="sremgma>u8_href="+comenable_rssi_report n>u8->,
 841
u8rssi_min_tholdn>u8-> 842        if17L84>174             wr_coa>,lea_ie"                     intlass="sremgma>u8rssi_max_tholdn>u8-> 843         f17L84>174 (          17L84>1744omgma_ie" claass="sresdat=>trace_apimenable_rssi_report n>u8->u8rssi_max_tholdn>u8->          17L84>1740211/util.9#L836" id9"L836" class="l17Lne" name17L84694 816          17L84>174      );
 re971_if_8110"L834" class="7i4e" name17"L8>10" 764afmgo>->u8<.a>a;->          16L78>1680211/util.1034800" id10"L834" class="68ne" name16L7N7me16L74>10" 758void           16L84>164 href="+coddax. IEEE "> .11 9. .12 *E=pos" cla7s="sreflag7770 850}
 851void 165     =. algor:thm.12 s a sca iddup valu. a 9s th. Chrefxly,a8"sca EEIE buffcr accordingato ordering" os" cla7s.10#5800" 770          16L85>165     =. factorcr startRSSI averagEEI algor:thm. hrefxs* of the buffcr should be used.=pos" class="sreflag7770 853          16L85>165 ( .11 9. .12 r*g=pos" class="sreflag7770          17L84>1_smp " claactio" class="sreautu8,
          16L84>1_smp " claactio" class="sreautu8,
void  787        el16L78>1680211/ut7l.10"9800"7id10"L829" class="65ne" n7me16L75895 7819          6     63     e" claass="sresdat=>trace_apimenabe_rssi_report n>u8->  net/m*ss="srevif8-> 759     for  16L75>16      wr_coa>,lea_ie"                     intlass="sremgma>u8rssi_min_tholdn>u8->          16L75>16      wr_coa>,lea_ie"                     intlass="sremgma>u8rssi_max_tholdn>u8->10" 771          7   = 73     /util.10#5800"7id10#L795" class="66ne" n7me16L76296 772;
<="+comenable_rssi_report ze_t"structlass="sremgma>u8href="+comsub_if_8,
,
10"3687
          17L84>1    );
          16L76>166 href="net/mac80211/sass="sremgma>u8rssi_min_tholdn>umcount/a>->        el16L76>166     ut7l.10#5800"7id10#L795" class="6L7e" n7me16L767977759     ct 1   s1atic voidlass="sremgma>u8_href="+comenable_rssi_report n>u8->
void 10"L839        PORT_SYMBOL_Glass="sremgma>uPORT_SYMBOL_G href="+cohref="+comr  63     e" claass="sresdat=>trace_apimenabe_rssi_report n>u8->->10# 821          6     600211/ut7l.10"3800"7id10"L833" class="67ne" n7me16L7729> 7819          6     63     dis claass="sresdat=>trace_apimenabe_rssi_repdis claass="sresdat=_href="+comenable_rssi_report ze_t"structlass="sremgma>u8href="+coma>  net/m*ss="srevif8-> 843         f17L84>174 (,
,
     of(st16L77>1670211/ut7l.9#L836" 7d9"L836" class="l167ne" n7me16L77>10"6755     id u8->10" 687
10" 808          6     61f="lass="sremgma>uPORT_SYMBOL_G href="+cohref="+comr  63     dis claass="sresdat=>trace_apimenabe_rssi_repdis claass="sresdat=_hre);
10" 819          7     739="+cutil.10#5800"7id10#L795" class="68ne" n7me16L78>10"L839        Edo ze_t"constlass="sremgma>u8u8800" id10"_split_veEdbuild_ht_capm>elehref="+comre_split_veEdbuild_ht_cap href="+cohref="+comEdo ze_t"constlass="sremgma>u8u8800" id1="+coddareturn lass="sref,e="+comenable_rssi_report ze_t"strta_ht_capm>elehref="+comre_split_vrta_ht_cap"sremgma>u8u8800" id1ht_capm>elehref="+comht_cap"sre846        el16L76>166     ut7l.10"9800"7id10"L829" class="68ne" n7me16L7819> 841
->10"2759     ct 10" 773     p;  776     of(sttmpm>elehref="+comtmpsreflag=7po n>u8->          16L76>1660211/ut7s="sreflag7770  gma>u8u8800" id1="+coddareturn lass="sref++8u8,
u8-> 786  gma>u8u8800" id1="+coddareturn lass="sref++8u8remgoff="+comenable_rssi_report ze_t"stht_capm>elehref="+comre_split_vht_cap"sre);
     ct 1memelehref="+comre_split_vht_cap"sre<);
10" 758void           16L84>164 href=" capability IEEE flagEis auto-detectcd for this *g=pos" cla7s="sreflag7770 790  6     of(sttmpm>elehref="+comtmpsref8u8,
);
     ct 16emcp="sremgma>u8uist6emcp= href="+cohref="+com="+coddareturn lass="sref,e0" id10"L835"mutexoutmpm>elehref="+comtmpsref)uremgoff="+cohref="+comE770 7<);
10"2759     /a>}
7a hre"+coddat=wpa" css="sredkb>u8 7);
 793          16L79>1690211/ut7l.1034800"7id10"L834" class="69ne" n7me16L79497 759          16L84>164 href=" AMPDUurns69nter flagEis auto-detectcd for this *g=pos" cla7s="sreflag7770  gma>u8u8800" id1="+coddareturn lass="sref++8u8,
->u |to-detectcd for this *g=pos" cla7s.9#L836" 777010" 786               17L84>174  ht_capm>elehref="+comht_cap"sre afmgo>->umclt;clt;to-detectcd for this *g=pos" cla7s.10#5800"777010" 687
u8 7);
10" 758void           16L84>164 href=" MCS * ThlagEis auto-detectcd for this *g=pos" cla8s="sreflag8770 790  6     of(st6emcp="sremgma>u8uist6emcp= href="+cohref="+com="+coddareturn lass="sref,e0" id10"L835"mutexouht_capm>elehref="+comht_cap"sre afmgo>->elehref="+comht_cap"sre afmgo>->);
     ct 1"+coddat=wpa" css="sredkb>u8elehref="+comht_cap"sre afmgo>->);
 772<>,           16L84>164 href=" extendIEEEapabilitie flagEis auto-detectcd for this *g=pos" cla8s="sreflag8770          17L84>1"+coddat=wpa" css="sredkb>u8 7);
     of(st16L77>1670211/ut8s="sreflag8770          16L84>164 href=" BFEEapabilitie flagEis auto-detectcd for this *g=pos" cla8s7"sreflag8770     ct 1"+coddat=wpa" css="sredkb>u810"2);
10" 758void           16L84>164 href=" > .1nna * le IEEE lagEis auto-detectcd for this *g=pos" cla8s="sreflag8770 790  6     of(st"+coddat=wpa" css="sredkb>u810# 821          6     600211/ut8s="sreflag877010"2759 10" 687
          16L76>1660211/ut8s="sreflag877010" 739        Edo ze_t"constlass="sremgma>u8u8800" id10"_split_veEdbuild_vht_capm>elehref="+comre_split_veEdbuild_vht_cap href="+cohref="+comEdo ze_t"constlass="sremgma>u8u8800" id1="+coddareturn lass="sref,e="+comenable_rssi_report ze_t"strta_vht_capm>elehref="+comre_split_vrta_vht_cap>         el16L76>166     ut8s="sreflag877010" 786                                                    ="+cohref="+comEid10"L829" nstlasu8>10"276     of(stcapm>elehref="+comcap"sre8->10"7759     ct  790  6     of(st__leid10"L829" nstlas__le8>10"276     of(sttmpm>elehref="+comtmpsreflag=7po n>u8->10" 819          7     739="+cut8l.10#5800"8id10#L795" class="7ine" n8me17"88>10"L759 gma>u8u8800" id1="+coddareturn lass="sref++8u8,
u8-> gma>u8u8800" id1="+coddareturn lass="sref++8u8remgoff="+comenable_rssi_report ze_t"stvht_capabilitie tlass="sremgma>u8href="+coht_capabilitie "sre);
10"2759     ct );
10" 773     p;           16L84>164 href=" capability IEEE flagEis auto-detectcd for this *g=pos" cla8"s1011800"8id10"L811" class="7ine" n8me17"82594 825          16L84>1tmpm>elehref="+comtmpsref8u8,
elehref="+comcap"sre8a>);
10"6755     id u8uist6emcp= href="+cohref="+com="+coddareturn lass="sref,e0" id10"L835"mutexoutmpm>elehref="+comtmpsref)uremgoff="+cohref="+comEid10"L829" nstlasu8>10"2<);
     ct 1"+coddat=wpa" css="sredkb>u810"2);
10" 758void           16L84>164 href=" VHT MCS * ThlagEis auto-detectcd for this *g=pos" cla8l.10#5800"8id10#L795" class="7ine" n8me17"8309> 790  6     of(st6emcp="sremgma>u8uist6emcp= href="+cohref="+com="+coddareturn lass="sref,e0" id10"L835"mutexou=ht_capm>elehref="+comvht_cap"sreeef=WARN_O822/plass="ht_mc+coddareturn las"ht_mc+sref)uremgoff="+cohref="+com=ht_capm>elehref="+comvht_cap"sreeef=WARN_O822/plass="ht_mc+coddareturn las"ht_mc+sref<);
     ct 1"+coddat=wpa" css="sredkb>u8elehref="+comvht_cap"sreeef=WARN_O822/plass="ht_mc+coddareturn las"ht_mc+sref);
 772<>,   10" 687
     of(st16L77>1670211/ut8l.10#5800"8id10#L795" class="7ine" n8me17"88>10" 739        Edo ze_t"constlass="sremgma>u8u8800" id10"_split_veEdbuild_ht_opeem>elehref="+comre_split_veEdbuild_ht_opee href="+cohref="+comEdo ze_t"constlass="sremgma>u8u8800" id1="+coddareturn lass="sref,e="+comenable_rssi_report ze_t"strta_ht_capm>elehref="+comre_split_vrta_ht_cap"sremgma>u8u8800" id1ht_capm>elehref="+comht_cap"sre846        el16L76>166     ut8l.10#5800"8id10#L795" class="7i7e" n8me17"83>10" 687
u8u8800" id1 hrene4omgms1atic s="s hrene4"sre846        el16L76>166     ut8l="sreflag8id10#L795" class="7ine" n8me17"83896 848
     of(stchrene4_re971_if_8110"L834" hrene4_re9710"2846        el16L76>166     ut8l.10"3800"8id10"L833" class="7i9e" n8me17"8399> 759     for  16L75>16      w="+cohref="+comE770 7f="7et/ma73 href=rotms="net/r21ub_if_dat=rotms="n"sre8-> 8759     ct  841
<="+comenable_rssi_report ze_t"stht_opee* varomgms1atic s="srt ze_t"stht_opee* var"sremgma>u8u8800" id1ht_opeem>elehref="+comht_opee hrelag=7po n>u8-> 842          16L84>164 href=" Build HT Int thaIEEE lagEis auto-detectcd for this *g=pos" cla8s="sreflag8770  gma>u8u8800" id1="+coddareturn lass="sref++8u8,
afmgo>-VENDOR_SPHT_OPERss="s hrelag=7po n>u8->  gma>u8u8800" id1="+coddareturn lass="sref++8u8remgoff="+comenable_rssi_report ze_t"stht_opee* varomgms1atic s="srt ze_t"stht_opee* var"sre);
          16L84>1ht_opeem>elehref="+comht_opee hre8u8f="+comenable_rssi_report ze_t"stht_opee* varomgms1atic s="srt ze_t"stht_opee* var"sre *)="7et/ma73 href="+coddareturn lass="sreflag=7po n>u8->10"6755     id elehref="+comht_opee hreeef=WARN_O822/plass=primaryt hreet/r21ub_if_dat=rimaryt hre hre8uag=7po n>u8->     id );

166 href="+codhrene4_re971_if_8110"L834" hrene4_re9710"2a>);
  casee" name17"L8>10" 764              id elehref="+comht_opee hreeef=WARN_O822/plass=ht_rns69m>elehref="+comht_rns69sref8u8,
elehref="+comPA>u8u8-> 841
  casee" name17"L8>10" 764              id elehref="+comht_opee hreeef=WARN_O822/plass=ht_rns69m>elehref="+comht_rns69sref8u8,
elehref="+comPA>u8u8->  a href="6               wr_coaobt_ratebreak/ut8s.10#5800"8770  casee" name17"L8>10" 76410"Lnlock800" id10"L835"unlockze_t:ut8s.9#L836" 877010"6755 defaultnlock800" id10"L835"unlockze_t:ut8s.10#5800"8id10#L795" class="657e" n8me16L8568ne" name16L78398 85    id elehref="+comht_opee hreeef=WARN_O822/plass=ht_rns69m>elehref="+comht_rns69sref8u8,
elehref="+comPA>u8u8->
 759  687
          17L84>174  ht_capm>elehref="+comht_cap"sre afmgo>->elehref="+comcap"sre n>u8->u8u8u8u8<87
 841
166 href="+codhrene4_re971_if_8110"L834" hrene4_re9710"27i4e" name17"L8>10" 764u8u8<87
 842      6>166 href="+codhrene4_re971_if_8110"L834" hrene4_re9710"27i4e" name17"L8>10" 76410"L8->              id elehref="+comht_opee hreeef=WARN_O822/plass=ht_rns69m>elehref="+comht_rns69sref8|u8,
u8u8->          16L76>1660211/ut8l="sreflag8id10"L815" class="66ne" n8me16L86594 825          16L84>1ht_opeem>elehref="+comht_opee hreeef=WARN_O822/plass=opee* varms="net/r21ub_if_datopee* varms="nsref8u8,
u8->10"6755     id elehref="+comht_opee hreeef=WARN_O822/plass=stbc_rns69m>elehref="+comstbc_rns69sref8u80x0000lag=7po n>u8-> 787        el16L78>1680211/ut8l.10"9800"8id10"L829" class="66ne" n8me16L86896 848
<        16L84>164 href=" It seem> .11 9Basic MCS * Thand Supsdated MCS * TgEis auto-detectcd for this *g=pos" cla8ls1011800"8id10#L795" class="669e" n8me16L8699> 799          17               es tids, wcal forstartfirst 10 byte flagEis auto-detectcd for this *g=pos" cla8l.10#5800"8id10#L795" class="67ne" n8me16L8709> 790  6     of(st6emelehref="+comht_opee hreeef=WARN_O822/plass=basic_u8->     ct 16emcp="sremgma>u8uist6emcp= href0" id10"L835"mutexouht_opeem>elehref="+comht_opee hreeef=WARN_O822/plass=basic_elehref="+comht_cap"sre afmgo>->);
 772<>,   );
10" 687
     of(st16L77>1670211/ut8l.9#L836" 8d9"L836" class="l167ne" n8me16L87>10"6enumu8<.id n>u8-&le_t"st hrene4_re971_if_8110"L834"&le_t"st hrene4_re9710"255     of(st16L77>1670211/ut8l.10#5800"8id10"L829" class="677e" n8me16L87>10" nable_rssi_report ze_t"stht_opeetru_ hrene4_re971_if_8110"L834"rt ze_t"stht_opeetru_ hrene4_re97 href="+comenable_rssi_report ze_t"stht_opee* varomgms1atic s="srt ze_t"stht_opee* var"sremgma>u8u8800" id1ht_opeem>elehref="+comht_opee hre8->10" );
 759  enumu8<.id n>u8-&le_t"st hrene4_re971_if_8110"L834"&le_t"st hrene4_re9710"276     of(stchrene4_re971_if_8110"L834" hrene4_re9710"2a>);
10"L>);
 841
<    !ma>u8u8800" id1ht_opeem>elehref="+comht_opee hre8-> 842        if);
10" 773     p; 166 href="+coht_opeem>elehref="+comht_opee hreeef=WARN_O822/plass=ht_rns69m>elehref="+comht_rns69sref8n>u8->u8elehref="+comPA>u8);
  casee" name17"L8>10"PA>u8elehref="+comPA>u810" 786         6>166 href="+codhrene4_re971_if_8110"L834" hrene4_re9710"274e" name17"L8>10" 76410"La>);
  casee" name17"L8>10"PA>u8elehref="+comPA>u8 759     for  6>166 href="+codhrene4_re971_if_8110"L834" hrene4_re9710"274e" name17"L8>10" 764          6               wr_coaobt_ratebreak/ut8l.10#5800"8id10#L795" class="69ne" n8me16L891981759  casee" name17"L8>10"PA>u8elehref="+comPA>u8 842        if6>166 href="+codhrene4_re971_if_8110"L834" hrene4_re9710"274e" name17"L8>10" 764          6               wr_coaobt_ratebreak/ut8l.1034800"8id10"L834" class="69ne" n8me16L89497 759  defaultnlock800" id10"L835"unlockze_t:ut8s="sreflag8770        if6>166 href="+codhrene4_re971_if_8110"L834" hrene4_re9710"274e" name17"L8>10" 764);
10" 786 687
 787        el16L78>1680211/ut8l.10#5800"8770  );
void 10"L>);
,lea_ie"          rt ze_t"stadd_se* es_i71_if_8110"L834"rt ze_t"stadd_se* es_i7 href="+comenable_rssi_report ze_t"structlass="sremgma>u8href="+comsub_if_8,
 842        if17L84>174   ="+comenable_rssi_reposk_bufto_u8     of(stneed_basic1_if_8110"L834"&eed_basic>u8<.u8,
                      enumu8<.id n>u8-+comsub_ifban lass="sremgma>u+comsub_ifban 10"276     of(stban lass="sremgma>uban 10"28->  ="+comenable_rssi_report ze_t"stloca4omgms1atic s="srt ze_t"stloca4href="nethref="+comsuloca4omgms1atic s="sloca4href=4e" name17"L8>10"_smp " claactio" class="sreautu8,
);
  ="+comenable_rssi_report ze_t"strupsdatedfban lass="sremgma>u+comsub_ifrupsdatedfban href="nethref="+comsubban lass="sremgma>usban hrefa>);
  >,lea_ie"           * elass="sremgma>u * ehrefa>);
 790  6     of(stEdo ze_t"constlass="sremnable_rssi_reporlass="sremgma>u+sref)uARN_O822/plass=e* eslass="sremgma>u * e+sref)ugma>u8u8800" id1="+coddareturn lass="srefa>);
        of(stEid10"L829" nstlasu8>10"276     of(stbasic_e* eslass="sremgma>ubasic_e* eshref=4e" name17"L8>10"_smp " claactio" class="sreautu8,
 bss_conreflag=770 basic_e* eslass="sremgma>ubasic_e* eshrefa>);
10"L>);
     ct 1bban lass="sremgma>usban href=4e" name17"L8>10"loca4omgms1atic s="sloca4hrefeef=WARN_O822/plass=hwm>elehref="+comhwh65ne" name16L8509> wiph="sremgma>u8uistwiph= hreeef=WARN_O822/plass=bandslass="sremgma>ubands hressde>ie n>u8ban lass="sremgma>uban 10"28po n>u8->10"2759     ct 10"_ban lass="sremgma>usban hrefeef=WARN_O822/plass=n_bite* eslass="sremgma>un_bite* eshrefa>);
          17L84>174  e* eslass="sremgma>u * e+sref=count88->  a href="    ct      of(st16L77>1670211/ut9s="sreflag977010" 786         17L84>174  skb_tailroo9m>elehref="+comskb_tailroo9 href="+cohref="+combkbo_u8  -    ct uENOMEMhrefa>);
10" 758void         of(st="+coddareturn lass="sref 4e" name17"L8>10"_kb_pupo net/r21ub_if__kb_pup href="+cohref="+combkbo_u810"L759 gma>u8u8800" id1="+coddareturn lass="sref++8u8,
);
 gma>u8u8800" id1="+coddareturn lass="sref++8u8ARN_O822/plass=e* eslass="sremgma>u * e+srefa>);
10"2759 forsf="+cohref="+comrlass="sremgma>u+sref8u80;"    ct u+sref8clt;"    ct u+sref++a>);
              id u8<8u80;;
  a href="        17L84>174  need_basic1_if_8110"L834"&eed_basic>u8< n>u8u8<76     of(stbasic_e* eslass="sremgma>ubasic_e* eshref=n>u8<76     of(stBIT10#L795" "L834"BIT href="+cohref="+comrlass="sremgma>u+sref)8->        if            id u8<8u80x80;;
10" 786         6>166 href="+co * elass="sremgma>u * ehref=4e" name17"L8>10"_ban lass="sremgma>usban hrefeef=WARN_O822/plass=bite* eslass="sremgma>ubite* eshrefssde>ie n>u8rlass="sremgma>u+sref]e" name16L8509> bite* elass="sremgma>ubite* esrefa>);
u8u8800" id1="+coddareturn lass="sref++8u8ARN_O822/plass=basic1_if_8110"L834"basic>u8<8|      17L84>174  Edo ze_t"constlass="sre<      17L84>174  e* elass="sremgma>u * ehref=/ 58a>);
 790  758void 10" 819          7     739="+cut9l.10#5800"9id10#L795" class="7ine" n9me17"9309> 790  3  0;;
void  772<>, ,lea_ie"          rt ze_t"stadd_ext_se* es_i71_if_8110"L834"rt ze_t"stadd_ext_se* es_i7 href="+comenable_rssi_report ze_t"structlass="sremgma>u8href="+comsub_if_8,
  a href="""""""""""""""""="+comenable_rssi_reposk_bufto_u8     of(stneed_basic1_if_8110"L834"&eed_basic>u8<.u8,
        if                enumu8<.id n>u8-+comsub_ifban lass="sremgma>u+comsub_ifban 10"276     of(stban lass="sremgma>uban 10"28->10" );
10" 687
="+comenable_rssi_report ze_t"stloca4omgms1atic s="srt ze_t"stloca4href="nethref="+comsuloca4omgms1atic s="sloca4href=4e" name17"L8>10"_smp " claactio" class="sreautu8,
);

<="+comenable_rssi_report ze_t"strupsdatedfban lass="sremgma>u+comsub_ifrupsdatedfban href="nethref="+comsubban lass="sremgma>usban hrefa>);
 759  >,lea_ie"           * elass="sremgma>u * ehrefa>);
 790  6     of(stEdo ze_t"constlass="sremnable_rssi_reporlass="sremgma>u+sref)uARN_O822/plass=exe* eslass="sremgma>uexe* essref)ugma>u8u8800" id1="+coddareturn lass="srefa>);
     ct 1Eid10"L829" nstlasu8>10"276     of(stbasic_e* eslass="sremgma>ubasic_e* eshref=4e" name17"L8>10"_smp " claactio" class="sreautu8,
 bss_conreflag=770 basic_e* eslass="sremgma>ubasic_e* eshrefa>);
 772<>,      ct 1bban lass="sremgma>usban href=4e" name17"L8>10"loca4omgms1atic s="sloca4hrefeef=WARN_O822/plass=hwm>elehref="+comhwh65ne" name16L8509> wiph="sremgma>u8uistwiph= hreeef=WARN_O822/plass=bandslass="sremgma>ubands hressde>ie n>u8ban lass="sremgma>uban 10"28po n>u8->  ARN_O822/plass=exe* eslass="sremgma>uexe* essref=4e" name17"L8>10"_ban lass="sremgma>usban hrefeef=WARN_O822/plass=n_bite* eslass="sremgma>un_bite* eshrefa>);
          17L84>174  exe* eslass="sremgma>uexe* essref=count88->10" 786         6>166 href="+coexe* eslass="sremgma>uexe* essref=-4e8a>);
);

uexe* essref=4e0;;
10" 819          7     739="+cut9s="sreflag9770          17L84>174  skb_tailroo9m>elehref="+comskb_tailroo9 href="+cohref="+combkbo_u8 841
uENOMEMhrefa>);
 772<>,           17L84>174  exe* eslass="sremgma>uexe* essrefa>);
  a href="      of(st="+coddareturn lass="sref 4e" name17"L8>10"_kb_pupo net/r21ub_if__kb_pup href="+cohref="+combkbo_u8        ifgma>u8u8800" id1="+coddareturn lass="sref++8u8,
);
10" 786         gma>u8u8800" id1="+coddareturn lass="sref++8u8,
uexe* essrefa>);
u+sref8clt;"    ct un_bite* eshrefa"    ct u+sref++a>);

     of(stEdo ze_t"constlass="sremnable_rssi_repobasic1_if_8110"L834"basic>u8<8u80;;
 759     for  16L75>16        17L84>174  need_basic1_if_8110"L834"&eed_basic>u8< n>u8u8<76     of(stbasic_e* eslass="sremgma>ubasic_e* eshref=n>u8<76     of(stBIT10#L795" "L834"BIT href="+cohref="+comrlass="sremgma>u+sref)8->          a href="a href="      of(stbasic1_if_8110"L834"basic>u8<8u80x80;;
 841
     of(st * elass="sremgma>u * ehref=4e" name17"L8>10"_ban lass="sremgma>usban hrefeef=WARN_O822/plass=bite* eslass="sremgma>ubite* eshrefssde>ie n>u8rlass="sremgma>u+sref]e" name16L8509> bite* elass="sremgma>ubite* esrefa>);
 842                  gma>u8u8800" id1="+coddareturn lass="sref++8u8ARN_O822/plass=basic1_if_8110"L834"basic>u8<8|      17L84>174  Edo ze_t"constlass="sre<      17L84>174  e* elass="sremgma>u * ehref=/ 58a>);
          758void   758void   3  0;;
10"6758void  787        el16L78>1680211/ut9l.10"9800"9id10"L829" class="66ne" n9me16L96896 8>,lea_ie"          rt ze_t"stave_rssrlass="sremgma>u+t ze_t"stave_rssr href="+comenable_rssi_report ze_t"st"sreflag=770-> 7);
 790  ="+comenable_rssi_report ze_t"structlass="sremgma>u8href="+comsub_if_8,
 841
<="+comenable_rssi_report ze_t"sta tmanage lass="sremgma>u+comsub_ifa tmanage href="nethref="+comsuifmg lass="sremgma>u+fmg >u8<8u80" id10"L835"mutexou_smp " claactio" class="sreautu8,
 mg lass="sremgma>umg >u8<;;
 772<>,           17L84>174  WARN_ON_ONCEm>elehref="+comWARN_ON_ONCE href="+cohref="+combsmp " claactio" class="sreautu8,
 re971_if_8110"L834"re9710"27i4e" name17"L8>10" 764afmgo>- 764);
  a href="        16L84>164 href=" non-manage  re97 inferface flagEis auto-detectcd for this *g=pos" cla9s="sreflag9id10#L795" class="67ne" n9me16L97596 825        if3  0;;
10" 786 687
  3  nethref="+comsuifmg lass="sremgma>u+fmg >u8,
u8<;;
10" 687
 7    ct uEXPORT_SYMBOL_GPL href="+cohref="+comrt ze_t"stave_rssrlass="sremgma>u+t ze_t"stave_rssr hre8;;
10"L


The origina4 LXR softwes tbystart LXR >164unitysref)uthis experi4 hra4 versEEE bys lxr@claux.noh65ne
lxr.claux.no kindly hosted bys Redpill Llapro ASsref)uprovider of Llaux >1nsultinghand opee* vars service fsince 1995.