imamnurby/smpl_train_seed8 huggingface dataset:
--- initial
+++ final
@@ -1,11 +1,11 @@
 static void brcmf_convert_sta_flags(u32 fw_sta_flags, struct station_info *si) {
   struct nl80211_sta_flag_update *sfu;
   brcmf_dbg(TRACE, "flags %08x\n", fw_sta_flags);
-  si->filled |= BIT(NL80211_STA_INFO_STA_FLAGS);
+  si->filled |= BIT_ULL(NL80211_STA_INFO_STA_FLAGS);
   sfu = &si->sta_flags;
   sfu->mask = BIT(NL80211_STA_FLAG_WME) | BIT(NL80211_STA_FLAG_AUTHENTICATED) | BIT(NL80211_STA_FLAG_ASSOCIATED) | BIT(NL80211_STA_FLAG_AUTHORIZED);
   if (fw_sta_flags & BRCMF_STA_WME) sfu->set |= BIT(NL80211_STA_FLAG_WME);
   if (fw_sta_flags & BRCMF_STA_AUTHE) sfu->set |= BIT(NL80211_STA_FLAG_AUTHENTICATED);
   if (fw_sta_flags & BRCMF_STA_ASSOC) sfu->set |= BIT(NL80211_STA_FLAG_ASSOCIATED);
   if (fw_sta_flags & BRCMF_STA_AUTHO) sfu->set |= BIT(NL80211_STA_FLAG_AUTHORIZED);
 }<sep>@@ @@
-	BIT(NL80211_STA_INFO_STA_FLAGS)
+	BIT_ULL(NL80211_STA_INFO_STA_FLAGS)
--- initial
+++ final
@@ -1,25 +1,25 @@
 static void brcmf_fill_bss_param(struct brcmf_if *ifp, struct station_info *si) {
   struct {
     __le32 len;
     struct brcmf_bss_info_le bss_le;
   } * buf;
   u16 capability;
   int err;
   buf = kzalloc(WL_BSS_INFO_MAX, GFP_KERNEL);
   if (!buf) return;
   buf->len = cpu_to_le32(WL_BSS_INFO_MAX);
   err = brcmf_fil_cmd_data_get(ifp, BRCMF_C_GET_BSS_INFO, buf, WL_BSS_INFO_MAX);
   if (err) {
     brcmf_err("Failed to get bss info (%d)\n", err);
     goto out_kfree;
   }
-  si->filled |= BIT(NL80211_STA_INFO_BSS_PARAM);
+  si->filled |= BIT_ULL(NL80211_STA_INFO_BSS_PARAM);
   si->bss_param.beacon_interval = le16_to_cpu(buf->bss_le.beacon_period);
   si->bss_param.dtim_period = buf->bss_le.dtim_period;
   capability = le16_to_cpu(buf->bss_le.capability);
   if (capability & IEEE80211_HT_STBC_PARAM_DUAL_CTS_PROT) si->bss_param.flags |= BSS_PARAM_FLAGS_CTS_PROT;
   if (capability & WLAN_CAPABILITY_SHORT_PREAMBLE) si->bss_param.flags |= BSS_PARAM_FLAGS_SHORT_PREAMBLE;
   if (capability & WLAN_CAPABILITY_SHORT_SLOT_TIME) si->bss_param.flags |= BSS_PARAM_FLAGS_SHORT_SLOT_TIME;
 out_kfree:
   kfree(buf);
 }<sep>@@ @@
