const parameter to a function doesn't define what can be passed. It is, instead, a "promise" by the function that it will not modify the data you pass it.
In C when you pass a "string" (which is actually an array of characters) to a function you don't actually pass the string (as in the content). You really just pass a pointer to the location in memory where the string is stored.
It is perfectly possible for a function to then make modifications to that passed "string", which will be modifying the original data in memory. That is not really desirable in many situations.
So by flagging the parameter as
const you tell the compiler "From this moment onwards the data pointed to by this variable must not be changed". All attempts to write to the memory using that variable will be blocked by the compiler.
There's no actual difference between, say, a
char * and a
const char * other than how the compiler treats attempts to write to them.
When you pass a
char * to a function that is expecting a
const char * the pointer is "upgraded" to a constant so that no attempts to change the data will be allowed.
The converse is not allowed though - you can't (or shouldn't) try and convert a
const char * to a
char * as on some systems ("Princeton" architecture systems with a single monolithic memory address space) the pointer could be pointing to data stored in flash, and an attempt to write to that will obviously fail.
The function you are calling to set the SSID is merely promising that it won't attempt to change the data you pass it. It doesn't matter if it's a constant or not - both will be treated as a constant and not be changed.