I suspect the problem is that the typedef for that struct is in a different file which the compiler is failing to include - but that's only a guess. If you want more than a guess, you need to post all of your code and the actual error message in its entirety.
You seem to be declaring a local variable stPacket with the same name as the function argument. The compiler may not complain about that, but I suggest it's probably not going to result in the behaviour you want.
PeterH is correct. The compiler may be pointing to the two lines that you show, but it is telling you that the problem is that something is expected BEFORE those lines, and that is where you are trying to declare a local variable with the same name as the function argument.