Add ieee80211ac ieee80211n

This commit is contained in:
Lakindu Akash 2020-11-14 05:06:57 +05:30
parent e07d175ea5
commit f3f013d12f
No known key found for this signature in database
GPG Key ID: 87D9889F7A634A38
5 changed files with 72 additions and 0 deletions

View File

@ -388,6 +388,38 @@
<property name="height">2</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="cb_ieee80211n">
<property name="label" translatable="yes">IEEE80211n</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">8</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="cb_ieee80211ac">
<property name="label" translatable="yes">IEEE80211ac</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="left_attach">2</property>
<property name="top_attach">8</property>
</packing>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>

View File

@ -122,6 +122,14 @@ const char *build_wh_mkconfig_command(ConfigValues* cv){
strcat(cmd_mkconfig,cv->channel);
}
if(cv->ieee80211n!=NULL && (strcmp(cv->ieee80211n,"1") == 0)){
strcat(cmd_mkconfig," --ieee80211n ");
}
if(cv->ieee80211ac!=NULL && (strcmp(cv->ieee80211ac,"1") == 0)){
strcat(cmd_mkconfig," --ieee80211ac ");
}
if(cv->mac!=NULL) {
strcat(cmd_mkconfig, " --mac ");
strcat(cmd_mkconfig, cv->mac);

View File

@ -122,6 +122,12 @@ static void setConfigValues(const char * key, char *value){
if( !strcmp ( MAC_FILTER_ACCEP, key ))
configValues.accepted_mac_file = value;
if( !strcmp ( IEEE80211N, key ))
configValues.ieee80211n = value;
if( !strcmp ( IEEE80211AC, key ))
configValues.ieee80211ac = value;
}

View File

@ -88,6 +88,8 @@ typedef struct{
char *mac_filter;
char *accepted_mac_file;
char *accepted_macs;
char *ieee80211n;
char *ieee80211ac;
} ConfigValues;

View File

@ -78,6 +78,8 @@ GtkCheckButton *cb_novirt;
GtkCheckButton *cb_channel;
GtkCheckButton *cb_open;
GtkCheckButton *cb_mac_filter;
GtkCheckButton *cb_ieee80211n;
GtkCheckButton *cb_ieee80211ac;
GtkProgressBar *progress_bar;
@ -370,6 +372,8 @@ int initUi(int argc, char *argv[]){
cb_channel = (GtkCheckButton *) gtk_builder_get_object(builder, "cb_channel");
cb_open = (GtkCheckButton *) gtk_builder_get_object(builder, "cb_open");
cb_mac_filter = (GtkCheckButton *) gtk_builder_get_object(builder, "cb_mac_filter");
cb_ieee80211n = (GtkCheckButton *) gtk_builder_get_object(builder, "cb_ieee80211n");
cb_ieee80211ac= (GtkCheckButton *) gtk_builder_get_object(builder, "cb_ieee80211ac");
rb_freq_auto = (GtkRadioButton *) gtk_builder_get_object(builder, "rb_freq_auto");
rb_freq_2 = (GtkRadioButton *) gtk_builder_get_object(builder, "rb_freq_2");
@ -459,6 +463,16 @@ void init_ui_from_config(){
gtk_toggle_button_set_active((GtkToggleButton*) cb_psk,TRUE);
}
if(strcmp(values->ieee80211n,"1")==0){
gtk_toggle_button_set_active((GtkToggleButton*) cb_ieee80211n,TRUE);
}
if(strcmp(values->ieee80211ac,"1")==0){
gtk_toggle_button_set_active((GtkToggleButton*) cb_ieee80211ac,TRUE);
}
if(strcmp(values->channel,"")!=0 && strcmp(values->channel,"default")!=0){
gtk_toggle_button_set_active((GtkToggleButton*) cb_channel,TRUE);
gtk_entry_set_text(entry_channel,values->channel);
@ -801,6 +815,16 @@ static int init_config_val_input(ConfigValues* cv){
else
cv->use_psk =NULL;
if(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(cb_ieee80211n)))
cv->ieee80211n = "1";
else
cv->ieee80211n =NULL;
if(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(cb_ieee80211ac)))
cv->ieee80211ac = "1";
else
cv->ieee80211ac =NULL;
if(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(cb_mac_filter))){
cv->mac_filter = "1";