Loading drivers/net/wireless/ath/ath9k/ar9003_calib.c +2 −0 Original line number Diff line number Diff line Loading @@ -976,6 +976,8 @@ static bool ar9003_hw_init_cal(struct ath_hw *ah, AR_PHY_CL_TAB_1, AR_PHY_CL_TAB_2 }; ar9003_hw_set_chain_masks(ah, ah->caps.rx_chainmask, ah->caps.tx_chainmask); if (rtt) { if (!ar9003_hw_rtt_restore(ah, chan)) run_rtt_cal = true; Loading drivers/net/wireless/ath/ath9k/ar9003_phy.c +7 −20 Original line number Diff line number Diff line Loading @@ -586,32 +586,19 @@ static void ar9003_hw_init_bb(struct ath_hw *ah, ath9k_hw_synth_delay(ah, chan, synthDelay); } static void ar9003_hw_set_chain_masks(struct ath_hw *ah, u8 rx, u8 tx) void ar9003_hw_set_chain_masks(struct ath_hw *ah, u8 rx, u8 tx) { switch (rx) { case 0x5: if (ah->caps.tx_chainmask == 5 || ah->caps.rx_chainmask == 5) REG_SET_BIT(ah, AR_PHY_ANALOG_SWAP, AR_PHY_SWAP_ALT_CHAIN); case 0x3: case 0x1: case 0x2: case 0x7: REG_WRITE(ah, AR_PHY_RX_CHAINMASK, rx); REG_WRITE(ah, AR_PHY_CAL_CHAINMASK, rx); break; default: break; } if ((ah->caps.hw_caps & ATH9K_HW_CAP_APM) && (tx == 0x7)) REG_WRITE(ah, AR_SELFGEN_MASK, 0x3); else REG_WRITE(ah, AR_SELFGEN_MASK, tx); tx = 3; if (tx == 0x5) { REG_SET_BIT(ah, AR_PHY_ANALOG_SWAP, AR_PHY_SWAP_ALT_CHAIN); } REG_WRITE(ah, AR_SELFGEN_MASK, tx); } /* Loading drivers/net/wireless/ath/ath9k/hw.h +1 −0 Original line number Diff line number Diff line Loading @@ -1066,6 +1066,7 @@ void ar9003_paprd_setup_gain_table(struct ath_hw *ah, int chain); int ar9003_paprd_init_table(struct ath_hw *ah); bool ar9003_paprd_is_done(struct ath_hw *ah); bool ar9003_is_paprd_enabled(struct ath_hw *ah); void ar9003_hw_set_chain_masks(struct ath_hw *ah, u8 rx, u8 tx); /* Hardware family op attach helpers */ void ar5008_hw_attach_phy_ops(struct ath_hw *ah); Loading drivers/net/wireless/ath/ath9k/main.c +3 −0 Original line number Diff line number Diff line Loading @@ -1826,6 +1826,9 @@ static u32 fill_chainmask(u32 cap, u32 new) static bool validate_antenna_mask(struct ath_hw *ah, u32 val) { if (AR_SREV_9300_20_OR_LATER(ah)) return true; switch (val & 0x7) { case 0x1: case 0x3: Loading drivers/net/wireless/iwlegacy/common.c +14 −21 Original line number Diff line number Diff line Loading @@ -3958,17 +3958,21 @@ il_connection_init_rx_config(struct il_priv *il) memset(&il->staging, 0, sizeof(il->staging)); if (!il->vif) { switch (il->iw_mode) { case NL80211_IFTYPE_UNSPECIFIED: il->staging.dev_type = RXON_DEV_TYPE_ESS; } else if (il->vif->type == NL80211_IFTYPE_STATION) { break; case NL80211_IFTYPE_STATION: il->staging.dev_type = RXON_DEV_TYPE_ESS; il->staging.filter_flags = RXON_FILTER_ACCEPT_GRP_MSK; } else if (il->vif->type == NL80211_IFTYPE_ADHOC) { break; case NL80211_IFTYPE_ADHOC: il->staging.dev_type = RXON_DEV_TYPE_IBSS; il->staging.flags = RXON_FLG_SHORT_PREAMBLE_MSK; il->staging.filter_flags = RXON_FILTER_BCON_AWARE_MSK | RXON_FILTER_ACCEPT_GRP_MSK; } else { break; default: IL_ERR("Unsupported interface type %d\n", il->vif->type); return; } Loading Loading @@ -4550,8 +4554,7 @@ il_mac_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif) EXPORT_SYMBOL(il_mac_add_interface); static void il_teardown_interface(struct il_priv *il, struct ieee80211_vif *vif, bool mode_change) il_teardown_interface(struct il_priv *il, struct ieee80211_vif *vif) { lockdep_assert_held(&il->mutex); Loading @@ -4560,9 +4563,7 @@ il_teardown_interface(struct il_priv *il, struct ieee80211_vif *vif, il_force_scan_end(il); } if (!mode_change) il_set_mode(il); } void Loading @@ -4575,8 +4576,8 @@ il_mac_remove_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif) WARN_ON(il->vif != vif); il->vif = NULL; il_teardown_interface(il, vif, false); il->iw_mode = NL80211_IFTYPE_UNSPECIFIED; il_teardown_interface(il, vif); memset(il->bssid, 0, ETH_ALEN); D_MAC80211("leave\n"); Loading Loading @@ -4685,18 +4686,10 @@ il_mac_change_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif, } /* success */ il_teardown_interface(il, vif, true); vif->type = newtype; vif->p2p = false; err = il_set_mode(il); WARN_ON(err); /* * We've switched internally, but submitting to the * device may have failed for some reason. Mask this * error, because otherwise mac80211 will not switch * (and set the interface type back) and we'll be * out of sync with it. */ il->iw_mode = newtype; il_teardown_interface(il, vif); err = 0; out: Loading Loading
drivers/net/wireless/ath/ath9k/ar9003_calib.c +2 −0 Original line number Diff line number Diff line Loading @@ -976,6 +976,8 @@ static bool ar9003_hw_init_cal(struct ath_hw *ah, AR_PHY_CL_TAB_1, AR_PHY_CL_TAB_2 }; ar9003_hw_set_chain_masks(ah, ah->caps.rx_chainmask, ah->caps.tx_chainmask); if (rtt) { if (!ar9003_hw_rtt_restore(ah, chan)) run_rtt_cal = true; Loading
drivers/net/wireless/ath/ath9k/ar9003_phy.c +7 −20 Original line number Diff line number Diff line Loading @@ -586,32 +586,19 @@ static void ar9003_hw_init_bb(struct ath_hw *ah, ath9k_hw_synth_delay(ah, chan, synthDelay); } static void ar9003_hw_set_chain_masks(struct ath_hw *ah, u8 rx, u8 tx) void ar9003_hw_set_chain_masks(struct ath_hw *ah, u8 rx, u8 tx) { switch (rx) { case 0x5: if (ah->caps.tx_chainmask == 5 || ah->caps.rx_chainmask == 5) REG_SET_BIT(ah, AR_PHY_ANALOG_SWAP, AR_PHY_SWAP_ALT_CHAIN); case 0x3: case 0x1: case 0x2: case 0x7: REG_WRITE(ah, AR_PHY_RX_CHAINMASK, rx); REG_WRITE(ah, AR_PHY_CAL_CHAINMASK, rx); break; default: break; } if ((ah->caps.hw_caps & ATH9K_HW_CAP_APM) && (tx == 0x7)) REG_WRITE(ah, AR_SELFGEN_MASK, 0x3); else REG_WRITE(ah, AR_SELFGEN_MASK, tx); tx = 3; if (tx == 0x5) { REG_SET_BIT(ah, AR_PHY_ANALOG_SWAP, AR_PHY_SWAP_ALT_CHAIN); } REG_WRITE(ah, AR_SELFGEN_MASK, tx); } /* Loading
drivers/net/wireless/ath/ath9k/hw.h +1 −0 Original line number Diff line number Diff line Loading @@ -1066,6 +1066,7 @@ void ar9003_paprd_setup_gain_table(struct ath_hw *ah, int chain); int ar9003_paprd_init_table(struct ath_hw *ah); bool ar9003_paprd_is_done(struct ath_hw *ah); bool ar9003_is_paprd_enabled(struct ath_hw *ah); void ar9003_hw_set_chain_masks(struct ath_hw *ah, u8 rx, u8 tx); /* Hardware family op attach helpers */ void ar5008_hw_attach_phy_ops(struct ath_hw *ah); Loading
drivers/net/wireless/ath/ath9k/main.c +3 −0 Original line number Diff line number Diff line Loading @@ -1826,6 +1826,9 @@ static u32 fill_chainmask(u32 cap, u32 new) static bool validate_antenna_mask(struct ath_hw *ah, u32 val) { if (AR_SREV_9300_20_OR_LATER(ah)) return true; switch (val & 0x7) { case 0x1: case 0x3: Loading
drivers/net/wireless/iwlegacy/common.c +14 −21 Original line number Diff line number Diff line Loading @@ -3958,17 +3958,21 @@ il_connection_init_rx_config(struct il_priv *il) memset(&il->staging, 0, sizeof(il->staging)); if (!il->vif) { switch (il->iw_mode) { case NL80211_IFTYPE_UNSPECIFIED: il->staging.dev_type = RXON_DEV_TYPE_ESS; } else if (il->vif->type == NL80211_IFTYPE_STATION) { break; case NL80211_IFTYPE_STATION: il->staging.dev_type = RXON_DEV_TYPE_ESS; il->staging.filter_flags = RXON_FILTER_ACCEPT_GRP_MSK; } else if (il->vif->type == NL80211_IFTYPE_ADHOC) { break; case NL80211_IFTYPE_ADHOC: il->staging.dev_type = RXON_DEV_TYPE_IBSS; il->staging.flags = RXON_FLG_SHORT_PREAMBLE_MSK; il->staging.filter_flags = RXON_FILTER_BCON_AWARE_MSK | RXON_FILTER_ACCEPT_GRP_MSK; } else { break; default: IL_ERR("Unsupported interface type %d\n", il->vif->type); return; } Loading Loading @@ -4550,8 +4554,7 @@ il_mac_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif) EXPORT_SYMBOL(il_mac_add_interface); static void il_teardown_interface(struct il_priv *il, struct ieee80211_vif *vif, bool mode_change) il_teardown_interface(struct il_priv *il, struct ieee80211_vif *vif) { lockdep_assert_held(&il->mutex); Loading @@ -4560,9 +4563,7 @@ il_teardown_interface(struct il_priv *il, struct ieee80211_vif *vif, il_force_scan_end(il); } if (!mode_change) il_set_mode(il); } void Loading @@ -4575,8 +4576,8 @@ il_mac_remove_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif) WARN_ON(il->vif != vif); il->vif = NULL; il_teardown_interface(il, vif, false); il->iw_mode = NL80211_IFTYPE_UNSPECIFIED; il_teardown_interface(il, vif); memset(il->bssid, 0, ETH_ALEN); D_MAC80211("leave\n"); Loading Loading @@ -4685,18 +4686,10 @@ il_mac_change_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif, } /* success */ il_teardown_interface(il, vif, true); vif->type = newtype; vif->p2p = false; err = il_set_mode(il); WARN_ON(err); /* * We've switched internally, but submitting to the * device may have failed for some reason. Mask this * error, because otherwise mac80211 will not switch * (and set the interface type back) and we'll be * out of sync with it. */ il->iw_mode = newtype; il_teardown_interface(il, vif); err = 0; out: Loading