Skip to content

Commit 6770a08

Browse files
authored
Merge pull request #242 from pganna856/RDKBACCL_870
RDKBACCL-870: Integrating "gw-lan-refresh" utility for banana pi
2 parents fdbda23 + b63cf04 commit 6770a08

File tree

3 files changed

+71
-0
lines changed

3 files changed

+71
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
SUMMARY = "GW LAN Refresh application for refreshing the LAN clients"
2+
3+
LICENSE = "Apache-2.0"
4+
LIC_FILES_CHKSUM = "file://LICENSE;md5=175792518e4ac015ab6696d16c4f607e"
5+
6+
7+
# Fetch the source code
8+
SRC_URI = "git://github.com/rdkcentral/broadband-utils.git;protocol=https;branch=develop"
9+
10+
SRCREV = "8dc573c6b82ba5e164cf1287d4ab5c659bd38641"
11+
12+
S = "${WORKDIR}/git"
13+
14+
DEPENDS = "rdkb-halif-ethsw hal-ethsw rbus"
15+
16+
17+
LDFLAGS = " -lrbus -lhal_ethsw"
18+
CFLAGS = " \
19+
-I${STAGING_INCDIR}/rbus \
20+
-I${STAGING_INCDIR}/ccsp \
21+
"
22+
23+
do_compile() {
24+
${CC} ${S}/gw-lan-refresh/source/*.c ${LDFLAGS} ${CFLAGS} -o gw_lan_refresh
25+
}
26+
27+
do_install() {
28+
# Create all directories first
29+
install -d ${D}${bindir}
30+
install -m 0755 gw_lan_refresh ${D}${bindir}/gw_lan_refresh
31+
}
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
Source: Prabhudas Gannavarapu <[email protected]>
2+
Subject: Adding HAL changes for gw_lan_refresh application for Banana Pi R4
3+
4+
Index: ethsw/rdkb_hal/src/ethsw/ccsp_hal_ethsw.c
5+
===================================================================
6+
--- ethsw.orig/rdkb_hal/src/ethsw/ccsp_hal_ethsw.c
7+
+++ ethsw/rdkb_hal/src/ethsw/ccsp_hal_ethsw.c
8+
@@ -630,20 +634,9 @@ CcspHalEthSwSetPortAdminStatus
9+
10+
char cmd1[32] = {0};
11+
char cmd2[32] = {0};
12+
- char interface[8] = {0};
13+
- char path[32] = {0};
14+
-
15+
- strcpy(path,"/sys/class/net/eth1");
16+
-
17+
- int eth_if=is_interface_exists(path);
18+
-
19+
- if(eth_if == 0 )
20+
- return RETURN_ERR;
21+
-
22+
- strcpy(interface,"eth1");
23+
24+
- sprintf(cmd1,"ip link set %s up",interface);
25+
- sprintf(cmd2,"ip link set %s down",interface);
26+
+ sprintf(cmd1,"ip link set lan%d up",PortId);
27+
+ sprintf(cmd2,"ip link set lan%d down",PortId);
28+
29+
switch (PortId)
30+
{
31+
@@ -661,7 +654,7 @@ CcspHalEthSwSetPortAdminStatus
32+
}
33+
else
34+
{
35+
- //system(cmd2);
36+
+ system(cmd2);
37+
admin_status=1;
38+
}
39+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
22
CFLAGS_append += " -D_PLATFORM_BANANAPI_R4_ "
33
SRC_URI_append += "file://Add_interface_Changes.patch"
4+
SRC_URI_append += "file://gw_lan_refresh.patch"

0 commit comments

Comments
 (0)