-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RDKB-58602: MultiVAP related changes #80
Closed
Closed
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"_comment": [ | ||
"This is a sample JSON configuration for Backhaul configuration to be read for Mesh Sta" | ||
], | ||
"Backhaul_SSID": "XFSETUP-433C", | ||
"Backhaul_KeyPassphrase": "cactus9246fancy" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
{ | ||
"_comment": [ | ||
"This is a sample JSON configuration for Raspberry PI with below assumptions:", | ||
" 1) External USB wifi adapter being used is Canakit usb wifi adapter, which supports 8 2.4G VAPs.", | ||
" Link: https://www.canakit.com/raspberry-pi-wifi.html", | ||
" 2) Interfaces specified in InterfaceName have already been created seperately and", | ||
" this file is only providing the interface mapping associated for that interface.", | ||
" 3) Built in Wifi of Rpi is using interface wlan0.", | ||
"Some details on the outline of the elements:", | ||
"PhyList is an array of phys supported on device with Index specifying the actual phy index.", | ||
"Each phy has an array of RadioList which depicts the radios supported on that phy.", | ||
"The index in the RadioList specifies the radio type 0 means 2.4G, 1 means 5G and 2 means 6G.", | ||
"The RadioName in the RadioList specifies the primary interface associate with that radio.", | ||
"The fields in InterfaceList is self-explanatory with vapName specifying the type of VAP." | ||
], | ||
"PhyList": [ | ||
{ | ||
"Index": 0, | ||
"RadioList": [ | ||
{ | ||
"Index": 1, | ||
"RadioName": "wlan0", | ||
"InterfaceList": [ | ||
{ | ||
"InterfaceName": "wlan0", | ||
"Bridge": "brlan0", | ||
"vlanId": 0, | ||
"vapIndex": 1, | ||
"vapName": "private_ssid_5g" | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
{ | ||
"Index": 1, | ||
"RadioList": [ | ||
{ | ||
"Index": 0, | ||
"RadioName": "wlan1", | ||
"InterfaceList": [ | ||
{ | ||
"InterfaceName": "wlan1.1", | ||
"Bridge": "brlan0", | ||
"vlanId": 0, | ||
"vapIndex": 2, | ||
"vapName": "private_ssid_2g" | ||
}, | ||
{ | ||
"InterfaceName": "wlan1.2", | ||
"Bridge": "brlan0", | ||
"vlanId": 0, | ||
"vapIndex": 3, | ||
"vapName": "iot_ssid_2g" | ||
}, | ||
{ | ||
"InterfaceName": "wlan1.3", | ||
"Bridge": "brlan0", | ||
"vlanId": 0, | ||
"vapIndex": 4, | ||
"vapName": "lnf_psk_2g" | ||
}, | ||
{ | ||
"InterfaceName": "wlan1.4", | ||
"Bridge": "brlan0", | ||
"vlanId": 0, | ||
"vapIndex": 5, | ||
"vapName": "mesh_backhaul_2g" | ||
}, | ||
{ | ||
"InterfaceName": "wlan1", | ||
"Bridge": "brlan0", | ||
"vlanId": 0, | ||
"vapIndex": 0, | ||
"vapName": "mesh_sta_2g" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/bin/sh | ||
|
||
#This file creates virtual interfaces on the primary interface passed in argument#1 | ||
#The number of interfaces created is specified in argument#2. | ||
|
||
#check whether number of input argument is 2 | ||
if [ $# -ne 2 ]; then | ||
echo "Usage: $0 <primary_interface> <number_of_interfaces>" | ||
exit 1 | ||
fi | ||
|
||
primary_intf=$1 | ||
num_intf=$2 | ||
|
||
#check if primary interface exists before proceeding | ||
if [ ! -e "/sys/class/net/$primary_intf" ]; then | ||
echo "Error: Primary interface $primary_intf does not exist" | ||
exit 1 | ||
fi | ||
|
||
# Create virtual interfaces | ||
for i in $(seq 1 $num_intf); do | ||
virtual_intf="${primary_intf}.$i" | ||
sudo iw dev "$primary_intf" interface add "$virtual_intf" type managed | ||
if [ -e "/sys/class/net/$virtual_intf" ]; then | ||
echo "Created virtual interface: $virtual_intf" | ||
sudo ifconfig "$virtual_intf" down | ||
else | ||
echo "Error: Unable to create virtual interface: $virtual_intf" | ||
exit 1 | ||
fi | ||
done | ||
|
||
echo "Created $num_intf virtual interfaces based on $primary_intf" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
plan to dynamically generate ssid/pwd in future