@@ -250,7 +250,7 @@ static int ath9k_htc_set_channel(struct ath9k_htc_priv *priv,
250250 u8 cmd_rsp ;
251251 int ret ;
252252
253- if (priv -> op_flags & OP_INVALID )
253+ if (test_bit ( OP_INVALID , & priv -> op_flags ) )
254254 return - EIO ;
255255
256256 fastcc = !!(hw -> conf .flags & IEEE80211_CONF_OFFCHANNEL );
@@ -304,7 +304,7 @@ static int ath9k_htc_set_channel(struct ath9k_htc_priv *priv,
304304
305305 htc_start (priv -> htc );
306306
307- if (!( priv -> op_flags & OP_SCANNING ) &&
307+ if (!test_bit ( OP_SCANNING , & priv -> op_flags ) &&
308308 !(hw -> conf .flags & IEEE80211_CONF_OFFCHANNEL ))
309309 ath9k_htc_vif_reconfig (priv );
310310
@@ -750,7 +750,7 @@ void ath9k_htc_start_ani(struct ath9k_htc_priv *priv)
750750 common -> ani .shortcal_timer = timestamp ;
751751 common -> ani .checkani_timer = timestamp ;
752752
753- priv -> op_flags |= OP_ANI_RUNNING ;
753+ set_bit ( OP_ANI_RUNNING , & priv -> op_flags ) ;
754754
755755 ieee80211_queue_delayed_work (common -> hw , & priv -> ani_work ,
756756 msecs_to_jiffies (ATH_ANI_POLLINTERVAL ));
@@ -759,7 +759,7 @@ void ath9k_htc_start_ani(struct ath9k_htc_priv *priv)
759759void ath9k_htc_stop_ani (struct ath9k_htc_priv * priv )
760760{
761761 cancel_delayed_work_sync (& priv -> ani_work );
762- priv -> op_flags &= ~ OP_ANI_RUNNING ;
762+ clear_bit ( OP_ANI_RUNNING , & priv -> op_flags ) ;
763763}
764764
765765void ath9k_htc_ani_work (struct work_struct * work )
@@ -944,7 +944,7 @@ static int ath9k_htc_start(struct ieee80211_hw *hw)
944944 ath_dbg (common , CONFIG ,
945945 "Failed to update capability in target\n" );
946946
947- priv -> op_flags &= ~ OP_INVALID ;
947+ clear_bit ( OP_INVALID , & priv -> op_flags ) ;
948948 htc_start (priv -> htc );
949949
950950 spin_lock_bh (& priv -> tx .tx_lock );
@@ -973,7 +973,7 @@ static void ath9k_htc_stop(struct ieee80211_hw *hw)
973973
974974 mutex_lock (& priv -> mutex );
975975
976- if (priv -> op_flags & OP_INVALID ) {
976+ if (test_bit ( OP_INVALID , & priv -> op_flags ) ) {
977977 ath_dbg (common , ANY , "Device not present\n" );
978978 mutex_unlock (& priv -> mutex );
979979 return ;
@@ -1015,7 +1015,7 @@ static void ath9k_htc_stop(struct ieee80211_hw *hw)
10151015 ath9k_htc_ps_restore (priv );
10161016 ath9k_htc_setpower (priv , ATH9K_PM_FULL_SLEEP );
10171017
1018- priv -> op_flags |= OP_INVALID ;
1018+ set_bit ( OP_INVALID , & priv -> op_flags ) ;
10191019
10201020 ath_dbg (common , CONFIG , "Driver halt\n" );
10211021 mutex_unlock (& priv -> mutex );
@@ -1105,7 +1105,7 @@ static int ath9k_htc_add_interface(struct ieee80211_hw *hw,
11051105 ath9k_htc_set_opmode (priv );
11061106
11071107 if ((priv -> ah -> opmode == NL80211_IFTYPE_AP ) &&
1108- !( priv -> op_flags & OP_ANI_RUNNING )) {
1108+ !test_bit ( OP_ANI_RUNNING , & priv -> op_flags )) {
11091109 ath9k_hw_set_tsfadjust (priv -> ah , 1 );
11101110 ath9k_htc_start_ani (priv );
11111111 }
@@ -1285,7 +1285,7 @@ static void ath9k_htc_configure_filter(struct ieee80211_hw *hw,
12851285 changed_flags &= SUPPORTED_FILTERS ;
12861286 * total_flags &= SUPPORTED_FILTERS ;
12871287
1288- if (priv -> op_flags & OP_INVALID ) {
1288+ if (test_bit ( OP_INVALID , & priv -> op_flags ) ) {
12891289 ath_dbg (ath9k_hw_common (priv -> ah ), ANY ,
12901290 "Unable to configure filter on invalid state\n" );
12911291 mutex_unlock (& priv -> mutex );
@@ -1517,7 +1517,7 @@ static void ath9k_htc_bss_info_changed(struct ieee80211_hw *hw,
15171517 ath_dbg (common , CONFIG , "Beacon enabled for BSS: %pM\n" ,
15181518 bss_conf -> bssid );
15191519 ath9k_htc_set_tsfadjust (priv , vif );
1520- priv -> op_flags |= OP_ENABLE_BEACON ;
1520+ set_bit ( OP_ENABLE_BEACON , & priv -> op_flags ) ;
15211521 ath9k_htc_beacon_config (priv , vif );
15221522 }
15231523
@@ -1530,7 +1530,7 @@ static void ath9k_htc_bss_info_changed(struct ieee80211_hw *hw,
15301530 ath_dbg (common , CONFIG ,
15311531 "Beacon disabled for BSS: %pM\n" ,
15321532 bss_conf -> bssid );
1533- priv -> op_flags &= ~ OP_ENABLE_BEACON ;
1533+ clear_bit ( OP_ENABLE_BEACON , & priv -> op_flags ) ;
15341534 ath9k_htc_beacon_config (priv , vif );
15351535 }
15361536 }
@@ -1543,7 +1543,7 @@ static void ath9k_htc_bss_info_changed(struct ieee80211_hw *hw,
15431543 (priv -> nvifs == 1 ) &&
15441544 (priv -> num_ap_vif == 1 ) &&
15451545 (vif -> type == NL80211_IFTYPE_AP )) {
1546- priv -> op_flags |= OP_TSF_RESET ;
1546+ set_bit ( OP_TSF_RESET , & priv -> op_flags ) ;
15471547 }
15481548 ath_dbg (common , CONFIG ,
15491549 "Beacon interval changed for BSS: %pM\n" ,
@@ -1655,7 +1655,7 @@ static void ath9k_htc_sw_scan_start(struct ieee80211_hw *hw)
16551655
16561656 mutex_lock (& priv -> mutex );
16571657 spin_lock_bh (& priv -> beacon_lock );
1658- priv -> op_flags |= OP_SCANNING ;
1658+ set_bit ( OP_SCANNING , & priv -> op_flags ) ;
16591659 spin_unlock_bh (& priv -> beacon_lock );
16601660 cancel_work_sync (& priv -> ps_work );
16611661 ath9k_htc_stop_ani (priv );
@@ -1668,7 +1668,7 @@ static void ath9k_htc_sw_scan_complete(struct ieee80211_hw *hw)
16681668
16691669 mutex_lock (& priv -> mutex );
16701670 spin_lock_bh (& priv -> beacon_lock );
1671- priv -> op_flags &= ~ OP_SCANNING ;
1671+ clear_bit ( OP_SCANNING , & priv -> op_flags ) ;
16721672 spin_unlock_bh (& priv -> beacon_lock );
16731673 ath9k_htc_ps_wakeup (priv );
16741674 ath9k_htc_vif_reconfig (priv );
0 commit comments