-	BIT(NL80211_STA_INFO_BSS_PARAM)
+	BIT_ULL(NL80211_STA_INFO_BSS_PARAM)
--- initial
+++ final
@@ -1,26 +1,26 @@
 static int lbs_cfg_get_station(struct wiphy *wiphy, struct net_device *dev, const u8 *mac, struct station_info *sinfo) {
   struct lbs_private *priv = wiphy_priv(wiphy);
   s8 signal, noise;
   int ret;
   size_t i;
-  sinfo->filled |= BIT(NL80211_STA_INFO_TX_BYTES) | BIT(NL80211_STA_INFO_TX_PACKETS) | BIT(NL80211_STA_INFO_RX_BYTES) | BIT(NL80211_STA_INFO_RX_PACKETS);
+  sinfo->filled |= BIT_ULL(NL80211_STA_INFO_TX_BYTES) | BIT_ULL(NL80211_STA_INFO_TX_PACKETS) | BIT_ULL(NL80211_STA_INFO_RX_BYTES) | BIT_ULL(NL80211_STA_INFO_RX_PACKETS);
   sinfo->tx_bytes = priv->dev->stats.tx_bytes;
   sinfo->tx_packets = priv->dev->stats.tx_packets;
   sinfo->rx_bytes = priv->dev->stats.rx_bytes;
   sinfo->rx_packets = priv->dev->stats.rx_packets;
   /* Get current RSSI */
   ret = lbs_get_rssi(priv, &signal, &noise);
   if (ret == 0) {
     sinfo->signal = signal;
-    sinfo->filled |= BIT(NL80211_STA_INFO_SIGNAL);
+    sinfo->filled |= BIT_ULL(NL80211_STA_INFO_SIGNAL);
   }
   /* Convert priv->cur_rate from hw_value to NL80211 value */
   for (i = 0; i < ARRAY_SIZE(lbs_rates); i++) {
     if (priv->cur_rate == lbs_rates[i].hw_value) {
       sinfo->txrate.legacy = lbs_rates[i].bitrate;
-      sinfo->filled |= BIT(NL80211_STA_INFO_TX_BITRATE);
+      sinfo->filled |= BIT_ULL(NL80211_STA_INFO_TX_BITRATE);
       break;
     }
   }
   return 0;
 }<sep>@@ @@
-	BIT(NL80211_STA_INFO_RX_BYTES)
+	BIT_ULL(NL80211_STA_INFO_RX_BYTES)

@@ @@
-	BIT(NL80211_STA_INFO_TX_BYTES)
+	BIT_ULL(NL80211_STA_INFO_TX_BYTES)

@@ @@
-	BIT(NL80211_STA_INFO_SIGNAL)
+	BIT_ULL(NL80211_STA_INFO_SIGNAL)

@@ @@
-	BIT(NL80211_STA_INFO_TX_BITRATE)
+	BIT_ULL(NL80211_STA_INFO_TX_BITRATE)

@@ @@
-	BIT(NL80211_STA_INFO_RX_PACKETS)
+	BIT_ULL(NL80211_STA_INFO_RX_PACKETS)

@@ @@
-	BIT(NL80211_STA_INFO_TX_PACKETS)
+	BIT_ULL(NL80211_STA_INFO_TX_PACKETS)
--- initial
+++ final
@@ -1,25 +1,25 @@
 static void iwl_mvm_mac_sta_statistics(struct ieee80211_hw *hw, struct ieee80211_vif *vif, struct ieee80211_sta *sta, struct station_info *sinfo) {
   struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw);
   struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
   struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta);
   if (mvmsta->avg_energy) {
     sinfo->signal_avg = mvmsta->avg_energy;
-    sinfo->filled |= BIT(NL80211_STA_INFO_SIGNAL_AVG);
+    sinfo->filled |= BIT_ULL(NL80211_STA_INFO_SIGNAL_AVG);
   }
   if (!fw_has_capa(&mvm->fw->ucode_capa, IWL_UCODE_TLV_CAPA_RADIO_BEACON_STATS)) return;
   /* if beacon filtering isn't on mac80211 does it anyway */
   if (!(vif->driver_flags & IEEE80211_VIF_BEACON_FILTER)) return;
   if (!vif->bss_conf.assoc) return;
   mutex_lock(&mvm->mutex);
   if (mvmvif->ap_sta_id != mvmsta->sta_id) goto unlock;
   if (iwl_mvm_request_statistics(mvm, false)) goto unlock;
   sinfo->rx_beacon = mvmvif->beacon_stats.num_beacons + mvmvif->beacon_stats.accu_num_beacons;
-  sinfo->filled |= BIT(NL80211_STA_INFO_BEACON_RX);
+  sinfo->filled |= BIT_ULL(NL80211_STA_INFO_BEACON_RX);
   if (mvmvif->beacon_stats.avg_signal) {
     /* firmware only reports a value after RXing a few beacons */
     sinfo->rx_beacon_signal_avg = mvmvif->beacon_stats.avg_signal;
-    sinfo->filled |= BIT(NL80211_STA_INFO_BEACON_SIGNAL_AVG);
+    sinfo->filled |= BIT_ULL(NL80211_STA_INFO_BEACON_SIGNAL_AVG);
   }
 unlock:
   mutex_unlock(&mvm->mutex);
 }<sep>@@ @@
-	BIT(NL80211_STA_INFO_SIGNAL_AVG)
+	BIT_ULL(NL80211_STA_INFO_SIGNAL_AVG)

