This cleanup patchset includes the following patches:
- bump version strings, by Simon Wunderlich - fix spelling error, by Sven Eckelmann - drop unneeded types.h include, by Sven Eckelmann - change random number generation to prandom_u32_max(), by Sven Eckelmann - remove unused function batadv_arp_change_timeout(), by Yue Haibing -----BEGIN PGP SIGNATURE----- iQJKBAABCgA0FiEE1ilQI7G+y+fdhnrfoSvjmEKSnqEFAl6m9HEWHHN3QHNpbW9u d3VuZGVybGljaC5kZQAKCRChK+OYQpKeoeKyEADJXMFP14aDblfXDyA/JwEJO7E8 R1YRjbCz7t5gqJbGQGfqGZo0TgpSqvYXVJZEL8ARXR9hIpJEaUiVaMBOOEDTuJj8 kBG/LupxUYpLPUXWobJRFwhAn+Q8z69gyNacF+/upuYaAJCJSLjOitcttjAeVdD+ w3M6Eyw6RGpKIa17E0wG4cwRd2vvJ7SY/Sv4i5G7eiD7PmfsaVYXvyowjk0OZryP RhytuKx/+e/hv1fS66aW0AdiuLjH/zKDNTDEb+QXePrEyT9DutRu33l1EFgXPfmP VsTWxCYPNzj3CREfGdYh6ETmZeYMbkGM4Rt7yETXO/lUI5bhyPxzPBlZdYmP4XEN WZ2ggFvY01UagYmqV9GNr71IWkmCoI1vfphoEBktv41sIQW26g7ByrQRzU7zhNOp W9fNIzVt1Y6PiIcZRyVoZ3VwEn9db7T1uX669vGwaxFigL9/r2dcrj+pQfLN5kj6 qigz/XMjawq5DloyyunSiu3qJ9iTsv3Dh0MeVBhBRdFeZEVht7whHAPqWhxxgpL/ 1FuEPqHSCVmc10IDR9VChVm1Xq9GaIVGdekW2hMNl6ry+T1f6b5akjWSa46r1mWO byIK3maK6s52Bwa9d4W2fGzKTbxBG9U2PYWP4IlTyr2hRDQbcL+RK6FJfZ068h/d I26onCKv/mURd6OUxw== =5bKt -----END PGP SIGNATURE----- Merge tag 'batadv-next-for-davem-20200427' of git://git.open-mesh.org/linux-merge Simon Wunderlich says: ==================== This cleanup patchset includes the following patches: - bump version strings, by Simon Wunderlich - fix spelling error, by Sven Eckelmann - drop unneeded types.h include, by Sven Eckelmann - change random number generation to prandom_u32_max(), by Sven Eckelmann - remove unused function batadv_arp_change_timeout(), by Yue Haibing ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Коммит
a21643cf56
|
@ -280,7 +280,7 @@ batadv_iv_ogm_emit_send_time(const struct batadv_priv *bat_priv)
|
|||
unsigned int msecs;
|
||||
|
||||
msecs = atomic_read(&bat_priv->orig_interval) - BATADV_JITTER;
|
||||
msecs += prandom_u32() % (2 * BATADV_JITTER);
|
||||
msecs += prandom_u32_max(2 * BATADV_JITTER);
|
||||
|
||||
return jiffies + msecs_to_jiffies(msecs);
|
||||
}
|
||||
|
@ -288,7 +288,7 @@ batadv_iv_ogm_emit_send_time(const struct batadv_priv *bat_priv)
|
|||
/* when do we schedule a ogm packet to be sent */
|
||||
static unsigned long batadv_iv_ogm_fwd_send_time(void)
|
||||
{
|
||||
return jiffies + msecs_to_jiffies(prandom_u32() % (BATADV_JITTER / 2));
|
||||
return jiffies + msecs_to_jiffies(prandom_u32_max(BATADV_JITTER / 2));
|
||||
}
|
||||
|
||||
/* apply hop penalty for a normal link */
|
||||
|
|
|
@ -49,7 +49,7 @@ static void batadv_v_elp_start_timer(struct batadv_hard_iface *hard_iface)
|
|||
unsigned int msecs;
|
||||
|
||||
msecs = atomic_read(&hard_iface->bat_v.elp_interval) - BATADV_JITTER;
|
||||
msecs += prandom_u32() % (2 * BATADV_JITTER);
|
||||
msecs += prandom_u32_max(2 * BATADV_JITTER);
|
||||
|
||||
queue_delayed_work(batadv_event_workqueue, &hard_iface->bat_v.elp_wq,
|
||||
msecs_to_jiffies(msecs));
|
||||
|
|
|
@ -88,7 +88,7 @@ static void batadv_v_ogm_start_queue_timer(struct batadv_hard_iface *hard_iface)
|
|||
unsigned int msecs = BATADV_MAX_AGGREGATION_MS * 1000;
|
||||
|
||||
/* msecs * [0.9, 1.1] */
|
||||
msecs += prandom_u32() % (msecs / 5) - (msecs / 10);
|
||||
msecs += prandom_u32_max(msecs / 5) - (msecs / 10);
|
||||
queue_delayed_work(batadv_event_workqueue, &hard_iface->bat_v.aggr_wq,
|
||||
msecs_to_jiffies(msecs / 1000));
|
||||
}
|
||||
|
@ -107,7 +107,7 @@ static void batadv_v_ogm_start_timer(struct batadv_priv *bat_priv)
|
|||
return;
|
||||
|
||||
msecs = atomic_read(&bat_priv->orig_interval) - BATADV_JITTER;
|
||||
msecs += prandom_u32() % (2 * BATADV_JITTER);
|
||||
msecs += prandom_u32_max(2 * BATADV_JITTER);
|
||||
queue_delayed_work(batadv_event_workqueue, &bat_priv->bat_v.ogm_wq,
|
||||
msecs_to_jiffies(msecs));
|
||||
}
|
||||
|
|
|
@ -163,11 +163,6 @@ static inline void batadv_dat_init_own_addr(struct batadv_priv *bat_priv,
|
|||
{
|
||||
}
|
||||
|
||||
static inline void batadv_arp_change_timeout(struct net_device *soft_iface,
|
||||
const char *name)
|
||||
{
|
||||
}
|
||||
|
||||
static inline int batadv_dat_init(struct batadv_priv *bat_priv)
|
||||
{
|
||||
return 0;
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
#define BATADV_DRIVER_DEVICE "batman-adv"
|
||||
|
||||
#ifndef BATADV_SOURCE_VERSION
|
||||
#define BATADV_SOURCE_VERSION "2020.1"
|
||||
#define BATADV_SOURCE_VERSION "2020.2"
|
||||
#endif
|
||||
|
||||
/* B.A.T.M.A.N. parameters */
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
#include <linux/percpu.h>
|
||||
#include <linux/printk.h>
|
||||
#include <linux/tracepoint.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
#undef TRACE_SYSTEM
|
||||
#define TRACE_SYSTEM batadv
|
||||
|
|
|
@ -1086,7 +1086,7 @@ struct batadv_priv_bla {
|
|||
* struct batadv_priv_debug_log - debug logging data
|
||||
*/
|
||||
struct batadv_priv_debug_log {
|
||||
/** @log_buff: buffer holding the logs (ring bufer) */
|
||||
/** @log_buff: buffer holding the logs (ring buffer) */
|
||||
char log_buff[BATADV_LOG_BUF_LEN];
|
||||
|
||||
/** @log_start: index of next character to read */
|
||||
|
|
Загрузка…
Ссылка в новой задаче