diff options
author | Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> | 2009-10-04 18:22:36 +0000 |
---|---|---|
committer | Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> | 2009-10-04 18:22:36 +0000 |
commit | 0c860d2cd54bb16e52429f724150fd76e6728c40 (patch) | |
tree | 91021afcb12ccc42236a405d90196d56f2dfe0fa /plugins | |
parent | 199330559c6abc7336d85006d9bb381dedfaae0f (diff) |
Constify wimax_mac_calc_crc16()
svn path=/trunk/; revision=30313
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/wimax/crc.c | 2 | ||||
-rw-r--r-- | plugins/wimax/crc.h | 2 | ||||
-rw-r--r-- | plugins/wimax/msg_dlmap.c | 16 |
3 files changed, 10 insertions, 10 deletions
diff --git a/plugins/wimax/crc.c b/plugins/wimax/crc.c index 74b76b9c8c..0273371030 100644 --- a/plugins/wimax/crc.c +++ b/plugins/wimax/crc.c @@ -155,7 +155,7 @@ guint32 wimax_mac_calc_crc32(const guint8 *data, guint data_len) SIDE EFFECTS: */ -guint16 wimax_mac_calc_crc16(guint8 *data, guint data_len) +guint16 wimax_mac_calc_crc16(const guint8 *data, guint data_len) { guint32 crc=CRC16_INITIAL_VALUE; guint j; diff --git a/plugins/wimax/crc.h b/plugins/wimax/crc.h index 327f12e230..2e8f789f5a 100644 --- a/plugins/wimax/crc.h +++ b/plugins/wimax/crc.h @@ -41,7 +41,7 @@ void wimax_mac_gen_crc8_table(void); #endif guint32 wimax_mac_calc_crc32(const guint8 *data, guint data_len); -guint16 wimax_mac_calc_crc16(guint8 *data, guint data_len); +guint16 wimax_mac_calc_crc16(const guint8 *data, guint data_len); guint8 wimax_mac_calc_crc8 (guint8 *data, guint data_len); #endif /* CRC_H */ diff --git a/plugins/wimax/msg_dlmap.c b/plugins/wimax/msg_dlmap.c index 51bfbaf7ac..303f7051a2 100644 --- a/plugins/wimax/msg_dlmap.c +++ b/plugins/wimax/msg_dlmap.c @@ -550,7 +550,7 @@ gint DL_HARQ_IR_CTC_sub_burst_IE(proto_tree *diuc_tree, const guint8 *bufptr, gi data = BIT_BITS(bit, bufptr, 16); generic_item = proto_tree_add_text(tree, tvb, BITHI(bit,16), "CRC-16: 0x%04x",data); /* calculate the CRC */ - calculated_crc = wimax_mac_calc_crc16((guint8 *)tvb_get_ptr(tvb, 0, BIT_TO_BYTE(bit)), BIT_TO_BYTE(bit)); + calculated_crc = wimax_mac_calc_crc16(tvb_get_ptr(tvb, 0, BIT_TO_BYTE(bit)), BIT_TO_BYTE(bit)); if (data != calculated_crc) { proto_item_append_text(generic_item, " - incorrect! (should be: 0x%x)", calculated_crc); @@ -623,7 +623,7 @@ gint DL_HARQ_IR_CC_sub_burst_IE(proto_tree *diuc_tree, const guint8 *bufptr, gin data = BIT_BITS(bit, bufptr, 16); generic_item = proto_tree_add_text(tree, tvb, BITHI(bit,16), "CRC-16: 0x%04x",data); /* calculate the CRC */ - calculated_crc = wimax_mac_calc_crc16((guint8 *)tvb_get_ptr(tvb, 0, BIT_TO_BYTE(bit)), BIT_TO_BYTE(bit)); + calculated_crc = wimax_mac_calc_crc16(tvb_get_ptr(tvb, 0, BIT_TO_BYTE(bit)), BIT_TO_BYTE(bit)); if (data != calculated_crc) { proto_item_append_text(generic_item, " - incorrect! (should be: 0x%x)", calculated_crc); @@ -692,7 +692,7 @@ gint MIMO_DL_Chase_HARQ_sub_burst_IE(proto_tree *diuc_tree, const guint8 *bufptr data = BIT_BITS(bit, bufptr, 16); generic_item = proto_tree_add_text(tree, tvb, BITHI(bit,16), "CRC-16: 0x%04x",data); /* calculate the CRC */ - calculated_crc = wimax_mac_calc_crc16((guint8 *)tvb_get_ptr(tvb, 0, BIT_TO_BYTE(bit)), BIT_TO_BYTE(bit)); + calculated_crc = wimax_mac_calc_crc16(tvb_get_ptr(tvb, 0, BIT_TO_BYTE(bit)), BIT_TO_BYTE(bit)); if (data != calculated_crc) { proto_item_append_text(generic_item, " - incorrect! (should be: 0x%x)", calculated_crc); @@ -755,7 +755,7 @@ gint MIMO_DL_IR_HARQ_sub_burst_IE(proto_tree *diuc_tree, const guint8 *bufptr, g data = BIT_BITS(bit, bufptr, 16); generic_item = proto_tree_add_text(tree, tvb, BITHI(bit,16), "CRC-16: 0x%04x",data); /* calculate the CRC */ - calculated_crc = wimax_mac_calc_crc16((guint8 *)tvb_get_ptr(tvb, 0, BIT_TO_BYTE(bit)), BIT_TO_BYTE(bit)); + calculated_crc = wimax_mac_calc_crc16(tvb_get_ptr(tvb, 0, BIT_TO_BYTE(bit)), BIT_TO_BYTE(bit)); if (data != calculated_crc) { proto_item_append_text(generic_item, " - incorrect! (should be: 0x%x)", calculated_crc); @@ -819,7 +819,7 @@ gint MIMO_DL_IR_HARQ_for_CC_sub_burst_IE(proto_tree *diuc_tree, const guint8 *bu data = BIT_BITS(bit, bufptr, 16); generic_item = proto_tree_add_text(tree, tvb, BITHI(bit,16), "CRC-16: 0x%04x",data); /* calculate the CRC */ - calculated_crc = wimax_mac_calc_crc16((guint8 *)tvb_get_ptr(tvb, 0, BIT_TO_BYTE(bit)), BIT_TO_BYTE(bit)); + calculated_crc = wimax_mac_calc_crc16(tvb_get_ptr(tvb, 0, BIT_TO_BYTE(bit)), BIT_TO_BYTE(bit)); if (data != calculated_crc) { proto_item_append_text(generic_item, " - incorrect! (should be: 0x%x)", calculated_crc); @@ -881,7 +881,7 @@ gint MIMO_DL_STC_HARQ_sub_burst_IE(proto_tree *diuc_tree, const guint8 *bufptr, data = BIT_BITS(bit, bufptr, 16); generic_item = proto_tree_add_text(tree, tvb, BITHI(bit,16), "CRC-16: 0x%04x",data); /* calculate the CRC */ - calculated_crc = wimax_mac_calc_crc16((guint8 *)tvb_get_ptr(tvb, 0, BIT_TO_BYTE(bit)), BIT_TO_BYTE(bit)); + calculated_crc = wimax_mac_calc_crc16(tvb_get_ptr(tvb, 0, BIT_TO_BYTE(bit)), BIT_TO_BYTE(bit)); if (data != calculated_crc) { proto_item_append_text(generic_item, " - incorrect! (should be: 0x%x)", calculated_crc); @@ -2268,7 +2268,7 @@ gint wimax_decode_sub_dl_ul_map(tvbuff_t *tvb, packet_info *pinfo, proto_tree *b data = NIB_WORD(nib, bufptr); generic_item = proto_tree_add_text(tree, tvb, NIBHI(nib,4), "CRC-16: 0x%04x",data); /* calculate the CRC */ - calculated_crc = wimax_mac_calc_crc16((guint8 *)tvb_get_ptr(tvb, 0, NIB_TO_BYTE(nib)), NIB_TO_BYTE(nib)); + calculated_crc = wimax_mac_calc_crc16(tvb_get_ptr(tvb, 0, NIB_TO_BYTE(nib)), NIB_TO_BYTE(nib)); if (data != calculated_crc) { proto_item_append_text(generic_item, " - incorrect! (should be: 0x%x)", calculated_crc); @@ -2397,7 +2397,7 @@ gint wimax_decode_dlmap_reduced_aas(tvbuff_t *tvb, packet_info *pinfo, proto_tre data = BIT_BITS(bit, bufptr, 16); generic_item = proto_tree_add_text(tree, tvb, BITHI(bit,16), "CRC-16: 0x%04x",data); /* calculate the CRC */ - calculated_crc = wimax_mac_calc_crc16((guint8 *)tvb_get_ptr(tvb, 0, BIT_TO_BYTE(bit)), BIT_TO_BYTE(bit)); + calculated_crc = wimax_mac_calc_crc16(tvb_get_ptr(tvb, 0, BIT_TO_BYTE(bit)), BIT_TO_BYTE(bit)); if (data != calculated_crc) { proto_item_append_text(generic_item, " - incorrect! (should be: 0x%x)", calculated_crc); |