Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e14ed976 authored by Alexei Avshalom Lazar's avatar Alexei Avshalom Lazar
Browse files

fst-manager: fix compilation warnings

1. change function signature of fst_get_peer_mbies
2. #include missing header in fst_manager.h

CRs-Fixed: 1097078

Change-Id: I5fd7ff769fd67d7c52e530fa7ebec25728b18d0d
parent 9e10495d
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -491,11 +491,10 @@ static int parse_peer_mbies(char *buf, void *data)
	return os_strlen(buf);
}

int fst_get_peer_mbies(struct fst_iface_info *iface, const uint8_t *peer,
		       char **mbies)
int fst_get_peer_mbies(const char *ifname, const uint8_t *peer, char **mbies)
{
	return do_command(parse_peer_mbies, mbies, FST_CMD_GET_PEER_MBIES " %s "
			  MACSTR, iface->name, MAC2STR(peer));
			  MACSTR, ifname, MAC2STR(peer));
}

static int iface_parser(char *str, void *data)
+2 −3
Original line number Diff line number Diff line
@@ -90,14 +90,13 @@ int fst_get_iface_peers(const struct fst_group_info *group,
/**
 * fst_get_peer_mbies - get the hexadecimal dump of the peer's MBIEs on a given
 * interface
 * @iface: FST interface info fst_get_group_ifaces()
 * @ifname: FST interface name
 * @peer:  The peer's MAC address
 * @mbies: The hexadecimal dump of the peer's MBIEs on the given interface
 *	if not NULL. The array should be freed by caller.
 * Returns: Number of allocated bytes if success or negative error code
 */
int fst_get_peer_mbies(struct fst_iface_info *iface, const uint8_t *peer,
		       char **mbies);
int fst_get_peer_mbies(const char *ifname, const uint8_t *peer, char **mbies);

/**
 * fst_get_group_ifaces - get interfaces for the provided group
+2 −2
Original line number Diff line number Diff line
@@ -586,7 +586,7 @@ static void _fst_mgr_peer_check_compliance(struct fst_mgr_peer *p)

	p->session->non_compliant = TRUE;
	_fst_peer_foreach_iface(p, pi) {
		if (fst_get_peer_mbies(&pi->iface->info,
		if (fst_get_peer_mbies(pi->iface->info.name,
			pi->addr, NULL) > 0) {
			p->session->non_compliant = FALSE;
			break;
@@ -793,7 +793,7 @@ static Boolean _fst_mgr_is_other_addr_in_mbies(struct fst_iface_info *info,
	int mbies_size;
	Boolean result = FALSE;

	str_mbies_size = fst_get_peer_mbies(info, addr, &str_mbies);
	str_mbies_size = fst_get_peer_mbies(info->name, addr, &str_mbies);
	if (str_mbies_size < 2 || str_mbies_size & 1)
		goto finish;

+1 −0
Original line number Diff line number Diff line
@@ -34,6 +34,7 @@
#define __FST_MANAGER_H__

#include "utils/common.h"
#include "common/ieee802_11_defs.h"

#ifndef FST_MGR_COMPONENT
#error "FST_MGR_COMPONENT has to be defined"
+1 −3
Original line number Diff line number Diff line
@@ -281,14 +281,12 @@ static int fst_dup_connection_sta(const struct rate_upgrade_group *g,
				  const char *iface, const u8* addr)
{
	int i;
	struct multi_band_ie *mbie;
	char *str_mbies = NULL;
	int str_mbies_size;
	int mbies_size;
	u8 *mbies = NULL, *mbies_iter;

	str_mbies_size = fst_get_peer_mbies(iface, addr,
					    &str_mbies);
	str_mbies_size = fst_get_peer_mbies(iface, addr, &str_mbies);
	if (str_mbies_size < 2 || str_mbies_size & 1) {
		fst_mgr_printf(MSG_INFO, "invalid mbies size %d",
			       str_mbies_size);