@@ @@
-	BIT(NL80211_STA_INFO_BEACON_RX)
+	BIT_ULL(NL80211_STA_INFO_BEACON_RX)

@@ @@
-	BIT(NL80211_STA_INFO_BEACON_SIGNAL_AVG)
+	BIT_ULL(NL80211_STA_INFO_BEACON_SIGNAL_AVG)
--- initial
+++ final
@@ -1,17 +1,17 @@
 static void ath10k_sta_statistics(struct ieee80211_hw *hw, struct ieee80211_vif *vif, struct ieee80211_sta *sta, struct station_info *sinfo) {
   struct ath10k_sta *arsta = (struct ath10k_sta *)sta->drv_priv;
   struct ath10k *ar = arsta->arvif->ar;
   if (!ath10k_peer_stats_enabled(ar)) return;
   sinfo->rx_duration = arsta->rx_duration;
-  sinfo->filled |= 1ULL << NL80211_STA_INFO_RX_DURATION;
+  sinfo->filled |= BIT_ULL(NL80211_STA_INFO_RX_DURATION);
   if (!arsta->txrate.legacy && !arsta->txrate.nss) return;
   if (arsta->txrate.legacy) {
     sinfo->txrate.legacy = arsta->txrate.legacy;
   } else {
     sinfo->txrate.mcs = arsta->txrate.mcs;
     sinfo->txrate.nss = arsta->txrate.nss;
     sinfo->txrate.bw = arsta->txrate.bw;
   }
   sinfo->txrate.flags = arsta->txrate.flags;
-  sinfo->filled |= 1ULL << NL80211_STA_INFO_TX_BITRATE;
+  sinfo->filled |= BIT_ULL(NL80211_STA_INFO_TX_BITRATE);
 }<sep>@@
expression e;
@@

- (1ULL << e)
+ BIT_ULL(e)
--- initial
+++ final
@@ -1,23 +1,23 @@
 static void wlcore_op_sta_statistics(struct ieee80211_hw *hw, struct ieee80211_vif *vif, struct ieee80211_sta *sta, struct station_info *sinfo) {
   struct wl1271 *wl = hw->priv;
   struct wl12xx_vif *wlvif = wl12xx_vif_to_data(vif);
   s8 rssi_dbm;
   int ret;
   wl1271_debug(DEBUG_MAC80211, "mac80211 get_rssi");
   mutex_lock(&wl->mutex);
   if (unlikely(wl->state != WLCORE_STATE_ON)) goto out;
   ret = pm_runtime_get_sync(wl->dev);
   if (ret < 0) {
     pm_runtime_put_noidle(wl->dev);
     goto out_sleep;
   }
   ret = wlcore_acx_average_rssi(wl, wlvif, &rssi_dbm);
   if (ret < 0) goto out_sleep;
-  sinfo->filled |= BIT(NL80211_STA_INFO_SIGNAL);
+  sinfo->filled |= BIT_ULL(NL80211_STA_INFO_SIGNAL);
   sinfo->signal = rssi_dbm;
 out_sleep:
   pm_runtime_mark_last_busy(wl->dev);
   pm_runtime_put_autosuspend(wl->dev);
 out:
   mutex_unlock(&wl->mutex);
 }<sep>@@ @@
-	BIT(NL80211_STA_INFO_SIGNAL)
+	BIT_ULL(NL80211_STA_INFO_SIGNAL)
--- initial
+++ final
@@ -1,17 +1,17 @@
 static void rndis_fill_station_info(struct usbnet *usbdev, struct station_info *sinfo) {
   __le32 linkspeed, rssi;
   int ret, len;
   memset(sinfo, 0, sizeof(*sinfo));
   len = sizeof(linkspeed);
   ret = rndis_query_oid(usbdev, RNDIS_OID_GEN_LINK_SPEED, &linkspeed, &len);
   if (ret == 0) {
     sinfo->txrate.legacy = le32_to_cpu(linkspeed) / 1000;
-    sinfo->filled |= BIT(NL80211_STA_INFO_TX_BITRATE);
+    sinfo->filled |= BIT_ULL(NL80211_STA_INFO_TX_BITRATE);
   }
   len = sizeof(rssi);
   ret = rndis_query_oid(usbdev, RNDIS_OID_802_11_RSSI, &rssi, &len);
   if (ret == 0) {
     sinfo->signal = level_to_qual(le32_to_cpu(rssi));
-    sinfo->filled |= BIT(NL80211_STA_INFO_SIGNAL);
+    sinfo->filled |= BIT_ULL(NL80211_STA_INFO_SIGNAL);
   }
 }<sep>@@ @@
