~ubuntu-branches/debian/wheezy/linux-2.6/wheezy

« back to all changes in this revision

Viewing changes to drivers/net/wireless/rtlwifi/core.c

  • Committer: Bazaar Package Importer
  • Author(s): Ben Hutchings, Ben Hutchings, Aurelien Jarno
  • Date: 2011-06-07 12:14:05 UTC
  • mfrom: (43.1.9 sid)
  • Revision ID: james.westby@ubuntu.com-20110607121405-i3h1rd7nrnd2b73h
Tags: 2.6.39-2
[ Ben Hutchings ]
* [x86] Enable BACKLIGHT_APPLE, replacing BACKLIGHT_MBP_NVIDIA
  (Closes: #627492)
* cgroups: Disable memory resource controller by default. Allow it
  to be enabled using kernel parameter 'cgroup_enable=memory'.
* rt2800usb: Enable support for more USB devices including
  Linksys WUSB600N (Closes: #596626) (this change was accidentally
  omitted from 2.6.39-1)
* [x86] Remove Celeron from list of processors supporting PAE. Most
  'Celeron M' models do not.
* Update debconf template translations:
  - Swedish (Martin Bagge) (Closes: #628932)
  - French (David Prévot) (Closes: #628191)
* aufs: Update for 2.6.39 (Closes: #627837)
* Add stable 2.6.39.1, including:
  - ext4: dont set PageUptodate in ext4_end_bio()
  - pata_cmd64x: fix boot crash on parisc (Closes: #622997, #622745)
  - ext3: Fix fs corruption when make_indexed_dir() fails
  - netfilter: nf_ct_sip: validate Content-Length in TCP SIP messages
  - sctp: fix race between sctp_bind_addr_free() and
    sctp_bind_addr_conflict()
  - sctp: fix memory leak of the ASCONF queue when free asoc
  - md/bitmap: fix saving of events_cleared and other state
  - cdc_acm: Fix oops when Droids MuIn LCD is connected
  - cx88: Fix conversion from BKL to fine-grained locks (Closes: #619827)
  - keys: Set cred->user_ns in key_replace_session_keyring (CVE-2011-2184)
  - tmpfs: fix race between truncate and writepage
  - nfs41: Correct offset for LAYOUTCOMMIT
  - xen/mmu: fix a race window causing leave_mm BUG()
  - ext4: fix possible use-after-free in ext4_remove_li_request()
  For the complete list of changes, see:
   http://www.kernel.org/pub/linux/kernel/v2.6/ChangeLog-2.6.39.1
* Bump ABI to 2
* netfilter: Enable IP_SET, IP_SET_BITMAP_IP, IP_SET_BITMAP_IPMAC,
  IP_SET_BITMAP_PORT, IP_SET_HASH_IP, IP_SET_HASH_IPPORT,
  IP_SET_HASH_IPPORTIP, IP_SET_HASH_IPPORTNET, IP_SET_HASH_NET,
  IP_SET_HASH_NETPORT, IP_SET_LIST_SET, NETFILTER_XT_SET as modules
  (Closes: #629401)

[ Aurelien Jarno ]
* [mipsel/loongson-2f] Disable_SCSI_LPFC to workaround GCC ICE.

Show diffs side-by-side

added added

removed removed

Lines of Context:
82
82
        mutex_unlock(&rtlpriv->locks.conf_mutex);
83
83
}
84
84
 
85
 
static int rtl_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
 
85
static void rtl_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
86
86
{
87
87
        struct rtl_priv *rtlpriv = rtl_priv(hw);
88
88
        struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw));
97
97
 
98
98
        rtlpriv->intf_ops->adapter_tx(hw, skb);
99
99
 
100
 
        return NETDEV_TX_OK;
 
100
        return;
101
101
 
102
102
err_free:
103
103
        dev_kfree_skb_any(skb);
104
 
        return NETDEV_TX_OK;
105
104
}
106
105
 
107
106
static int rtl_op_add_interface(struct ieee80211_hw *hw,
434
433
 
435
434
        aci = _rtl_get_hal_qnum(queue);
436
435
        mac->ac[aci].aifs = param->aifs;
437
 
        mac->ac[aci].cw_min = param->cw_min;
438
 
        mac->ac[aci].cw_max = param->cw_max;
439
 
        mac->ac[aci].tx_op = param->txop;
 
436
        mac->ac[aci].cw_min = cpu_to_le16(param->cw_min);
 
437
        mac->ac[aci].cw_max = cpu_to_le16(param->cw_max);
 
438
        mac->ac[aci].tx_op = cpu_to_le16(param->txop);
440
439
        memcpy(&mac->edca_param[aci], param, sizeof(*param));
441
440
        rtlpriv->cfg->ops->set_qos(hw, aci);
442
441
        return 0;
552
551
                RT_TRACE(rtlpriv, COMP_MAC80211, DBG_TRACE,
553
552
                         ("BSS_CHANGED_HT\n"));
554
553
 
 
554
                rcu_read_lock();
555
555
                sta = ieee80211_find_sta(mac->vif, mac->bssid);
556
556
 
557
557
                if (sta) {
564
564
                                mac->current_ampdu_factor =
565
565
                                    sta->ht_cap.ampdu_factor;
566
566
                }
 
567
                rcu_read_unlock();
567
568
 
568
569
                rtlpriv->cfg->ops->set_hw_reg(hw, HW_VAR_SHORTGI_DENSITY,
569
570
                                              (u8 *) (&mac->max_mss_density));
615
616
                else
616
617
                        mac->mode = WIRELESS_MODE_G;
617
618
 
 
619
                rcu_read_lock();
618
620
                sta = ieee80211_find_sta(mac->vif, mac->bssid);
619
621
 
620
622
                if (sta) {
649
651
                                 */
650
652
                        }
651
653
                }
 
654
                rcu_read_unlock();
652
655
 
653
656
                /*mac80211 just give us CCK rates any time
654
657
                 *So we add G rate in basic rates when
666
669
                        rtlpriv->cfg->ops->set_hw_reg(hw, HW_VAR_BASIC_RATE,
667
670
                                        (u8 *) (&basic_rates));
668
671
 
669
 
                        if (rtlpriv->dm.b_useramask)
 
672
                        if (rtlpriv->dm.useramask)
670
673
                                rtlpriv->cfg->ops->update_rate_mask(hw, 0);
671
674
                        else
672
675
                                rtlpriv->cfg->ops->update_rate_table(hw);
681
684
         */
682
685
        if (changed & BSS_CHANGED_ASSOC) {
683
686
                if (bss_conf->assoc) {
684
 
                        if (ppsc->b_fwctrl_lps) {
 
687
                        if (ppsc->fwctrl_lps) {
685
688
                                u8 mstatus = RT_MEDIA_CONNECT;
686
689
                                rtlpriv->cfg->ops->set_hw_reg(hw,
687
690
                                                      HW_VAR_H2C_FW_JOINBSSRPT,
689
692
                                ppsc->report_linked = true;
690
693
                        }
691
694
                } else {
692
 
                        if (ppsc->b_fwctrl_lps) {
 
695
                        if (ppsc->fwctrl_lps) {
693
696
                                u8 mstatus = RT_MEDIA_DISCONNECT;
694
697
                                rtlpriv->cfg->ops->set_hw_reg(hw,
695
698
                                                      HW_VAR_H2C_FW_JOINBSSRPT,
748
751
static int rtl_op_ampdu_action(struct ieee80211_hw *hw,
749
752
                               struct ieee80211_vif *vif,
750
753
                               enum ieee80211_ampdu_mlme_action action,
751
 
                               struct ieee80211_sta *sta, u16 tid, u16 * ssn)
 
754
                               struct ieee80211_sta *sta, u16 tid, u16 *ssn,
 
755
                               u8 buf_size)
752
756
{
753
757
        struct rtl_priv *rtlpriv = rtl_priv(hw);
754
758
 
817
821
                /* fix fwlps issue */
818
822
                rtlpriv->cfg->ops->set_network_type(hw, mac->opmode);
819
823
 
820
 
                if (rtlpriv->dm.b_useramask)
 
824
                if (rtlpriv->dm.useramask)
821
825
                        rtlpriv->cfg->ops->update_rate_mask(hw, 0);
822
826
                else
823
827
                        rtlpriv->cfg->ops->update_rate_table(hw);