Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mac80211: use bool argument to ieee80211_send_nullfunc

Instead of int with 0/1, use bool with false/true for the
powersave argument to ieee80211_send_nullfunc().

Signed-off-by: Johannes Berg <johannes.berg@intel.com>

+10 -10
+1 -1
net/mac80211/ieee80211_i.h
··· 1850 1850 void ieee80211_dynamic_ps_timer(unsigned long data); 1851 1851 void ieee80211_send_nullfunc(struct ieee80211_local *local, 1852 1852 struct ieee80211_sub_if_data *sdata, 1853 - int powersave); 1853 + bool powersave); 1854 1854 void ieee80211_sta_rx_notify(struct ieee80211_sub_if_data *sdata, 1855 1855 struct ieee80211_hdr *hdr); 1856 1856 void ieee80211_sta_tx_notify(struct ieee80211_sub_if_data *sdata,
+5 -5
net/mac80211/mlme.c
··· 936 936 937 937 void ieee80211_send_nullfunc(struct ieee80211_local *local, 938 938 struct ieee80211_sub_if_data *sdata, 939 - int powersave) 939 + bool powersave) 940 940 { 941 941 struct sk_buff *skb; 942 942 struct ieee80211_hdr_3addr *nullfunc; ··· 1420 1420 msecs_to_jiffies(conf->dynamic_ps_timeout)); 1421 1421 } else { 1422 1422 if (ieee80211_hw_check(&local->hw, PS_NULLFUNC_STACK)) 1423 - ieee80211_send_nullfunc(local, sdata, 1); 1423 + ieee80211_send_nullfunc(local, sdata, true); 1424 1424 1425 1425 if (ieee80211_hw_check(&local->hw, PS_NULLFUNC_STACK) && 1426 1426 ieee80211_hw_check(&local->hw, REPORTS_TX_ACK_STATUS)) ··· 1635 1635 msecs_to_jiffies( 1636 1636 local->hw.conf.dynamic_ps_timeout)); 1637 1637 } else { 1638 - ieee80211_send_nullfunc(local, sdata, 1); 1638 + ieee80211_send_nullfunc(local, sdata, true); 1639 1639 /* Flush to get the tx status of nullfunc frame */ 1640 1640 ieee80211_flush_queues(local, sdata, false); 1641 1641 } ··· 2268 2268 2269 2269 if (ieee80211_hw_check(&sdata->local->hw, REPORTS_TX_ACK_STATUS)) { 2270 2270 ifmgd->nullfunc_failed = false; 2271 - ieee80211_send_nullfunc(sdata->local, sdata, 0); 2271 + ieee80211_send_nullfunc(sdata->local, sdata, false); 2272 2272 } else { 2273 2273 int ssid_len; 2274 2274 ··· 3445 3445 ieee80211_hw_config(local, 3446 3446 IEEE80211_CONF_CHANGE_PS); 3447 3447 } 3448 - ieee80211_send_nullfunc(local, sdata, 0); 3448 + ieee80211_send_nullfunc(local, sdata, false); 3449 3449 } else if (!local->pspolling && sdata->u.mgd.powersave) { 3450 3450 local->pspolling = true; 3451 3451
+3 -3
net/mac80211/offchannel.c
··· 57 57 * to send a new nullfunc frame to inform the AP that we 58 58 * are again sleeping. 59 59 */ 60 - ieee80211_send_nullfunc(local, sdata, 1); 60 + ieee80211_send_nullfunc(local, sdata, true); 61 61 } 62 62 63 63 /* inform AP that we are awake again, unless power save is enabled */ ··· 66 66 struct ieee80211_local *local = sdata->local; 67 67 68 68 if (!local->ps_sdata) 69 - ieee80211_send_nullfunc(local, sdata, 0); 69 + ieee80211_send_nullfunc(local, sdata, false); 70 70 else if (local->offchannel_ps_enabled) { 71 71 /* 72 72 * In !IEEE80211_HW_PS_NULLFUNC_STACK case the hardware ··· 93 93 * restart the timer now and send a nullfunc frame to inform 94 94 * the AP that we are awake. 95 95 */ 96 - ieee80211_send_nullfunc(local, sdata, 0); 96 + ieee80211_send_nullfunc(local, sdata, false); 97 97 mod_timer(&local->dynamic_ps_timer, jiffies + 98 98 msecs_to_jiffies(local->hw.conf.dynamic_ps_timeout)); 99 99 }
+1 -1
net/mac80211/util.c
··· 1966 1966 if (!sdata->u.mgd.associated) 1967 1967 continue; 1968 1968 1969 - ieee80211_send_nullfunc(local, sdata, 0); 1969 + ieee80211_send_nullfunc(local, sdata, false); 1970 1970 } 1971 1971 } 1972 1972