-	BIT(NL80211_STA_INFO_SIGNAL)
+	BIT_ULL(NL80211_STA_INFO_SIGNAL)

@@ @@
-	BIT(NL80211_STA_INFO_TX_BITRATE)
+	BIT_ULL(NL80211_STA_INFO_TX_BITRATE)
--- initial
+++ final
@@ -1,21 +1,21 @@
 static int prism2_get_station(struct wiphy *wiphy, struct net_device *dev, const u8 *mac, struct station_info *sinfo) {
   struct wlandevice *wlandev = dev->ml_priv;
   struct p80211msg_lnxreq_commsquality quality;
   int result;
   memset(sinfo, 0, sizeof(*sinfo));
   if (!wlandev || (wlandev->msdstate != WLAN_MSD_RUNNING)) return -EOPNOTSUPP;
   /* build request message */
   quality.msgcode = DIDmsg_lnxreq_commsquality;
   quality.dbm.data = P80211ENUM_truth_true;
   quality.dbm.status = P80211ENUM_msgitem_status_data_ok;
   /* send message to nsd */
   if (!wlandev->mlmerequest) return -EOPNOTSUPP;
   result = wlandev->mlmerequest(wlandev, (struct p80211msg *)&quality);
   if (result == 0) {
     sinfo->txrate.legacy = quality.txrate.data;
-    sinfo->filled |= BIT(NL80211_STA_INFO_TX_BITRATE);
+    sinfo->filled |= BIT_ULL(NL80211_STA_INFO_TX_BITRATE);
     sinfo->signal = quality.level.data;
-    sinfo->filled |= BIT(NL80211_STA_INFO_SIGNAL);
+    sinfo->filled |= BIT_ULL(NL80211_STA_INFO_SIGNAL);
   }
   return result;
 }<sep>@@ @@
-	BIT(NL80211_STA_INFO_SIGNAL)
+	BIT_ULL(NL80211_STA_INFO_SIGNAL)

@@ @@
-	BIT(NL80211_STA_INFO_TX_BITRATE)
+	BIT_ULL(NL80211_STA_INFO_TX_BITRATE)
--- initial
+++ final
@@ -1,20 +1,20 @@
 static int cfg80211_rtw_dump_station(struct wiphy *wiphy, struct net_device *ndev, int idx, u8 *mac, struct station_info *sinfo) {
   int ret = 0;
   struct adapter *padapter = (struct adapter *)rtw_netdev_priv(ndev);
   struct sta_info *psta = NULL;
   struct sta_priv *pstapriv = &padapter->stapriv;
   DBG_871X(FUNC_NDEV_FMT "\n", FUNC_NDEV_ARG(ndev));
   spin_lock_bh(&pstapriv->asoc_list_lock);
   psta = rtw_sta_info_get_by_idx(idx, pstapriv);
   spin_unlock_bh(&pstapriv->asoc_list_lock);
   if (NULL == psta) {
     DBG_871X("Station is not found\n");
     ret = -ENOENT;
     goto exit;
   }
   memcpy(mac, psta->hwaddr, ETH_ALEN);
-  sinfo->filled = BIT(NL80211_STA_INFO_SIGNAL);
+  sinfo->filled = BIT_ULL(NL80211_STA_INFO_SIGNAL);
   sinfo->signal = psta->rssi;
 exit:
   return ret;
 }<sep>@@ @@
