Skip to content

Commit 4cbfaa6

Browse files
committed
Merge branch 'bits/002-backports' into asahi-wip
2 parents dadcaa1 + 646f405 commit 4cbfaa6

3 files changed

Lines changed: 14 additions & 32 deletions

File tree

drivers/cpufreq/cpufreq.c

Lines changed: 4 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -575,30 +575,11 @@ unsigned int cpufreq_policy_transition_delay_us(struct cpufreq_policy *policy)
575575
return policy->transition_delay_us;
576576

577577
latency = policy->cpuinfo.transition_latency / NSEC_PER_USEC;
578-
if (latency) {
579-
unsigned int max_delay_us = 2 * MSEC_PER_SEC;
578+
if (latency)
579+
/* Give a 50% breathing room between updates */
580+
return latency + (latency >> 1);
580581

581-
/*
582-
* If the platform already has high transition_latency, use it
583-
* as-is.
584-
*/
585-
if (latency > max_delay_us)
586-
return latency;
587-
588-
/*
589-
* For platforms that can change the frequency very fast (< 2
590-
* us), the above formula gives a decent transition delay. But
591-
* for platforms where transition_latency is in milliseconds, it
592-
* ends up giving unrealistic values.
593-
*
594-
* Cap the default transition delay to 2 ms, which seems to be
595-
* a reasonable amount of time after which we should reevaluate
596-
* the frequency.
597-
*/
598-
return min(latency * LATENCY_MULTIPLIER, max_delay_us);
599-
}
600-
601-
return LATENCY_MULTIPLIER;
582+
return USEC_PER_MSEC;
602583
}
603584
EXPORT_SYMBOL_GPL(cpufreq_policy_transition_delay_us);
604585

drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4320,9 +4320,16 @@ brcmf_pmksa_v3_op(struct brcmf_if *ifp, struct cfg80211_pmksa *pmksa,
43204320
/* Single PMK operation */
43214321
pmk_op->count = cpu_to_le16(1);
43224322
length += sizeof(struct brcmf_pmksa_v3);
4323-
memcpy(pmk_op->pmk[0].bssid, pmksa->bssid, ETH_ALEN);
4324-
memcpy(pmk_op->pmk[0].pmkid, pmksa->pmkid, WLAN_PMKID_LEN);
4325-
pmk_op->pmk[0].pmkid_len = WLAN_PMKID_LEN;
4323+
if (pmksa->bssid)
4324+
memcpy(pmk_op->pmk[0].bssid, pmksa->bssid, ETH_ALEN);
4325+
if (pmksa->pmkid) {
4326+
memcpy(pmk_op->pmk[0].pmkid, pmksa->pmkid, WLAN_PMKID_LEN);
4327+
pmk_op->pmk[0].pmkid_len = WLAN_PMKID_LEN;
4328+
}
4329+
if (pmksa->ssid && pmksa->ssid_len) {
4330+
memcpy(pmk_op->pmk[0].ssid.SSID, pmksa->ssid, pmksa->ssid_len);
4331+
pmk_op->pmk[0].ssid.SSID_len = pmksa->ssid_len;
4332+
}
43264333
pmk_op->pmk[0].time_left = cpu_to_le32(alive ? BRCMF_PMKSA_NO_EXPIRY : 0);
43274334
}
43284335

include/linux/cpufreq.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -577,12 +577,6 @@ static inline unsigned long cpufreq_scale(unsigned long old, u_int div,
577577
#define CPUFREQ_POLICY_POWERSAVE (1)
578578
#define CPUFREQ_POLICY_PERFORMANCE (2)
579579

580-
/*
581-
* The polling frequency depends on the capability of the processor. Default
582-
* polling frequency is 1000 times the transition latency of the processor.
583-
*/
584-
#define LATENCY_MULTIPLIER (1000)
585-
586580
struct cpufreq_governor {
587581
char name[CPUFREQ_NAME_LEN];
588582
int (*init)(struct cpufreq_policy *policy);

0 commit comments

Comments
 (0)