|
@@ -10272,11 +10272,49 @@ static uint8_t tdls_get_wmi_offchannel_mode(uint8_t tdls_sw_mode)
|
|
|
}
|
|
|
return off_chan_mode;
|
|
|
}
|
|
|
+
|
|
|
+/**
|
|
|
+ * tdls_get_wmi_offchannel_bw - Get WMI tdls off channel Bandwidth
|
|
|
+ * @tdls_sw_mode: tdls_sw_mode
|
|
|
+ *
|
|
|
+ * This function returns wmi tdls offchannel bandwidth
|
|
|
+ *
|
|
|
+ * Return: TDLS offchannel bandwidth
|
|
|
+ */
|
|
|
+static uint8_t tdls_get_wmi_offchannel_bw(uint16_t tdls_off_ch_bw_offset)
|
|
|
+{
|
|
|
+ uint8_t off_chan_bw;
|
|
|
+
|
|
|
+ switch (tdls_off_ch_bw_offset) {
|
|
|
+ case BW20:
|
|
|
+ off_chan_bw = WMI_TDLS_OFFCHAN_20MHZ;
|
|
|
+ break;
|
|
|
+ case BW40_LOW_PRIMARY:
|
|
|
+ case BW40_HIGH_PRIMARY:
|
|
|
+ off_chan_bw = WMI_TDLS_OFFCHAN_40MHZ;
|
|
|
+ break;
|
|
|
+ case BW80:
|
|
|
+ off_chan_bw = WMI_TDLS_OFFCHAN_80MHZ;
|
|
|
+ case BWALL:
|
|
|
+ off_chan_bw = WMI_TDLS_OFFCHAN_160MHZ;
|
|
|
+ default:
|
|
|
+ WMI_LOGD(FL("unknown tdls_offchannel bw offset %d"),
|
|
|
+ off_chan_bw);
|
|
|
+ off_chan_bw = WMI_TDLS_OFFCHAN_20MHZ;
|
|
|
+ }
|
|
|
+ return off_chan_bw;
|
|
|
+}
|
|
|
+
|
|
|
#else
|
|
|
static uint8_t tdls_get_wmi_offchannel_mode(uint8_t tdls_sw_mode)
|
|
|
{
|
|
|
return WMI_TDLS_DISABLE_OFFCHANNEL;
|
|
|
}
|
|
|
+
|
|
|
+static uint8_t tdls_get_wmi_offchannel_bw(uint16_t tdls_off_ch_bw_offset)
|
|
|
+{
|
|
|
+ return WMI_TDLS_OFFCHAN_20MHZ;
|
|
|
+}
|
|
|
#endif
|
|
|
|
|
|
/**
|
|
@@ -10314,7 +10352,9 @@ static QDF_STATUS send_set_tdls_offchan_mode_cmd_tlv(wmi_unified_t wmi_handle,
|
|
|
tdls_get_wmi_offchannel_mode(chan_switch_params->tdls_sw_mode);
|
|
|
cmd->is_peer_responder = chan_switch_params->is_responder;
|
|
|
cmd->offchan_num = chan_switch_params->tdls_off_ch;
|
|
|
- cmd->offchan_bw_bitmap = chan_switch_params->tdls_off_ch_bw_offset;
|
|
|
+ cmd->offchan_bw_bitmap =
|
|
|
+ tdls_get_wmi_offchannel_bw(
|
|
|
+ chan_switch_params->tdls_off_ch_bw_offset);
|
|
|
cmd->offchan_oper_class = chan_switch_params->oper_class;
|
|
|
|
|
|
WMI_LOGD(FL("Peer MAC Addr mac_addr31to0: 0x%x, mac_addr47to32: 0x%x"),
|