diff options
Diffstat (limited to 'wmi.c')
| -rw-r--r-- | wmi.c | 32 |
1 files changed, 16 insertions, 16 deletions
@@ -3046,7 +3046,7 @@ static int ath10k_wmi_main_op_pull_fw_stats(struct ath10k *ar, if (!skb_pull(skb, sizeof(*src))) return -EPROTO; - dst = kzalloc(sizeof(*dst), GFP_ATOMIC); + dst = kzalloc_obj(*dst, GFP_ATOMIC); if (!dst) continue; @@ -3067,7 +3067,7 @@ static int ath10k_wmi_main_op_pull_fw_stats(struct ath10k *ar, if (!skb_pull(skb, sizeof(*src))) return -EPROTO; - dst = kzalloc(sizeof(*dst), GFP_ATOMIC); + dst = kzalloc_obj(*dst, GFP_ATOMIC); if (!dst) continue; @@ -3100,7 +3100,7 @@ static int ath10k_wmi_10x_op_pull_fw_stats(struct ath10k *ar, if (!skb_pull(skb, sizeof(*src))) return -EPROTO; - dst = kzalloc(sizeof(*dst), GFP_ATOMIC); + dst = kzalloc_obj(*dst, GFP_ATOMIC); if (!dst) continue; @@ -3122,7 +3122,7 @@ static int ath10k_wmi_10x_op_pull_fw_stats(struct ath10k *ar, if (!skb_pull(skb, sizeof(*src))) return -EPROTO; - dst = kzalloc(sizeof(*dst), GFP_ATOMIC); + dst = kzalloc_obj(*dst, GFP_ATOMIC); if (!dst) continue; @@ -3161,7 +3161,7 @@ static int ath10k_wmi_10_2_op_pull_fw_stats(struct ath10k *ar, if (!skb_pull(skb, sizeof(*src))) return -EPROTO; - dst = kzalloc(sizeof(*dst), GFP_ATOMIC); + dst = kzalloc_obj(*dst, GFP_ATOMIC); if (!dst) continue; @@ -3198,7 +3198,7 @@ static int ath10k_wmi_10_2_op_pull_fw_stats(struct ath10k *ar, if (!skb_pull(skb, sizeof(*src))) return -EPROTO; - dst = kzalloc(sizeof(*dst), GFP_ATOMIC); + dst = kzalloc_obj(*dst, GFP_ATOMIC); if (!dst) continue; @@ -3238,7 +3238,7 @@ static int ath10k_wmi_10_2_4_op_pull_fw_stats(struct ath10k *ar, if (!skb_pull(skb, sizeof(*src))) return -EPROTO; - dst = kzalloc(sizeof(*dst), GFP_ATOMIC); + dst = kzalloc_obj(*dst, GFP_ATOMIC); if (!dst) continue; @@ -3281,7 +3281,7 @@ static int ath10k_wmi_10_2_4_op_pull_fw_stats(struct ath10k *ar, if (!skb_pull(skb, stats_len)) return -EPROTO; - dst = kzalloc(sizeof(*dst), GFP_ATOMIC); + dst = kzalloc_obj(*dst, GFP_ATOMIC); if (!dst) continue; @@ -3330,7 +3330,7 @@ static int ath10k_wmi_10_4_op_pull_fw_stats(struct ath10k *ar, if (!skb_pull(skb, sizeof(*src))) return -EPROTO; - dst = kzalloc(sizeof(*dst), GFP_ATOMIC); + dst = kzalloc_obj(*dst, GFP_ATOMIC); if (!dst) continue; @@ -3376,7 +3376,7 @@ static int ath10k_wmi_10_4_op_pull_fw_stats(struct ath10k *ar, if (!skb_pull(skb, sizeof(*src))) return -EPROTO; - dst = kzalloc(sizeof(*dst), GFP_ATOMIC); + dst = kzalloc_obj(*dst, GFP_ATOMIC); if (!dst) continue; @@ -3409,7 +3409,7 @@ static int ath10k_wmi_10_4_op_pull_fw_stats(struct ath10k *ar, if (!skb_pull(skb, sizeof(*src))) return -EPROTO; - dst = kzalloc(sizeof(*dst), GFP_ATOMIC); + dst = kzalloc_obj(*dst, GFP_ATOMIC); if (!dst) continue; @@ -3429,7 +3429,7 @@ static int ath10k_wmi_10_4_op_pull_fw_stats(struct ath10k *ar, if (!skb_pull(skb, sizeof(*src))) return -EPROTO; - dst = kzalloc(sizeof(*dst), GFP_ATOMIC); + dst = kzalloc_obj(*dst, GFP_ATOMIC); if (!dst) continue; ath10k_wmi_10_4_pull_vdev_stats(src, dst); @@ -4912,7 +4912,7 @@ void ath10k_wmi_event_pdev_tpc_config(struct ath10k *ar, struct sk_buff *skb) rate_max = WMI_TPC_RATE_MAX; } - tpc_stats = kzalloc(sizeof(*tpc_stats), GFP_ATOMIC); + tpc_stats = kzalloc_obj(*tpc_stats, GFP_ATOMIC); if (!tpc_stats) return; @@ -5168,7 +5168,7 @@ void ath10k_wmi_event_tpc_final_table(struct ath10k *ar, struct sk_buff *skb) rate_max = WMI_TPC_FINAL_RATE_MAX; } - tpc_stats = kzalloc(sizeof(*tpc_stats), GFP_ATOMIC); + tpc_stats = kzalloc_obj(*tpc_stats, GFP_ATOMIC); if (!tpc_stats) return; @@ -5289,8 +5289,6 @@ ath10k_wmi_event_peer_sta_ps_state_chg(struct ath10k *ar, struct sk_buff *skb) struct ath10k_sta *arsta; u8 peer_addr[ETH_ALEN]; - lockdep_assert_held(&ar->data_lock); - ev = (struct wmi_peer_sta_ps_state_chg_event *)skb->data; ether_addr_copy(peer_addr, ev->peer_macaddr.addr); @@ -5305,7 +5303,9 @@ ath10k_wmi_event_peer_sta_ps_state_chg(struct ath10k *ar, struct sk_buff *skb) } arsta = (struct ath10k_sta *)sta->drv_priv; + spin_lock_bh(&ar->data_lock); arsta->peer_ps_state = __le32_to_cpu(ev->peer_ps_state); + spin_unlock_bh(&ar->data_lock); exit: rcu_read_unlock(); |