-	BIT(NL80211_STA_INFO_SIGNAL)
+	BIT_ULL(NL80211_STA_INFO_SIGNAL)
--- initial
+++ final
@@ -1,43 +1,43 @@
 static int cfg80211_rtw_get_station(struct wiphy *wiphy, struct net_device *ndev, const u8 *mac, struct station_info *sinfo) {
   int ret = 0;
   struct adapter *padapter = (struct adapter *)rtw_netdev_priv(ndev);
   struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
   struct sta_info *psta = NULL;
   struct sta_priv *pstapriv = &padapter->stapriv;
   sinfo->filled = 0;
   if (!mac) {
     DBG_871X(FUNC_NDEV_FMT " mac ==%p\n", FUNC_NDEV_ARG(ndev), mac);
     ret = -ENOENT;
     goto exit;
   }
   psta = rtw_get_stainfo(pstapriv, (u8 *)mac);
   if (psta == NULL) {
     DBG_8192C("%s, sta_info is null\n", __func__);
     ret = -ENOENT;
     goto exit;
   }
 #ifdef DEBUG_CFG80211
   DBG_871X(FUNC_NDEV_FMT " mac =" MAC_FMT "\n", FUNC_NDEV_ARG(ndev), MAC_ARG(mac));
 #endif
   /* for infra./P2PClient mode */
   if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) && check_fwstate(pmlmepriv, _FW_LINKED)) {
     struct wlan_network *cur_network = &(pmlmepriv->cur_network);
     if (memcmp((u8 *)mac, cur_network->network.MacAddress, ETH_ALEN)) {
       DBG_871X("%s, mismatch bssid =" MAC_FMT "\n", __func__, MAC_ARG(cur_network->network.MacAddress));
       ret = -ENOENT;
       goto exit;
     }
-    sinfo->filled |= BIT(NL80211_STA_INFO_SIGNAL);
+    sinfo->filled |= BIT_ULL(NL80211_STA_INFO_SIGNAL);
     sinfo->signal = translate_percentage_to_dbm(padapter->recvpriv.signal_strength);
-    sinfo->filled |= BIT(NL80211_STA_INFO_TX_BITRATE);
+    sinfo->filled |= BIT_ULL(NL80211_STA_INFO_TX_BITRATE);
     sinfo->txrate.legacy = rtw_get_cur_max_rate(padapter);
-    sinfo->filled |= BIT(NL80211_STA_INFO_RX_PACKETS);
+    sinfo->filled |= BIT_ULL(NL80211_STA_INFO_RX_PACKETS);
     sinfo->rx_packets = sta_rx_data_pkts(psta);
-    sinfo->filled |= BIT(NL80211_STA_INFO_TX_PACKETS);
+    sinfo->filled |= BIT_ULL(NL80211_STA_INFO_TX_PACKETS);
     sinfo->tx_packets = psta->sta_stats.tx_pkts;
   }
   /* for Ad-Hoc/AP mode */
   if ((check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) || check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) || check_fwstate(pmlmepriv, WIFI_AP_STATE)) && check_fwstate(pmlmepriv, _FW_LINKED)) { /* TODO: should acquire station info... */ }
 exit:
   return ret;
 }<sep>@@ @@
-	BIT(NL80211_STA_INFO_SIGNAL)
+	BIT_ULL(NL80211_STA_INFO_SIGNAL)

@@ @@
-	BIT(NL80211_STA_INFO_TX_BITRATE)
+	BIT_ULL(NL80211_STA_INFO_TX_BITRATE)

@@ @@
-	BIT(NL80211_STA_INFO_RX_PACKETS)
+	BIT_ULL(NL80211_STA_INFO_RX_PACKETS)

@@ @@
-	BIT(NL80211_STA_INFO_TX_PACKETS)
+	BIT_ULL(NL80211_STA_INFO_TX_PACKETS)
--- initial
+++ final
@@ -1,11 +1,11 @@
 static int dump_station(struct wiphy *wiphy, struct net_device *dev, int idx, u8 *mac, struct station_info *sinfo) {
   struct wilc_priv *priv;
   struct wilc_vif *vif;
   if (idx != 0) return -ENOENT;
   priv = wiphy_priv(wiphy);
   vif = netdev_priv(priv->dev);
-  sinfo->filled |= BIT(NL80211_STA_INFO_SIGNAL);
+  sinfo->filled |= BIT_ULL(NL80211_STA_INFO_SIGNAL);
   wilc_get_rssi(vif, &sinfo->signal);
   memcpy(mac, priv->associated_bss, ETH_ALEN);
   return 0;
 }<sep>@@ @@
