]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/mac80211/ieee80211.c
[PATCH] mac80211: regulatory domain cleanup
[linux-2.6-omap-h63xx.git] / net / mac80211 / ieee80211.c
index fe32a2d16053195882cb7a06909d0f1d4ab41ffc..6c63dcf9f1ec175b171dafcf5ea014c0977813fc 100644 (file)
@@ -442,7 +442,7 @@ ieee80211_tx_h_rate_ctrl(struct ieee80211_txrx_data *tx)
        if (!tx->u.tx.rate)
                return TXRX_DROP;
        if (tx->u.tx.mode->mode == MODE_IEEE80211G &&
-           tx->local->cts_protect_erp_frames && tx->fragmented &&
+           tx->sdata->use_protection && tx->fragmented &&
            extra.nonerp) {
                tx->u.tx.last_frag_rate = tx->u.tx.rate;
                tx->u.tx.probe_last_frag = extra.probe ? 1 : 0;
@@ -868,8 +868,7 @@ ieee80211_tx_h_misc(struct ieee80211_txrx_data *tx)
         * for the frame. */
        if (mode->mode == MODE_IEEE80211G &&
            (tx->u.tx.rate->flags & IEEE80211_RATE_ERP) &&
-           tx->u.tx.unicast &&
-           tx->local->cts_protect_erp_frames &&
+           tx->u.tx.unicast && tx->sdata->use_protection &&
            !(control->flags & IEEE80211_TXCTL_USE_RTS_CTS))
                control->flags |= IEEE80211_TXCTL_USE_CTS_PROTECT;
 
@@ -5096,7 +5095,7 @@ int ieee80211_register_hwmode(struct ieee80211_hw *hw,
        }
 
        if (!(hw->flags & IEEE80211_HW_DEFAULT_REG_DOMAIN_CONFIGURED))
-               ieee80211_init_client(local->mdev);
+               ieee80211_set_default_regdomain(mode);
 
        return 0;
 }
@@ -5247,6 +5246,7 @@ static int __init ieee80211_init(void)
        }
 
        ieee80211_debugfs_netdev_init();
+       ieee80211_regdomain_init();
 
        return 0;
 }