| .. | .. |
|---|
| 1 | 1 | /* |
|---|
| 2 | | - * Marvell Wireless LAN device driver: station command response handling |
|---|
| 2 | + * NXP Wireless LAN device driver: station command response handling |
|---|
| 3 | 3 | * |
|---|
| 4 | | - * Copyright (C) 2011-2014, Marvell International Ltd. |
|---|
| 4 | + * Copyright 2011-2020 NXP |
|---|
| 5 | 5 | * |
|---|
| 6 | | - * This software file (the "File") is distributed by Marvell International |
|---|
| 7 | | - * Ltd. under the terms of the GNU General Public License Version 2, June 1991 |
|---|
| 6 | + * This software file (the "File") is distributed by NXP |
|---|
| 7 | + * under the terms of the GNU General Public License Version 2, June 1991 |
|---|
| 8 | 8 | * (the "License"). You may use, redistribute and/or modify this File in |
|---|
| 9 | 9 | * accordance with the terms and conditions of the License, a copy of which |
|---|
| 10 | 10 | * is available by writing to the Free Software Foundation, Inc., |
|---|
| .. | .. |
|---|
| 46 | 46 | { |
|---|
| 47 | 47 | struct mwifiex_adapter *adapter = priv->adapter; |
|---|
| 48 | 48 | struct host_cmd_ds_802_11_ps_mode_enh *pm; |
|---|
| 49 | | - unsigned long flags; |
|---|
| 50 | 49 | |
|---|
| 51 | 50 | mwifiex_dbg(adapter, ERROR, |
|---|
| 52 | 51 | "CMD_RESP: cmd %#x error, result=%#x\n", |
|---|
| .. | .. |
|---|
| 87 | 86 | /* Handling errors here */ |
|---|
| 88 | 87 | mwifiex_recycle_cmd_node(adapter, adapter->curr_cmd); |
|---|
| 89 | 88 | |
|---|
| 90 | | - spin_lock_irqsave(&adapter->mwifiex_cmd_lock, flags); |
|---|
| 89 | + spin_lock_bh(&adapter->mwifiex_cmd_lock); |
|---|
| 91 | 90 | adapter->curr_cmd = NULL; |
|---|
| 92 | | - spin_unlock_irqrestore(&adapter->mwifiex_cmd_lock, flags); |
|---|
| 91 | + spin_unlock_bh(&adapter->mwifiex_cmd_lock); |
|---|
| 93 | 92 | } |
|---|
| 94 | 93 | |
|---|
| 95 | 94 | /* |
|---|
| .. | .. |
|---|
| 1033 | 1032 | struct ieee80211_regdomain *regd; |
|---|
| 1034 | 1033 | struct ieee80211_reg_rule *rule; |
|---|
| 1035 | 1034 | bool new_rule; |
|---|
| 1036 | | - int regd_size, idx, freq, prev_freq = 0; |
|---|
| 1035 | + int idx, freq, prev_freq = 0; |
|---|
| 1037 | 1036 | u32 bw, prev_bw = 0; |
|---|
| 1038 | 1037 | u8 chflags, prev_chflags = 0, valid_rules = 0; |
|---|
| 1039 | 1038 | |
|---|
| 1040 | 1039 | if (WARN_ON_ONCE(num_chan > NL80211_MAX_SUPP_REG_RULES)) |
|---|
| 1041 | 1040 | return ERR_PTR(-EINVAL); |
|---|
| 1042 | 1041 | |
|---|
| 1043 | | - regd_size = sizeof(struct ieee80211_regdomain) + |
|---|
| 1044 | | - num_chan * sizeof(struct ieee80211_reg_rule); |
|---|
| 1045 | | - |
|---|
| 1046 | | - regd = kzalloc(regd_size, GFP_KERNEL); |
|---|
| 1042 | + regd = kzalloc(struct_size(regd, reg_rules, num_chan), GFP_KERNEL); |
|---|
| 1047 | 1043 | if (!regd) |
|---|
| 1048 | 1044 | return ERR_PTR(-ENOMEM); |
|---|
| 1049 | 1045 | |
|---|