-	BIT(NL80211_STA_INFO_SIGNAL)
+	BIT_ULL(NL80211_STA_INFO_SIGNAL)
--- initial
+++ final
@@ -1,38 +1,38 @@
 static int get_station(struct wiphy *wiphy, struct net_device *dev, const u8 *mac, struct station_info *sinfo) {
   struct wilc_priv *priv;
   struct wilc_vif *vif;
   u32 i = 0;
   u32 associatedsta = ~0;
   u32 inactive_time = 0;
   priv = wiphy_priv(wiphy);
   vif = netdev_priv(dev);
   if (vif->iftype == AP_MODE || vif->iftype == GO_MODE) {
     for (i = 0; i < NUM_STA_ASSOCIATED; i++) {
       if (!(memcmp(mac, priv->assoc_stainfo.sta_associated_bss[i], ETH_ALEN))) {
         associatedsta = i;
         break;
       }
     }
     if (associatedsta == ~0) {
       netdev_err(dev, "sta required is not associated\n");
       return -ENOENT;
     }
-    sinfo->filled |= BIT(NL80211_STA_INFO_INACTIVE_TIME);
+    sinfo->filled |= BIT_ULL(NL80211_STA_INFO_INACTIVE_TIME);
     wilc_get_inactive_time(vif, mac, &inactive_time);
     sinfo->inactive_time = 1000 * inactive_time;
   } else if (vif->iftype == STATION_MODE) {
     struct rf_info stats;
     wilc_get_statistics(vif, &stats, true);
-    sinfo->filled |= BIT(NL80211_STA_INFO_SIGNAL) | BIT(NL80211_STA_INFO_RX_PACKETS) | BIT(NL80211_STA_INFO_TX_PACKETS) | BIT(NL80211_STA_INFO_TX_FAILED) | BIT(NL80211_STA_INFO_TX_BITRATE);
+    sinfo->filled |= BIT_ULL(NL80211_STA_INFO_SIGNAL) | BIT_ULL(NL80211_STA_INFO_RX_PACKETS) | BIT_ULL(NL80211_STA_INFO_TX_PACKETS) | BIT_ULL(NL80211_STA_INFO_TX_FAILED) | BIT_ULL(NL80211_STA_INFO_TX_BITRATE);
     sinfo->signal = stats.rssi;
     sinfo->rx_packets = stats.rx_cnt;
     sinfo->tx_packets = stats.tx_cnt + stats.tx_fail_cnt;
     sinfo->tx_failed = stats.tx_fail_cnt;
     sinfo->txrate.legacy = stats.link_speed * 10;
     if (stats.link_speed > TCP_ACK_FILTER_LINK_SPEED_THRESH && stats.link_speed != DEFAULT_LINK_SPEED)
       wilc_enable_tcp_ack_filter(true);
     else if (stats.link_speed != DEFAULT_LINK_SPEED)
       wilc_enable_tcp_ack_filter(false);
   }
   return 0;
 }<sep>@@ @@
-	BIT(NL80211_STA_INFO_INACTIVE_TIME)
+	BIT_ULL(NL80211_STA_INFO_INACTIVE_TIME)

@@ @@
-	BIT(NL80211_STA_INFO_SIGNAL)
+	BIT_ULL(NL80211_STA_INFO_SIGNAL)

@@ @@
-	BIT(NL80211_STA_INFO_TX_BITRATE)
+	BIT_ULL(NL80211_STA_INFO_TX_BITRATE)

@@ @@
-	BIT(NL80211_STA_INFO_RX_PACKETS)
+	BIT_ULL(NL80211_STA_INFO_RX_PACKETS)

@@ @@
-	BIT(NL80211_STA_INFO_TX_PACKETS)
+	BIT_ULL(NL80211_STA_INFO_TX_PACKETS)

