diff options
author | Andrew Lunn <andrew@lunn.ch> | 2010-01-02 05:30:49 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-03-03 19:42:36 -0500 |
commit | a9c2910aa15c5b2559e80d1406176f8456d3e34e (patch) | |
tree | 7bede70aef90823d6f7cf0a1947c7a55b868e86b /drivers/staging/batman-adv/translation-table.c | |
parent | e70171957a3ac67fd62af0c66efe7b7749121899 (diff) |
Staging: batman-adv: Allow the MAC address to be set
Some embedded devices have very limited sources of entropy for the
random number generator. It has been observed that the random MAC
address on the interface bat0 is not always random. When testing with
a collection of identical hardware, sometimes the bat0 device the same
MAC address on multiple devices, causing mayhem. This patch allows the
MAC address to be set by the user.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/batman-adv/translation-table.c')
-rw-r--r-- | drivers/staging/batman-adv/translation-table.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/staging/batman-adv/translation-table.c b/drivers/staging/batman-adv/translation-table.c index 8c8136b7162..53a054e413d 100644 --- a/drivers/staging/batman-adv/translation-table.c +++ b/drivers/staging/batman-adv/translation-table.c | |||
@@ -211,6 +211,21 @@ static void hna_local_del(struct hna_local_entry *hna_local_entry, | |||
211 | _hna_local_del(hna_local_entry); | 211 | _hna_local_del(hna_local_entry); |
212 | } | 212 | } |
213 | 213 | ||
214 | void hna_local_remove(uint8_t *addr, char *message) | ||
215 | { | ||
216 | struct hna_local_entry *hna_local_entry; | ||
217 | unsigned long flags; | ||
218 | |||
219 | spin_lock_irqsave(&hna_local_hash_lock, flags); | ||
220 | |||
221 | hna_local_entry = (struct hna_local_entry *) | ||
222 | hash_find(hna_local_hash, addr); | ||
223 | if (hna_local_entry) | ||
224 | hna_local_del(hna_local_entry, message); | ||
225 | |||
226 | spin_unlock_irqrestore(&hna_local_hash_lock, flags); | ||
227 | } | ||
228 | |||
214 | void hna_local_purge(struct work_struct *work) | 229 | void hna_local_purge(struct work_struct *work) |
215 | { | 230 | { |
216 | struct hna_local_entry *hna_local_entry; | 231 | struct hna_local_entry *hna_local_entry; |