mac80211: use nl80211 interface types

There's really no reason for mac80211 to be using its
own interface type defines. Use the nl80211 types and
simplify the configuration code a bit: there's no need
to translate them any more now.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
Johannes Berg
2008-09-11 00:01:58 +02:00
committed by John W. Linville
parent 96dd22ac06
commit 05c914fe33
53 changed files with 517 additions and 551 deletions
+11 -11
View File
@@ -765,11 +765,11 @@ static void adm8211_update_mode(struct ieee80211_hw *dev)
priv->soft_rx_crc = 0; priv->soft_rx_crc = 0;
switch (priv->mode) { switch (priv->mode) {
case IEEE80211_IF_TYPE_STA: case NL80211_IFTYPE_STATION:
priv->nar &= ~(ADM8211_NAR_PR | ADM8211_NAR_EA); priv->nar &= ~(ADM8211_NAR_PR | ADM8211_NAR_EA);
priv->nar |= ADM8211_NAR_ST | ADM8211_NAR_SR; priv->nar |= ADM8211_NAR_ST | ADM8211_NAR_SR;
break; break;
case IEEE80211_IF_TYPE_IBSS: case NL80211_IFTYPE_ADHOC:
priv->nar &= ~ADM8211_NAR_PR; priv->nar &= ~ADM8211_NAR_PR;
priv->nar |= ADM8211_NAR_EA | ADM8211_NAR_ST | ADM8211_NAR_SR; priv->nar |= ADM8211_NAR_EA | ADM8211_NAR_ST | ADM8211_NAR_SR;
@@ -777,7 +777,7 @@ static void adm8211_update_mode(struct ieee80211_hw *dev)
if (priv->pdev->revision >= ADM8211_REV_BA) if (priv->pdev->revision >= ADM8211_REV_BA)
priv->soft_rx_crc = 1; priv->soft_rx_crc = 1;
break; break;
case IEEE80211_IF_TYPE_MNTR: case NL80211_IFTYPE_MONITOR:
priv->nar &= ~(ADM8211_NAR_EA | ADM8211_NAR_ST); priv->nar &= ~(ADM8211_NAR_EA | ADM8211_NAR_ST);
priv->nar |= ADM8211_NAR_PR | ADM8211_NAR_SR; priv->nar |= ADM8211_NAR_PR | ADM8211_NAR_SR;
break; break;
@@ -1410,11 +1410,11 @@ static int adm8211_add_interface(struct ieee80211_hw *dev,
struct ieee80211_if_init_conf *conf) struct ieee80211_if_init_conf *conf)
{ {
struct adm8211_priv *priv = dev->priv; struct adm8211_priv *priv = dev->priv;
if (priv->mode != IEEE80211_IF_TYPE_MNTR) if (priv->mode != NL80211_IFTYPE_MONITOR)
return -EOPNOTSUPP; return -EOPNOTSUPP;
switch (conf->type) { switch (conf->type) {
case IEEE80211_IF_TYPE_STA: case NL80211_IFTYPE_STATION:
priv->mode = conf->type; priv->mode = conf->type;
break; break;
default: default:
@@ -1437,7 +1437,7 @@ static void adm8211_remove_interface(struct ieee80211_hw *dev,
struct ieee80211_if_init_conf *conf) struct ieee80211_if_init_conf *conf)
{ {
struct adm8211_priv *priv = dev->priv; struct adm8211_priv *priv = dev->priv;
priv->mode = IEEE80211_IF_TYPE_MNTR; priv->mode = NL80211_IFTYPE_MONITOR;
} }
static int adm8211_init_rings(struct ieee80211_hw *dev) static int adm8211_init_rings(struct ieee80211_hw *dev)
@@ -1556,7 +1556,7 @@ static int adm8211_start(struct ieee80211_hw *dev)
ADM8211_CSR_WRITE(IER, ADM8211_IER_NIE | ADM8211_IER_AIE | ADM8211_CSR_WRITE(IER, ADM8211_IER_NIE | ADM8211_IER_AIE |
ADM8211_IER_RCIE | ADM8211_IER_TCIE | ADM8211_IER_RCIE | ADM8211_IER_TCIE |
ADM8211_IER_TDUIE | ADM8211_IER_GPTIE); ADM8211_IER_TDUIE | ADM8211_IER_GPTIE);
priv->mode = IEEE80211_IF_TYPE_MNTR; priv->mode = NL80211_IFTYPE_MONITOR;
adm8211_update_mode(dev); adm8211_update_mode(dev);
ADM8211_CSR_WRITE(RDR, 0); ADM8211_CSR_WRITE(RDR, 0);
@@ -1571,7 +1571,7 @@ static void adm8211_stop(struct ieee80211_hw *dev)
{ {
struct adm8211_priv *priv = dev->priv; struct adm8211_priv *priv = dev->priv;
priv->mode = IEEE80211_IF_TYPE_INVALID; priv->mode = NL80211_IFTYPE_UNSPECIFIED;
priv->nar = 0; priv->nar = 0;
ADM8211_CSR_WRITE(NAR, 0); ADM8211_CSR_WRITE(NAR, 0);
ADM8211_CSR_WRITE(IER, 0); ADM8211_CSR_WRITE(IER, 0);
@@ -1896,7 +1896,7 @@ static int __devinit adm8211_probe(struct pci_dev *pdev,
priv->tx_power = 0x40; priv->tx_power = 0x40;
priv->lpf_cutoff = 0xFF; priv->lpf_cutoff = 0xFF;
priv->lnags_threshold = 0xFF; priv->lnags_threshold = 0xFF;
priv->mode = IEEE80211_IF_TYPE_INVALID; priv->mode = NL80211_IFTYPE_UNSPECIFIED;
/* Power-on issue. EEPROM won't read correctly without */ /* Power-on issue. EEPROM won't read correctly without */
if (pdev->revision >= ADM8211_REV_BA) { if (pdev->revision >= ADM8211_REV_BA) {
@@ -1986,7 +1986,7 @@ static int adm8211_suspend(struct pci_dev *pdev, pm_message_t state)
struct ieee80211_hw *dev = pci_get_drvdata(pdev); struct ieee80211_hw *dev = pci_get_drvdata(pdev);
struct adm8211_priv *priv = dev->priv; struct adm8211_priv *priv = dev->priv;
if (priv->mode != IEEE80211_IF_TYPE_INVALID) { if (priv->mode != NL80211_IFTYPE_UNSPECIFIED) {
ieee80211_stop_queues(dev); ieee80211_stop_queues(dev);
adm8211_stop(dev); adm8211_stop(dev);
} }
@@ -2004,7 +2004,7 @@ static int adm8211_resume(struct pci_dev *pdev)
pci_set_power_state(pdev, PCI_D0); pci_set_power_state(pdev, PCI_D0);
pci_restore_state(pdev); pci_restore_state(pdev);
if (priv->mode != IEEE80211_IF_TYPE_INVALID) { if (priv->mode != NL80211_IFTYPE_UNSPECIFIED) {
adm8211_start(dev); adm8211_start(dev);
ieee80211_wake_queues(dev); ieee80211_wake_queues(dev);
} }
+2 -2
View File
@@ -1008,7 +1008,7 @@ struct ath5k_hw {
enum ath5k_int ah_imr; enum ath5k_int ah_imr;
enum ieee80211_if_types ah_op_mode; enum nl80211_iftype ah_op_mode;
enum ath5k_power_mode ah_power_mode; enum ath5k_power_mode ah_power_mode;
struct ieee80211_channel ah_current_channel; struct ieee80211_channel ah_current_channel;
bool ah_turbo; bool ah_turbo;
@@ -1117,7 +1117,7 @@ extern void ath5k_hw_detach(struct ath5k_hw *ah);
/* Reset Functions */ /* Reset Functions */
extern int ath5k_hw_nic_wakeup(struct ath5k_hw *ah, int flags, bool initial); extern int ath5k_hw_nic_wakeup(struct ath5k_hw *ah, int flags, bool initial);
extern int ath5k_hw_reset(struct ath5k_hw *ah, enum ieee80211_if_types op_mode, struct ieee80211_channel *channel, bool change_channel); extern int ath5k_hw_reset(struct ath5k_hw *ah, enum nl80211_iftype op_mode, struct ieee80211_channel *channel, bool change_channel);
/* Power management functions */ /* Power management functions */
extern int ath5k_hw_set_power(struct ath5k_hw *ah, enum ath5k_power_mode mode, bool set_chip, u16 sleep_duration); extern int ath5k_hw_set_power(struct ath5k_hw *ah, enum ath5k_power_mode mode, bool set_chip, u16 sleep_duration);
+1 -1
View File
@@ -124,7 +124,7 @@ struct ath5k_hw *ath5k_hw_attach(struct ath5k_softc *sc, u8 mac_version)
/* /*
* HW information * HW information
*/ */
ah->ah_op_mode = IEEE80211_IF_TYPE_STA; ah->ah_op_mode = NL80211_IFTYPE_STATION;
ah->ah_radar.r_enabled = AR5K_TUNE_RADAR_ALERT; ah->ah_radar.r_enabled = AR5K_TUNE_RADAR_ALERT;
ah->ah_turbo = false; ah->ah_turbo = false;
ah->ah_txpower.txp_tpc = AR5K_TUNE_TPC_TXPOWER; ah->ah_txpower.txp_tpc = AR5K_TUNE_TPC_TXPOWER;
+25 -25
View File
@@ -507,7 +507,7 @@ ath5k_pci_probe(struct pci_dev *pdev,
sc->iobase = mem; /* So we can unmap it on detach */ sc->iobase = mem; /* So we can unmap it on detach */
sc->cachelsz = csz * sizeof(u32); /* convert to bytes */ sc->cachelsz = csz * sizeof(u32); /* convert to bytes */
sc->opmode = IEEE80211_IF_TYPE_STA; sc->opmode = NL80211_IFTYPE_STATION;
mutex_init(&sc->lock); mutex_init(&sc->lock);
spin_lock_init(&sc->rxbuflock); spin_lock_init(&sc->rxbuflock);
spin_lock_init(&sc->txbuflock); spin_lock_init(&sc->txbuflock);
@@ -1377,8 +1377,8 @@ ath5k_beaconq_config(struct ath5k_softc *sc)
ret = ath5k_hw_get_tx_queueprops(ah, sc->bhalq, &qi); ret = ath5k_hw_get_tx_queueprops(ah, sc->bhalq, &qi);
if (ret) if (ret)
return ret; return ret;
if (sc->opmode == IEEE80211_IF_TYPE_AP || if (sc->opmode == NL80211_IFTYPE_AP ||
sc->opmode == IEEE80211_IF_TYPE_MESH_POINT) { sc->opmode == NL80211_IFTYPE_MESH_POINT) {
/* /*
* Always burst out beacon and CAB traffic * Always burst out beacon and CAB traffic
* (aifs = cwmin = cwmax = 0) * (aifs = cwmin = cwmax = 0)
@@ -1386,7 +1386,7 @@ ath5k_beaconq_config(struct ath5k_softc *sc)
qi.tqi_aifs = 0; qi.tqi_aifs = 0;
qi.tqi_cw_min = 0; qi.tqi_cw_min = 0;
qi.tqi_cw_max = 0; qi.tqi_cw_max = 0;
} else if (sc->opmode == IEEE80211_IF_TYPE_IBSS) { } else if (sc->opmode == NL80211_IFTYPE_ADHOC) {
/* /*
* Adhoc mode; backoff between 0 and (2 * cw_min). * Adhoc mode; backoff between 0 and (2 * cw_min).
*/ */
@@ -1714,7 +1714,7 @@ ath5k_tasklet_rx(unsigned long data)
/* let crypto-error packets fall through in MNTR */ /* let crypto-error packets fall through in MNTR */
if ((rs.rs_status & if ((rs.rs_status &
~(AR5K_RXERR_DECRYPT|AR5K_RXERR_MIC)) || ~(AR5K_RXERR_DECRYPT|AR5K_RXERR_MIC)) ||
sc->opmode != IEEE80211_IF_TYPE_MNTR) sc->opmode != NL80211_IFTYPE_MONITOR)
goto next; goto next;
} }
accept: accept:
@@ -1777,7 +1777,7 @@ accept:
ath5k_debug_dump_skb(sc, skb, "RX ", 0); ath5k_debug_dump_skb(sc, skb, "RX ", 0);
/* check beacons in IBSS mode */ /* check beacons in IBSS mode */
if (sc->opmode == IEEE80211_IF_TYPE_IBSS) if (sc->opmode == NL80211_IFTYPE_ADHOC)
ath5k_check_ibss_tsf(sc, skb, &rxs); ath5k_check_ibss_tsf(sc, skb, &rxs);
__ieee80211_rx(sc->hw, skb, &rxs); __ieee80211_rx(sc->hw, skb, &rxs);
@@ -1892,7 +1892,7 @@ ath5k_beacon_setup(struct ath5k_softc *sc, struct ath5k_buf *bf)
ds = bf->desc; ds = bf->desc;
flags = AR5K_TXDESC_NOACK; flags = AR5K_TXDESC_NOACK;
if (sc->opmode == IEEE80211_IF_TYPE_IBSS && ath5k_hw_hasveol(ah)) { if (sc->opmode == NL80211_IFTYPE_ADHOC && ath5k_hw_hasveol(ah)) {
ds->ds_link = bf->daddr; /* self-linked */ ds->ds_link = bf->daddr; /* self-linked */
flags |= AR5K_TXDESC_VEOL; flags |= AR5K_TXDESC_VEOL;
/* /*
@@ -1941,8 +1941,8 @@ ath5k_beacon_send(struct ath5k_softc *sc)
ATH5K_DBG_UNLIMIT(sc, ATH5K_DEBUG_BEACON, "in beacon_send\n"); ATH5K_DBG_UNLIMIT(sc, ATH5K_DEBUG_BEACON, "in beacon_send\n");
if (unlikely(bf->skb == NULL || sc->opmode == IEEE80211_IF_TYPE_STA || if (unlikely(bf->skb == NULL || sc->opmode == NL80211_IFTYPE_STATION ||
sc->opmode == IEEE80211_IF_TYPE_MNTR)) { sc->opmode == NL80211_IFTYPE_MONITOR)) {
ATH5K_WARN(sc, "bf=%p bf_skb=%p\n", bf, bf ? bf->skb : NULL); ATH5K_WARN(sc, "bf=%p bf_skb=%p\n", bf, bf ? bf->skb : NULL);
return; return;
} }
@@ -2116,9 +2116,9 @@ ath5k_beacon_config(struct ath5k_softc *sc)
sc->bmisscount = 0; sc->bmisscount = 0;
sc->imask &= ~(AR5K_INT_BMISS | AR5K_INT_SWBA); sc->imask &= ~(AR5K_INT_BMISS | AR5K_INT_SWBA);
if (sc->opmode == IEEE80211_IF_TYPE_STA) { if (sc->opmode == NL80211_IFTYPE_STATION) {
sc->imask |= AR5K_INT_BMISS; sc->imask |= AR5K_INT_BMISS;
} else if (sc->opmode == IEEE80211_IF_TYPE_IBSS) { } else if (sc->opmode == NL80211_IFTYPE_ADHOC) {
/* /*
* In IBSS mode we use a self-linked tx descriptor and let the * In IBSS mode we use a self-linked tx descriptor and let the
* hardware send the beacons automatically. We have to load it * hardware send the beacons automatically. We have to load it
@@ -2323,7 +2323,7 @@ ath5k_intr(int irq, void *dev_id)
* transmission time) in order to detect wether * transmission time) in order to detect wether
* automatic TSF updates happened. * automatic TSF updates happened.
*/ */
if (sc->opmode == IEEE80211_IF_TYPE_IBSS) { if (sc->opmode == NL80211_IFTYPE_ADHOC) {
/* XXX: only if VEOL suppported */ /* XXX: only if VEOL suppported */
u64 tsf = ath5k_hw_get_tsf64(ah); u64 tsf = ath5k_hw_get_tsf64(ah);
sc->nexttbtt += sc->bintval; sc->nexttbtt += sc->bintval;
@@ -2553,7 +2553,7 @@ ath5k_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
ath5k_debug_dump_skb(sc, skb, "TX ", 1); ath5k_debug_dump_skb(sc, skb, "TX ", 1);
if (sc->opmode == IEEE80211_IF_TYPE_MNTR) if (sc->opmode == NL80211_IFTYPE_MONITOR)
ATH5K_DBG(sc, ATH5K_DEBUG_XMIT, "tx in monitor (scan?)\n"); ATH5K_DBG(sc, ATH5K_DEBUG_XMIT, "tx in monitor (scan?)\n");
/* /*
@@ -2688,9 +2688,9 @@ static int ath5k_add_interface(struct ieee80211_hw *hw,
sc->vif = conf->vif; sc->vif = conf->vif;
switch (conf->type) { switch (conf->type) {
case IEEE80211_IF_TYPE_STA: case NL80211_IFTYPE_STATION:
case IEEE80211_IF_TYPE_IBSS: case NL80211_IFTYPE_ADHOC:
case IEEE80211_IF_TYPE_MNTR: case NL80211_IFTYPE_MONITOR:
sc->opmode = conf->type; sc->opmode = conf->type;
break; break;
default: default:
@@ -2761,7 +2761,7 @@ ath5k_config_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
} }
if (conf->changed & IEEE80211_IFCC_BEACON && if (conf->changed & IEEE80211_IFCC_BEACON &&
vif->type == IEEE80211_IF_TYPE_IBSS) { vif->type == NL80211_IFTYPE_ADHOC) {
struct sk_buff *beacon = ieee80211_beacon_get(hw, vif); struct sk_buff *beacon = ieee80211_beacon_get(hw, vif);
if (!beacon) { if (!beacon) {
ret = -ENOMEM; ret = -ENOMEM;
@@ -2880,17 +2880,17 @@ static void ath5k_configure_filter(struct ieee80211_hw *hw,
/* XXX move these to mac80211, and add a beacon IFF flag to mac80211 */ /* XXX move these to mac80211, and add a beacon IFF flag to mac80211 */
if (sc->opmode == IEEE80211_IF_TYPE_MNTR) if (sc->opmode == NL80211_IFTYPE_MONITOR)
rfilt |= AR5K_RX_FILTER_CONTROL | AR5K_RX_FILTER_BEACON | rfilt |= AR5K_RX_FILTER_CONTROL | AR5K_RX_FILTER_BEACON |
AR5K_RX_FILTER_PROBEREQ | AR5K_RX_FILTER_PROM; AR5K_RX_FILTER_PROBEREQ | AR5K_RX_FILTER_PROM;
if (sc->opmode != IEEE80211_IF_TYPE_STA) if (sc->opmode != NL80211_IFTYPE_STATION)
rfilt |= AR5K_RX_FILTER_PROBEREQ; rfilt |= AR5K_RX_FILTER_PROBEREQ;
if (sc->opmode != IEEE80211_IF_TYPE_AP && if (sc->opmode != NL80211_IFTYPE_AP &&
sc->opmode != IEEE80211_IF_TYPE_MESH_POINT && sc->opmode != NL80211_IFTYPE_MESH_POINT &&
test_bit(ATH_STAT_PROMISC, sc->status)) test_bit(ATH_STAT_PROMISC, sc->status))
rfilt |= AR5K_RX_FILTER_PROM; rfilt |= AR5K_RX_FILTER_PROM;
if (sc->opmode == IEEE80211_IF_TYPE_STA || if (sc->opmode == NL80211_IFTYPE_STATION ||
sc->opmode == IEEE80211_IF_TYPE_IBSS) { sc->opmode == NL80211_IFTYPE_ADHOC) {
rfilt |= AR5K_RX_FILTER_BEACON; rfilt |= AR5K_RX_FILTER_BEACON;
} }
@@ -2995,7 +2995,7 @@ ath5k_reset_tsf(struct ieee80211_hw *hw)
* in IBSS mode we need to update the beacon timers too. * in IBSS mode we need to update the beacon timers too.
* this will also reset the TSF if we call it with 0 * this will also reset the TSF if we call it with 0
*/ */
if (sc->opmode == IEEE80211_IF_TYPE_IBSS) if (sc->opmode == NL80211_IFTYPE_ADHOC)
ath5k_beacon_update_timers(sc, 0); ath5k_beacon_update_timers(sc, 0);
else else
ath5k_hw_reset_tsf(sc->ah); ath5k_hw_reset_tsf(sc->ah);
@@ -3010,7 +3010,7 @@ ath5k_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb)
ath5k_debug_dump_skb(sc, skb, "BC ", 1); ath5k_debug_dump_skb(sc, skb, "BC ", 1);
if (sc->opmode != IEEE80211_IF_TYPE_IBSS) { if (sc->opmode != NL80211_IFTYPE_ADHOC) {
ret = -EIO; ret = -EIO;
goto end; goto end;
} }
+1 -1
View File
@@ -113,7 +113,7 @@ struct ath5k_softc {
struct ieee80211_channel channels[ATH_CHAN_MAX]; struct ieee80211_channel channels[ATH_CHAN_MAX];
struct ieee80211_rate rates[IEEE80211_NUM_BANDS][AR5K_MAX_RATES]; struct ieee80211_rate rates[IEEE80211_NUM_BANDS][AR5K_MAX_RATES];
u8 rate_idx[IEEE80211_NUM_BANDS][AR5K_MAX_RATES]; u8 rate_idx[IEEE80211_NUM_BANDS][AR5K_MAX_RATES];
enum ieee80211_if_types opmode; enum nl80211_iftype opmode;
struct ath5k_hw *ah; /* Atheros HW */ struct ath5k_hw *ah; /* Atheros HW */
struct ieee80211_supported_band *curband; struct ieee80211_supported_band *curband;
+6 -6
View File
@@ -52,26 +52,26 @@ int ath5k_hw_set_opmode(struct ath5k_hw *ah)
ATH5K_TRACE(ah->ah_sc); ATH5K_TRACE(ah->ah_sc);
switch (ah->ah_op_mode) { switch (ah->ah_op_mode) {
case IEEE80211_IF_TYPE_IBSS: case NL80211_IFTYPE_ADHOC:
pcu_reg |= AR5K_STA_ID1_ADHOC | AR5K_STA_ID1_DESC_ANTENNA | pcu_reg |= AR5K_STA_ID1_ADHOC | AR5K_STA_ID1_DESC_ANTENNA |
(ah->ah_version == AR5K_AR5210 ? (ah->ah_version == AR5K_AR5210 ?
AR5K_STA_ID1_NO_PSPOLL : 0); AR5K_STA_ID1_NO_PSPOLL : 0);
beacon_reg |= AR5K_BCR_ADHOC; beacon_reg |= AR5K_BCR_ADHOC;
break; break;
case IEEE80211_IF_TYPE_AP: case NL80211_IFTYPE_AP:
case IEEE80211_IF_TYPE_MESH_POINT: case NL80211_IFTYPE_MESH_POINT:
pcu_reg |= AR5K_STA_ID1_AP | AR5K_STA_ID1_RTS_DEF_ANTENNA | pcu_reg |= AR5K_STA_ID1_AP | AR5K_STA_ID1_RTS_DEF_ANTENNA |
(ah->ah_version == AR5K_AR5210 ? (ah->ah_version == AR5K_AR5210 ?
AR5K_STA_ID1_NO_PSPOLL : 0); AR5K_STA_ID1_NO_PSPOLL : 0);
beacon_reg |= AR5K_BCR_AP; beacon_reg |= AR5K_BCR_AP;
break; break;
case IEEE80211_IF_TYPE_STA: case NL80211_IFTYPE_STATION:
pcu_reg |= AR5K_STA_ID1_DEFAULT_ANTENNA | pcu_reg |= AR5K_STA_ID1_DEFAULT_ANTENNA |
(ah->ah_version == AR5K_AR5210 ? (ah->ah_version == AR5K_AR5210 ?
AR5K_STA_ID1_PWR_SV : 0); AR5K_STA_ID1_PWR_SV : 0);
case IEEE80211_IF_TYPE_MNTR: case NL80211_IFTYPE_MONITOR:
pcu_reg |= AR5K_STA_ID1_DEFAULT_ANTENNA | pcu_reg |= AR5K_STA_ID1_DEFAULT_ANTENNA |
(ah->ah_version == AR5K_AR5210 ? (ah->ah_version == AR5K_AR5210 ?
AR5K_STA_ID1_NO_PSPOLL : 0); AR5K_STA_ID1_NO_PSPOLL : 0);
@@ -649,7 +649,7 @@ void ath5k_hw_init_beacon(struct ath5k_hw *ah, u32 next_beacon, u32 interval)
* Set the additional timers by mode * Set the additional timers by mode
*/ */
switch (ah->ah_op_mode) { switch (ah->ah_op_mode) {
case IEEE80211_IF_TYPE_STA: case NL80211_IFTYPE_STATION:
if (ah->ah_version == AR5K_AR5210) { if (ah->ah_version == AR5K_AR5210) {
timer1 = 0xffffffff; timer1 = 0xffffffff;
timer2 = 0xffffffff; timer2 = 0xffffffff;
+1 -1
View File
@@ -399,7 +399,7 @@ int ath5k_hw_nic_wakeup(struct ath5k_hw *ah, int flags, bool initial)
/* /*
* Main reset function * Main reset function
*/ */
int ath5k_hw_reset(struct ath5k_hw *ah, enum ieee80211_if_types op_mode, int ath5k_hw_reset(struct ath5k_hw *ah, enum nl80211_iftype op_mode,
struct ieee80211_channel *channel, bool change_channel) struct ieee80211_channel *channel, bool change_channel)
{ {
struct ath5k_eeprom_info *ee = &ah->ah_capabilities.cap_eeprom; struct ath5k_eeprom_info *ee = &ah->ah_capabilities.cap_eeprom;
+14 -14
View File
@@ -140,7 +140,7 @@ static int ath_key_config(struct ath_softc *sc,
struct ath9k_keyval hk; struct ath9k_keyval hk;
const u8 *mac = NULL; const u8 *mac = NULL;
int ret = 0; int ret = 0;
enum ieee80211_if_types opmode; enum nl80211_iftype opmode;
memset(&hk, 0, sizeof(hk)); memset(&hk, 0, sizeof(hk));
@@ -179,14 +179,14 @@ static int ath_key_config(struct ath_softc *sc,
*/ */
if (is_broadcast_ether_addr(addr)) { if (is_broadcast_ether_addr(addr)) {
switch (opmode) { switch (opmode) {
case IEEE80211_IF_TYPE_STA: case NL80211_IFTYPE_STATION:
/* default key: could be group WPA key /* default key: could be group WPA key
* or could be static WEP key */ * or could be static WEP key */
mac = NULL; mac = NULL;
break; break;
case IEEE80211_IF_TYPE_IBSS: case NL80211_IFTYPE_ADHOC:
break; break;
case IEEE80211_IF_TYPE_AP: case NL80211_IFTYPE_AP:
break; break;
default: default:
ASSERT(0); ASSERT(0);
@@ -1147,13 +1147,13 @@ static int ath9k_add_interface(struct ieee80211_hw *hw,
return -ENOBUFS; return -ENOBUFS;
switch (conf->type) { switch (conf->type) {
case IEEE80211_IF_TYPE_STA: case NL80211_IFTYPE_STATION:
ic_opmode = ATH9K_M_STA; ic_opmode = ATH9K_M_STA;
break; break;
case IEEE80211_IF_TYPE_IBSS: case NL80211_IFTYPE_ADHOC:
ic_opmode = ATH9K_M_IBSS; ic_opmode = ATH9K_M_IBSS;
break; break;
case IEEE80211_IF_TYPE_AP: case NL80211_IFTYPE_AP:
ic_opmode = ATH9K_M_HOSTAP; ic_opmode = ATH9K_M_HOSTAP;
break; break;
default: default:
@@ -1275,7 +1275,7 @@ static int ath9k_config_interface(struct ieee80211_hw *hw,
/* TODO: Need to decide which hw opmode to use for multi-interface /* TODO: Need to decide which hw opmode to use for multi-interface
* cases */ * cases */
if (vif->type == IEEE80211_IF_TYPE_AP && if (vif->type == NL80211_IFTYPE_AP &&
ah->ah_opmode != ATH9K_M_HOSTAP) { ah->ah_opmode != ATH9K_M_HOSTAP) {
ah->ah_opmode = ATH9K_M_HOSTAP; ah->ah_opmode = ATH9K_M_HOSTAP;
ath9k_hw_setopmode(ah); ath9k_hw_setopmode(ah);
@@ -1287,8 +1287,8 @@ static int ath9k_config_interface(struct ieee80211_hw *hw,
if ((conf->changed & IEEE80211_IFCC_BSSID) && if ((conf->changed & IEEE80211_IFCC_BSSID) &&
!is_zero_ether_addr(conf->bssid)) { !is_zero_ether_addr(conf->bssid)) {
switch (vif->type) { switch (vif->type) {
case IEEE80211_IF_TYPE_STA: case NL80211_IFTYPE_STATION:
case IEEE80211_IF_TYPE_IBSS: case NL80211_IFTYPE_ADHOC:
/* Update ratectrl about the new state */ /* Update ratectrl about the new state */
ath_rate_newstate(sc, avp); ath_rate_newstate(sc, avp);
@@ -1333,8 +1333,8 @@ static int ath9k_config_interface(struct ieee80211_hw *hw,
} }
if ((conf->changed & IEEE80211_IFCC_BEACON) && if ((conf->changed & IEEE80211_IFCC_BEACON) &&
((vif->type == IEEE80211_IF_TYPE_IBSS) || ((vif->type == NL80211_IFTYPE_ADHOC) ||
(vif->type == IEEE80211_IF_TYPE_AP))) { (vif->type == NL80211_IFTYPE_AP))) {
/* /*
* Allocate and setup the beacon frame. * Allocate and setup the beacon frame.
* *
@@ -1353,7 +1353,7 @@ static int ath9k_config_interface(struct ieee80211_hw *hw,
} }
/* Check for WLAN_CAPABILITY_PRIVACY ? */ /* Check for WLAN_CAPABILITY_PRIVACY ? */
if ((avp->av_opmode != IEEE80211_IF_TYPE_STA)) { if ((avp->av_opmode != NL80211_IFTYPE_STATION)) {
for (i = 0; i < IEEE80211_WEP_NKID; i++) for (i = 0; i < IEEE80211_WEP_NKID; i++)
if (ath9k_hw_keyisvalid(sc->sc_ah, (u16)i)) if (ath9k_hw_keyisvalid(sc->sc_ah, (u16)i))
ath9k_hw_keysetmac(sc->sc_ah, ath9k_hw_keysetmac(sc->sc_ah,
@@ -1362,7 +1362,7 @@ static int ath9k_config_interface(struct ieee80211_hw *hw,
} }
/* Only legacy IBSS for now */ /* Only legacy IBSS for now */
if (vif->type == IEEE80211_IF_TYPE_IBSS) if (vif->type == NL80211_IFTYPE_ADHOC)
ath_update_chainmask(sc, 0); ath_update_chainmask(sc, 0);
return 0; return 0;
+19 -19
View File
@@ -1244,13 +1244,13 @@ generate_new:
static void handle_irq_tbtt_indication(struct b43_wldev *dev) static void handle_irq_tbtt_indication(struct b43_wldev *dev)
{ {
if (b43_is_mode(dev->wl, IEEE80211_IF_TYPE_AP)) { if (b43_is_mode(dev->wl, NL80211_IFTYPE_AP)) {
///TODO: PS TBTT ///TODO: PS TBTT
} else { } else {
if (1 /*FIXME: the last PSpoll frame was sent successfully */ ) if (1 /*FIXME: the last PSpoll frame was sent successfully */ )
b43_power_saving_ctl_bits(dev, 0); b43_power_saving_ctl_bits(dev, 0);
} }
if (b43_is_mode(dev->wl, IEEE80211_IF_TYPE_IBSS)) if (b43_is_mode(dev->wl, NL80211_IFTYPE_ADHOC))
dev->dfq_valid = 1; dev->dfq_valid = 1;
} }
@@ -1599,8 +1599,8 @@ static void handle_irq_beacon(struct b43_wldev *dev)
struct b43_wl *wl = dev->wl; struct b43_wl *wl = dev->wl;
u32 cmd, beacon0_valid, beacon1_valid; u32 cmd, beacon0_valid, beacon1_valid;
if (!b43_is_mode(wl, IEEE80211_IF_TYPE_AP) && if (!b43_is_mode(wl, NL80211_IFTYPE_AP) &&
!b43_is_mode(wl, IEEE80211_IF_TYPE_MESH_POINT)) !b43_is_mode(wl, NL80211_IFTYPE_MESH_POINT))
return; return;
/* This is the bottom half of the asynchronous beacon update. */ /* This is the bottom half of the asynchronous beacon update. */
@@ -2568,10 +2568,10 @@ static void b43_adjust_opmode(struct b43_wldev *dev)
ctl &= ~B43_MACCTL_BEACPROMISC; ctl &= ~B43_MACCTL_BEACPROMISC;
ctl |= B43_MACCTL_INFRA; ctl |= B43_MACCTL_INFRA;
if (b43_is_mode(wl, IEEE80211_IF_TYPE_AP) || if (b43_is_mode(wl, NL80211_IFTYPE_AP) ||
b43_is_mode(wl, IEEE80211_IF_TYPE_MESH_POINT)) b43_is_mode(wl, NL80211_IFTYPE_MESH_POINT))
ctl |= B43_MACCTL_AP; ctl |= B43_MACCTL_AP;
else if (b43_is_mode(wl, IEEE80211_IF_TYPE_IBSS)) else if (b43_is_mode(wl, NL80211_IFTYPE_ADHOC))
ctl &= ~B43_MACCTL_INFRA; ctl &= ~B43_MACCTL_INFRA;
if (wl->filter_flags & FIF_CONTROL) if (wl->filter_flags & FIF_CONTROL)
@@ -3406,8 +3406,8 @@ static int b43_op_config(struct ieee80211_hw *hw, struct ieee80211_conf *conf)
phy->ops->set_rx_antenna(dev, antenna); phy->ops->set_rx_antenna(dev, antenna);
/* Update templates for AP/mesh mode. */ /* Update templates for AP/mesh mode. */
if (b43_is_mode(wl, IEEE80211_IF_TYPE_AP) || if (b43_is_mode(wl, NL80211_IFTYPE_AP) ||
b43_is_mode(wl, IEEE80211_IF_TYPE_MESH_POINT)) b43_is_mode(wl, NL80211_IFTYPE_MESH_POINT))
b43_set_beacon_int(dev, conf->beacon_int); b43_set_beacon_int(dev, conf->beacon_int);
if (!!conf->radio_enabled != phy->radio_on) { if (!!conf->radio_enabled != phy->radio_on) {
@@ -3595,14 +3595,14 @@ static int b43_op_config_interface(struct ieee80211_hw *hw,
else else
memset(wl->bssid, 0, ETH_ALEN); memset(wl->bssid, 0, ETH_ALEN);
if (b43_status(dev) >= B43_STAT_INITIALIZED) { if (b43_status(dev) >= B43_STAT_INITIALIZED) {
if (b43_is_mode(wl, IEEE80211_IF_TYPE_AP) || if (b43_is_mode(wl, NL80211_IFTYPE_AP) ||
b43_is_mode(wl, IEEE80211_IF_TYPE_MESH_POINT)) { b43_is_mode(wl, NL80211_IFTYPE_MESH_POINT)) {
B43_WARN_ON(vif->type != wl->if_type); B43_WARN_ON(vif->type != wl->if_type);
if (conf->changed & IEEE80211_IFCC_SSID) if (conf->changed & IEEE80211_IFCC_SSID)
b43_set_ssid(dev, conf->ssid, conf->ssid_len); b43_set_ssid(dev, conf->ssid, conf->ssid_len);
if (conf->changed & IEEE80211_IFCC_BEACON) if (conf->changed & IEEE80211_IFCC_BEACON)
b43_update_templates(wl); b43_update_templates(wl);
} else if (b43_is_mode(wl, IEEE80211_IF_TYPE_IBSS)) { } else if (b43_is_mode(wl, NL80211_IFTYPE_ADHOC)) {
if (conf->changed & IEEE80211_IFCC_BEACON) if (conf->changed & IEEE80211_IFCC_BEACON)
b43_update_templates(wl); b43_update_templates(wl);
} }
@@ -3903,7 +3903,7 @@ static void b43_set_synth_pu_delay(struct b43_wldev *dev, bool idle)
pu_delay = 3700; pu_delay = 3700;
else else
pu_delay = 1050; pu_delay = 1050;
if (b43_is_mode(dev->wl, IEEE80211_IF_TYPE_IBSS) || idle) if (b43_is_mode(dev->wl, NL80211_IFTYPE_ADHOC) || idle)
pu_delay = 500; pu_delay = 500;
if ((dev->phy.radio_ver == 0x2050) && (dev->phy.radio_rev == 8)) if ((dev->phy.radio_ver == 0x2050) && (dev->phy.radio_rev == 8))
pu_delay = max(pu_delay, (u16)2400); pu_delay = max(pu_delay, (u16)2400);
@@ -3917,7 +3917,7 @@ static void b43_set_pretbtt(struct b43_wldev *dev)
u16 pretbtt; u16 pretbtt;
/* The time value is in microseconds. */ /* The time value is in microseconds. */
if (b43_is_mode(dev->wl, IEEE80211_IF_TYPE_IBSS)) { if (b43_is_mode(dev->wl, NL80211_IFTYPE_ADHOC)) {
pretbtt = 2; pretbtt = 2;
} else { } else {
if (dev->phy.type == B43_PHYTYPE_A) if (dev->phy.type == B43_PHYTYPE_A)
@@ -4084,11 +4084,11 @@ static int b43_op_add_interface(struct ieee80211_hw *hw,
/* TODO: allow WDS/AP devices to coexist */ /* TODO: allow WDS/AP devices to coexist */
if (conf->type != IEEE80211_IF_TYPE_AP && if (conf->type != NL80211_IFTYPE_AP &&
conf->type != IEEE80211_IF_TYPE_MESH_POINT && conf->type != NL80211_IFTYPE_MESH_POINT &&
conf->type != IEEE80211_IF_TYPE_STA && conf->type != NL80211_IFTYPE_STATION &&
conf->type != IEEE80211_IF_TYPE_WDS && conf->type != NL80211_IFTYPE_WDS &&
conf->type != IEEE80211_IF_TYPE_IBSS) conf->type != NL80211_IFTYPE_ADHOC)
return -EOPNOTSUPP; return -EOPNOTSUPP;
mutex_lock(&wl->mutex); mutex_lock(&wl->mutex);
+2 -2
View File
@@ -162,7 +162,7 @@ void b43_phy_lock(struct b43_wldev *dev)
#endif #endif
B43_WARN_ON(dev->dev->id.revision < 3); B43_WARN_ON(dev->dev->id.revision < 3);
if (!b43_is_mode(dev->wl, IEEE80211_IF_TYPE_AP)) if (!b43_is_mode(dev->wl, NL80211_IFTYPE_AP))
b43_power_saving_ctl_bits(dev, B43_PS_AWAKE); b43_power_saving_ctl_bits(dev, B43_PS_AWAKE);
} }
@@ -174,7 +174,7 @@ void b43_phy_unlock(struct b43_wldev *dev)
#endif #endif
B43_WARN_ON(dev->dev->id.revision < 3); B43_WARN_ON(dev->dev->id.revision < 3);
if (!b43_is_mode(dev->wl, IEEE80211_IF_TYPE_AP)) if (!b43_is_mode(dev->wl, NL80211_IFTYPE_AP))
b43_power_saving_ctl_bits(dev, 0); b43_power_saving_ctl_bits(dev, 0);
} }
+15 -15
View File
@@ -888,13 +888,13 @@ generate_new:
static void handle_irq_tbtt_indication(struct b43legacy_wldev *dev) static void handle_irq_tbtt_indication(struct b43legacy_wldev *dev)
{ {
if (b43legacy_is_mode(dev->wl, IEEE80211_IF_TYPE_AP)) { if (b43legacy_is_mode(dev->wl, NL80211_IFTYPE_AP)) {
/* TODO: PS TBTT */ /* TODO: PS TBTT */
} else { } else {
if (1/*FIXME: the last PSpoll frame was sent successfully */) if (1/*FIXME: the last PSpoll frame was sent successfully */)
b43legacy_power_saving_ctl_bits(dev, -1, -1); b43legacy_power_saving_ctl_bits(dev, -1, -1);
} }
if (b43legacy_is_mode(dev->wl, IEEE80211_IF_TYPE_IBSS)) if (b43legacy_is_mode(dev->wl, NL80211_IFTYPE_ADHOC))
dev->dfq_valid = 1; dev->dfq_valid = 1;
} }
@@ -1201,7 +1201,7 @@ static void handle_irq_beacon(struct b43legacy_wldev *dev)
struct b43legacy_wl *wl = dev->wl; struct b43legacy_wl *wl = dev->wl;
u32 cmd; u32 cmd;
if (!b43legacy_is_mode(wl, IEEE80211_IF_TYPE_AP)) if (!b43legacy_is_mode(wl, NL80211_IFTYPE_AP))
return; return;
/* This is the bottom half of the asynchronous beacon update. */ /* This is the bottom half of the asynchronous beacon update. */
@@ -1936,9 +1936,9 @@ static void b43legacy_adjust_opmode(struct b43legacy_wldev *dev)
ctl &= ~B43legacy_MACCTL_BEACPROMISC; ctl &= ~B43legacy_MACCTL_BEACPROMISC;
ctl |= B43legacy_MACCTL_INFRA; ctl |= B43legacy_MACCTL_INFRA;
if (b43legacy_is_mode(wl, IEEE80211_IF_TYPE_AP)) if (b43legacy_is_mode(wl, NL80211_IFTYPE_AP))
ctl |= B43legacy_MACCTL_AP; ctl |= B43legacy_MACCTL_AP;
else if (b43legacy_is_mode(wl, IEEE80211_IF_TYPE_IBSS)) else if (b43legacy_is_mode(wl, NL80211_IFTYPE_ADHOC))
ctl &= ~B43legacy_MACCTL_INFRA; ctl &= ~B43legacy_MACCTL_INFRA;
if (wl->filter_flags & FIF_CONTROL) if (wl->filter_flags & FIF_CONTROL)
@@ -2646,7 +2646,7 @@ static int b43legacy_op_dev_config(struct ieee80211_hw *hw,
b43legacy_mgmtframe_txantenna(dev, antenna_tx); b43legacy_mgmtframe_txantenna(dev, antenna_tx);
/* Update templates for AP mode. */ /* Update templates for AP mode. */
if (b43legacy_is_mode(wl, IEEE80211_IF_TYPE_AP)) if (b43legacy_is_mode(wl, NL80211_IFTYPE_AP))
b43legacy_set_beacon_int(dev, conf->beacon_int); b43legacy_set_beacon_int(dev, conf->beacon_int);
@@ -2733,12 +2733,12 @@ static int b43legacy_op_config_interface(struct ieee80211_hw *hw,
else else
memset(wl->bssid, 0, ETH_ALEN); memset(wl->bssid, 0, ETH_ALEN);
if (b43legacy_status(dev) >= B43legacy_STAT_INITIALIZED) { if (b43legacy_status(dev) >= B43legacy_STAT_INITIALIZED) {
if (b43legacy_is_mode(wl, IEEE80211_IF_TYPE_AP)) { if (b43legacy_is_mode(wl, NL80211_IFTYPE_AP)) {
B43legacy_WARN_ON(vif->type != IEEE80211_IF_TYPE_AP); B43legacy_WARN_ON(vif->type != NL80211_IFTYPE_AP);
b43legacy_set_ssid(dev, conf->ssid, conf->ssid_len); b43legacy_set_ssid(dev, conf->ssid, conf->ssid_len);
if (conf->changed & IEEE80211_IFCC_BEACON) if (conf->changed & IEEE80211_IFCC_BEACON)
b43legacy_update_templates(wl); b43legacy_update_templates(wl);
} else if (b43legacy_is_mode(wl, IEEE80211_IF_TYPE_IBSS)) { } else if (b43legacy_is_mode(wl, NL80211_IFTYPE_ADHOC)) {
if (conf->changed & IEEE80211_IFCC_BEACON) if (conf->changed & IEEE80211_IFCC_BEACON)
b43legacy_update_templates(wl); b43legacy_update_templates(wl);
} }
@@ -3020,7 +3020,7 @@ static void b43legacy_set_synth_pu_delay(struct b43legacy_wldev *dev,
bool idle) { bool idle) {
u16 pu_delay = 1050; u16 pu_delay = 1050;
if (b43legacy_is_mode(dev->wl, IEEE80211_IF_TYPE_IBSS) || idle) if (b43legacy_is_mode(dev->wl, NL80211_IFTYPE_ADHOC) || idle)
pu_delay = 500; pu_delay = 500;
if ((dev->phy.radio_ver == 0x2050) && (dev->phy.radio_rev == 8)) if ((dev->phy.radio_ver == 0x2050) && (dev->phy.radio_rev == 8))
pu_delay = max(pu_delay, (u16)2400); pu_delay = max(pu_delay, (u16)2400);
@@ -3035,7 +3035,7 @@ static void b43legacy_set_pretbtt(struct b43legacy_wldev *dev)
u16 pretbtt; u16 pretbtt;
/* The time value is in microseconds. */ /* The time value is in microseconds. */
if (b43legacy_is_mode(dev->wl, IEEE80211_IF_TYPE_IBSS)) if (b43legacy_is_mode(dev->wl, NL80211_IFTYPE_ADHOC))
pretbtt = 2; pretbtt = 2;
else else
pretbtt = 250; pretbtt = 250;
@@ -3259,10 +3259,10 @@ static int b43legacy_op_add_interface(struct ieee80211_hw *hw,
/* TODO: allow WDS/AP devices to coexist */ /* TODO: allow WDS/AP devices to coexist */
if (conf->type != IEEE80211_IF_TYPE_AP && if (conf->type != NL80211_IFTYPE_AP &&
conf->type != IEEE80211_IF_TYPE_STA && conf->type != NL80211_IFTYPE_STATION &&
conf->type != IEEE80211_IF_TYPE_WDS && conf->type != NL80211_IFTYPE_WDS &&
conf->type != IEEE80211_IF_TYPE_IBSS) conf->type != NL80211_IFTYPE_ADHOC)
return -EOPNOTSUPP; return -EOPNOTSUPP;
mutex_lock(&wl->mutex); mutex_lock(&wl->mutex);
+2 -2
View File
@@ -103,7 +103,7 @@ void b43legacy_phy_lock(struct b43legacy_wldev *dev)
if (dev->dev->id.revision < 3) { if (dev->dev->id.revision < 3) {
b43legacy_mac_suspend(dev); b43legacy_mac_suspend(dev);
} else { } else {
if (!b43legacy_is_mode(dev->wl, IEEE80211_IF_TYPE_AP)) if (!b43legacy_is_mode(dev->wl, NL80211_IFTYPE_AP))
b43legacy_power_saving_ctl_bits(dev, -1, 1); b43legacy_power_saving_ctl_bits(dev, -1, 1);
} }
} }
@@ -118,7 +118,7 @@ void b43legacy_phy_unlock(struct b43legacy_wldev *dev)
if (dev->dev->id.revision < 3) { if (dev->dev->id.revision < 3) {
b43legacy_mac_enable(dev); b43legacy_mac_enable(dev);
} else { } else {
if (!b43legacy_is_mode(dev->wl, IEEE80211_IF_TYPE_AP)) if (!b43legacy_is_mode(dev->wl, NL80211_IFTYPE_AP))
b43legacy_power_saving_ctl_bits(dev, -1, -1); b43legacy_power_saving_ctl_bits(dev, -1, -1);
} }
} }
+1 -1
View File
@@ -682,7 +682,7 @@ static void rs_get_rate(void *priv_rate, struct net_device *dev,
rs_sta = (void *)sta->rate_ctrl_priv; rs_sta = (void *)sta->rate_ctrl_priv;
if ((priv->iw_mode == IEEE80211_IF_TYPE_IBSS) && if ((priv->iw_mode == NL80211_IFTYPE_ADHOC) &&
!rs_sta->ibss_sta_added) { !rs_sta->ibss_sta_added) {
u8 sta_id = iwl3945_hw_find_station(priv, hdr->addr1); u8 sta_id = iwl3945_hw_find_station(priv, hdr->addr1);
+3 -3
View File
@@ -520,10 +520,10 @@ static int iwl3945_is_network_packet(struct iwl3945_priv *priv,
/* Filter incoming packets to determine if they are targeted toward /* Filter incoming packets to determine if they are targeted toward
* this network, discarding packets coming from ourselves */ * this network, discarding packets coming from ourselves */
switch (priv->iw_mode) { switch (priv->iw_mode) {
case IEEE80211_IF_TYPE_IBSS: /* Header: Dest. | Source | BSSID */ case NL80211_IFTYPE_ADHOC: /* Header: Dest. | Source | BSSID */
/* packets to our IBSS update information */ /* packets to our IBSS update information */
return !compare_ether_addr(header->addr3, priv->bssid); return !compare_ether_addr(header->addr3, priv->bssid);
case IEEE80211_IF_TYPE_STA: /* Header: Dest. | AP{BSSID} | Source */ case NL80211_IFTYPE_STATION: /* Header: Dest. | AP{BSSID} | Source */
/* packets to our IBSS update information */ /* packets to our IBSS update information */
return !compare_ether_addr(header->addr2, priv->bssid); return !compare_ether_addr(header->addr2, priv->bssid);
default: default:
@@ -807,7 +807,7 @@ void iwl3945_hw_build_tx_cmd_rate(struct iwl3945_priv *priv,
priv->stations[sta_id].current_rate.rate_n_flags = rate; priv->stations[sta_id].current_rate.rate_n_flags = rate;
if ((priv->iw_mode == IEEE80211_IF_TYPE_IBSS) && if ((priv->iw_mode == NL80211_IFTYPE_ADHOC) &&
(sta_id != priv->hw_setting.bcast_sta_id) && (sta_id != priv->hw_setting.bcast_sta_id) &&
(sta_id != IWL_MULTICAST_ID)) (sta_id != IWL_MULTICAST_ID))
priv->stations[IWL_STA_ID].current_rate.rate_n_flags = rate; priv->stations[IWL_STA_ID].current_rate.rate_n_flags = rate;
+1 -1
View File
@@ -851,7 +851,7 @@ struct iwl3945_priv {
/* eeprom */ /* eeprom */
struct iwl3945_eeprom eeprom; struct iwl3945_eeprom eeprom;
enum ieee80211_if_types iw_mode; enum nl80211_iftype iw_mode;
struct sk_buff *ibss_beacon; struct sk_buff *ibss_beacon;
+4 -4
View File
@@ -821,7 +821,7 @@ static void rs_tx_status(void *priv_rate, struct net_device *dev,
lq_sta = (struct iwl_lq_sta *)sta->rate_ctrl_priv; lq_sta = (struct iwl_lq_sta *)sta->rate_ctrl_priv;
if ((priv->iw_mode == IEEE80211_IF_TYPE_IBSS) && if ((priv->iw_mode == NL80211_IFTYPE_ADHOC) &&
!lq_sta->ibss_sta_added) !lq_sta->ibss_sta_added)
goto out; goto out;
@@ -2093,7 +2093,7 @@ static void rs_initialize_lq(struct iwl_priv *priv,
i = sta->last_txrate_idx; i = sta->last_txrate_idx;
if ((lq_sta->lq.sta_id == 0xff) && if ((lq_sta->lq.sta_id == 0xff) &&
(priv->iw_mode == IEEE80211_IF_TYPE_IBSS)) (priv->iw_mode == NL80211_IFTYPE_ADHOC))
goto out; goto out;
valid_tx_ant = priv->hw_params.valid_tx_ant; valid_tx_ant = priv->hw_params.valid_tx_ant;
@@ -2163,7 +2163,7 @@ static void rs_get_rate(void *priv_rate, struct net_device *dev,
lq_sta = (struct iwl_lq_sta *)sta->rate_ctrl_priv; lq_sta = (struct iwl_lq_sta *)sta->rate_ctrl_priv;
i = sta->last_txrate_idx; i = sta->last_txrate_idx;
if ((priv->iw_mode == IEEE80211_IF_TYPE_IBSS) && if ((priv->iw_mode == NL80211_IFTYPE_ADHOC) &&
!lq_sta->ibss_sta_added) { !lq_sta->ibss_sta_added) {
u8 sta_id = iwl_find_station(priv, hdr->addr1); u8 sta_id = iwl_find_station(priv, hdr->addr1);
DECLARE_MAC_BUF(mac); DECLARE_MAC_BUF(mac);
@@ -2243,7 +2243,7 @@ static void rs_rate_init(void *priv_rate, void *priv_sta,
* after assoc.. */ * after assoc.. */
lq_sta->ibss_sta_added = 0; lq_sta->ibss_sta_added = 0;
if (priv->iw_mode == IEEE80211_IF_TYPE_AP) { if (priv->iw_mode == NL80211_IFTYPE_AP) {
u8 sta_id = iwl_find_station(priv, sta->addr); u8 sta_id = iwl_find_station(priv, sta->addr);
DECLARE_MAC_BUF(mac); DECLARE_MAC_BUF(mac);
+32 -32
View File
@@ -337,7 +337,7 @@ static int iwl4965_commit_rxon(struct iwl_priv *priv)
/* If we have set the ASSOC_MSK and we are in BSS mode then /* If we have set the ASSOC_MSK and we are in BSS mode then
* add the IWL_AP_ID to the station rate table */ * add the IWL_AP_ID to the station rate table */
if (new_assoc) { if (new_assoc) {
if (priv->iw_mode == IEEE80211_IF_TYPE_STA) { if (priv->iw_mode == NL80211_IFTYPE_STATION) {
ret = iwl_rxon_add_station(priv, ret = iwl_rxon_add_station(priv,
priv->active_rxon.bssid_addr, 1); priv->active_rxon.bssid_addr, 1);
if (ret == IWL_INVALID_STATION) { if (ret == IWL_INVALID_STATION) {
@@ -448,8 +448,8 @@ static unsigned int iwl_fill_beacon_frame(struct iwl_priv *priv,
const u8 *dest, int left) const u8 *dest, int left)
{ {
if (!iwl_is_associated(priv) || !priv->ibss_beacon || if (!iwl_is_associated(priv) || !priv->ibss_beacon ||
((priv->iw_mode != IEEE80211_IF_TYPE_IBSS) && ((priv->iw_mode != NL80211_IFTYPE_ADHOC) &&
(priv->iw_mode != IEEE80211_IF_TYPE_AP))) (priv->iw_mode != NL80211_IFTYPE_AP)))
return 0; return 0;
if (priv->ibss_beacon->len > left) if (priv->ibss_beacon->len > left)
@@ -672,7 +672,7 @@ static void iwl4965_setup_rxon_timing(struct iwl_priv *priv)
beacon_int = priv->beacon_int; beacon_int = priv->beacon_int;
spin_unlock_irqrestore(&priv->lock, flags); spin_unlock_irqrestore(&priv->lock, flags);
if (priv->iw_mode == IEEE80211_IF_TYPE_STA) { if (priv->iw_mode == NL80211_IFTYPE_STATION) {
if (beacon_int == 0) { if (beacon_int == 0) {
priv->rxon_timing.beacon_interval = cpu_to_le16(100); priv->rxon_timing.beacon_interval = cpu_to_le16(100);
priv->rxon_timing.beacon_init_val = cpu_to_le32(102400); priv->rxon_timing.beacon_init_val = cpu_to_le32(102400);
@@ -721,7 +721,7 @@ static void iwl_set_flags_for_band(struct iwl_priv *priv,
else else
priv->staging_rxon.flags &= ~RXON_FLG_SHORT_SLOT_MSK; priv->staging_rxon.flags &= ~RXON_FLG_SHORT_SLOT_MSK;
if (priv->iw_mode == IEEE80211_IF_TYPE_IBSS) if (priv->iw_mode == NL80211_IFTYPE_ADHOC)
priv->staging_rxon.flags &= ~RXON_FLG_SHORT_SLOT_MSK; priv->staging_rxon.flags &= ~RXON_FLG_SHORT_SLOT_MSK;
priv->staging_rxon.flags |= RXON_FLG_BAND_24G_MSK; priv->staging_rxon.flags |= RXON_FLG_BAND_24G_MSK;
@@ -740,23 +740,23 @@ static void iwl4965_connection_init_rx_config(struct iwl_priv *priv)
memset(&priv->staging_rxon, 0, sizeof(priv->staging_rxon)); memset(&priv->staging_rxon, 0, sizeof(priv->staging_rxon));
switch (priv->iw_mode) { switch (priv->iw_mode) {
case IEEE80211_IF_TYPE_AP: case NL80211_IFTYPE_AP:
priv->staging_rxon.dev_type = RXON_DEV_TYPE_AP; priv->staging_rxon.dev_type = RXON_DEV_TYPE_AP;
break; break;
case IEEE80211_IF_TYPE_STA: case NL80211_IFTYPE_STATION:
priv->staging_rxon.dev_type = RXON_DEV_TYPE_ESS; priv->staging_rxon.dev_type = RXON_DEV_TYPE_ESS;
priv->staging_rxon.filter_flags = RXON_FILTER_ACCEPT_GRP_MSK; priv->staging_rxon.filter_flags = RXON_FILTER_ACCEPT_GRP_MSK;
break; break;
case IEEE80211_IF_TYPE_IBSS: case NL80211_IFTYPE_ADHOC:
priv->staging_rxon.dev_type = RXON_DEV_TYPE_IBSS; priv->staging_rxon.dev_type = RXON_DEV_TYPE_IBSS;
priv->staging_rxon.flags = RXON_FLG_SHORT_PREAMBLE_MSK; priv->staging_rxon.flags = RXON_FLG_SHORT_PREAMBLE_MSK;
priv->staging_rxon.filter_flags = RXON_FILTER_BCON_AWARE_MSK | priv->staging_rxon.filter_flags = RXON_FILTER_BCON_AWARE_MSK |
RXON_FILTER_ACCEPT_GRP_MSK; RXON_FILTER_ACCEPT_GRP_MSK;
break; break;
case IEEE80211_IF_TYPE_MNTR: case NL80211_IFTYPE_MONITOR:
priv->staging_rxon.dev_type = RXON_DEV_TYPE_SNIFFER; priv->staging_rxon.dev_type = RXON_DEV_TYPE_SNIFFER;
priv->staging_rxon.filter_flags = RXON_FILTER_PROMISC_MSK | priv->staging_rxon.filter_flags = RXON_FILTER_PROMISC_MSK |
RXON_FILTER_CTL2HOST_MSK | RXON_FILTER_ACCEPT_GRP_MSK; RXON_FILTER_CTL2HOST_MSK | RXON_FILTER_ACCEPT_GRP_MSK;
@@ -785,7 +785,7 @@ static void iwl4965_connection_init_rx_config(struct iwl_priv *priv)
* in some case A channels are all non IBSS * in some case A channels are all non IBSS
* in this case force B/G channel * in this case force B/G channel
*/ */
if ((priv->iw_mode == IEEE80211_IF_TYPE_IBSS) && if ((priv->iw_mode == NL80211_IFTYPE_ADHOC) &&
!(is_channel_ibss(ch_info))) !(is_channel_ibss(ch_info)))
ch_info = &priv->channel_info[0]; ch_info = &priv->channel_info[0];
@@ -1182,7 +1182,7 @@ static void iwl4965_rx_beacon_notif(struct iwl_priv *priv,
le32_to_cpu(beacon->low_tsf), rate); le32_to_cpu(beacon->low_tsf), rate);
#endif #endif
if ((priv->iw_mode == IEEE80211_IF_TYPE_AP) && if ((priv->iw_mode == NL80211_IFTYPE_AP) &&
(!test_bit(STATUS_EXIT_PENDING, &priv->status))) (!test_bit(STATUS_EXIT_PENDING, &priv->status)))
queue_work(priv->workqueue, &priv->beacon_update); queue_work(priv->workqueue, &priv->beacon_update);
} }
@@ -2388,7 +2388,7 @@ static void iwl4965_bg_set_monitor(struct work_struct *work)
mutex_lock(&priv->mutex); mutex_lock(&priv->mutex);
ret = iwl4965_set_mode(priv, IEEE80211_IF_TYPE_MNTR); ret = iwl4965_set_mode(priv, NL80211_IFTYPE_MONITOR);
if (ret) { if (ret) {
if (ret == -EAGAIN) if (ret == -EAGAIN)
@@ -2469,7 +2469,7 @@ static void iwl4965_post_associate(struct iwl_priv *priv)
DECLARE_MAC_BUF(mac); DECLARE_MAC_BUF(mac);
unsigned long flags; unsigned long flags;
if (priv->iw_mode == IEEE80211_IF_TYPE_AP) { if (priv->iw_mode == NL80211_IFTYPE_AP) {
IWL_ERROR("%s Should not be called in AP mode\n", __func__); IWL_ERROR("%s Should not be called in AP mode\n", __func__);
return; return;
} }
@@ -2524,7 +2524,7 @@ static void iwl4965_post_associate(struct iwl_priv *priv)
else else
priv->staging_rxon.flags &= ~RXON_FLG_SHORT_SLOT_MSK; priv->staging_rxon.flags &= ~RXON_FLG_SHORT_SLOT_MSK;
if (priv->iw_mode == IEEE80211_IF_TYPE_IBSS) if (priv->iw_mode == NL80211_IFTYPE_ADHOC)
priv->staging_rxon.flags &= ~RXON_FLG_SHORT_SLOT_MSK; priv->staging_rxon.flags &= ~RXON_FLG_SHORT_SLOT_MSK;
} }
@@ -2532,10 +2532,10 @@ static void iwl4965_post_associate(struct iwl_priv *priv)
iwl4965_commit_rxon(priv); iwl4965_commit_rxon(priv);
switch (priv->iw_mode) { switch (priv->iw_mode) {
case IEEE80211_IF_TYPE_STA: case NL80211_IFTYPE_STATION:
break; break;
case IEEE80211_IF_TYPE_IBSS: case NL80211_IFTYPE_ADHOC:
/* assume default assoc id */ /* assume default assoc id */
priv->assoc_id = 1; priv->assoc_id = 1;
@@ -2551,7 +2551,7 @@ static void iwl4965_post_associate(struct iwl_priv *priv)
break; break;
} }
if (priv->iw_mode == IEEE80211_IF_TYPE_IBSS) if (priv->iw_mode == NL80211_IFTYPE_ADHOC)
priv->assoc_station_added = 1; priv->assoc_station_added = 1;
spin_lock_irqsave(&priv->lock, flags); spin_lock_irqsave(&priv->lock, flags);
@@ -2828,7 +2828,7 @@ static int iwl4965_mac_config(struct ieee80211_hw *hw, struct ieee80211_conf *co
goto out; goto out;
} }
if (priv->iw_mode == IEEE80211_IF_TYPE_IBSS && if (priv->iw_mode == NL80211_IFTYPE_ADHOC &&
!is_channel_ibss(ch_info)) { !is_channel_ibss(ch_info)) {
IWL_ERROR("channel %d in band %d not IBSS channel\n", IWL_ERROR("channel %d in band %d not IBSS channel\n",
conf->channel->hw_value, conf->channel->band); conf->channel->hw_value, conf->channel->band);
@@ -2943,7 +2943,7 @@ static void iwl4965_config_ap(struct iwl_priv *priv)
priv->staging_rxon.flags &= priv->staging_rxon.flags &=
~RXON_FLG_SHORT_SLOT_MSK; ~RXON_FLG_SHORT_SLOT_MSK;
if (priv->iw_mode == IEEE80211_IF_TYPE_IBSS) if (priv->iw_mode == NL80211_IFTYPE_ADHOC)
priv->staging_rxon.flags &= priv->staging_rxon.flags &=
~RXON_FLG_SHORT_SLOT_MSK; ~RXON_FLG_SHORT_SLOT_MSK;
} }
@@ -2982,7 +2982,7 @@ static int iwl4965_mac_config_interface(struct ieee80211_hw *hw,
return 0; return 0;
} }
if (priv->iw_mode == IEEE80211_IF_TYPE_IBSS && if (priv->iw_mode == NL80211_IFTYPE_ADHOC &&
conf->changed & IEEE80211_IFCC_BEACON) { conf->changed & IEEE80211_IFCC_BEACON) {
struct sk_buff *beacon = ieee80211_beacon_get(hw, vif); struct sk_buff *beacon = ieee80211_beacon_get(hw, vif);
if (!beacon) if (!beacon)
@@ -2992,7 +2992,7 @@ static int iwl4965_mac_config_interface(struct ieee80211_hw *hw,
return rc; return rc;
} }
if ((priv->iw_mode == IEEE80211_IF_TYPE_AP) && if ((priv->iw_mode == NL80211_IFTYPE_AP) &&
(!conf->ssid_len)) { (!conf->ssid_len)) {
IWL_DEBUG_MAC80211 IWL_DEBUG_MAC80211
("Leaving in AP mode because HostAPD is not ready.\n"); ("Leaving in AP mode because HostAPD is not ready.\n");
@@ -3015,7 +3015,7 @@ static int iwl4965_mac_config_interface(struct ieee80211_hw *hw,
!(priv->hw->flags & IEEE80211_HW_NO_PROBE_FILTERING)) { !(priv->hw->flags & IEEE80211_HW_NO_PROBE_FILTERING)) {
*/ */
if (priv->iw_mode == IEEE80211_IF_TYPE_AP) { if (priv->iw_mode == NL80211_IFTYPE_AP) {
if (!conf->bssid) { if (!conf->bssid) {
conf->bssid = priv->mac_addr; conf->bssid = priv->mac_addr;
memcpy(priv->bssid, priv->mac_addr, ETH_ALEN); memcpy(priv->bssid, priv->mac_addr, ETH_ALEN);
@@ -3050,11 +3050,11 @@ static int iwl4965_mac_config_interface(struct ieee80211_hw *hw,
* to verify) - jpk */ * to verify) - jpk */
memcpy(priv->bssid, conf->bssid, ETH_ALEN); memcpy(priv->bssid, conf->bssid, ETH_ALEN);
if (priv->iw_mode == IEEE80211_IF_TYPE_AP) if (priv->iw_mode == NL80211_IFTYPE_AP)
iwl4965_config_ap(priv); iwl4965_config_ap(priv);
else { else {
rc = iwl4965_commit_rxon(priv); rc = iwl4965_commit_rxon(priv);
if ((priv->iw_mode == IEEE80211_IF_TYPE_STA) && rc) if ((priv->iw_mode == NL80211_IFTYPE_STATION) && rc)
iwl_rxon_add_station( iwl_rxon_add_station(
priv, priv->active_rxon.bssid_addr, 1); priv, priv->active_rxon.bssid_addr, 1);
} }
@@ -3090,7 +3090,7 @@ static void iwl4965_configure_filter(struct ieee80211_hw *hw,
if (changed_flags & (*total_flags) & FIF_OTHER_BSS) { if (changed_flags & (*total_flags) & FIF_OTHER_BSS) {
IWL_DEBUG_MAC80211("Enter: type %d (0x%x, 0x%x)\n", IWL_DEBUG_MAC80211("Enter: type %d (0x%x, 0x%x)\n",
IEEE80211_IF_TYPE_MNTR, NL80211_IFTYPE_MONITOR,
changed_flags, *total_flags); changed_flags, *total_flags);
/* queue work 'cuz mac80211 is holding a lock which /* queue work 'cuz mac80211 is holding a lock which
* prevents us from issuing (synchronous) f/w cmds */ * prevents us from issuing (synchronous) f/w cmds */
@@ -3204,7 +3204,7 @@ static int iwl_mac_hw_scan(struct ieee80211_hw *hw, u8 *ssid, size_t ssid_len)
goto out_unlock; goto out_unlock;
} }
if (priv->iw_mode == IEEE80211_IF_TYPE_AP) { /* APs don't scan */ if (priv->iw_mode == NL80211_IFTYPE_AP) { /* APs don't scan */
ret = -EIO; ret = -EIO;
IWL_ERROR("ERROR: APs don't scan\n"); IWL_ERROR("ERROR: APs don't scan\n");
goto out_unlock; goto out_unlock;
@@ -3329,7 +3329,7 @@ static int iwl4965_mac_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
* in 1X mode. * in 1X mode.
* In legacy wep mode, we use another host command to the uCode */ * In legacy wep mode, we use another host command to the uCode */
if (key->alg == ALG_WEP && sta_id == priv->hw_params.bcast_sta_id && if (key->alg == ALG_WEP && sta_id == priv->hw_params.bcast_sta_id &&
priv->iw_mode != IEEE80211_IF_TYPE_AP) { priv->iw_mode != NL80211_IFTYPE_AP) {
if (cmd == SET_KEY) if (cmd == SET_KEY)
is_default_wep_key = !priv->key_mapping_key; is_default_wep_key = !priv->key_mapping_key;
else else
@@ -3400,7 +3400,7 @@ static int iwl4965_mac_conf_tx(struct ieee80211_hw *hw, u16 queue,
priv->qos_data.def_qos_parm.ac[q].reserved1 = 0; priv->qos_data.def_qos_parm.ac[q].reserved1 = 0;
priv->qos_data.qos_active = 1; priv->qos_data.qos_active = 1;
if (priv->iw_mode == IEEE80211_IF_TYPE_AP) if (priv->iw_mode == NL80211_IFTYPE_AP)
iwl_activate_qos(priv, 1); iwl_activate_qos(priv, 1);
else if (priv->assoc_id && iwl_is_associated(priv)) else if (priv->assoc_id && iwl_is_associated(priv))
iwl_activate_qos(priv, 0); iwl_activate_qos(priv, 0);
@@ -3518,7 +3518,7 @@ static void iwl4965_mac_reset_tsf(struct ieee80211_hw *hw)
priv->beacon_int = priv->hw->conf.beacon_int; priv->beacon_int = priv->hw->conf.beacon_int;
priv->timestamp = 0; priv->timestamp = 0;
if ((priv->iw_mode == IEEE80211_IF_TYPE_STA)) if ((priv->iw_mode == NL80211_IFTYPE_STATION))
priv->beacon_int = 0; priv->beacon_int = 0;
spin_unlock_irqrestore(&priv->lock, flags); spin_unlock_irqrestore(&priv->lock, flags);
@@ -3532,7 +3532,7 @@ static void iwl4965_mac_reset_tsf(struct ieee80211_hw *hw)
/* we are restarting association process /* we are restarting association process
* clear RXON_FILTER_ASSOC_MSK bit * clear RXON_FILTER_ASSOC_MSK bit
*/ */
if (priv->iw_mode != IEEE80211_IF_TYPE_AP) { if (priv->iw_mode != NL80211_IFTYPE_AP) {
iwl_scan_cancel_timeout(priv, 100); iwl_scan_cancel_timeout(priv, 100);
priv->staging_rxon.filter_flags &= ~RXON_FILTER_ASSOC_MSK; priv->staging_rxon.filter_flags &= ~RXON_FILTER_ASSOC_MSK;
iwl4965_commit_rxon(priv); iwl4965_commit_rxon(priv);
@@ -3541,7 +3541,7 @@ static void iwl4965_mac_reset_tsf(struct ieee80211_hw *hw)
iwl_power_update_mode(priv, 0); iwl_power_update_mode(priv, 0);
/* Per mac80211.h: This is only used in IBSS mode... */ /* Per mac80211.h: This is only used in IBSS mode... */
if (priv->iw_mode != IEEE80211_IF_TYPE_IBSS) { if (priv->iw_mode != NL80211_IFTYPE_ADHOC) {
/* switch to CAM during association period. /* switch to CAM during association period.
* the ucode will block any association/authentication * the ucode will block any association/authentication
@@ -3580,7 +3580,7 @@ static int iwl4965_mac_beacon_update(struct ieee80211_hw *hw, struct sk_buff *sk
return -EIO; return -EIO;
} }
if (priv->iw_mode != IEEE80211_IF_TYPE_IBSS) { if (priv->iw_mode != NL80211_IFTYPE_ADHOC) {
IWL_DEBUG_MAC80211("leave - not IBSS\n"); IWL_DEBUG_MAC80211("leave - not IBSS\n");
mutex_unlock(&priv->mutex); mutex_unlock(&priv->mutex);
return -EIO; return -EIO;
+4 -4
View File
@@ -306,14 +306,14 @@ void iwl_reset_qos(struct iwl_priv *priv)
spin_lock_irqsave(&priv->lock, flags); spin_lock_irqsave(&priv->lock, flags);
priv->qos_data.qos_active = 0; priv->qos_data.qos_active = 0;
if (priv->iw_mode == IEEE80211_IF_TYPE_IBSS) { if (priv->iw_mode == NL80211_IFTYPE_ADHOC) {
if (priv->qos_data.qos_enable) if (priv->qos_data.qos_enable)
priv->qos_data.qos_active = 1; priv->qos_data.qos_active = 1;
if (!(priv->active_rate & 0xfff0)) { if (!(priv->active_rate & 0xfff0)) {
cw_min = 31; cw_min = 31;
is_legacy = 1; is_legacy = 1;
} }
} else if (priv->iw_mode == IEEE80211_IF_TYPE_AP) { } else if (priv->iw_mode == NL80211_IFTYPE_AP) {
if (priv->qos_data.qos_enable) if (priv->qos_data.qos_enable)
priv->qos_data.qos_active = 1; priv->qos_data.qos_active = 1;
} else if (!(priv->staging_rxon.flags & RXON_FLG_SHORT_SLOT_MSK)) { } else if (!(priv->staging_rxon.flags & RXON_FLG_SHORT_SLOT_MSK)) {
@@ -932,7 +932,7 @@ int iwl_init_drv(struct iwl_priv *priv)
priv->ieee_rates = NULL; priv->ieee_rates = NULL;
priv->band = IEEE80211_BAND_2GHZ; priv->band = IEEE80211_BAND_2GHZ;
priv->iw_mode = IEEE80211_IF_TYPE_STA; priv->iw_mode = NL80211_IFTYPE_STATION;
priv->use_ant_b_for_management_frame = 1; /* start with ant B */ priv->use_ant_b_for_management_frame = 1; /* start with ant B */
priv->current_ht_config.sm_ps = WLAN_HT_CAP_SM_PS_DISABLED; priv->current_ht_config.sm_ps = WLAN_HT_CAP_SM_PS_DISABLED;
@@ -1396,7 +1396,7 @@ void iwl_radio_kill_sw_disable_radio(struct iwl_priv *priv)
iwl_scan_cancel(priv); iwl_scan_cancel(priv);
/* FIXME: This is a workaround for AP */ /* FIXME: This is a workaround for AP */
if (priv->iw_mode != IEEE80211_IF_TYPE_AP) { if (priv->iw_mode != NL80211_IFTYPE_AP) {
spin_lock_irqsave(&priv->lock, flags); spin_lock_irqsave(&priv->lock, flags);
iwl_write32(priv, CSR_UCODE_DRV_GP1_SET, iwl_write32(priv, CSR_UCODE_DRV_GP1_SET,
CSR_UCODE_SW_BIT_RFKILL); CSR_UCODE_SW_BIT_RFKILL);
+1 -1
View File
@@ -954,7 +954,7 @@ struct iwl_priv {
u8 *eeprom; u8 *eeprom;
struct iwl_eeprom_calib_info *calib_info; struct iwl_eeprom_calib_info *calib_info;
enum ieee80211_if_types iw_mode; enum nl80211_iftype iw_mode;
struct sk_buff *ibss_beacon; struct sk_buff *ibss_beacon;
+1 -1
View File
@@ -290,7 +290,7 @@ int iwl_power_update_mode(struct iwl_priv *priv, bool force)
final_mode = setting->critical_power_setting; final_mode = setting->critical_power_setting;
/* driver only support CAM for non STA network */ /* driver only support CAM for non STA network */
if (priv->iw_mode != IEEE80211_IF_TYPE_STA) if (priv->iw_mode != NL80211_IFTYPE_STATION)
final_mode = IWL_POWER_MODE_CAM; final_mode = IWL_POWER_MODE_CAM;
if (!iwl_is_rfkill(priv) && !setting->power_disabled && if (!iwl_is_rfkill(priv) && !setting->power_disabled &&

Some files were not shown because too many files have changed in this diff Show More