@@ @@
-	BIT(NL80211_STA_INFO_TX_FAILED)
+	BIT_ULL(NL80211_STA_INFO_TX_FAILED)
--- initial
+++ final
@@ -1,17 +1,16 @@
 int __tcf_idr_release(struct tc_action *p, bool bind, bool strict) {
   int ret = 0;
   ASSERT_RTNL();
   if (p) {
     if (bind)
-      p->tcfa_bindcnt--;
-    else if (strict && p->tcfa_bindcnt > 0)
+      atomic_dec(&p->tcfa_bindcnt);
+    else if (strict && atomic_read(&p->tcfa_bindcnt) > 0)
       return -EPERM;
-    p->tcfa_refcnt--;
-    if (p->tcfa_bindcnt <= 0 && p->tcfa_refcnt <= 0) {
+    if (atomic_read(&p->tcfa_bindcnt) <= 0 && refcount_dec_and_test(&p->tcfa_refcnt)) {
       if (p->ops->cleanup) p->ops->cleanup(p);
       tcf_idr_remove(p->idrinfo, p);
       ret = ACT_P_DELETED;
     }
   }
   return ret;
 }<sep>@@
expression p;
@@

- p->tcfa_bindcnt--
+ atomic_dec(&p->tcfa_bindcnt)

@@
expression p;
@@

(
  &p->tcfa_bindcnt
|
- p->tcfa_bindcnt
+ atomic_read(&p->tcfa_bindcnt)
)




@@
expression p;
statement S1,S2;
@@

-               p->tcfa_refcnt--;
                ... when != p->tcfa_refcnt
                if (<+...
-                        p->tcfa_refcnt <= 0
+                        refcount_dec_and_test(&p->tcfa_refcnt)
                    ...+>) S1 else S2
--- initial
+++ final
@@ -1,5 +1,5 @@
 static void cleanup_a(struct list_head *actions, int ovr) {
   struct tc_action *a;
   if (!ovr) return;
-  list_for_each_entry(a, actions, list) a->tcfa_refcnt--;
+  list_for_each_entry(a, actions, list) refcount_dec(&a->tcfa_refcnt);
 }<sep>@@
expression p;
@@

- p->tcfa_refcnt--
+ refcount_dec(&p->tcfa_refcnt)
--- initial
+++ final
@@ -1,29 +1,29 @@
 int tcf_action_init(struct net *net, struct tcf_proto *tp, struct nlattr *nla, struct nlattr *est, char *name, int ovr, int bind, struct list_head *actions, size_t *attr_size, struct netlink_ext_ack *extack) {
   struct nlattr *tb[TCA_ACT_MAX_PRIO + 1];
   struct tc_action *act;
   size_t sz = 0;
   int err;
   int i;
   err = nla_parse_nested(tb, TCA_ACT_MAX_PRIO, nla, NULL, extack);
   if (err < 0) return err;
   for (i = 1; i <= TCA_ACT_MAX_PRIO && tb[i]; i++) {
     act = tcf_action_init_1(net, tp, tb[i], est, name, ovr, bind, extack);
     if (IS_ERR(act)) {
       err = PTR_ERR(act);
       goto err;
     }
     act->order = i;
     sz += tcf_action_fill_size(act);
-    if (ovr) act->tcfa_refcnt++;
+    if (ovr) refcount_inc(&act->tcfa_refcnt);
     list_add_tail(&act->list, actions);
   }
   *attr_size = tcf_action_full_attrs_size(sz);
   /* Remove the temp refcnt which was necessary to protect against
    * destroying an existing action which was being replaced
    */
   cleanup_a(actions, ovr);
   return 0;
 err:
   tcf_action_destroy(actions, bind);
   return err;
 }<sep>@@
expression p;
@@

- p->tcfa_refcnt++
+ refcount_inc(&p->tcfa_refcnt)
--- initial
+++ final
@@ -1,11 +1,11 @@
 bool tcf_idr_check(struct tc_action_net *tn, u32 index, struct tc_action **a, int bind) {
   struct tcf_idrinfo *idrinfo = tn->idrinfo;
   struct tc_action *p = tcf_idr_lookup(index, idrinfo);
   if (index && p) {
-    if (bind) p->tcfa_bindcnt++;
-    p->tcfa_refcnt++;
+    if (bind) atomic_inc(&p->tcfa_bindcnt);
+    refcount_inc(&p->tcfa_refcnt);
     *a = p;
     return true;
   }
   return false;
 }<sep>@@
expression p;
@@

- p->tcfa_bindcnt++
+ atomic_inc(&p->tcfa_bindcnt)

@@
expression p;
@@

- p->tcfa_refcnt++
+ refcount_inc(&p->tcfa_refcnt)
--- initial
+++ final
@@ -1,50 +1,50 @@
 int tcf_idr_create(struct tc_action_net *tn, u32 index, struct nlattr *est, struct tc_action **a, const struct tc_action_ops *ops, int bind, bool cpustats) {
   struct tc_action *p = kzalloc(ops->size, GFP_KERNEL);
   struct tcf_idrinfo *idrinfo = tn->idrinfo;
   struct idr *idr = &idrinfo->action_idr;
   int err = -ENOMEM;
   if (unlikely(!p)) return -ENOMEM;
-  p->tcfa_refcnt = 1;
-  if (bind) p->tcfa_bindcnt = 1;
+  refcount_set(&p->tcfa_refcnt, 1);
+  if (bind) atomic_set(&p->tcfa_bindcnt, 1);
   if (cpustats) {
     p->cpu_bstats = netdev_alloc_pcpu_stats(struct gnet_stats_basic_cpu);
     if (!p->cpu_bstats) goto err1;
     p->cpu_qstats = alloc_percpu(struct gnet_stats_queue);
     if (!p->cpu_qstats) goto err2;
   }
   spin_lock_init(&p->tcfa_lock);
   idr_preload(GFP_KERNEL);
   spin_lock(&idrinfo->lock);
   /* user doesn't specify an index */
   if (!index) {
     index = 1;
     err = idr_alloc_u32(idr, NULL, &index, UINT_MAX, GFP_ATOMIC);
   } else {
     err = idr_alloc_u32(idr, NULL, &index, index, GFP_ATOMIC);
   }
   spin_unlock(&idrinfo->lock);
   idr_preload_end();
   if (err) goto err3;
   p->tcfa_index = index;
   p->tcfa_tm.install = jiffies;
   p->tcfa_tm.lastuse = jiffies;
   p->tcfa_tm.firstuse = 0;
   if (est) {
     err = gen_new_estimator(&p->tcfa_bstats, p->cpu_bstats, &p->tcfa_rate_est, &p->tcfa_lock, NULL, est);
     if (err) goto err4;
   }
   p->idrinfo = idrinfo;
   p->ops = ops;
   INIT_LIST_HEAD(&p->list);
   *a = p;
   return 0;
 err4:
   idr_remove(idr, index);
 err3:
   free_percpu(p->cpu_qstats);
 err2:
   free_percpu(p->cpu_bstats);
 err1:
   kfree(p);
   return err;
 }<sep>@@
expression p;
expression e;
@@

- p->tcfa_bindcnt = e
+ atomic_set(&p->tcfa_bindcnt,e)

@@
expression p;
expression e;
@@

- p->tcfa_refcnt = e
+ refcount_set(&p->tcfa_refcnt,e)
--- initial
+++ final
@@ -1,24 +1,24 @@
 static int tcf_bpf_dump(struct sk_buff *skb, struct tc_action *act, int bind, int ref) {
   unsigned char *tp = skb_tail_pointer(skb);
   struct tcf_bpf *prog = to_bpf(act);
   struct tc_act_bpf opt = {
       .index = prog->tcf_index,
-      .refcnt = prog->tcf_refcnt - ref,
-      .bindcnt = prog->tcf_bindcnt - bind,
+      .refcnt = refcount_read(&prog->tcf_refcnt) - ref,
+      .bindcnt = atomic_read(&prog->tcf_bindcnt) - bind,
       .action = prog->tcf_action,
   };
   struct tcf_t tm;
   int ret;
   if (nla_put(skb, TCA_ACT_BPF_PARMS, sizeof(opt), &opt)) goto nla_put_failure;
   if (tcf_bpf_is_ebpf(prog))
     ret = tcf_bpf_dump_ebpf_info(prog, skb);
   else
     ret = tcf_bpf_dump_bpf_info(prog, skb);
   if (ret) goto nla_put_failure;
   tcf_tm_dump(&tm, &prog->tcf_tm);
   if (nla_put_64bit(skb, TCA_ACT_BPF_TM, sizeof(tm), &tm, TCA_ACT_BPF_PAD)) goto nla_put_failure;
   return skb->len;
 nla_put_failure:
   nlmsg_trim(skb, tp);
   return -1;
 }<sep>@@
expression p;
@@

- p->tcf_bindcnt
+ atomic_read(&p->tcf_bindcnt)




@@
expression p;
@@

- p->tcf_refcnt
+ refcount_read(&p->tcf_refcnt)
--- initial
+++ final
@@ -1,19 +1,19 @@
 static inline int tcf_connmark_dump(struct sk_buff *skb, struct tc_action *a, int bind, int ref) {
   unsigned char *b = skb_tail_pointer(skb);
   struct tcf_connmark_info *ci = to_connmark(a);
   struct tc_connmark opt = {
       .index = ci->tcf_index,
-      .refcnt = ci->tcf_refcnt - ref,
-      .bindcnt = ci->tcf_bindcnt - bind,
+      .refcnt = refcount_read(&ci->tcf_refcnt) - ref,
+      .bindcnt = atomic_read(&ci->tcf_bindcnt) - bind,
       .action = ci->tcf_action,
       .zone = ci->zone,
   };
   struct tcf_t t;
   if (nla_put(skb, TCA_CONNMARK_PARMS, sizeof(opt), &opt)) goto nla_put_failure;
   tcf_tm_dump(&t, &ci->tcf_tm);
   if (nla_put_64bit(skb, TCA_CONNMARK_TM, sizeof(t), &t, TCA_CONNMARK_PAD)) goto nla_put_failure;
   return skb->len;
 nla_put_failure:
   nlmsg_trim(skb, b);
   return -1;
 }<sep>@@
expression p;
@@

- p->tcf_bindcnt
+ atomic_read(&p->tcf_bindcnt)




@@
expression p;
@@

- p->tcf_refcnt
+ refcount_read(&p->tcf_refcnt)