Skip to content

Commit 26166d1

Browse files
author
Arto Kinnunen
authored
Remove ns_sw_mac_packet_ingress_rate_limit_by_mem (ARMmbed#2132)
Functin ns_sw_mac_packet_ingress_rate_limit_by_mem is replaced by ns_conf_packet_ingress_rate_limit_by_mem and therefore removed from sw_mac.
1 parent 5305754 commit 26166d1

File tree

5 files changed

+4
-39
lines changed

5 files changed

+4
-39
lines changed

nanostack/sw_mac.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -88,15 +88,6 @@ extern int ns_sw_mac_statistics_start(struct mac_api_s *mac_api, struct mac_stat
8888
*/
8989
extern uint32_t ns_sw_mac_read_current_timestamp(struct mac_api_s *mac_api);
9090

91-
/**
92-
* @brief Limit amount of incoming packets if system does not have enough free memory.
93-
* Memory statistics must been initialized in nsdynmemLIB to get this feature working.
94-
*
95-
* @param free_heap_percentage Percentage of free heap that must be available when packet arrives to MAC layer.
96-
* @return 0 in case of success, <0 otherwise.
97-
*/
98-
extern int ns_sw_mac_packet_ingress_rate_limit_by_mem(uint8_t free_heap_percentage);
99-
10091
#ifdef __cplusplus
10192
}
10293
#endif

source/MAC/IEEE802_15_4/sw_mac.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2016-2019, Arm Limited and affiliates.
2+
* Copyright (c) 2016-2018, Arm Limited and affiliates.
33
* SPDX-License-Identifier: Apache-2.0
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -715,8 +715,3 @@ uint32_t ns_sw_mac_read_current_timestamp(struct mac_api_s *mac_api)
715715
mac_setup->dev_driver->phy_driver->extension(PHY_EXTENSION_GET_TIMESTAMP, (uint8_t *)&time_stamp_buffer);
716716
return time_stamp_buffer;
717717
}
718-
719-
int ns_sw_mac_packet_ingress_rate_limit_by_mem(uint8_t free_heap_percentage)
720-
{
721-
return mcps_packet_ingress_rate_limit_by_memory(free_heap_percentage);
722-
}

test/nanostack/unittest/mac/sw_mac/sw_mactest.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2016-2019, Arm Limited and affiliates.
2+
* Copyright (c) 2016-2018, Arm Limited and affiliates.
33
* SPDX-License-Identifier: Apache-2.0
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -114,8 +114,3 @@ TEST(sw_mac, test_ns_sw_mac_virtual_client_unregister)
114114
CHECK(test_ns_sw_mac_virtual_client_unregister());
115115
}
116116

117-
TEST(sw_mac, test_ns_sw_mac_packet_ingress_rate_limit_by_mem)
118-
{
119-
CHECK(test_ns_sw_mac_packet_ingress_rate_limit_by_mem());
120-
}
121-

test/nanostack/unittest/mac/sw_mac/test_sw_mac.c

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2016-2019, Arm Limited and affiliates.
2+
* Copyright (c) 2016-2018, Arm Limited and affiliates.
33
* SPDX-License-Identifier: Apache-2.0
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -477,20 +477,6 @@ bool test_ns_sw_mac_virtual_client_unregister()
477477
return true;
478478
}
479479

480-
bool test_ns_sw_mac_packet_ingress_rate_limit_by_mem()
481-
{
482-
int ret_val;
483-
484-
mac_mcps_sap_stub.int8_value = 0;
485-
486-
ret_val = ns_sw_mac_packet_ingress_rate_limit_by_mem(99);
487-
if (ret_val != 0) {
488-
return false;
489-
}
490-
491-
return true;
492-
}
493-
494480
bool test_mlme_req()
495481
{
496482
arm_device_driver_list_s list;

test/nanostack/unittest/mac/sw_mac/test_sw_mac.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2016-2019, Arm Limited and affiliates.
2+
* Copyright (c) 2016-2017, Arm Limited and affiliates.
33
* SPDX-License-Identifier: Apache-2.0
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -59,8 +59,6 @@ bool test_ns_sw_mac_virtual_client_unregister();
5959
// Test registering FHSS to software MAC
6060
bool test_ns_sw_mac_fhss_register();
6161

62-
bool test_ns_sw_mac_packet_ingress_rate_limit_by_mem();
63-
6462
#ifdef __cplusplus
6563
}
6664
#endif

0 commit comments

Comments
 (0)