mirror of
https://github.com/torvalds/linux.git
synced 2026-05-26 08:02:27 +02:00
wifi: mwifiex: Use max_t() to improve code
Use max_t() to reduce the code and improve its readability. Signed-off-by: Qianfeng Rong <rongqianfeng@vivo.com> Reviewed-by: Jeff Chen <jeff.chen_1@nxp.con> Link: https://patch.msgid.link/20250715121721.266713-6-rongqianfeng@vivo.com Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
b60c49590a
commit
37fa920819
|
|
@ -4783,10 +4783,9 @@ int mwifiex_register_cfg80211(struct mwifiex_adapter *adapter)
|
|||
wiphy->iface_combinations = &mwifiex_iface_comb_ap_sta;
|
||||
wiphy->n_iface_combinations = 1;
|
||||
|
||||
if (adapter->max_sta_conn > adapter->max_p2p_conn)
|
||||
wiphy->max_ap_assoc_sta = adapter->max_sta_conn;
|
||||
else
|
||||
wiphy->max_ap_assoc_sta = adapter->max_p2p_conn;
|
||||
wiphy->max_ap_assoc_sta = max_t(typeof(wiphy->max_ap_assoc_sta),
|
||||
adapter->max_sta_conn,
|
||||
adapter->max_p2p_conn);
|
||||
|
||||
/* Initialize cipher suits */
|
||||
wiphy->cipher_suites = mwifiex_cipher_suites;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user