summaryrefslogtreecommitdiffstats
path: root/net/wireless/scan.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2019-04-11 10:59:50 +0200
committerJohannes Berg <johannes.berg@intel.com>2019-04-26 13:02:11 +0200
commit5809a5d54bb9eda3a388b5a712657970c2cb9f8e (patch)
treef21f0833e43090825bb52cfead03de6ef33f7965 /net/wireless/scan.c
parentmac80211: store tx power value from user to station (diff)
downloadlinux-5809a5d54bb9eda3a388b5a712657970c2cb9f8e.tar.xz
linux-5809a5d54bb9eda3a388b5a712657970c2cb9f8e.zip
cfg80211: don't pass pointer to pointer unnecessarily
The cfg80211_merge_profile() and ieee802_11_find_bssid_profile() are a bit cleaner if we just pass the merged_ie pointer instead of a pointer to the pointer. This isn't a functional change, it's just a clean up. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to '')
-rw-r--r--net/wireless/scan.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/wireless/scan.c b/net/wireless/scan.c
index 878c867f3f7d..85dd3342d2c4 100644
--- a/net/wireless/scan.c
+++ b/net/wireless/scan.c
@@ -1502,7 +1502,7 @@ static const struct element
size_t cfg80211_merge_profile(const u8 *ie, size_t ielen,
const struct element *mbssid_elem,
const struct element *sub_elem,
- u8 **merged_ie, size_t max_copy_len)
+ u8 *merged_ie, size_t max_copy_len)
{
size_t copied_len = sub_elem->datalen;
const struct element *next_mbssid;
@@ -1510,7 +1510,7 @@ size_t cfg80211_merge_profile(const u8 *ie, size_t ielen,
if (sub_elem->datalen > max_copy_len)
return 0;
- memcpy(*merged_ie, sub_elem->data, sub_elem->datalen);
+ memcpy(merged_ie, sub_elem->data, sub_elem->datalen);
while ((next_mbssid = cfg80211_get_profile_continuation(ie, ielen,
mbssid_elem,
@@ -1519,7 +1519,7 @@ size_t cfg80211_merge_profile(const u8 *ie, size_t ielen,
if (copied_len + next_sub->datalen > max_copy_len)
break;
- memcpy(*merged_ie + copied_len, next_sub->data,
+ memcpy(merged_ie + copied_len, next_sub->data,
next_sub->datalen);
copied_len += next_sub->datalen;
}
@@ -1588,7 +1588,7 @@ static void cfg80211_parse_mbssid_data(struct wiphy *wiphy,
profile_len = cfg80211_merge_profile(ie, ielen,
elem,
sub,
- &profile,
+ profile,
ielen);
/* found a Nontransmitted BSSID Profile */