Skip to contentSkip to conversation

batman-adv: fix num_changes type to uint16_t

PATCH Applied Antonio Quartulli 2 participants 4 messages May 24, 2013 – May 28, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 batman-adv: fix num_changes type to uint16_t

Since the introduction of the tvlv_tt_data struct variables storing the number of TT changes are always declared as uint16_t, however some of them were not changed.

Switch them al to uint16_t.

Introduced by 8405301b979466610a726b7d595b6bfee5306cf7 ("batman-adv: tvlv - convert tt data sent within OGMs")

---
 translation-table.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
translation-table.c +3 -3
index 44e7789..f6b96cb 100644
@@ -1486,7 +1486,7 @@ static void batadv_tt_req_list_free(struct batadv_priv *bat_priv)
 static void batadv_tt_save_orig_buffer(struct batadv_priv *bat_priv,
 				       struct batadv_orig_node *orig_node,
 				       const unsigned char *tt_buff,
-				       uint8_t tt_num_changes)
+				       uint16_t tt_num_changes)
 {
 	uint16_t tt_buff_len = batadv_tt_len(tt_num_changes);
 
@@ -2407,8 +2407,8 @@ out:
 static void batadv_tt_update_orig(struct batadv_priv *bat_priv,
 				  struct batadv_orig_node *orig_node,
 				  const unsigned char *tt_buff,
-				  uint8_t tt_num_changes,
-				  uint8_t ttvn, uint32_t tt_crc)
+				  uint16_t tt_num_changes, uint8_t ttvn,
+				  uint32_t tt_crc)
 {
 	uint8_t orig_ttvn = (uint8_t)atomic_read(&orig_node->last_ttvn);
 	bool full_table = true;
Signature · 1 line
1.8.1.5
#1 lore raw

PATCH 2/2 batman-adv: fix typo in kernel doc

Now TT uses CRC32 instead of CRC16

Introduced by c5e7a06a29612056006e4dc01910c0b44e858583 ("batman-adv: use CRC32C instead of CRC16 in TT code")

---
 translation-table.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
translation-table.c +1 -1
index f6b96cb..08da23a 100644
@@ -2402,7 +2402,7 @@ out:
  * @tt_buff: buffer holding the tt information
  * @tt_num_changes: number of tt changes inside the tt buffer
  * @ttvn: translation table version number of this changeset
- * @tt_crc: crc16 checksum of orig node's translation table
+ * @tt_crc: crc32 checksum of orig node's translation table
  */
 static void batadv_tt_update_orig(struct batadv_priv *bat_priv,
 				  struct batadv_orig_node *orig_node,
Signature · 1 line
1.8.1.5
#2 lore raw

Re: [B.A.T.M.A.N.] [PATCH 2/2] batman-adv: fix typo in kernel doc

Quoted 9 lines · On Friday, May 24, 2013 23:25:29 Antonio Quartulli wrote:

Now TT uses CRC32 instead of CRC16

Introduced by c5e7a06a29612056006e4dc01910c0b44e858583 ("batman-adv: use CRC32C instead of CRC16 in TT code")

---
 translation-table.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Applied in revision 3b0654e.

Thanks,
Marek

#3 lore raw
In reply to Antonio Quartulli
Quoted 6 lines · On Friday, May 24, 2013 23:25:28 Antonio Quartulli wrote:

Since the introduction of the tvlv_tt_data struct variables storing the number of TT changes are always declared as uint16_t, however some of them were not changed.

Switch them al to uint16_t.

Quoted 7 lines

Introduced by 8405301b979466610a726b7d595b6bfee5306cf7 ("batman-adv: tvlv - convert tt data sent within OGMs")

---
 translation-table.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Applied in revision 49d9c47.

Thanks,
Marek