Skip to content
Snippets Groups Projects
Commit 39e80d19 authored by Maxim Menshikov's avatar Maxim Menshikov
Browse files

Style improvements

parent 9854e296
No related branches found
No related tags found
No related merge requests found
Pipeline #114107 failed
...@@ -194,10 +194,11 @@ int agent_gen_dpp_bootstrapping_uri_notif(struct agent *a, ...@@ -194,10 +194,11 @@ int agent_gen_dpp_bootstrapping_uri_notif(struct agent *a,
int agent_gen_1905_encap_dpp_tlv(struct agent *a, struct cmdu_buff *frm, int agent_gen_1905_encap_dpp_tlv(struct agent *a, struct cmdu_buff *frm,
uint8_t *enrollee, uint8_t frametype, uint8_t *enrollee, uint8_t frametype,
uint16_t framelen, uint8_t *frame); uint16_t framelen, uint8_t *frame);
int agent_gen_profile2_error_code_tlv(struct agent *a, struct cmdu_buff *frm, int agent_gen_profile2_error_code_tlv(struct agent *a,
uint8_t reason, struct cmdu_buff *frm,
uint8_t bssid[6], uint8_t reason,
uint32_t spr_id, uint8_t bssid[6],
uint16_t qmid); uint32_t spr_id,
uint16_t qmid);
#endif #endif
#endif /* MAPAGENT_TLV_H */ #endif /* MAPAGENT_TLV_H */
/* /*
* rules.c - rules wrapper functions * qos.c - agent-side QoS implementation
* *
* Copyright (C) 2019 IOPSYS Software Solutions AB. All rights reserved. * Copyright (C) 2023 IOPSYS Software Solutions AB. All rights reserved.
* *
* Author: anjan.chanda@iopsys.eu * Author: maxim.menshikov@iopsys.eu
* *
*/ */
...@@ -232,10 +232,10 @@ dscp_pcp_conv_result dscp_pcp2qosmap(uint8_t dscp_pcp[64], ...@@ -232,10 +232,10 @@ dscp_pcp_conv_result dscp_pcp2qosmap(uint8_t dscp_pcp[64],
for (i = 0; i < total_du; ++i) { for (i = 0; i < total_du; ++i) {
char pair[TMP_BUF_LEN]; char pair[TMP_BUF_LEN];
/* /*
* No need for bounds check - result length can't exceed the buffer * No need for bounds check - result length can't exceed the buffer
* length * length
*/ */
sprintf(pair, "%d,%d,", dscp_up[i][0], dscp_up[i][1]); sprintf(pair, "%d,%d,", dscp_up[i][0], dscp_up[i][1]);
final_len += strlen(pair); final_len += strlen(pair);
if (final_len > qos_map_len) { if (final_len > qos_map_len) {
......
...@@ -14,10 +14,10 @@ ...@@ -14,10 +14,10 @@
void qos_rule_free(void *rule); void qos_rule_free(void *rule);
void qos_rule_free_all(struct list_head *list); void qos_rule_free_all(struct list_head *list);
int qos_add_dscp_rule(void *a, int qos_add_dscp_rule(void *a,
struct tlv_spr *spr, struct tlv_spr *spr,
struct ieee1905_dscp_pcp_usr *dscp_pcp); struct ieee1905_dscp_pcp_usr *dscp_pcp);
int qos_del_dscp_rule(void *a, int qos_del_dscp_rule(void *a,
struct tlv_spr *spr); struct tlv_spr *spr);
int qos_apply_dscp_rules(void *a); int qos_apply_dscp_rules(void *a);
int qos_sync_rules_to_nodes(void *agent); int qos_sync_rules_to_nodes(void *agent);
int qos_get_rules(void *a); int qos_get_rules(void *a);
......
...@@ -62,24 +62,24 @@ enum qos_rule_type { ...@@ -62,24 +62,24 @@ enum qos_rule_type {
/* Temporary rule structure which contains both SPR and DSCP parts */ /* Temporary rule structure which contains both SPR and DSCP parts */
typedef struct temp_rule { typedef struct temp_rule {
struct list_head list; /**< List head */ struct list_head list; /**< List head */
struct tlv_spr spr; /**< Service Prioritization Rule */ struct tlv_spr spr; /**< Service Prioritization Rule */
enum qos_rule_type type; /**< Rule Type */ enum qos_rule_type type; /**< Rule Type */
union { union {
struct ieee1905_dscp_pcp_usr dscp; /**< DSCP rule - valid only in struct ieee1905_dscp_pcp_usr dscp; /**< DSCP rule - valid only in
case of case of
QOS_RULE_TYPE_DSCP_PCP rule QOS_RULE_TYPE_DSCP_PCP rule
type */ type */
}; };
} temp_rule; } temp_rule;
/* DSCP-PCP -> hostapd format conversion results */ /* DSCP-PCP -> hostapd format conversion results */
typedef enum dscp_pcp_conv_result { typedef enum dscp_pcp_conv_result {
DSCP_PCP_CONV_RESULT_OK, /**< Conversion finished well */ DSCP_PCP_CONV_RESULT_OK, /**< Conversion finished well */
DSCP_PCP_CONV_RESULT_OK_TOO_MANY_EXC, /**< Conversion finished well, DSCP_PCP_CONV_RESULT_OK_TOO_MANY_EXC, /**< Conversion finished well,
but too many exceptions */ but too many exceptions */
DSCP_PCP_CONV_RESULT_TOO_LONG, /**< Too long result that didn't DSCP_PCP_CONV_RESULT_TOO_LONG, /**< Too long result that didn't
fit the output buffer */ fit the output buffer */
DSCP_PCP_CONV_RESULT_FAIL, /**< Failure producing QoS map */ DSCP_PCP_CONV_RESULT_FAIL, /**< Failure producing QoS map */
} dscp_pcp_conv_result; } dscp_pcp_conv_result;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment